├── .prettierignore ├── .npmrc ├── .github ├── FUNDING.yml ├── pr-labeler.yml ├── changeset-version.js └── workflows │ └── release.yml ├── packages ├── media │ ├── src │ │ ├── index.tsx │ │ └── video │ │ │ └── types.ts │ ├── rollup.config.js │ ├── tsconfig.json │ ├── package.json │ └── README.md ├── auth │ ├── plugin │ │ ├── pridepack.json │ │ ├── tsconfig.json │ │ ├── src │ │ │ ├── compiler │ │ │ │ └── index.ts │ │ │ └── index.ts │ │ └── README.md │ └── solid │ │ ├── locals.d.ts │ │ ├── rollup.config.js │ │ ├── README.md │ │ ├── .eslintrc.json │ │ ├── .gitignore │ │ ├── tsconfig.build.json │ │ ├── tsconfig.json │ │ └── scripts │ │ └── postbuild.js ├── forms │ ├── plugin │ │ ├── pridepack.json │ │ ├── src │ │ │ ├── compiler │ │ │ │ └── index.ts │ │ │ └── index.ts │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ └── tsconfig.json │ └── solid │ │ ├── src │ │ ├── utils │ │ │ ├── index.ts │ │ │ ├── helpers.ts │ │ │ └── components.tsx │ │ └── error.ts │ │ ├── tsup.config.ts │ │ ├── tsconfig.json │ │ └── package.json ├── prpc │ ├── plugin │ │ ├── pridepack.json │ │ ├── tsconfig.json │ │ ├── README.md │ │ └── src │ │ │ └── compiler │ │ │ └── index.ts │ ├── tests │ │ ├── src │ │ │ ├── caller │ │ │ │ ├── withImport.ts │ │ │ │ ├── withMw.ts │ │ │ │ ├── withMw.output.js │ │ │ │ ├── withImport.output.js │ │ │ │ ├── wrapImport.ts │ │ │ │ ├── moreWrap.ts │ │ │ │ └── wrapImport.output.js │ │ │ ├── server │ │ │ │ ├── user │ │ │ │ │ └── user.queries.ts │ │ │ │ ├── hello │ │ │ │ │ └── hello.queries.ts │ │ │ │ ├── authpc.ts │ │ │ │ └── auth.ts │ │ │ ├── caller.test.ts │ │ │ └── utils │ │ │ │ └── createTest.ts │ │ ├── tsconfig.json │ │ └── package.json │ └── solid │ │ ├── src │ │ ├── createAction.ts │ │ ├── index.ts │ │ └── error.ts │ │ ├── .eslintrc.json │ │ ├── tsup.config.ts │ │ ├── .gitignore │ │ └── tsconfig.json ├── routetypes │ ├── pridepack.json │ ├── README.md │ ├── src │ │ ├── test.d.ts │ │ ├── compiler │ │ │ ├── index.ts │ │ │ └── utils.ts │ │ └── utils.ts │ └── tsconfig.json ├── authpc │ ├── plugin │ │ └── README.md │ └── solid │ │ └── README.md ├── shared │ ├── README.md │ ├── src │ │ ├── index.ts │ │ ├── solid.ts │ │ └── utils.ts │ ├── rollup.config.js │ ├── tsconfig.json │ ├── package.json │ └── CHANGELOG.md ├── log │ ├── .gitignore │ ├── src │ │ ├── compiler │ │ │ └── utils.ts │ │ └── index.tsx │ ├── tsconfig.json │ ├── tsup.config.ts │ ├── CHANGELOG.md │ └── package.json └── og │ ├── tests │ ├── fixtures │ │ ├── solid-start │ │ │ ├── variables │ │ │ │ ├── code.js │ │ │ │ └── output.js │ │ │ ├── custom-image-options │ │ │ │ ├── code.js │ │ │ │ └── output.js │ │ │ ├── multiple-children │ │ │ │ ├── code.js │ │ │ │ └── output.js │ │ │ ├── exclude-static │ │ │ │ ├── code.js │ │ │ │ └── output.js │ │ │ ├── basic │ │ │ │ ├── code.js │ │ │ │ └── output.js │ │ │ ├── partially-dynamic-object │ │ │ │ ├── code.js │ │ │ │ └── output.js │ │ │ └── realistic-styles │ │ │ │ ├── code.js │ │ │ │ └── output.js │ │ └── tanstack-start │ │ │ └── basic │ │ │ ├── code.js │ │ │ └── output.js │ └── compiler.test.ts │ ├── tsconfig.json │ ├── tsup.config.ts │ ├── src │ ├── index.tsx │ ├── compiler │ │ └── index.ts │ └── unplugin │ │ └── index.ts │ ├── README.md │ └── package.json ├── docs ├── src │ ├── global.d.ts │ ├── entry-client.tsx │ ├── routes │ │ ├── [...404].mdx │ │ ├── packages │ │ │ ├── prpc │ │ │ │ ├── redirect.mdx │ │ │ │ ├── error.mdx │ │ │ │ ├── response.mdx │ │ │ │ ├── error-handling.mdx │ │ │ │ └── optimistic.mdx │ │ │ ├── forms │ │ │ │ └── install.mdx │ │ │ ├── og │ │ │ │ ├── opengraph.mdx │ │ │ │ ├── install.mdx │ │ │ │ └── DynamicImageExample.tsx │ │ │ ├── index.mdx │ │ │ └── log │ │ │ │ ├── install.mdx │ │ │ │ └── log.mdx │ │ ├── sponsors.mdx │ │ ├── contributors.mdx │ │ └── index.mdx │ ├── app.tsx │ └── entry-server.tsx ├── public │ └── favicon.ico ├── .gitignore ├── tsconfig.json ├── package.json └── README.md ├── examples ├── prpc-clerk │ ├── src │ │ ├── server │ │ │ └── auth.ts │ │ ├── app.css │ │ ├── entry-client.tsx │ │ ├── use │ │ │ ├── file1.ts │ │ │ ├── use2.ts │ │ │ ├── file2.ts │ │ │ ├── test.ts │ │ │ └── use.ts │ │ ├── middleware.ts │ │ ├── entry-server.tsx │ │ ├── app.tsx │ │ └── routes │ │ │ └── index.tsx │ ├── public │ │ └── favicon.ico │ ├── postcss.config.cjs │ ├── tailwind.config.cjs │ ├── .gitignore │ ├── .eslintrc.json │ ├── app.config.ts │ ├── README.MD │ ├── tsconfig.json │ └── package.json ├── log │ ├── src │ │ ├── global.d.ts │ │ ├── entry-client.tsx │ │ ├── routes │ │ │ ├── [...404].tsx │ │ │ └── index.tsx │ │ ├── app.tsx │ │ ├── entry-server.tsx │ │ └── app.css │ ├── public │ │ └── favicon.ico │ ├── app.config.ts │ ├── .gitignore │ ├── tsconfig.json │ ├── package.json │ └── README.md ├── og │ ├── src │ │ ├── global.d.ts │ │ ├── entry-client.tsx │ │ ├── routes │ │ │ ├── test2.tsx │ │ │ ├── [...404].tsx │ │ │ ├── data-fetching.tsx │ │ │ └── solidbase.tsx │ │ ├── app.tsx │ │ ├── entry-server.tsx │ │ └── app.css │ ├── public │ │ └── favicon.ico │ ├── app.config.ts │ ├── .gitignore │ ├── tsconfig.json │ ├── package.json │ └── README.md ├── README.md ├── auth │ ├── src │ │ ├── app.css │ │ ├── utils │ │ │ └── string.ts │ │ ├── entry-client.tsx │ │ ├── routes │ │ │ ├── api │ │ │ │ └── auth │ │ │ │ │ └── [...solidauth].ts │ │ │ ├── test2.tsx │ │ │ ├── test.tsx │ │ │ ├── auth │ │ │ │ └── [provider].tsx │ │ │ ├── loader.tsx │ │ │ ├── protected.tsx │ │ │ └── discord.tsx │ │ ├── middleware.ts │ │ ├── entry-server.tsx │ │ ├── app.tsx │ │ └── server │ │ │ └── auth.ts │ ├── .env.example │ ├── public │ │ └── favicon.ico │ ├── postcss.config.cjs │ ├── env.d.ts │ ├── tailwind.config.cjs │ ├── .gitignore │ ├── .eslintrc.json │ ├── tsconfig.json │ ├── app.config.ts │ ├── README.MD │ └── package.json ├── forms │ ├── src │ │ ├── app.css │ │ ├── entry-client.tsx │ │ ├── app.tsx │ │ ├── entry-server.tsx │ │ └── routes │ │ │ └── field.tsx │ ├── public │ │ └── favicon.ico │ ├── postcss.config.cjs │ ├── tailwind.config.cjs │ ├── app.config.ts │ ├── .gitignore │ ├── .eslintrc.json │ ├── tsconfig.json │ ├── README.MD │ └── package.json ├── media │ ├── src │ │ ├── app.css │ │ ├── entry-client.tsx │ │ ├── app.tsx │ │ ├── entry-server.tsx │ │ └── routes │ │ │ └── index.tsx │ ├── public │ │ └── favicon.ico │ ├── app.config.ts │ ├── postcss.config.cjs │ ├── .vinxi │ │ └── build │ │ │ └── ssr │ │ │ ├── assets │ │ │ ├── onig-fd885c2d.wasm │ │ │ └── createVideo-88738752.js │ │ │ ├── index.js │ │ │ ├── page.js │ │ │ └── manifest.json │ ├── tailwind.config.cjs │ ├── .gitignore │ ├── .eslintrc.json │ ├── tsconfig.json │ ├── README.MD │ └── package.json ├── prpc │ ├── src │ │ ├── app.css │ │ ├── entry-client.tsx │ │ ├── use │ │ │ ├── test2.ts │ │ │ ├── file1.ts │ │ │ ├── use2.ts │ │ │ ├── file2.ts │ │ │ ├── test.ts │ │ │ └── use.ts │ │ ├── routes │ │ │ ├── api │ │ │ │ └── auth │ │ │ │ │ └── [...solidauth].ts │ │ │ ├── async.tsx │ │ │ └── index.tsx │ │ ├── server │ │ │ └── auth.ts │ │ ├── entry-server.tsx │ │ └── app.tsx │ ├── public │ │ └── favicon.ico │ ├── postcss.config.cjs │ ├── tailwind.config.cjs │ ├── .gitignore │ ├── .eslintrc.json │ ├── app.config.ts │ ├── README.MD │ ├── tsconfig.json │ └── package.json ├── jd-prpc │ ├── src │ │ ├── app.css │ │ ├── entry-client.tsx │ │ ├── routes │ │ │ └── api │ │ │ │ └── auth │ │ │ │ └── [...solidauth].ts │ │ ├── server │ │ │ ├── user │ │ │ │ └── user.queries.ts │ │ │ ├── hello │ │ │ │ └── hello.queries.ts │ │ │ ├── db.ts │ │ │ ├── prpc.ts │ │ │ └── auth.ts │ │ ├── middleware.ts │ │ ├── entry-server.tsx │ │ └── app.tsx │ ├── prisma │ │ ├── db.sqlite │ │ └── schema.prisma │ ├── public │ │ └── favicon.ico │ ├── postcss.config.cjs │ ├── tailwind.config.cjs │ ├── .env.example │ ├── .gitignore │ ├── .eslintrc.json │ ├── tsconfig.json │ ├── app.config.ts │ ├── README.MD │ └── package.json └── routetypes │ ├── src │ ├── app.css │ ├── routes │ │ ├── test.tsx │ │ └── index.tsx │ ├── entry-client.tsx │ ├── app.tsx │ └── entry-server.tsx │ ├── postcss.config.cjs │ ├── tailwind.config.cjs │ ├── app.config.ts │ ├── test.d.ts │ ├── .gitignore │ ├── .eslintrc.json │ ├── README.MD │ ├── tsconfig.json │ └── package.json ├── pnpm-workspace.yaml ├── .prettierrc ├── tsconfig.json ├── .eslintignore ├── tsconfig.base.json ├── README.MD ├── .changeset ├── README.md └── config.json ├── turbo.json ├── .gitignore ├── rollup.config.js ├── .eslintrc.cjs └── package.json /.prettierignore: -------------------------------------------------------------------------------- 1 | **/tests/* -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | auto-install-peers=true 2 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: [orjdev] 2 | -------------------------------------------------------------------------------- /packages/media/src/index.tsx: -------------------------------------------------------------------------------- 1 | export * from './video/createVideo' 2 | -------------------------------------------------------------------------------- /.github/pr-labeler.yml: -------------------------------------------------------------------------------- 1 | '🔒 core': 2 | - any: ['packages/core/**'] 3 | -------------------------------------------------------------------------------- /docs/src/global.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /examples/prpc-clerk/src/server/auth.ts: -------------------------------------------------------------------------------- 1 | export const authOpts = {} 2 | -------------------------------------------------------------------------------- /packages/auth/plugin/pridepack.json: -------------------------------------------------------------------------------- 1 | { 2 | "target": "es2017" 3 | } 4 | -------------------------------------------------------------------------------- /packages/forms/plugin/pridepack.json: -------------------------------------------------------------------------------- 1 | { 2 | "target": "es2017" 3 | } 4 | -------------------------------------------------------------------------------- /packages/prpc/plugin/pridepack.json: -------------------------------------------------------------------------------- 1 | { 2 | "target": "es2017" 3 | } 4 | -------------------------------------------------------------------------------- /packages/routetypes/pridepack.json: -------------------------------------------------------------------------------- 1 | { 2 | "target": "es2017" 3 | } 4 | -------------------------------------------------------------------------------- /examples/log/src/global.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /examples/og/src/global.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /examples/README.md: -------------------------------------------------------------------------------- 1 | ### Examples 2 | 3 | Examples app for testing MediaKit in this monorepo 4 | -------------------------------------------------------------------------------- /examples/auth/src/app.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | -------------------------------------------------------------------------------- /examples/forms/src/app.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | -------------------------------------------------------------------------------- /examples/media/src/app.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | -------------------------------------------------------------------------------- /examples/prpc/src/app.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | -------------------------------------------------------------------------------- /packages/authpc/plugin/README.md: -------------------------------------------------------------------------------- 1 | This was renamed to pRPC 2 | 3 | [Here](../../prpc/plugin) 4 | -------------------------------------------------------------------------------- /packages/authpc/solid/README.md: -------------------------------------------------------------------------------- 1 | This was renamed to pRPC 2 | 3 | [Here](../../prpc/solid) 4 | -------------------------------------------------------------------------------- /pnpm-workspace.yaml: -------------------------------------------------------------------------------- 1 | packages: 2 | - 'docs' 3 | - 'packages/**/*' 4 | - 'examples/**/*' 5 | -------------------------------------------------------------------------------- /examples/auth/.env.example: -------------------------------------------------------------------------------- 1 | DISCORD_ID= 2 | DISCORD_SECRET= 3 | AUTH_SECRET= 4 | AUTH_TRUST_HOST=true -------------------------------------------------------------------------------- /examples/jd-prpc/src/app.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | -------------------------------------------------------------------------------- /examples/prpc-clerk/src/app.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | -------------------------------------------------------------------------------- /examples/routetypes/src/app.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | -------------------------------------------------------------------------------- /examples/routetypes/src/routes/test.tsx: -------------------------------------------------------------------------------- 1 | export default () => { 2 | return
hey
3 | } 4 | -------------------------------------------------------------------------------- /docs/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/mediakit/HEAD/docs/public/favicon.ico -------------------------------------------------------------------------------- /packages/shared/README.md: -------------------------------------------------------------------------------- 1 | # @solid-mediakit/shared 2 | 3 | A set of utilities to use with your Solid apps. 4 | -------------------------------------------------------------------------------- /examples/og/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/mediakit/HEAD/examples/og/public/favicon.ico -------------------------------------------------------------------------------- /examples/auth/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/mediakit/HEAD/examples/auth/public/favicon.ico -------------------------------------------------------------------------------- /examples/forms/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/mediakit/HEAD/examples/forms/public/favicon.ico -------------------------------------------------------------------------------- /examples/jd-prpc/prisma/db.sqlite: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/mediakit/HEAD/examples/jd-prpc/prisma/db.sqlite -------------------------------------------------------------------------------- /examples/log/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/mediakit/HEAD/examples/log/public/favicon.ico -------------------------------------------------------------------------------- /examples/media/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/mediakit/HEAD/examples/media/public/favicon.ico -------------------------------------------------------------------------------- /examples/prpc/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/mediakit/HEAD/examples/prpc/public/favicon.ico -------------------------------------------------------------------------------- /packages/forms/solid/src/utils/index.ts: -------------------------------------------------------------------------------- 1 | export * from './zod' 2 | export * from './helpers' 3 | export * from './components' 4 | -------------------------------------------------------------------------------- /packages/log/.gitignore: -------------------------------------------------------------------------------- 1 | unplugin 2 | compiler 3 | !src/**/* 4 | *.js 5 | !rollup.config.js 6 | !scripts/**/* 7 | *.d.ts 8 | *.jsx -------------------------------------------------------------------------------- /examples/jd-prpc/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/mediakit/HEAD/examples/jd-prpc/public/favicon.ico -------------------------------------------------------------------------------- /packages/shared/src/index.ts: -------------------------------------------------------------------------------- 1 | export * as babel from './babel' 2 | export * as solid from './solid' 3 | export * from './utils' 4 | -------------------------------------------------------------------------------- /examples/auth/postcss.config.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /examples/auth/src/utils/string.ts: -------------------------------------------------------------------------------- 1 | export const capitalize = (str: string) => 2 | `${str.slice(0, 1).toUpperCase()}${str.slice(1)}`; 3 | -------------------------------------------------------------------------------- /examples/prpc-clerk/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/mediakit/HEAD/examples/prpc-clerk/public/favicon.ico -------------------------------------------------------------------------------- /packages/og/tests/fixtures/solid-start/variables/code.js: -------------------------------------------------------------------------------- 1 | const coolVar =
{nonSignal}
; -------------------------------------------------------------------------------- /examples/jd-prpc/postcss.config.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /examples/forms/postcss.config.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | }; -------------------------------------------------------------------------------- /examples/media/app.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from '@solidjs/start/config' 2 | 3 | export default defineConfig({ 4 | ssr: true, 5 | }) 6 | -------------------------------------------------------------------------------- /examples/media/postcss.config.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | }; -------------------------------------------------------------------------------- /examples/prpc/postcss.config.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | }; -------------------------------------------------------------------------------- /packages/og/tests/fixtures/solid-start/custom-image-options/code.js: -------------------------------------------------------------------------------- 1 |
Hi!
-------------------------------------------------------------------------------- /examples/prpc-clerk/postcss.config.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | }; -------------------------------------------------------------------------------- /examples/routetypes/postcss.config.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | }; -------------------------------------------------------------------------------- /packages/routetypes/README.md: -------------------------------------------------------------------------------- 1 | # @solid-mediakit/routetypes 2 | 3 | Vite Plugin that makes your SolidJS routes type-safe 4 | 5 | ### Installation 6 | -------------------------------------------------------------------------------- /packages/forms/solid/src/utils/helpers.ts: -------------------------------------------------------------------------------- 1 | export const capitalize = (t: string) => { 2 | return `${t[0].toUpperCase()}${t.slice(1).toLowerCase()}` 3 | } 4 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json.schemastore.org/prettierrc", 3 | "semi": false, 4 | "singleQuote": true, 5 | "jsxSingleQuote": true 6 | } 7 | -------------------------------------------------------------------------------- /examples/auth/env.d.ts: -------------------------------------------------------------------------------- 1 | interface ImportMetaEnv { 2 | VITE_AUTH_PATH: string 3 | } 4 | 5 | interface ImportMeta { 6 | readonly env: ImportMetaEnv 7 | } 8 | -------------------------------------------------------------------------------- /packages/media/rollup.config.js: -------------------------------------------------------------------------------- 1 | import withSolid from 'rollup-preset-solid' 2 | 3 | export default withSolid([{ input: './src/index.tsx', targets: ['esm'] }]) 4 | -------------------------------------------------------------------------------- /examples/auth/src/entry-client.tsx: -------------------------------------------------------------------------------- 1 | import { mount, StartClient } from '@solidjs/start/client' 2 | 3 | mount(() => , document.getElementById('app')) 4 | -------------------------------------------------------------------------------- /examples/forms/src/entry-client.tsx: -------------------------------------------------------------------------------- 1 | import { mount, StartClient } from '@solidjs/start/client' 2 | 3 | mount(() => , document.getElementById('app')) 4 | -------------------------------------------------------------------------------- /examples/media/src/entry-client.tsx: -------------------------------------------------------------------------------- 1 | import { mount, StartClient } from '@solidjs/start/client' 2 | 3 | mount(() => , document.getElementById('app')) 4 | -------------------------------------------------------------------------------- /examples/prpc/src/entry-client.tsx: -------------------------------------------------------------------------------- 1 | import { mount, StartClient } from '@solidjs/start/client' 2 | 3 | mount(() => , document.getElementById('app')!) 4 | -------------------------------------------------------------------------------- /examples/jd-prpc/src/entry-client.tsx: -------------------------------------------------------------------------------- 1 | import { mount, StartClient } from "@solidjs/start/client"; 2 | 3 | mount(() => , document.getElementById("app")!); 4 | -------------------------------------------------------------------------------- /examples/media/.vinxi/build/ssr/assets/onig-fd885c2d.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/solidjs-community/mediakit/HEAD/examples/media/.vinxi/build/ssr/assets/onig-fd885c2d.wasm -------------------------------------------------------------------------------- /examples/prpc-clerk/src/entry-client.tsx: -------------------------------------------------------------------------------- 1 | import { mount, StartClient } from '@solidjs/start/client' 2 | 3 | mount(() => , document.getElementById('app')!) 4 | -------------------------------------------------------------------------------- /examples/prpc/src/use/test2.ts: -------------------------------------------------------------------------------- 1 | import { createCaller, redirect$ } from '@solid-mediakit/prpc' 2 | 3 | export const redirectRequet = createCaller(() => redirect$('/test')) 4 | -------------------------------------------------------------------------------- /examples/routetypes/src/entry-client.tsx: -------------------------------------------------------------------------------- 1 | import { mount, StartClient } from '@solidjs/start/client' 2 | 3 | mount(() => , document.getElementById('app')!) 4 | -------------------------------------------------------------------------------- /packages/og/tests/fixtures/solid-start/multiple-children/code.js: -------------------------------------------------------------------------------- 1 | const coolVar = ( 2 | 3 |
4 |
5 |
6 | ) 7 | -------------------------------------------------------------------------------- /docs/src/entry-client.tsx: -------------------------------------------------------------------------------- 1 | // @refresh reload 2 | import { mount, StartClient } from "@solidjs/start/client"; 3 | 4 | mount(() => , document.getElementById("app")!); 5 | -------------------------------------------------------------------------------- /packages/og/tests/fixtures/solid-start/exclude-static/code.js: -------------------------------------------------------------------------------- 1 | const coolVar = ( 2 | 3 |
Hello
4 |
5 | ) 6 | -------------------------------------------------------------------------------- /examples/log/src/entry-client.tsx: -------------------------------------------------------------------------------- 1 | // @refresh reload 2 | import { mount, StartClient } from "@solidjs/start/client"; 3 | 4 | mount(() => , document.getElementById("app")!); 5 | -------------------------------------------------------------------------------- /examples/og/src/entry-client.tsx: -------------------------------------------------------------------------------- 1 | // @refresh reload 2 | import { mount, StartClient } from "@solidjs/start/client"; 3 | 4 | mount(() => , document.getElementById("app")!); 5 | -------------------------------------------------------------------------------- /examples/prpc/src/routes/api/auth/[...solidauth].ts: -------------------------------------------------------------------------------- 1 | import { SolidAuth } from '@solid-mediakit/auth' 2 | import { authOpts } from '~/server/auth' 3 | 4 | export const { GET, POST } = SolidAuth(authOpts) 5 | -------------------------------------------------------------------------------- /examples/auth/src/routes/api/auth/[...solidauth].ts: -------------------------------------------------------------------------------- 1 | import { SolidAuth } from '@solid-mediakit/auth' 2 | import { authOptions } from '~/server/auth' 3 | 4 | export const { GET, POST } = SolidAuth(authOptions) 5 | -------------------------------------------------------------------------------- /packages/og/tests/fixtures/solid-start/basic/code.js: -------------------------------------------------------------------------------- 1 | import { createSignal } from "solid-js"; 2 | 3 | const [signal] = createSignal("") 4 | const coolVar =
{signal()}
; -------------------------------------------------------------------------------- /packages/prpc/tests/src/caller/withImport.ts: -------------------------------------------------------------------------------- 1 | import { myCaller } from './withMw' 2 | 3 | export const importCaller = myCaller.use(({ ctx$ }) => { 4 | return { 5 | ...ctx$, 6 | test: 1, 7 | } 8 | }) 9 | -------------------------------------------------------------------------------- /examples/auth/tailwind.config.cjs: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | module.exports = { 3 | content: ['./src/**/*.{js,ts,jsx,tsx}'], 4 | theme: { 5 | extend: {}, 6 | }, 7 | plugins: [], 8 | } 9 | -------------------------------------------------------------------------------- /examples/forms/tailwind.config.cjs: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | module.exports = { 3 | content: ["./src/**/*.{js,ts,jsx,tsx}"], 4 | theme: { 5 | extend: {}, 6 | }, 7 | plugins: [], 8 | }; 9 | -------------------------------------------------------------------------------- /examples/jd-prpc/src/routes/api/auth/[...solidauth].ts: -------------------------------------------------------------------------------- 1 | import { SolidAuth } from "@solid-mediakit/auth"; 2 | import { authOptions } from "~/server/auth"; 3 | 4 | export const { GET, POST } = SolidAuth(authOptions); 5 | -------------------------------------------------------------------------------- /examples/jd-prpc/tailwind.config.cjs: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | module.exports = { 3 | content: ['./src/**/*.{js,ts,jsx,tsx}'], 4 | theme: { 5 | extend: {}, 6 | }, 7 | plugins: [], 8 | } 9 | -------------------------------------------------------------------------------- /examples/media/tailwind.config.cjs: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | module.exports = { 3 | content: ["./src/**/*.{js,ts,jsx,tsx}"], 4 | theme: { 5 | extend: {}, 6 | }, 7 | plugins: [], 8 | }; 9 | -------------------------------------------------------------------------------- /examples/prpc/tailwind.config.cjs: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | module.exports = { 3 | content: ["./src/**/*.{js,ts,jsx,tsx}"], 4 | theme: { 5 | extend: {}, 6 | }, 7 | plugins: [], 8 | }; 9 | -------------------------------------------------------------------------------- /packages/og/tests/fixtures/tanstack-start/basic/code.js: -------------------------------------------------------------------------------- 1 | import { createSignal } from "solid-js"; 2 | 3 | const [signal] = createSignal("") 4 | const coolVar =
{signal()}
; -------------------------------------------------------------------------------- /examples/prpc-clerk/tailwind.config.cjs: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | module.exports = { 3 | content: ["./src/**/*.{js,ts,jsx,tsx}"], 4 | theme: { 5 | extend: {}, 6 | }, 7 | plugins: [], 8 | }; 9 | -------------------------------------------------------------------------------- /examples/routetypes/tailwind.config.cjs: -------------------------------------------------------------------------------- 1 | /** @type {import('tailwindcss').Config} */ 2 | module.exports = { 3 | content: ["./src/**/*.{js,ts,jsx,tsx}"], 4 | theme: { 5 | extend: {}, 6 | }, 7 | plugins: [], 8 | }; 9 | -------------------------------------------------------------------------------- /packages/auth/solid/locals.d.ts: -------------------------------------------------------------------------------- 1 | import type { Session } from '@auth/core/types' 2 | 3 | declare module '@solidjs/start/server' { 4 | interface RequestEventLocals { 5 | session: Session | null | undefined 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /examples/jd-prpc/.env.example: -------------------------------------------------------------------------------- 1 | DISCORD_ID= 2 | DISCORD_SECRET= 3 | AUTH_SECRET=b198e07a64406260b98f06e21c457b84 4 | AUTH_TRUST_HOST=true 5 | AUTH_URL=http://localhost:3000 6 | VITE_AUTH_PATH=/api/auth 7 | DATABASE_URL=file:./db.sqlite 8 | -------------------------------------------------------------------------------- /packages/auth/solid/rollup.config.js: -------------------------------------------------------------------------------- 1 | import withSolid from 'rollup-preset-solid' 2 | 3 | export default withSolid([ 4 | { input: './src/client.tsx', targets: ['esm'] }, 5 | { input: './src/index.ts', targets: ['esm'] }, 6 | ]) 7 | -------------------------------------------------------------------------------- /packages/prpc/tests/src/caller/withMw.ts: -------------------------------------------------------------------------------- 1 | import { createCaller } from '@solid-mediakit/prpc' 2 | 3 | export const myCaller = createCaller.use(({ event$ }) => { 4 | return { 5 | ua: event$.request.headers.get('user-agent'), 6 | } 7 | }) 8 | -------------------------------------------------------------------------------- /examples/og/app.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from '@solidjs/start/config' 2 | import { vitePlugin as OGPlugin } from '@solid-mediakit/og/unplugin' 3 | export default defineConfig({ 4 | vite: { 5 | plugins: [OGPlugin({ log: true })], 6 | }, 7 | }) 8 | -------------------------------------------------------------------------------- /packages/prpc/solid/src/createAction.ts: -------------------------------------------------------------------------------- 1 | import { infer as _ZodInfer } from 'zod' 2 | import { OutputCaller$ } from './types' 3 | import { createCaller } from './createCaller' 4 | 5 | export const createAction = createCaller as unknown as OutputCaller$<'action'> 6 | -------------------------------------------------------------------------------- /packages/routetypes/src/test.d.ts: -------------------------------------------------------------------------------- 1 | type $KnownRoutes = '/' | '/test' 2 | 3 | declare module '@solidjs/router' { 4 | interface Navigator { 5 | (to: R, options?: Partial): void 6 | (delta: number): void 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/shared/src/solid.ts: -------------------------------------------------------------------------------- 1 | export function getFileName(_filename: string): string { 2 | if (_filename.includes('?')) { 3 | // might be useful for the future 4 | const [actualId] = _filename.split('?') 5 | return actualId 6 | } 7 | return _filename 8 | } 9 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.base.json", 3 | "compilerOptions": { 4 | "outDir": "./dist", 5 | "noErrorTruncation": true, 6 | "jsx": "preserve", 7 | "jsxImportSource": "solid-js" 8 | }, 9 | "exclude": ["node_modules"] 10 | } 11 | -------------------------------------------------------------------------------- /examples/routetypes/app.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from '@solidjs/start/config' 2 | import { routeTypes } from '@solid-mediakit/routetypes' 3 | 4 | export default defineConfig({ 5 | ssr: true, 6 | vite: { 7 | plugins: [routeTypes()], 8 | }, 9 | }) 10 | -------------------------------------------------------------------------------- /packages/og/tests/fixtures/solid-start/partially-dynamic-object/code.js: -------------------------------------------------------------------------------- 1 | import { createSignal } from "solid-js"; 2 | 3 | const [signal] = createSignal("hello") 4 | const coolVar =
{}
; -------------------------------------------------------------------------------- /packages/shared/rollup.config.js: -------------------------------------------------------------------------------- 1 | import typescript from '@rollup/plugin-typescript' 2 | 3 | export default { 4 | input: { 5 | index: './src/index.ts', 6 | }, 7 | output: { 8 | dir: 'dist', 9 | format: 'es', 10 | }, 11 | plugins: [typescript()], 12 | } 13 | -------------------------------------------------------------------------------- /examples/forms/app.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from '@solidjs/start/config' 2 | import { formsPlugin } from '@solid-mediakit/forms-plugin' 3 | 4 | export default defineConfig({ 5 | ssr: true, 6 | vite: { 7 | plugins: [formsPlugin({ log: false })], 8 | }, 9 | }) 10 | -------------------------------------------------------------------------------- /examples/auth/src/routes/test2.tsx: -------------------------------------------------------------------------------- 1 | import { protected$ } from '@solid-mediakit/auth' 2 | 3 | export default protected$( 4 | () => { 5 | return ( 6 |
7 |

Hidden for logged in

8 |
9 | ) 10 | }, 11 | '/test', 12 | true, 13 | ) 14 | -------------------------------------------------------------------------------- /examples/auth/src/middleware.ts: -------------------------------------------------------------------------------- 1 | import { authMiddleware } from '@solid-mediakit/auth' 2 | import { createMiddleware } from '@solidjs/start/middleware' 3 | import { authOptions } from './server/auth' 4 | 5 | export default createMiddleware({ 6 | onRequest: [authMiddleware(true, authOptions)], 7 | }) 8 | -------------------------------------------------------------------------------- /examples/prpc/src/use/file1.ts: -------------------------------------------------------------------------------- 1 | import { createCaller } from '@solid-mediakit/prpc' 2 | 3 | export const withMw1 = createCaller.use(() => { 4 | return { 5 | myFile1: 1, 6 | } 7 | }) 8 | 9 | export const action1 = withMw1(({ ctx$ }) => { 10 | return `hey ${ctx$.myFile1} ` 11 | }) 12 | -------------------------------------------------------------------------------- /examples/prpc-clerk/src/use/file1.ts: -------------------------------------------------------------------------------- 1 | import { createCaller } from '@solid-mediakit/prpc' 2 | 3 | export const withMw1 = createCaller.use(() => { 4 | return { 5 | myFile1: 1, 6 | } 7 | }) 8 | 9 | export const action1 = withMw1(({ ctx$ }) => { 10 | return `hey ${ctx$.myFile1} ` 11 | }) 12 | -------------------------------------------------------------------------------- /packages/auth/solid/README.md: -------------------------------------------------------------------------------- 1 | # @solid-mediakit/auth 2 | 3 | An authentication utility library for Solid. 4 | 5 | ### Installation 6 | 7 | ```bash 8 | pnpm install @solid-mediakit/auth@latest @auth/core@latest 9 | ``` 10 | 11 | [Read More Here](https://mediakit-taupe.vercel.app/auth/install) 12 | -------------------------------------------------------------------------------- /packages/prpc/tests/src/caller/withMw.output.js: -------------------------------------------------------------------------------- 1 | import { createCaller } from '@solid-mediakit/prpc' 2 | export const myCaller = createCaller 3 | export const _$$myCaller_mws = [ 4 | ({ event$ }) => { 5 | return { 6 | ua: event$.request.headers.get('user-agent'), 7 | } 8 | }, 9 | ] 10 | -------------------------------------------------------------------------------- /examples/prpc/src/use/use2.ts: -------------------------------------------------------------------------------- 1 | import { withMws } from './use' 2 | 3 | const okefgsdg = withMws.use((current) => { 4 | return { 5 | ...current, 6 | lll: 3, 7 | } 8 | }) 9 | 10 | export const q2 = okefgsdg( 11 | () => { 12 | return 1 13 | }, 14 | { 15 | key: 'q2', 16 | }, 17 | ) 18 | -------------------------------------------------------------------------------- /docs/src/routes/[...404].mdx: -------------------------------------------------------------------------------- 1 | import { mdxComponents } from "@kobalte/solidbase/client"; 2 | import { Dynamic } from "solid-js/web"; 3 | 4 | # 404 5 | 6 | :::danger[] 7 | No page here 8 | ::: 9 | 10 | Go history.back()} href="#">back or return [Home](/). -------------------------------------------------------------------------------- /examples/prpc-clerk/src/use/use2.ts: -------------------------------------------------------------------------------- 1 | import { withMws } from './use' 2 | 3 | const okefgsdg = withMws.use((current) => { 4 | return { 5 | ...current, 6 | lll: 3, 7 | } 8 | }) 9 | 10 | export const q2 = okefgsdg( 11 | () => { 12 | return 1 13 | }, 14 | { 15 | key: 'q2', 16 | }, 17 | ) 18 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | **/dist 2 | **/.turbo 3 | 4 | # dependencies 5 | **/node_modules 6 | 7 | # IDEs and editors 8 | **/.idea 9 | **/.project 10 | **/.classpath 11 | **/*.launch 12 | **/.settings/ 13 | 14 | # Temp 15 | gitignore 16 | 17 | # System Files 18 | **/.DS_Store 19 | **/Thumbs.db 20 | 21 | .env 22 | .eslintrc.cjs -------------------------------------------------------------------------------- /packages/prpc/tests/src/caller/withImport.output.js: -------------------------------------------------------------------------------- 1 | import { myCaller, _$$myCaller_mws } from './withMw' 2 | export const importCaller = myCaller 3 | export const _$$importCaller_mws = [ 4 | ..._$$myCaller_mws, 5 | ({ ctx$ }) => { 6 | return { 7 | ...ctx$, 8 | test: 1, 9 | } 10 | }, 11 | ] 12 | -------------------------------------------------------------------------------- /docs/src/app.tsx: -------------------------------------------------------------------------------- 1 | import { SolidBaseRoot } from '@kobalte/solidbase/client' 2 | import { Router } from '@solidjs/router' 3 | import { FileRoutes } from '@solidjs/start/router' 4 | 5 | export default function App() { 6 | return ( 7 | 8 | 9 | 10 | ) 11 | } 12 | -------------------------------------------------------------------------------- /examples/log/app.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from '@solidjs/start/config' 2 | import { vitePlugin as logPlugin } from '@solid-mediakit/log/unplugin' 3 | 4 | export default defineConfig({ 5 | vite: { 6 | plugins: [ 7 | logPlugin({ 8 | logOn: 'development', 9 | }), 10 | ], 11 | }, 12 | }) 13 | -------------------------------------------------------------------------------- /examples/routetypes/test.d.ts: -------------------------------------------------------------------------------- 1 | type $KnownRoutes = '/' | '/test' 2 | type $KnownOrExt = $KnownRoutes | `http://${string}` | `https://${string}` 3 | 4 | type $NavigateOptions = Partial & {} 5 | 6 | interface Navigator { 7 | (to: R, options: $NavigateOptions): void 8 | (delta: number): void 9 | } 10 | -------------------------------------------------------------------------------- /examples/auth/.gitignore: -------------------------------------------------------------------------------- 1 | dist 2 | .solid 3 | .output 4 | .vercel 5 | .netlify 6 | netlify 7 | 8 | # dependencies 9 | /node_modules 10 | 11 | # IDEs and editors 12 | /.idea 13 | .project 14 | .classpath 15 | *.launch 16 | .settings/ 17 | 18 | # Temp 19 | gitignore 20 | 21 | # System Files 22 | .DS_Store 23 | Thumbs.db 24 | 25 | .env 26 | -------------------------------------------------------------------------------- /examples/forms/.gitignore: -------------------------------------------------------------------------------- 1 | dist 2 | .solid 3 | .output 4 | .vercel 5 | .netlify 6 | netlify 7 | 8 | # dependencies 9 | /node_modules 10 | 11 | # IDEs and editors 12 | /.idea 13 | .project 14 | .classpath 15 | *.launch 16 | .settings/ 17 | 18 | # Temp 19 | gitignore 20 | 21 | # System Files 22 | .DS_Store 23 | Thumbs.db 24 | 25 | .env 26 | -------------------------------------------------------------------------------- /examples/jd-prpc/src/server/user/user.queries.ts: -------------------------------------------------------------------------------- 1 | import { z } from 'zod' 2 | import { userCaller } from '../prpc' 3 | 4 | export const protectedQuery = userCaller( 5 | z.object({ 6 | hello: z.string(), 7 | }), 8 | ({ input$, ctx$ }) => { 9 | return `this is top secret: ${input$.hello} ${ctx$.user.name}` 10 | }, 11 | ) 12 | -------------------------------------------------------------------------------- /examples/media/.gitignore: -------------------------------------------------------------------------------- 1 | dist 2 | .solid 3 | .output 4 | .vercel 5 | .netlify 6 | netlify 7 | 8 | # dependencies 9 | /node_modules 10 | 11 | # IDEs and editors 12 | /.idea 13 | .project 14 | .classpath 15 | *.launch 16 | .settings/ 17 | 18 | # Temp 19 | gitignore 20 | 21 | # System Files 22 | .DS_Store 23 | Thumbs.db 24 | 25 | .env 26 | -------------------------------------------------------------------------------- /examples/prpc/.gitignore: -------------------------------------------------------------------------------- 1 | dist 2 | .solid 3 | .output 4 | .vercel 5 | .netlify 6 | netlify 7 | 8 | # dependencies 9 | /node_modules 10 | 11 | # IDEs and editors 12 | /.idea 13 | .project 14 | .classpath 15 | *.launch 16 | .settings/ 17 | 18 | # Temp 19 | gitignore 20 | 21 | # System Files 22 | .DS_Store 23 | Thumbs.db 24 | 25 | .env 26 | -------------------------------------------------------------------------------- /packages/prpc/tests/src/server/user/user.queries.ts: -------------------------------------------------------------------------------- 1 | import { z } from 'zod' 2 | import { userCaller } from '../prpc' 3 | 4 | export const protectedQuery = userCaller( 5 | z.object({ 6 | hello: z.string(), 7 | }), 8 | ({ input$, ctx$ }) => { 9 | return `this is top secret: ${input$.hello} ${ctx$.user.name}` 10 | }, 11 | ) 12 | -------------------------------------------------------------------------------- /examples/jd-prpc/.gitignore: -------------------------------------------------------------------------------- 1 | dist 2 | .solid 3 | .output 4 | .vercel 5 | .netlify 6 | netlify 7 | 8 | # dependencies 9 | /node_modules 10 | 11 | # IDEs and editors 12 | /.idea 13 | .project 14 | .classpath 15 | *.launch 16 | .settings/ 17 | 18 | # Temp 19 | gitignore 20 | 21 | # System Files 22 | .DS_Store 23 | Thumbs.db 24 | 25 | .env 26 | -------------------------------------------------------------------------------- /examples/prpc-clerk/.gitignore: -------------------------------------------------------------------------------- 1 | dist 2 | .solid 3 | .output 4 | .vercel 5 | .netlify 6 | netlify 7 | 8 | # dependencies 9 | /node_modules 10 | 11 | # IDEs and editors 12 | /.idea 13 | .project 14 | .classpath 15 | *.launch 16 | .settings/ 17 | 18 | # Temp 19 | gitignore 20 | 21 | # System Files 22 | .DS_Store 23 | Thumbs.db 24 | 25 | .env 26 | -------------------------------------------------------------------------------- /examples/routetypes/.gitignore: -------------------------------------------------------------------------------- 1 | dist 2 | .solid 3 | .output 4 | .vercel 5 | .netlify 6 | netlify 7 | 8 | # dependencies 9 | /node_modules 10 | 11 | # IDEs and editors 12 | /.idea 13 | .project 14 | .classpath 15 | *.launch 16 | .settings/ 17 | 18 | # Temp 19 | gitignore 20 | 21 | # System Files 22 | .DS_Store 23 | Thumbs.db 24 | 25 | .env 26 | -------------------------------------------------------------------------------- /examples/auth/src/routes/test.tsx: -------------------------------------------------------------------------------- 1 | import { protected$ } from '@solid-mediakit/auth' 2 | 3 | export default protected$( 4 | (session$) => { 5 | return ( 6 |
7 |

Protected Route

8 |

hello {session$.user.name}

9 |
10 | ) 11 | }, 12 | () =>
not logged in
, 13 | ) 14 | -------------------------------------------------------------------------------- /examples/og/src/routes/test2.tsx: -------------------------------------------------------------------------------- 1 | import { DynamicImage } from '@solid-mediakit/og' 2 | import { createSignal } from 'solid-js' 3 | 4 | const [signal] = createSignal('') 5 | const coolVar = ( 6 | 7 |
{signal()}
8 |
9 | ) 10 | 11 | export default () => { 12 | return

hey

13 | } 14 | -------------------------------------------------------------------------------- /tsconfig.base.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "declaration": true, 4 | "allowSyntheticDefaultImports": true, 5 | "target": "esnext", 6 | "newLine": "LF", 7 | "moduleResolution": "Node", 8 | "strict": true, 9 | "module": "esnext", 10 | "types": ["node"] 11 | }, 12 | "exclude": ["node_modules", "dist"] 13 | } 14 | -------------------------------------------------------------------------------- /examples/jd-prpc/src/middleware.ts: -------------------------------------------------------------------------------- 1 | import { authMiddleware } from "@solid-mediakit/auth"; 2 | import { createMiddleware } from "@solidjs/start/middleware"; 3 | import { authOptions } from "./server/auth"; 4 | 5 | const pathsToPreload = ["/"]; 6 | 7 | export default createMiddleware({ 8 | onRequest: [authMiddleware(pathsToPreload, authOptions)], 9 | }); 10 | -------------------------------------------------------------------------------- /examples/jd-prpc/src/server/hello/hello.queries.ts: -------------------------------------------------------------------------------- 1 | import { z } from 'zod' 2 | import { helloCaller } from '../prpc' 3 | 4 | export const helloQuery = helloCaller( 5 | z.object({ 6 | hello: z.string(), 7 | }), 8 | ({ input$, ctx$ }) => { 9 | if (input$.hello === 'hello') { 10 | return ctx$.hello 11 | } 12 | return ctx$.world 13 | }, 14 | ) 15 | -------------------------------------------------------------------------------- /examples/log/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | dist 3 | .solid 4 | .output 5 | .vercel 6 | .netlify 7 | .vinxi 8 | 9 | # Environment 10 | .env 11 | .env*.local 12 | 13 | # dependencies 14 | /node_modules 15 | 16 | # IDEs and editors 17 | /.idea 18 | .project 19 | .classpath 20 | *.launch 21 | .settings/ 22 | 23 | # Temp 24 | gitignore 25 | 26 | # System Files 27 | .DS_Store 28 | Thumbs.db 29 | -------------------------------------------------------------------------------- /examples/og/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | dist 3 | .solid 4 | .output 5 | .vercel 6 | .netlify 7 | .vinxi 8 | 9 | # Environment 10 | .env 11 | .env*.local 12 | 13 | # dependencies 14 | /node_modules 15 | 16 | # IDEs and editors 17 | /.idea 18 | .project 19 | .classpath 20 | *.launch 21 | .settings/ 22 | 23 | # Temp 24 | gitignore 25 | 26 | # System Files 27 | .DS_Store 28 | Thumbs.db 29 | -------------------------------------------------------------------------------- /packages/prpc/tests/src/server/hello/hello.queries.ts: -------------------------------------------------------------------------------- 1 | import { z } from 'zod' 2 | import { helloCaller } from '../prpc' 3 | 4 | export const helloQuery = helloCaller( 5 | z.object({ 6 | hello: z.string(), 7 | }), 8 | ({ input$, ctx$ }) => { 9 | if (input$.hello === 'hello') { 10 | return ctx$.hello 11 | } 12 | return ctx$.world 13 | }, 14 | ) 15 | -------------------------------------------------------------------------------- /docs/.gitignore: -------------------------------------------------------------------------------- 1 | dist 2 | .wrangler 3 | .output 4 | .vercel 5 | .netlify 6 | .vinxi 7 | app.config.timestamp_*.js 8 | 9 | # Environment 10 | .env 11 | .env*.local 12 | 13 | # dependencies 14 | /node_modules 15 | 16 | # IDEs and editors 17 | /.idea 18 | .project 19 | .classpath 20 | *.launch 21 | .settings/ 22 | 23 | # Temp 24 | gitignore 25 | 26 | # System Files 27 | .DS_Store 28 | Thumbs.db 29 | -------------------------------------------------------------------------------- /examples/auth/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "parser": "@typescript-eslint/parser", 3 | "parserOptions": { 4 | "project": "./tsconfig.json" 5 | }, 6 | "plugins": ["@typescript-eslint"], 7 | "extends": [ 8 | "plugin:solid/typescript", 9 | "plugin:@typescript-eslint/recommended" 10 | ], 11 | "rules": { 12 | "@typescript-eslint/consistent-type-imports": "warn" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /examples/forms/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "parser": "@typescript-eslint/parser", 3 | "parserOptions": { 4 | "project": "./tsconfig.json" 5 | }, 6 | "plugins": ["@typescript-eslint"], 7 | "extends": [ 8 | "plugin:solid/typescript", 9 | "plugin:@typescript-eslint/recommended" 10 | ], 11 | "rules": { 12 | "@typescript-eslint/consistent-type-imports": "warn" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /examples/jd-prpc/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "parser": "@typescript-eslint/parser", 3 | "parserOptions": { 4 | "project": "./tsconfig.json" 5 | }, 6 | "plugins": ["@typescript-eslint"], 7 | "extends": [ 8 | "plugin:solid/typescript", 9 | "plugin:@typescript-eslint/recommended" 10 | ], 11 | "rules": { 12 | "@typescript-eslint/consistent-type-imports": "warn" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /examples/media/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "parser": "@typescript-eslint/parser", 3 | "parserOptions": { 4 | "project": "./tsconfig.json" 5 | }, 6 | "plugins": ["@typescript-eslint"], 7 | "extends": [ 8 | "plugin:solid/typescript", 9 | "plugin:@typescript-eslint/recommended" 10 | ], 11 | "rules": { 12 | "@typescript-eslint/consistent-type-imports": "warn" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /examples/prpc-clerk/src/middleware.ts: -------------------------------------------------------------------------------- 1 | import { createMiddleware } from '@solidjs/start/middleware' 2 | import { clerkMiddleware } from 'clerk-solidjs/start/server' 3 | 4 | export default createMiddleware({ 5 | onRequest: [ 6 | clerkMiddleware({ 7 | publishableKey: process.env.VITE_CLERK_PUBLISHABLE_KEY, 8 | secretKey: process.env.CLERK_SECRET_KEY, 9 | }), 10 | ], 11 | }) 12 | -------------------------------------------------------------------------------- /examples/prpc/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "parser": "@typescript-eslint/parser", 3 | "parserOptions": { 4 | "project": "./tsconfig.json" 5 | }, 6 | "plugins": ["@typescript-eslint"], 7 | "extends": [ 8 | "plugin:solid/typescript", 9 | "plugin:@typescript-eslint/recommended" 10 | ], 11 | "rules": { 12 | "@typescript-eslint/consistent-type-imports": "warn" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /examples/prpc-clerk/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "parser": "@typescript-eslint/parser", 3 | "parserOptions": { 4 | "project": "./tsconfig.json" 5 | }, 6 | "plugins": ["@typescript-eslint"], 7 | "extends": [ 8 | "plugin:solid/typescript", 9 | "plugin:@typescript-eslint/recommended" 10 | ], 11 | "rules": { 12 | "@typescript-eslint/consistent-type-imports": "warn" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /examples/routetypes/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "parser": "@typescript-eslint/parser", 3 | "parserOptions": { 4 | "project": "./tsconfig.json" 5 | }, 6 | "plugins": ["@typescript-eslint"], 7 | "extends": [ 8 | "plugin:solid/typescript", 9 | "plugin:@typescript-eslint/recommended" 10 | ], 11 | "rules": { 12 | "@typescript-eslint/consistent-type-imports": "warn" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/auth/solid/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "parser": "@typescript-eslint/parser", 3 | "parserOptions": { 4 | "project": "./tsconfig.json" 5 | }, 6 | "plugins": ["@typescript-eslint"], 7 | "extends": [ 8 | "plugin:solid/typescript", 9 | "plugin:@typescript-eslint/recommended" 10 | ], 11 | "rules": { 12 | "@typescript-eslint/consistent-type-imports": "warn" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/og/tests/fixtures/solid-start/realistic-styles/code.js: -------------------------------------------------------------------------------- 1 | const coolVar = 2 |
13 | {`👋 Hello, ${count() * 2}!`} 14 |
15 |
-------------------------------------------------------------------------------- /packages/prpc/solid/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "parser": "@typescript-eslint/parser", 3 | "parserOptions": { 4 | "project": "./tsconfig.json" 5 | }, 6 | "plugins": ["@typescript-eslint"], 7 | "extends": [ 8 | "plugin:solid/typescript", 9 | "plugin:@typescript-eslint/recommended" 10 | ], 11 | "rules": { 12 | "@typescript-eslint/consistent-type-imports": "warn" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/prpc/solid/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './createCaller' 2 | export * from './createAction' 3 | export * from './utils' 4 | export * from './types' 5 | export * from './error' 6 | 7 | import type { createApp } from 'vinxi/dist/types/lib/app' 8 | 9 | export interface BaseSettings { 10 | config: ReturnType & { auth?: 'authjs' | 'clerk' } 11 | } 12 | 13 | export interface Settings extends BaseSettings {} 14 | -------------------------------------------------------------------------------- /README.MD: -------------------------------------------------------------------------------- 1 | # MediaKit 2 | 3 | A set of utilities to use with your Solid apps. 4 | 5 | ## Features 6 | 7 | - [pRPC](./packages/prpc/solid/README.md) - Server Action Utility 8 | - [Authentication](./packages/auth/solid) - Solid AuthJS 9 | - [Media (Video / Audio / Img)](./packages/media/README.md) - Impl For