@raybase/create 0.0.2 → 0.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/THIRD_PARTY_NOTICES.md +38 -0
- package/assets/apple-touch-icons/0.png +0 -0
- package/assets/apple-touch-icons/1.png +0 -0
- package/assets/apple-touch-icons/2.png +0 -0
- package/assets/apple-touch-icons/3.png +0 -0
- package/assets/apple-touch-icons/4.png +0 -0
- package/assets/apple-touch-icons/5.png +0 -0
- package/assets/apple-touch-icons/6.png +0 -0
- package/assets/apple-touch-icons/7.png +0 -0
- package/assets/apple-touch-icons/8.png +0 -0
- package/assets/apple-touch-icons/9.png +0 -0
- package/assets/apple-touch-icons/A.png +0 -0
- package/assets/apple-touch-icons/B.png +0 -0
- package/assets/apple-touch-icons/C.png +0 -0
- package/assets/apple-touch-icons/D.png +0 -0
- package/assets/apple-touch-icons/E.png +0 -0
- package/assets/apple-touch-icons/F.png +0 -0
- package/assets/apple-touch-icons/G.png +0 -0
- package/assets/apple-touch-icons/H.png +0 -0
- package/assets/apple-touch-icons/I.png +0 -0
- package/assets/apple-touch-icons/J.png +0 -0
- package/assets/apple-touch-icons/K.png +0 -0
- package/assets/apple-touch-icons/L.png +0 -0
- package/assets/apple-touch-icons/M.png +0 -0
- package/assets/apple-touch-icons/N.png +0 -0
- package/assets/apple-touch-icons/O.png +0 -0
- package/assets/apple-touch-icons/P.png +0 -0
- package/assets/apple-touch-icons/Q.png +0 -0
- package/assets/apple-touch-icons/R.png +0 -0
- package/assets/apple-touch-icons/S.png +0 -0
- package/assets/apple-touch-icons/T.png +0 -0
- package/assets/apple-touch-icons/U.png +0 -0
- package/assets/apple-touch-icons/V.png +0 -0
- package/assets/apple-touch-icons/W.png +0 -0
- package/assets/apple-touch-icons/X.png +0 -0
- package/assets/apple-touch-icons/Y.png +0 -0
- package/assets/apple-touch-icons/Z.png +0 -0
- package/assets/apple-touch-icons/default.png +0 -0
- package/dist/.source-hash +1 -0
- package/dist/index.d.ts +56 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2353 -0
- package/dist/index.js.map +1 -0
- package/dist/raybase-package-ranges.d.ts +11 -0
- package/dist/raybase-package-ranges.d.ts.map +1 -0
- package/dist/raybase-package-ranges.js +11 -0
- package/dist/raybase-package-ranges.js.map +1 -0
- package/dist/source-fetch.d.ts +91 -0
- package/dist/source-fetch.d.ts.map +1 -0
- package/dist/source-fetch.js +325 -0
- package/dist/source-fetch.js.map +1 -0
- package/dist/source-hash.d.ts +2 -0
- package/dist/source-hash.d.ts.map +1 -0
- package/dist/source-hash.js +23 -0
- package/dist/source-hash.js.map +1 -0
- package/dist/starter-description.d.ts +44 -0
- package/dist/starter-description.d.ts.map +1 -0
- package/dist/starter-description.js +273 -0
- package/dist/starter-description.js.map +1 -0
- package/dist/starter-source.d.ts +43 -0
- package/dist/starter-source.d.ts.map +1 -0
- package/dist/starter-source.js +156 -0
- package/dist/starter-source.js.map +1 -0
- package/dist/store-app-apply.d.ts +27 -0
- package/dist/store-app-apply.d.ts.map +1 -0
- package/dist/store-app-apply.js +100 -0
- package/dist/store-app-apply.js.map +1 -0
- package/dist/store-app-manifest.d.ts +86 -0
- package/dist/store-app-manifest.d.ts.map +1 -0
- package/dist/store-app-manifest.js +110 -0
- package/dist/store-app-manifest.js.map +1 -0
- package/dist/store-app-registry.d.ts +30 -0
- package/dist/store-app-registry.d.ts.map +1 -0
- package/dist/store-app-registry.js +232 -0
- package/dist/store-app-registry.js.map +1 -0
- package/models/recommended.json +42 -0
- package/modules/api/templates/react-router/app/api/operations.ts +8 -0
- package/modules/api/templates/tanstack-start/src/api/operations.ts +15 -0
- package/modules/docs/templates/astro-emdash/content/docs/getting-started.mdx +13 -0
- package/modules/docs/templates/astro-emdash/content/docs/index.mdx +13 -0
- package/modules/docs/templates/astro-emdash/content/docs/mcp.mdx +11 -0
- package/modules/docs/templates/astro-emdash/content/docs/meta.json +4 -0
- package/modules/docs/templates/astro-emdash/site/content/docs/getting-started.mdx +12 -0
- package/modules/docs/templates/astro-emdash/site/content/docs/index.mdx +12 -0
- package/modules/docs/templates/astro-emdash/site/content/docs/mcp.mdx +10 -0
- package/modules/docs/templates/astro-emdash/site/content/docs/meta.json +4 -0
- package/modules/docs/templates/astro-emdash/site/source.config.ts +10 -0
- package/modules/docs/templates/astro-emdash/site/src/docs/docs-assets.ts +1 -0
- package/modules/docs/templates/astro-emdash/site/src/docs/docs-client.tsx +22 -0
- package/modules/docs/templates/astro-emdash/site/src/docs/docs-data.ts +24 -0
- package/modules/docs/templates/astro-emdash/site/src/docs/docs-handler.tsx +105 -0
- package/modules/docs/templates/astro-emdash/site/src/docs/docs-layout.tsx +56 -0
- package/modules/docs/templates/astro-emdash/site/src/docs/docs-mdx.tsx +79 -0
- package/modules/docs/templates/astro-emdash/site/src/docs/docs-page-actions.tsx +146 -0
- package/modules/docs/templates/astro-emdash/site/src/docs/docs-page.tsx +70 -0
- package/modules/docs/templates/astro-emdash/site/src/docs/llm-text.ts +61 -0
- package/modules/docs/templates/astro-emdash/site/src/docs/source.ts +7 -0
- package/modules/docs/templates/astro-emdash/site/src/pages/docs/[...slug].ts +6 -0
- package/modules/docs/templates/astro-emdash/site/src/pages/docs/api/markdown.ts +4 -0
- package/modules/docs/templates/astro-emdash/site/src/pages/docs/api/search.ts +4 -0
- package/modules/docs/templates/astro-emdash/site/src/pages/llms.txt.ts +8 -0
- package/modules/docs/templates/astro-emdash/site/src/styles-docs.css +3 -0
- package/modules/docs/templates/astro-emdash/source.config.ts +10 -0
- package/modules/docs/templates/astro-emdash/src/docs/docs-assets.ts +1 -0
- package/modules/docs/templates/astro-emdash/src/docs/docs-client.tsx +22 -0
- package/modules/docs/templates/astro-emdash/src/docs/docs-data.ts +24 -0
- package/modules/docs/templates/astro-emdash/src/docs/docs-handler.tsx +105 -0
- package/modules/docs/templates/astro-emdash/src/docs/docs-layout.tsx +56 -0
- package/modules/docs/templates/astro-emdash/src/docs/docs-mdx.tsx +79 -0
- package/modules/docs/templates/astro-emdash/src/docs/docs-page-actions.tsx +146 -0
- package/modules/docs/templates/astro-emdash/src/docs/docs-page.tsx +70 -0
- package/modules/docs/templates/astro-emdash/src/docs/llm-text.ts +61 -0
- package/modules/docs/templates/astro-emdash/src/docs/source.ts +7 -0
- package/modules/docs/templates/astro-emdash/src/routes/docs/$.tsx +22 -0
- package/modules/docs/templates/astro-emdash/src/routes/docs/api/markdown.ts +12 -0
- package/modules/docs/templates/astro-emdash/src/routes/docs/api/search.ts +12 -0
- package/modules/docs/templates/astro-emdash/src/routes/docs.index.tsx +22 -0
- package/modules/docs/templates/astro-emdash/src/routes/docs.tsx +22 -0
- package/modules/docs/templates/astro-emdash/src/styles-docs.css +3 -0
- package/modules/docs/templates/react-router/app/components/mdx.tsx +79 -0
- package/modules/docs/templates/react-router/app/lib/layout.shared.tsx +54 -0
- package/modules/docs/templates/react-router/app/lib/source.ts +7 -0
- package/modules/docs/templates/react-router/app/routes/docs.$.tsx +49 -0
- package/modules/docs/templates/react-router/app/routes/docs.api.search.ts +10 -0
- package/modules/docs/templates/react-router/app/routes/docs.tsx +13 -0
- package/modules/docs/templates/react-router/content/docs/getting-started.mdx +8 -0
- package/modules/docs/templates/react-router/content/docs/index.mdx +8 -0
- package/modules/docs/templates/react-router/content/docs/mcp.mdx +121 -0
- package/modules/docs/templates/react-router/content/docs/meta.json +4 -0
- package/modules/docs/templates/react-router/source.config.ts +5 -0
- package/modules/docs/templates/tanstack-start/content/docs/getting-started.mdx +10 -0
- package/modules/docs/templates/tanstack-start/content/docs/index.mdx +8 -0
- package/modules/docs/templates/tanstack-start/content/docs/mcp.mdx +121 -0
- package/modules/docs/templates/tanstack-start/content/docs/meta.json +4 -0
- package/modules/docs/templates/tanstack-start/source.config.ts +10 -0
- package/modules/docs/templates/tanstack-start/src/docs/docs-assets.ts +1 -0
- package/modules/docs/templates/tanstack-start/src/docs/docs-client.tsx +22 -0
- package/modules/docs/templates/tanstack-start/src/docs/docs-data.ts +24 -0
- package/modules/docs/templates/tanstack-start/src/docs/docs-handler.tsx +105 -0
- package/modules/docs/templates/tanstack-start/src/docs/docs-layout.tsx +56 -0
- package/modules/docs/templates/tanstack-start/src/docs/docs-mdx.tsx +79 -0
- package/modules/docs/templates/tanstack-start/src/docs/docs-page-actions.tsx +146 -0
- package/modules/docs/templates/tanstack-start/src/docs/docs-page.tsx +70 -0
- package/modules/docs/templates/tanstack-start/src/docs/llm-text.ts +61 -0
- package/modules/docs/templates/tanstack-start/src/docs/source.ts +7 -0
- package/modules/docs/templates/tanstack-start/src/routes/docs/$.tsx +22 -0
- package/modules/docs/templates/tanstack-start/src/routes/docs/api/markdown.ts +12 -0
- package/modules/docs/templates/tanstack-start/src/routes/docs/api/search.ts +12 -0
- package/modules/docs/templates/tanstack-start/src/routes/docs.index.tsx +22 -0
- package/modules/docs/templates/tanstack-start/src/routes/docs.tsx +22 -0
- package/modules/docs/templates/tanstack-start/src/styles-docs.css +3 -0
- package/modules/guide/templates/astro-emdash/content/guide/capability-map.md +17 -0
- package/modules/guide/templates/astro-emdash/src/components/guide-widget.tsx +41 -0
- package/modules/guide/templates/astro-emdash/src/guide/actions.ts +8 -0
- package/modules/guide/templates/astro-emdash/src/guide/config.ts +21 -0
- package/modules/guide/templates/astro-emdash/src/guide/corpus.gen.ts +4 -0
- package/modules/guide/templates/astro-emdash/src/guide/corpus.manifest.json +72 -0
- package/modules/guide/templates/astro-emdash/src/guide/corpus.ts +4 -0
- package/modules/guide/templates/astro-emdash/src/guide/resources.json +4 -0
- package/modules/guide/templates/react-router/app/components/guide-widget.tsx +29 -0
- package/modules/guide/templates/react-router/app/guide/actions.ts +3 -0
- package/modules/guide/templates/react-router/app/guide/config.ts +21 -0
- package/modules/guide/templates/react-router/app/guide/corpus.gen.ts +4 -0
- package/modules/guide/templates/react-router/app/guide/corpus.manifest.json +22 -0
- package/modules/guide/templates/react-router/app/guide/corpus.ts +4 -0
- package/modules/guide/templates/react-router/app/guide/resources.json +4 -0
- package/modules/guide/templates/react-router/content/guide/capability-map.md +13 -0
- package/modules/guide/templates/tanstack-start/content/guide/capability-map.md +17 -0
- package/modules/guide/templates/tanstack-start/src/components/guide-widget.tsx +41 -0
- package/modules/guide/templates/tanstack-start/src/guide/actions.ts +17 -0
- package/modules/guide/templates/tanstack-start/src/guide/config.ts +21 -0
- package/modules/guide/templates/tanstack-start/src/guide/corpus.gen.ts +4 -0
- package/modules/guide/templates/tanstack-start/src/guide/corpus.manifest.json +22 -0
- package/modules/guide/templates/tanstack-start/src/guide/corpus.ts +4 -0
- package/modules/guide/templates/tanstack-start/src/guide/resources.json +4 -0
- package/modules/openai-subscription/templates/astro-emdash/.agents/skills/raybase-openai-subscription/SKILL.md +57 -0
- package/modules/openai-subscription/templates/astro-emdash/.agents/skills/raybase-openai-subscription/references/compatibility-and-testing.md +129 -0
- package/modules/openai-subscription/templates/astro-emdash/.agents/skills/raybase-openai-subscription/references/module-contract.md +133 -0
- package/modules/openai-subscription/templates/astro-emdash/.agents/skills/raybase-openai-subscription/references/structured-outputs.md +159 -0
- package/modules/openai-subscription/templates/astro-emdash/src/openai-subscription.ts +11 -0
- package/modules/openai-subscription/templates/react-router/.agents/skills/raybase-openai-subscription/SKILL.md +57 -0
- package/modules/openai-subscription/templates/react-router/.agents/skills/raybase-openai-subscription/references/compatibility-and-testing.md +129 -0
- package/modules/openai-subscription/templates/react-router/.agents/skills/raybase-openai-subscription/references/module-contract.md +133 -0
- package/modules/openai-subscription/templates/react-router/.agents/skills/raybase-openai-subscription/references/structured-outputs.md +159 -0
- package/modules/openai-subscription/templates/react-router/app/openai-subscription.ts +11 -0
- package/modules/openai-subscription/templates/tanstack-start/.agents/skills/raybase-openai-subscription/SKILL.md +57 -0
- package/modules/openai-subscription/templates/tanstack-start/.agents/skills/raybase-openai-subscription/references/compatibility-and-testing.md +129 -0
- package/modules/openai-subscription/templates/tanstack-start/.agents/skills/raybase-openai-subscription/references/module-contract.md +133 -0
- package/modules/openai-subscription/templates/tanstack-start/.agents/skills/raybase-openai-subscription/references/structured-outputs.md +159 -0
- package/modules/openai-subscription/templates/tanstack-start/src/openai-subscription.ts +11 -0
- package/package.json +34 -8
- package/skills/README.md +122 -0
- package/skills/raybase-actions/SKILL.md +223 -0
- package/skills/raybase-actions/references/action-patterns.md +190 -0
- package/skills/raybase-actions/references/adapting-actions.md +93 -0
- package/skills/raybase-actions/references/testing-actions.md +48 -0
- package/skills/raybase-agent-debugging/SKILL.md +230 -0
- package/skills/raybase-ai/SKILL.md +1310 -0
- package/skills/raybase-api/SKILL.md +45 -0
- package/skills/raybase-astro-emdash/SKILL.md +143 -0
- package/skills/raybase-astro-emdash-content-model/SKILL.md +217 -0
- package/skills/raybase-astro-emdash-content-model/references/LICENSE-emdash +9 -0
- package/skills/raybase-astro-emdash-content-model/references/emdash-collections.md +265 -0
- package/skills/raybase-astro-emdash-design/LICENSE-impeccable +60 -0
- package/skills/raybase-astro-emdash-design/SKILL.md +170 -0
- package/skills/raybase-astro-emdash-design/reference/color.md +91 -0
- package/skills/raybase-astro-emdash-design/reference/copy.md +73 -0
- package/skills/raybase-astro-emdash-design/reference/direction.md +115 -0
- package/skills/raybase-astro-emdash-design/reference/imagery.md +84 -0
- package/skills/raybase-astro-emdash-design/reference/layout.md +69 -0
- package/skills/raybase-astro-emdash-design/reference/motion.md +75 -0
- package/skills/raybase-astro-emdash-design/reference/polish.md +75 -0
- package/skills/raybase-astro-emdash-design/reference/typography.md +72 -0
- package/skills/raybase-astro-emdash-galley/SKILL.md +265 -0
- package/skills/raybase-astro-emdash-migration/SKILL.md +218 -0
- package/skills/raybase-astro-emdash-migration/references/inventory-and-conversion.md +242 -0
- package/skills/raybase-astro-emdash-security-review/SKILL.md +68 -0
- package/skills/raybase-astro-emdash-theme-selection/SKILL.md +216 -0
- package/skills/raybase-auth/SKILL.md +358 -0
- package/skills/raybase-background-jobs/SKILL.md +774 -0
- package/skills/raybase-building/SKILL.md +409 -0
- package/skills/raybase-building/references/interview-and-spec.md +87 -0
- package/skills/raybase-building/references/planning-docs.md +26 -0
- package/skills/raybase-building/references/schema-and-config.md +70 -0
- package/skills/raybase-changing-a-live-app/SKILL.md +119 -0
- package/skills/raybase-data-and-policies/SKILL.md +377 -0
- package/skills/raybase-deploy/SKILL.md +136 -0
- package/skills/raybase-docs-writing/SKILL.md +119 -0
- package/skills/raybase-guide/SKILL.md +235 -0
- package/skills/raybase-mcp/SKILL.md +309 -0
- package/skills/raybase-mcp/agents/openai.yaml +4 -0
- package/skills/raybase-notifications/SKILL.md +138 -0
- package/skills/raybase-pro-migration/SKILL.md +28 -0
- package/skills/raybase-react-router/SKILL.md +241 -0
- package/skills/raybase-react-router-design/LICENSE-impeccable +60 -0
- package/skills/raybase-react-router-design/SKILL.md +135 -0
- package/skills/raybase-react-router-design/reference/color.md +87 -0
- package/skills/raybase-react-router-design/reference/copy.md +83 -0
- package/skills/raybase-react-router-design/reference/delight.md +48 -0
- package/skills/raybase-react-router-design/reference/interaction.md +91 -0
- package/skills/raybase-react-router-design/reference/layout.md +82 -0
- package/skills/raybase-react-router-design/reference/motion.md +86 -0
- package/skills/raybase-react-router-design/reference/polish.md +79 -0
- package/skills/raybase-react-router-design/reference/typography.md +71 -0
- package/skills/raybase-react-router-security-review/LICENSE +22 -0
- package/skills/raybase-react-router-security-review/SKILL.md +190 -0
- package/skills/raybase-react-router-security-review/agents/openai.yaml +4 -0
- package/skills/raybase-react-router-security-review/references/api-security.md +519 -0
- package/skills/raybase-react-router-security-review/references/authentication.md +353 -0
- package/skills/raybase-react-router-security-review/references/authorization.md +372 -0
- package/skills/raybase-react-router-security-review/references/business-logic.md +443 -0
- package/skills/raybase-react-router-security-review/references/cryptography.md +329 -0
- package/skills/raybase-react-router-security-review/references/csrf.md +398 -0
- package/skills/raybase-react-router-security-review/references/data-protection.md +378 -0
- package/skills/raybase-react-router-security-review/references/deserialization.md +410 -0
- package/skills/raybase-react-router-security-review/references/error-handling.md +436 -0
- package/skills/raybase-react-router-security-review/references/file-security.md +457 -0
- package/skills/raybase-react-router-security-review/references/injection.md +259 -0
- package/skills/raybase-react-router-security-review/references/logging.md +433 -0
- package/skills/raybase-react-router-security-review/references/misconfiguration.md +435 -0
- package/skills/raybase-react-router-security-review/references/modern-threats.md +475 -0
- package/skills/raybase-react-router-security-review/references/raybase-react-router-security.md +235 -0
- package/skills/raybase-react-router-security-review/references/ssrf.md +413 -0
- package/skills/raybase-react-router-security-review/references/supply-chain.md +405 -0
- package/skills/raybase-react-router-security-review/references/xss.md +336 -0
- package/skills/raybase-realtime/SKILL.md +158 -0
- package/skills/raybase-realtime/agents/openai.yaml +4 -0
- package/skills/raybase-schema/SKILL.md +209 -0
- package/skills/raybase-search/SKILL.md +137 -0
- package/skills/raybase-search/agents/openai.yaml +4 -0
- package/skills/raybase-settings/SKILL.md +139 -0
- package/skills/raybase-settings/agents/openai.yaml +4 -0
- package/skills/raybase-tanstack-start/SKILL.md +166 -0
- package/skills/raybase-tanstack-start-design/LICENSE-impeccable +60 -0
- package/skills/raybase-tanstack-start-design/SKILL.md +140 -0
- package/skills/raybase-tanstack-start-design/reference/color.md +80 -0
- package/skills/raybase-tanstack-start-design/reference/copy.md +83 -0
- package/skills/raybase-tanstack-start-design/reference/delight.md +48 -0
- package/skills/raybase-tanstack-start-design/reference/interaction.md +91 -0
- package/skills/raybase-tanstack-start-design/reference/layout.md +82 -0
- package/skills/raybase-tanstack-start-design/reference/motion.md +86 -0
- package/skills/raybase-tanstack-start-design/reference/polish.md +79 -0
- package/skills/raybase-tanstack-start-design/reference/typography.md +71 -0
- package/skills/raybase-tanstack-start-security-review/LICENSE +22 -0
- package/skills/raybase-tanstack-start-security-review/SKILL.md +194 -0
- package/skills/raybase-tanstack-start-security-review/agents/openai.yaml +4 -0
- package/skills/raybase-tanstack-start-security-review/references/api-security.md +519 -0
- package/skills/raybase-tanstack-start-security-review/references/authentication.md +353 -0
- package/skills/raybase-tanstack-start-security-review/references/authorization.md +372 -0
- package/skills/raybase-tanstack-start-security-review/references/business-logic.md +443 -0
- package/skills/raybase-tanstack-start-security-review/references/cryptography.md +329 -0
- package/skills/raybase-tanstack-start-security-review/references/csrf.md +398 -0
- package/skills/raybase-tanstack-start-security-review/references/data-protection.md +378 -0
- package/skills/raybase-tanstack-start-security-review/references/deserialization.md +410 -0
- package/skills/raybase-tanstack-start-security-review/references/error-handling.md +436 -0
- package/skills/raybase-tanstack-start-security-review/references/file-security.md +457 -0
- package/skills/raybase-tanstack-start-security-review/references/injection.md +259 -0
- package/skills/raybase-tanstack-start-security-review/references/logging.md +433 -0
- package/skills/raybase-tanstack-start-security-review/references/misconfiguration.md +435 -0
- package/skills/raybase-tanstack-start-security-review/references/modern-threats.md +475 -0
- package/skills/raybase-tanstack-start-security-review/references/raybase-tanstack-security.md +208 -0
- package/skills/raybase-tanstack-start-security-review/references/ssrf.md +413 -0
- package/skills/raybase-tanstack-start-security-review/references/supply-chain.md +405 -0
- package/skills/raybase-tanstack-start-security-review/references/xss.md +336 -0
- package/skills-manifest.json +41 -0
- package/templates/astro-emdash/.dev.vars.example +7 -0
- package/templates/astro-emdash/AGENTS.md +122 -0
- package/templates/astro-emdash/DESIGN.md +90 -0
- package/templates/astro-emdash/components.json +21 -0
- package/templates/astro-emdash/content/docs/getting-started.mdx +20 -0
- package/templates/astro-emdash/content/docs/index.mdx +13 -0
- package/templates/astro-emdash/content/docs/mcp.mdx +11 -0
- package/templates/astro-emdash/content/docs/meta.json +4 -0
- package/templates/astro-emdash/content/docs/site-templates.mdx +62 -0
- package/templates/astro-emdash/dev/CODEBASE-MAP.md +46 -0
- package/templates/astro-emdash/dev/SPEC-OVERVIEW.md +15 -0
- package/templates/astro-emdash/dev/SPEC.md +84 -0
- package/templates/astro-emdash/dev/features/archive/.gitkeep +1 -0
- package/templates/astro-emdash/docs/theme-previews/base.svg +24 -0
- package/templates/astro-emdash/docs/theme-previews/steel.svg +24 -0
- package/templates/astro-emdash/docs/theme-previews/zen.svg +24 -0
- package/templates/astro-emdash/docs/themes.md +106 -0
- package/templates/astro-emdash/drizzle.config.ts +5 -0
- package/templates/astro-emdash/gitignore +11 -0
- package/templates/astro-emdash/migrations/app/meta/_journal.json +5 -0
- package/templates/astro-emdash/package.json +79 -0
- package/templates/astro-emdash/pnpm-workspace.yaml +71 -0
- package/templates/astro-emdash/public/_headers +4 -0
- package/templates/astro-emdash/site/astro.config.mjs +120 -0
- package/templates/astro-emdash/site/demo/README.md +72 -0
- package/templates/astro-emdash/site/demo/content/collection.json +43 -0
- package/templates/astro-emdash/site/demo/content/entries.json +120 -0
- package/templates/astro-emdash/site/demo/templates/demo-article-card/manifest.json +51 -0
- package/templates/astro-emdash/site/demo/templates/demo-article-card/sample-content.json +5 -0
- package/templates/astro-emdash/site/demo/templates/demo-article-card/template.liquid +48 -0
- package/templates/astro-emdash/site/demo/templates/demo-article-page/host.json +9 -0
- package/templates/astro-emdash/site/demo/templates/demo-article-page/manifest.json +38 -0
- package/templates/astro-emdash/site/demo/templates/demo-article-page/sample-content.json +34 -0
- package/templates/astro-emdash/site/demo/templates/demo-article-page/template.liquid +84 -0
- package/templates/astro-emdash/site/demo/templates/demo-articles-index/manifest.json +64 -0
- package/templates/astro-emdash/site/demo/templates/demo-articles-index/page.json +7 -0
- package/templates/astro-emdash/site/demo/templates/demo-articles-index/sample-content.json +24 -0
- package/templates/astro-emdash/site/demo/templates/demo-articles-index/template.liquid +100 -0
- package/templates/astro-emdash/site/demo/templates/demo-menu-nav/manifest.json +51 -0
- package/templates/astro-emdash/site/demo/templates/demo-menu-nav/sample-content.json +5 -0
- package/templates/astro-emdash/site/demo/templates/demo-menu-nav/template.liquid +70 -0
- package/templates/astro-emdash/site/gitignore +1 -0
- package/templates/astro-emdash/site/package.json +56 -0
- package/templates/astro-emdash/site/scripts/apply-site-templates.mjs +560 -0
- package/templates/astro-emdash/site/scripts/galley-demo.mjs +298 -0
- package/templates/astro-emdash/site/scripts/seed-galley-starter.mjs +360 -0
- package/templates/astro-emdash/site/scripts/site-origin.mjs +45 -0
- package/templates/astro-emdash/site/seed/seed.json +154 -0
- package/templates/astro-emdash/site/seed/templates/.gitkeep +1 -0
- package/templates/astro-emdash/site/src/components/RaybaseSignedInMenu.astro +163 -0
- package/templates/astro-emdash/site/src/components/blocks/RaybaseActionIsland.astro +41 -0
- package/templates/astro-emdash/site/src/content-door/raybase-routes.ts +738 -0
- package/templates/astro-emdash/site/src/content-door/resolve-page.ts +142 -0
- package/templates/astro-emdash/site/src/content-door/seed.ts +85 -0
- package/templates/astro-emdash/site/src/env.d.ts +12 -0
- package/templates/astro-emdash/site/src/layouts/SiteLayout.astro +68 -0
- package/templates/astro-emdash/site/src/lib/palettes.gen.ts +7 -0
- package/templates/astro-emdash/site/src/lib/site-motion.ts +169 -0
- package/templates/astro-emdash/site/src/lib/site-shell.ts +294 -0
- package/templates/astro-emdash/site/src/live.config.ts +8 -0
- package/templates/astro-emdash/site/src/middleware.ts +20 -0
- package/templates/astro-emdash/site/src/pages/[...slug].astro +113 -0
- package/templates/astro-emdash/site/src/pages/_raybase/handoff/consume.ts +6 -0
- package/templates/astro-emdash/site/src/pages/_raybase/islands/action.ts +8 -0
- package/templates/astro-emdash/site/src/pages/_raybase/sign-out/index.ts +6 -0
- package/templates/astro-emdash/site/src/styles/palette-fonts.gen.css +1 -0
- package/templates/astro-emdash/site/src/styles/palettes.gen.css +3 -0
- package/templates/astro-emdash/site/src/styles.css +607 -0
- package/templates/astro-emdash/site/tsconfig.json +12 -0
- package/templates/astro-emdash/site/wrangler.jsonc +34 -0
- package/templates/astro-emdash/source.config.ts +10 -0
- package/templates/astro-emdash/src/actions.ts +58 -0
- package/templates/astro-emdash/src/ai/agents.ts +20 -0
- package/templates/astro-emdash/src/ai/retrieval.ts +36 -0
- package/templates/astro-emdash/src/auth-door.ts +18 -0
- package/templates/astro-emdash/src/client.tsx +25 -0
- package/templates/astro-emdash/src/components/.gitkeep +1 -0
- package/templates/astro-emdash/src/components/account-menu.tsx +91 -0
- package/templates/astro-emdash/src/components/auth-shell.tsx +69 -0
- package/templates/astro-emdash/src/components/mode-toggle.tsx +32 -0
- package/templates/astro-emdash/src/components/search-command-palette.tsx +107 -0
- package/templates/astro-emdash/src/components/setup-token-page.tsx +196 -0
- package/templates/astro-emdash/src/components/ui/avatar.tsx +107 -0
- package/templates/astro-emdash/src/components/ui/badge.tsx +52 -0
- package/templates/astro-emdash/src/components/ui/button.tsx +69 -0
- package/templates/astro-emdash/src/components/ui/checkbox.tsx +29 -0
- package/templates/astro-emdash/src/components/ui/dialog.tsx +158 -0
- package/templates/astro-emdash/src/components/ui/dropdown-menu.tsx +303 -0
- package/templates/astro-emdash/src/components/ui/input.tsx +20 -0
- package/templates/astro-emdash/src/components/ui/label.tsx +20 -0
- package/templates/astro-emdash/src/components/ui/scroll-area.tsx +53 -0
- package/templates/astro-emdash/src/components/ui/select.tsx +215 -0
- package/templates/astro-emdash/src/components/ui/separator.tsx +23 -0
- package/templates/astro-emdash/src/components/ui/sheet.tsx +138 -0
- package/templates/astro-emdash/src/components/ui/sidebar.tsx +728 -0
- package/templates/astro-emdash/src/components/ui/skeleton.tsx +13 -0
- package/templates/astro-emdash/src/components/ui/textarea.tsx +18 -0
- package/templates/astro-emdash/src/components/ui/tooltip.tsx +66 -0
- package/templates/astro-emdash/src/db/migrations.gen.ts +6 -0
- package/templates/astro-emdash/src/db/schema.ts +6 -0
- package/templates/astro-emdash/src/db/seed.ts +16 -0
- package/templates/astro-emdash/src/db/storage.ts +32 -0
- package/templates/astro-emdash/src/docs/docs-assets.ts +1 -0
- package/templates/astro-emdash/src/docs/docs-client.tsx +22 -0
- package/templates/astro-emdash/src/docs/docs-data.ts +24 -0
- package/templates/astro-emdash/src/docs/docs-handler.tsx +105 -0
- package/templates/astro-emdash/src/docs/docs-layout.tsx +56 -0
- package/templates/astro-emdash/src/docs/docs-mdx.tsx +79 -0
- package/templates/astro-emdash/src/docs/docs-page-actions.tsx +146 -0
- package/templates/astro-emdash/src/docs/docs-page.tsx +70 -0
- package/templates/astro-emdash/src/docs/llm-text.ts +61 -0
- package/templates/astro-emdash/src/docs/source.ts +7 -0
- package/templates/astro-emdash/src/guide/corpus.gen.ts +4 -0
- package/templates/astro-emdash/src/guide/corpus.manifest.json +72 -0
- package/templates/astro-emdash/src/hooks/use-mobile.ts +19 -0
- package/templates/astro-emdash/src/jobs.example.ts +48 -0
- package/templates/astro-emdash/src/lib/account.ts +12 -0
- package/templates/astro-emdash/src/lib/auth-client.ts +181 -0
- package/templates/astro-emdash/src/lib/utils.ts +6 -0
- package/templates/astro-emdash/src/mcp-app.ts +57 -0
- package/templates/astro-emdash/src/notifications.example.ts +37 -0
- package/templates/astro-emdash/src/raybase.auth.ts +70 -0
- package/templates/astro-emdash/src/raybase.config.ts +49 -0
- package/templates/astro-emdash/src/raybase.server.ts +56 -0
- package/templates/astro-emdash/src/realtime.example.ts +18 -0
- package/templates/astro-emdash/src/router.tsx +19 -0
- package/templates/astro-emdash/src/routes/__root.tsx +56 -0
- package/templates/astro-emdash/src/routes/_app/admin.tsx +13 -0
- package/templates/astro-emdash/src/routes/_app/forgot-password.tsx +97 -0
- package/templates/astro-emdash/src/routes/_app/index.tsx +169 -0
- package/templates/astro-emdash/src/routes/_app/invite.$token.tsx +11 -0
- package/templates/astro-emdash/src/routes/_app/login.tsx +193 -0
- package/templates/astro-emdash/src/routes/_app/profile.tsx +98 -0
- package/templates/astro-emdash/src/routes/_app/reset-password.$token.tsx +15 -0
- package/templates/astro-emdash/src/routes/_app/reset-password.tsx +115 -0
- package/templates/astro-emdash/src/routes/_app/setup.$token.tsx +11 -0
- package/templates/astro-emdash/src/routes/_app/signup.tsx +141 -0
- package/templates/astro-emdash/src/routes/_app/verify-email.$token.tsx +15 -0
- package/templates/astro-emdash/src/routes/_app/verify-email.tsx +154 -0
- package/templates/astro-emdash/src/routes/_app.tsx +33 -0
- package/templates/astro-emdash/src/routes/admin/$.ts +20 -0
- package/templates/astro-emdash/src/routes/api/$.ts +19 -0
- package/templates/astro-emdash/src/routes/docs/$.tsx +22 -0
- package/templates/astro-emdash/src/routes/docs/api/markdown.ts +12 -0
- package/templates/astro-emdash/src/routes/docs/api/search.ts +12 -0
- package/templates/astro-emdash/src/routes/docs.index.tsx +22 -0
- package/templates/astro-emdash/src/routes/docs.tsx +22 -0
- package/templates/astro-emdash/src/search.ts +6 -0
- package/templates/astro-emdash/src/settings.ts +12 -0
- package/templates/astro-emdash/src/styles-docs.css +3 -0
- package/templates/astro-emdash/src/styles.css +101 -0
- package/templates/astro-emdash/src/themes/base.css +76 -0
- package/templates/astro-emdash/src/themes/carbon.css +76 -0
- package/templates/astro-emdash/src/themes/fonts.css +25 -0
- package/templates/astro-emdash/src/themes/sage.css +76 -0
- package/templates/astro-emdash/src/themes/sand.css +76 -0
- package/templates/astro-emdash/src/themes/slate.css +81 -0
- package/templates/astro-emdash/src/themes/ultra.css +76 -0
- package/templates/astro-emdash/src/themes/zen.css +76 -0
- package/templates/astro-emdash/src/worker-entry.ts +31 -0
- package/templates/astro-emdash/tests/raybase-patterns.test.ts +29 -0
- package/templates/astro-emdash/tsconfig.json +36 -0
- package/templates/astro-emdash/vite.config.ts +130 -0
- package/templates/astro-emdash/vitest.config.ts +8 -0
- package/templates/astro-emdash/wrangler.jsonc +112 -0
- package/templates/react-router/.dev.vars.example +5 -0
- package/templates/react-router/.editorconfig +15 -0
- package/templates/react-router/AGENTS.md +54 -0
- package/templates/react-router/README.md +52 -0
- package/templates/react-router/app/app.css +44 -0
- package/templates/react-router/app/components/mdx.tsx +79 -0
- package/templates/react-router/app/components/ui/button.tsx +45 -0
- package/templates/react-router/app/components/ui/card.tsx +87 -0
- package/templates/react-router/app/components/ui/separator.tsx +22 -0
- package/templates/react-router/app/db/migrations.gen.ts +6 -0
- package/templates/react-router/app/db/schema.ts +56 -0
- package/templates/react-router/app/db/seed.ts +14 -0
- package/templates/react-router/app/entry.server.tsx +41 -0
- package/templates/react-router/app/globals.d.ts +1 -0
- package/templates/react-router/app/lib/layout.shared.tsx +52 -0
- package/templates/react-router/app/lib/source.ts +7 -0
- package/templates/react-router/app/lib/utils.ts +6 -0
- package/templates/react-router/app/raybase.server.ts +65 -0
- package/templates/react-router/app/root.tsx +23 -0
- package/templates/react-router/app/routes/_index.tsx +53 -0
- package/templates/react-router/app/routes/docs.$.tsx +49 -0
- package/templates/react-router/app/routes/docs.api.search.ts +10 -0
- package/templates/react-router/app/routes/docs.tsx +13 -0
- package/templates/react-router/app/routes.ts +3 -0
- package/templates/react-router/components.json +22 -0
- package/templates/react-router/content/docs/getting-started.mdx +15 -0
- package/templates/react-router/content/docs/index.mdx +8 -0
- package/templates/react-router/content/docs/mcp.mdx +121 -0
- package/templates/react-router/content/docs/meta.json +4 -0
- package/templates/react-router/dev/CODEBASE-MAP.md +48 -0
- package/templates/react-router/dev/SPEC-OVERVIEW.md +35 -0
- package/templates/react-router/dev/SPEC.md +93 -0
- package/templates/react-router/dev/features/archive/.gitkeep +1 -0
- package/templates/react-router/drizzle.config.ts +5 -0
- package/templates/react-router/env.d.ts +53 -0
- package/templates/react-router/gitignore +23 -0
- package/templates/react-router/migrations/app/meta/_journal.json +1 -0
- package/templates/react-router/package.json +70 -0
- package/templates/react-router/public/_headers +4 -0
- package/templates/react-router/public/favicon.ico +0 -0
- package/templates/react-router/react-router.config.ts +9 -0
- package/templates/react-router/source.config.ts +5 -0
- package/templates/react-router/tests/raybase-patterns.test.ts +23 -0
- package/templates/react-router/tsconfig.json +27 -0
- package/templates/react-router/vite.config.ts +59 -0
- package/templates/react-router/vitest.config.ts +8 -0
- package/templates/react-router/workers/app.ts +40 -0
- package/templates/react-router/wrangler.jsonc +111 -0
- package/templates/tanstack-start/.dev.vars.example +5 -0
- package/templates/tanstack-start/AGENTS.md +95 -0
- package/templates/tanstack-start/DESIGN.md +65 -0
- package/templates/tanstack-start/components.json +21 -0
- package/templates/tanstack-start/content/docs/getting-started.mdx +65 -0
- package/templates/tanstack-start/content/docs/index.mdx +10 -0
- package/templates/tanstack-start/content/docs/mcp.mdx +122 -0
- package/templates/tanstack-start/content/docs/meta.json +4 -0
- package/templates/tanstack-start/dev/CODEBASE-MAP.md +84 -0
- package/templates/tanstack-start/dev/SPEC-OVERVIEW.md +46 -0
- package/templates/tanstack-start/dev/SPEC.md +213 -0
- package/templates/tanstack-start/dev/features/archive/.gitkeep +1 -0
- package/templates/tanstack-start/docs/theme-previews/base.svg +24 -0
- package/templates/tanstack-start/docs/theme-previews/steel.svg +24 -0
- package/templates/tanstack-start/docs/theme-previews/zen.svg +24 -0
- package/templates/tanstack-start/docs/themes.md +116 -0
- package/templates/tanstack-start/drizzle.config.ts +5 -0
- package/templates/tanstack-start/gitignore +11 -0
- package/templates/tanstack-start/migrations/app/0000_low_karen_page.sql +26 -0
- package/templates/tanstack-start/migrations/app/meta/0000_snapshot.json +196 -0
- package/templates/tanstack-start/migrations/app/meta/_journal.json +13 -0
- package/templates/tanstack-start/package.json +77 -0
- package/templates/tanstack-start/public/_headers +8 -0
- package/templates/tanstack-start/public/icons/app-icon-maskable.svg +1 -0
- package/templates/tanstack-start/public/icons/app-icon.svg +1 -0
- package/templates/tanstack-start/public/icons/apple-touch-icon.png +0 -0
- package/templates/tanstack-start/public/manifest.webmanifest +14 -0
- package/templates/tanstack-start/public/raybase-push-sw.js +32 -0
- package/templates/tanstack-start/source.config.ts +10 -0
- package/templates/tanstack-start/src/actions.ts +560 -0
- package/templates/tanstack-start/src/ai/agents.ts +78 -0
- package/templates/tanstack-start/src/ai/retrieval.ts +36 -0
- package/templates/tanstack-start/src/auth-door.ts +18 -0
- package/templates/tanstack-start/src/client.tsx +25 -0
- package/templates/tanstack-start/src/components/.gitkeep +1 -0
- package/templates/tanstack-start/src/components/account-menu.tsx +127 -0
- package/templates/tanstack-start/src/components/auth-shell.tsx +69 -0
- package/templates/tanstack-start/src/components/install-app.tsx +35 -0
- package/templates/tanstack-start/src/components/mode-toggle.tsx +32 -0
- package/templates/tanstack-start/src/components/search-command-palette.tsx +107 -0
- package/templates/tanstack-start/src/components/setup-token-page.tsx +197 -0
- package/templates/tanstack-start/src/components/ui/avatar.tsx +107 -0
- package/templates/tanstack-start/src/components/ui/badge.tsx +52 -0
- package/templates/tanstack-start/src/components/ui/button.tsx +69 -0
- package/templates/tanstack-start/src/components/ui/checkbox.tsx +29 -0
- package/templates/tanstack-start/src/components/ui/dialog.tsx +158 -0
- package/templates/tanstack-start/src/components/ui/dropdown-menu.tsx +303 -0
- package/templates/tanstack-start/src/components/ui/input.tsx +20 -0
- package/templates/tanstack-start/src/components/ui/label.tsx +20 -0
- package/templates/tanstack-start/src/components/ui/scroll-area.tsx +53 -0
- package/templates/tanstack-start/src/components/ui/select.tsx +215 -0
- package/templates/tanstack-start/src/components/ui/separator.tsx +23 -0
- package/templates/tanstack-start/src/components/ui/sheet.tsx +138 -0
- package/templates/tanstack-start/src/components/ui/sidebar.tsx +728 -0
- package/templates/tanstack-start/src/components/ui/skeleton.tsx +13 -0
- package/templates/tanstack-start/src/components/ui/textarea.tsx +18 -0
- package/templates/tanstack-start/src/components/ui/tooltip.tsx +66 -0
- package/templates/tanstack-start/src/db/migrations.gen.ts +6 -0
- package/templates/tanstack-start/src/db/schema.ts +90 -0
- package/templates/tanstack-start/src/db/seed.ts +106 -0
- package/templates/tanstack-start/src/db/storage.ts +32 -0
- package/templates/tanstack-start/src/docs/docs-assets.ts +1 -0
- package/templates/tanstack-start/src/docs/docs-client.tsx +22 -0
- package/templates/tanstack-start/src/docs/docs-data.ts +24 -0
- package/templates/tanstack-start/src/docs/docs-handler.tsx +105 -0
- package/templates/tanstack-start/src/docs/docs-layout.tsx +56 -0
- package/templates/tanstack-start/src/docs/docs-mdx.tsx +79 -0
- package/templates/tanstack-start/src/docs/docs-page-actions.tsx +146 -0
- package/templates/tanstack-start/src/docs/docs-page.tsx +70 -0
- package/templates/tanstack-start/src/docs/llm-text.ts +61 -0
- package/templates/tanstack-start/src/docs/source.ts +7 -0
- package/templates/tanstack-start/src/hooks/use-mobile.ts +19 -0
- package/templates/tanstack-start/src/hooks/use-pwa-install.ts +77 -0
- package/templates/tanstack-start/src/jobs.example.ts +56 -0
- package/templates/tanstack-start/src/lib/account.ts +13 -0
- package/templates/tanstack-start/src/lib/auth-client.ts +187 -0
- package/templates/tanstack-start/src/lib/push-client.ts +98 -0
- package/templates/tanstack-start/src/lib/utils.ts +6 -0
- package/templates/tanstack-start/src/mcp-app.ts +74 -0
- package/templates/tanstack-start/src/notifications.example.ts +37 -0
- package/templates/tanstack-start/src/raybase.auth.ts +86 -0
- package/templates/tanstack-start/src/raybase.config.ts +86 -0
- package/templates/tanstack-start/src/raybase.server.ts +155 -0
- package/templates/tanstack-start/src/realtime.example.ts +46 -0
- package/templates/tanstack-start/src/router.tsx +19 -0
- package/templates/tanstack-start/src/routes/__root.tsx +73 -0
- package/templates/tanstack-start/src/routes/_app/admin.tsx +13 -0
- package/templates/tanstack-start/src/routes/_app/forgot-password.tsx +97 -0
- package/templates/tanstack-start/src/routes/_app/index.tsx +1316 -0
- package/templates/tanstack-start/src/routes/_app/invite.$token.tsx +11 -0
- package/templates/tanstack-start/src/routes/_app/login.tsx +193 -0
- package/templates/tanstack-start/src/routes/_app/profile.tsx +98 -0
- package/templates/tanstack-start/src/routes/_app/reset-password.$token.tsx +16 -0
- package/templates/tanstack-start/src/routes/_app/reset-password.tsx +115 -0
- package/templates/tanstack-start/src/routes/_app/setup.$token.tsx +11 -0
- package/templates/tanstack-start/src/routes/_app/signup.tsx +141 -0
- package/templates/tanstack-start/src/routes/_app/verify-email.$token.tsx +15 -0
- package/templates/tanstack-start/src/routes/_app/verify-email.tsx +154 -0
- package/templates/tanstack-start/src/routes/_app.tsx +33 -0
- package/templates/tanstack-start/src/routes/admin/$.ts +20 -0
- package/templates/tanstack-start/src/routes/api/$.ts +19 -0
- package/templates/tanstack-start/src/routes/docs/$.tsx +22 -0
- package/templates/tanstack-start/src/routes/docs/api/markdown.ts +12 -0
- package/templates/tanstack-start/src/routes/docs/api/search.ts +12 -0
- package/templates/tanstack-start/src/routes/docs.index.tsx +22 -0
- package/templates/tanstack-start/src/routes/docs.tsx +22 -0
- package/templates/tanstack-start/src/search.ts +26 -0
- package/templates/tanstack-start/src/settings.ts +12 -0
- package/templates/tanstack-start/src/styles-docs.css +3 -0
- package/templates/tanstack-start/src/styles.css +73 -0
- package/templates/tanstack-start/src/themes/base.css +76 -0
- package/templates/tanstack-start/src/themes/carbon.css +76 -0
- package/templates/tanstack-start/src/themes/fonts.css +18 -0
- package/templates/tanstack-start/src/themes/sage.css +76 -0
- package/templates/tanstack-start/src/themes/sand.css +76 -0
- package/templates/tanstack-start/src/themes/slate.css +76 -0
- package/templates/tanstack-start/src/themes/ultra.css +76 -0
- package/templates/tanstack-start/src/themes/zen.css +76 -0
- package/templates/tanstack-start/src/worker-entry.ts +30 -0
- package/templates/tanstack-start/tests/raybase-patterns.test.ts +247 -0
- package/templates/tanstack-start/tsconfig.json +33 -0
- package/templates/tanstack-start/vite.config.ts +132 -0
- package/templates/tanstack-start/vitest.config.ts +8 -0
- package/templates/tanstack-start/wrangler.jsonc +112 -0
- package/README.md +0 -3
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { existsSync, realpathSync } from "node:fs";
|
|
2
|
+
import { createRequire } from "node:module";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
import cloudflare from "@astrojs/cloudflare";
|
|
5
|
+
import react from "@astrojs/react";
|
|
6
|
+
import { d1, r2 } from "@emdash-cms/cloudflare";
|
|
7
|
+
import { raybaseAuth } from "@raybase/emdash";
|
|
8
|
+
import { galley } from "@raybase/galley";
|
|
9
|
+
import tailwindcss from "@tailwindcss/vite";
|
|
10
|
+
import { defineConfig } from "astro/config";
|
|
11
|
+
import emdash from "emdash/astro";
|
|
12
|
+
import { searchForWorkspaceRoot } from "vite";
|
|
13
|
+
import { resolveSpineOrigin } from "./scripts/site-origin.mjs";
|
|
14
|
+
|
|
15
|
+
// Spine origin discovery falls back to the app root's .dev.vars, where
|
|
16
|
+
// `raybase dev` persists the port it actually resolved — a standalone site
|
|
17
|
+
// launch must not verify handoff tokens against a stale 3000 default.
|
|
18
|
+
const spineUrl = resolveSpineOrigin();
|
|
19
|
+
// The content door's runtime lookup reads import.meta.env inside workerd,
|
|
20
|
+
// which only carries PUBLIC_-prefixed vars from this process's env; publish
|
|
21
|
+
// the resolved origin there so every launch mode sees the same issuer.
|
|
22
|
+
process.env.PUBLIC_RAYBASE_SPINE_URL = spineUrl;
|
|
23
|
+
const handoffResource = process.env.RAYBASE_HANDOFF_RESOURCE ?? "primary";
|
|
24
|
+
const linkedGalleyRoot = realpathIfExists(new URL("node_modules/@raybase/galley", import.meta.url));
|
|
25
|
+
// Galley pulls css-tree, whose default entry require()s a JSON data file that
|
|
26
|
+
// workerd cannot load in dev. Alias to the self-contained ESM bundle.
|
|
27
|
+
const require = createRequire(import.meta.url);
|
|
28
|
+
const cssTreeBundle = require.resolve("css-tree/dist/csstree.esm");
|
|
29
|
+
|
|
30
|
+
export default defineConfig({
|
|
31
|
+
output: "server",
|
|
32
|
+
devToolbar: {
|
|
33
|
+
enabled: false
|
|
34
|
+
},
|
|
35
|
+
adapter: cloudflare({
|
|
36
|
+
imageService: "passthrough"
|
|
37
|
+
}),
|
|
38
|
+
vite: {
|
|
39
|
+
plugins: [tailwindcss()],
|
|
40
|
+
server: {
|
|
41
|
+
fs: {
|
|
42
|
+
allow: [
|
|
43
|
+
searchForWorkspaceRoot(process.cwd()),
|
|
44
|
+
...(linkedGalleyRoot ? [linkedGalleyRoot] : [])
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
resolve: {
|
|
49
|
+
alias: {
|
|
50
|
+
"css-tree": cssTreeBundle
|
|
51
|
+
},
|
|
52
|
+
// The Galley inline editor mounts @emdash-cms/admin components from its
|
|
53
|
+
// own package graph. Without dedupe, linked installs resolve second
|
|
54
|
+
// copies of the context-carrying packages (@lingui/react,
|
|
55
|
+
// @tanstack/react-query), so the editor's I18nProvider and
|
|
56
|
+
// QueryClientProvider never reach the admin components and the
|
|
57
|
+
// Portable Text editor crashes on first edit.
|
|
58
|
+
dedupe: ["react", "react-dom", "@lingui/core", "@lingui/react", "@tanstack/react-query"]
|
|
59
|
+
},
|
|
60
|
+
optimizeDeps: {
|
|
61
|
+
// Pre-bundle every dependency the workerd runtime loads lazily (first
|
|
62
|
+
// content write, first media touch, first template render). A dep
|
|
63
|
+
// discovered mid-session re-optimizes deps_ssr and strands workerd's
|
|
64
|
+
// module graph, 500ing every route until `raybase dev` restarts.
|
|
65
|
+
include: [
|
|
66
|
+
"extend",
|
|
67
|
+
"css-tree",
|
|
68
|
+
"emdash",
|
|
69
|
+
"emdash/ui",
|
|
70
|
+
"emdash/page",
|
|
71
|
+
"emdash/runtime",
|
|
72
|
+
"emdash/plugin-utils",
|
|
73
|
+
"emdash/media/local-runtime",
|
|
74
|
+
"emdash/middleware",
|
|
75
|
+
"emdash/middleware/auth",
|
|
76
|
+
"emdash/middleware/redirect",
|
|
77
|
+
"emdash/middleware/request-context",
|
|
78
|
+
"emdash/middleware/setup",
|
|
79
|
+
"emdash/routes/PluginRegistry",
|
|
80
|
+
"@emdash-cms/cloudflare/db/d1",
|
|
81
|
+
"@emdash-cms/cloudflare/storage/r2",
|
|
82
|
+
"liquidjs",
|
|
83
|
+
"emdash > jose",
|
|
84
|
+
"esbuild",
|
|
85
|
+
"astro/zod",
|
|
86
|
+
"react",
|
|
87
|
+
"react-dom",
|
|
88
|
+
"react-dom/server"
|
|
89
|
+
]
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
integrations: [
|
|
93
|
+
react(),
|
|
94
|
+
emdash({
|
|
95
|
+
database: d1({ binding: "EMDASH_DB", session: "auto" }),
|
|
96
|
+
storage: r2({ binding: "EMDASH_MEDIA" }),
|
|
97
|
+
plugins: [galley()],
|
|
98
|
+
auth: raybaseAuth({
|
|
99
|
+
resource: handoffResource,
|
|
100
|
+
hub: spineUrl,
|
|
101
|
+
// The CMS admits editors, so the spine may only hand it an SSO
|
|
102
|
+
// handoff; a pass for another resource can never be replayed here.
|
|
103
|
+
issuers: [{ issuer: spineUrl, kinds: ["sso"] }],
|
|
104
|
+
returnTo: "/_emdash/admin",
|
|
105
|
+
roleMapping: {
|
|
106
|
+
owner: 50,
|
|
107
|
+
admin: 50,
|
|
108
|
+
"content-editor": 40,
|
|
109
|
+
user: 10
|
|
110
|
+
},
|
|
111
|
+
defaultRole: 10
|
|
112
|
+
})
|
|
113
|
+
})
|
|
114
|
+
]
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
function realpathIfExists(url) {
|
|
118
|
+
const path = fileURLToPath(url);
|
|
119
|
+
return existsSync(path) ? realpathSync(path) : null;
|
|
120
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Galley demo starter set
|
|
2
|
+
|
|
3
|
+
A worked example of how Galley templates wire into EmDash collections and
|
|
4
|
+
menus. Read the files first — that is what this directory is for. Loading it
|
|
5
|
+
is optional.
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
pnpm --dir site run demo:load # requires the site dev server running
|
|
9
|
+
pnpm --dir site run demo:unload # removes everything the load created
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
The demo is teaching material, never production content. `demo:load` installs
|
|
13
|
+
the collection-backed article examples as drafts (invisible on the public site
|
|
14
|
+
and in builds), every loaded id is `demo-`prefixed, and `raybase doctor` warns
|
|
15
|
+
while it is loaded. The menu nav example is inspect-first only by default
|
|
16
|
+
because it binds to the shared, live `primary` owner-data menu. Copy the
|
|
17
|
+
wiring, not the look — real pages should come from registry Templates
|
|
18
|
+
(`raybase templates list`, the theme-selection skill).
|
|
19
|
+
|
|
20
|
+
## What each file demonstrates
|
|
21
|
+
|
|
22
|
+
| File | Demonstrates |
|
|
23
|
+
| --- | --- |
|
|
24
|
+
| `templates/demo-article-page/manifest.json` | Entry-hosted page starter: `context.post` with `source: "host"`, plus the `host` block naming the collection and context key. |
|
|
25
|
+
| `templates/demo-article-page/template.liquid` | Reading typed context (`post.title`, `post.content`), the `portable_text` filter, and edit markers: `data-dynamic-text`, `data-dynamic-portable-text`. The `backLabel` field shows a local presentation setting next to entry-owned facts. |
|
|
26
|
+
| `templates/demo-article-page/host.json` | The staging artifact that gives `demoarticles` a `galley:block` design field defaulting every entry to the starter — one template becomes the page for the whole collection. |
|
|
27
|
+
| `templates/demo-articles-index/manifest.json` | A `dataSources` collection query, and the list-field-default idiom: the `notes` list carries its content in `default`, because list data declared only in sample content renders empty once a page composes the template. |
|
|
28
|
+
| `templates/demo-articles-index/template.liquid` | Looping a dataSource with per-item edit markers (`data-dynamic-item`, `data-dynamic-item-id`), composing a partial with `{% render "demo-article-card", article: article %}`, list-field markers (`data-dynamic-list`, `data-dynamic-list-item`), and CSS-tier motion (`data-rb-motion`, `data-rb-motion-item`). |
|
|
29
|
+
| `templates/demo-articles-index/page.json` | A page seed: the staged page whose `design` points at the starter. Stays a draft (`publish` is never set for the demo). |
|
|
30
|
+
| `templates/demo-article-card/manifest.json` | A partial that receives data as a render argument: the `article` group field declares the shape it reads and defaults keep it previewable standalone. |
|
|
31
|
+
| `templates/demo-menu-nav/manifest.json` | A menu dataSource: `dataSources.links = { "kind": "menu", "menu": "primary" }` shadows the local `links` field, whose default remains the seed/fallback source. |
|
|
32
|
+
| `templates/demo-menu-nav/template.liquid` | The editable menu loop: `data-dynamic-list="links"` marks the list owner, scalar item markers route label/URL edits to the menu item, and the item popover handles target changes. |
|
|
33
|
+
| `content/collection.json` | The collection schema the demo creates: field types, `urlPattern` (which routes each entry to its entry-hosted page), drafts support. |
|
|
34
|
+
| `content/entries.json` | Draft entries with Portable Text bodies. Their copy explains the wiring from the reader's side. |
|
|
35
|
+
|
|
36
|
+
## How loading works
|
|
37
|
+
|
|
38
|
+
`demo:load` uses the same machinery as real Templates — nothing demo-specific
|
|
39
|
+
touches the database path:
|
|
40
|
+
|
|
41
|
+
1. Creates the `demoarticles` collection and its draft entries through the
|
|
42
|
+
EmDash API (the piece a content-model seed normally owns).
|
|
43
|
+
2. Installs the three article templates with `raybase templates add file://…` — the
|
|
44
|
+
real CLI install path: manifest validation, staging under
|
|
45
|
+
`site/seed/templates/`, provenance, the `.raybase/templates.json` lock.
|
|
46
|
+
3. Runs `templates:apply`, which saves the templates as drafts, applies the
|
|
47
|
+
page seed, and attaches the `host.json` design field.
|
|
48
|
+
4. Writes `.raybase/galley-demo.json`, the marker `demo:unload` consumes and
|
|
49
|
+
`raybase doctor` checks.
|
|
50
|
+
|
|
51
|
+
`demo:unload` deletes the page, the collection (with its entries and design
|
|
52
|
+
field), the staged seed copies, the lock entries, and the marker. Galley
|
|
53
|
+
template records themselves stay as unpublished drafts until the Galley
|
|
54
|
+
plugin exposes a delete route; they render nowhere.
|
|
55
|
+
|
|
56
|
+
## Menu nav example
|
|
57
|
+
|
|
58
|
+
`templates/demo-menu-nav/` is not installed by `demo:load`. It binds to
|
|
59
|
+
`menu:primary`, and `templates:apply` would seed `primary` from the local
|
|
60
|
+
default only if that menu were missing. Since menus publish through immediately
|
|
61
|
+
and are shared across shells, keep this example inspect-first unless you
|
|
62
|
+
intentionally want to test menu editing:
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
raybase templates add file://$PWD/site/demo/templates/demo-menu-nav --stage-only
|
|
66
|
+
pnpm --dir site run templates:apply
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Existing `primary` menu items are never overwritten. If you stage the nav and
|
|
70
|
+
then want to remove the staged template seed, delete
|
|
71
|
+
`site/seed/templates/demo-menu-nav/` and the matching entry in
|
|
72
|
+
`.raybase/templates.json`; leave the `primary` menu as owner data.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"slug": "demoarticles",
|
|
3
|
+
"label": "Demo Articles",
|
|
4
|
+
"labelSingular": "Demo Article",
|
|
5
|
+
"supports": [
|
|
6
|
+
"drafts",
|
|
7
|
+
"revisions",
|
|
8
|
+
"search"
|
|
9
|
+
],
|
|
10
|
+
"hasSeo": false,
|
|
11
|
+
"urlPattern": "/demo-articles/{slug}",
|
|
12
|
+
"fields": [
|
|
13
|
+
{
|
|
14
|
+
"slug": "title",
|
|
15
|
+
"label": "Title",
|
|
16
|
+
"type": "string",
|
|
17
|
+
"required": true,
|
|
18
|
+
"searchable": true
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"slug": "summary",
|
|
22
|
+
"label": "Summary",
|
|
23
|
+
"type": "text",
|
|
24
|
+
"searchable": true
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"slug": "author",
|
|
28
|
+
"label": "Author",
|
|
29
|
+
"type": "string"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"slug": "date",
|
|
33
|
+
"label": "Date",
|
|
34
|
+
"type": "string"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"slug": "content",
|
|
38
|
+
"label": "Content",
|
|
39
|
+
"type": "portableText",
|
|
40
|
+
"searchable": true
|
|
41
|
+
}
|
|
42
|
+
]
|
|
43
|
+
}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
{
|
|
2
|
+
"collection": "demoarticles",
|
|
3
|
+
"entries": [
|
|
4
|
+
{
|
|
5
|
+
"slug": "how-this-page-is-wired",
|
|
6
|
+
"data": {
|
|
7
|
+
"title": "How this page is wired",
|
|
8
|
+
"summary": "This page you are reading is one shared template applied to every entry in the demoarticles collection.",
|
|
9
|
+
"author": "Raybase Demo",
|
|
10
|
+
"date": "July 2026",
|
|
11
|
+
"content": [
|
|
12
|
+
{
|
|
13
|
+
"_type": "block",
|
|
14
|
+
"_key": "wired-p1",
|
|
15
|
+
"style": "normal",
|
|
16
|
+
"markDefs": [],
|
|
17
|
+
"children": [
|
|
18
|
+
{
|
|
19
|
+
"_type": "span",
|
|
20
|
+
"_key": "wired-p1-text",
|
|
21
|
+
"text": "There is no page record behind this URL. The demoarticles collection has a design field whose options default every entry to the demo-article-page template, so the public catch-all renders this entry through that one shared template. That is an entry-hosted detail page: editors change the entry, the page follows.",
|
|
22
|
+
"marks": []
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"_type": "block",
|
|
28
|
+
"_key": "wired-h2",
|
|
29
|
+
"style": "h2",
|
|
30
|
+
"markDefs": [],
|
|
31
|
+
"children": [
|
|
32
|
+
{ "_type": "span", "_key": "wired-h2-text", "text": "Where each value comes from", "marks": [] }
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"_type": "block",
|
|
37
|
+
"_key": "wired-p2",
|
|
38
|
+
"style": "normal",
|
|
39
|
+
"markDefs": [],
|
|
40
|
+
"children": [
|
|
41
|
+
{
|
|
42
|
+
"_type": "span",
|
|
43
|
+
"_key": "wired-p2-text",
|
|
44
|
+
"text": "The title, byline, and this body reach the template as typed context: the template declares context.post with source \"host\" and reads post.title, post.author, and post.content. The back link's label is different — it is a template field with a default, a presentation setting that belongs to the template rather than to any entry.",
|
|
45
|
+
"marks": []
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"_type": "block",
|
|
51
|
+
"_key": "wired-p3",
|
|
52
|
+
"style": "normal",
|
|
53
|
+
"markDefs": [],
|
|
54
|
+
"children": [
|
|
55
|
+
{
|
|
56
|
+
"_type": "span",
|
|
57
|
+
"_key": "wired-p3-text",
|
|
58
|
+
"text": "Open this entry in the EmDash admin and edit the title: the page updates because the markers (data-dynamic-text, data-dynamic-portable-text) route visual-editor edits back to the entry. The Liquid source for this page lives in site/demo/templates/demo-article-page/.",
|
|
59
|
+
"marks": []
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"slug": "where-the-demo-lives",
|
|
68
|
+
"data": {
|
|
69
|
+
"title": "Where the demo lives and how to remove it",
|
|
70
|
+
"summary": "Everything in this demo is inspectable on disk and removable with one command.",
|
|
71
|
+
"author": "Raybase Demo",
|
|
72
|
+
"date": "July 2026",
|
|
73
|
+
"content": [
|
|
74
|
+
{
|
|
75
|
+
"_type": "block",
|
|
76
|
+
"_key": "lives-p1",
|
|
77
|
+
"style": "normal",
|
|
78
|
+
"markDefs": [],
|
|
79
|
+
"children": [
|
|
80
|
+
{
|
|
81
|
+
"_type": "span",
|
|
82
|
+
"_key": "lives-p1-text",
|
|
83
|
+
"text": "The source of truth for this demo is site/demo/ in your project: three loaded article templates, one inspect-first menu nav template, this collection's schema, and these entries. Loading the demo used the same install path as real registry Templates — raybase templates add, then templates:apply — so the staged copies under site/seed/templates/ look exactly like a real install.",
|
|
84
|
+
"marks": []
|
|
85
|
+
}
|
|
86
|
+
]
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"_type": "block",
|
|
90
|
+
"_key": "lives-p2",
|
|
91
|
+
"style": "normal",
|
|
92
|
+
"markDefs": [],
|
|
93
|
+
"children": [
|
|
94
|
+
{
|
|
95
|
+
"_type": "span",
|
|
96
|
+
"_key": "lives-p2-text",
|
|
97
|
+
"text": "Everything here is a draft: these entries and the demo-articles index page never render on the public site or in a production build. When you are done reading, run pnpm --dir site run demo:unload to delete the collection, entries, page, and staged files. raybase doctor warns if the demo is still loaded, so it cannot slip into a deploy unnoticed.",
|
|
98
|
+
"marks": []
|
|
99
|
+
}
|
|
100
|
+
]
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"_type": "block",
|
|
104
|
+
"_key": "lives-p3",
|
|
105
|
+
"style": "normal",
|
|
106
|
+
"markDefs": [],
|
|
107
|
+
"children": [
|
|
108
|
+
{
|
|
109
|
+
"_type": "span",
|
|
110
|
+
"_key": "lives-p3-text",
|
|
111
|
+
"text": "To build real pages, do not copy this demo's look — browse the registry with raybase templates list and install a theme and shell. Copy this demo's wiring: typed context for content facts, fields with defaults for presentation, dataSources for lists.",
|
|
112
|
+
"marks": []
|
|
113
|
+
}
|
|
114
|
+
]
|
|
115
|
+
}
|
|
116
|
+
]
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
]
|
|
120
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"id": "demo-article-card",
|
|
4
|
+
"kind": "partial",
|
|
5
|
+
"version": "1.0.0",
|
|
6
|
+
"name": "Demo Article Card",
|
|
7
|
+
"summary": "Card partial rendered per entry by the demo articles index: title, summary, and byline passed in as a render argument.",
|
|
8
|
+
"overview": "The worked example of a partial that receives its data as a {% render %} argument. The article group field declares the shape the card reads and carries a default so the card previews standalone; when the index composes it, each loop item replaces the default. The whole card is a link to the entry's own page (the entry-hosted demo-article-page).",
|
|
9
|
+
"tags": ["demo", "article", "card"],
|
|
10
|
+
"family": "raybase/demo",
|
|
11
|
+
"catalog": {
|
|
12
|
+
"description": "Demo article card: linked title, summary, and byline for one entry.",
|
|
13
|
+
"sectionType": "card",
|
|
14
|
+
"density": "compact",
|
|
15
|
+
"tone": ["plain"],
|
|
16
|
+
"typeAffinity": "neutral",
|
|
17
|
+
"selfContained": true,
|
|
18
|
+
"themeAware": true,
|
|
19
|
+
"motionLevel": "none",
|
|
20
|
+
"reducedMotionSafe": true,
|
|
21
|
+
"bestFor": ["Reading how list items reach a card partial through render arguments."],
|
|
22
|
+
"avoidWhen": ["Any real site page. This is teaching material; unload it before deploy."]
|
|
23
|
+
},
|
|
24
|
+
"compatibility": { "frameworks": ["astro-emdash"], "galley": "^0.7.0", "raybaseCli": ">=0.0.0" },
|
|
25
|
+
"galley": {
|
|
26
|
+
"role": "partial",
|
|
27
|
+
"source": "./template.liquid",
|
|
28
|
+
"fields": {
|
|
29
|
+
"article": {
|
|
30
|
+
"label": "Article",
|
|
31
|
+
"kind": "group",
|
|
32
|
+
"fields": {
|
|
33
|
+
"title": { "kind": "text", "label": "Title" },
|
|
34
|
+
"summary": { "kind": "text", "label": "Summary" },
|
|
35
|
+
"author": { "kind": "string", "label": "Author" },
|
|
36
|
+
"date": { "kind": "string", "label": "Date" },
|
|
37
|
+
"url": { "kind": "url", "label": "URL" }
|
|
38
|
+
},
|
|
39
|
+
"default": {
|
|
40
|
+
"title": "A standalone preview of this card",
|
|
41
|
+
"summary": "When no index passes an article in, this default keeps the card previewable on its own.",
|
|
42
|
+
"author": "Raybase Demo",
|
|
43
|
+
"date": "July 2026",
|
|
44
|
+
"url": "#"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"dataSources": {},
|
|
49
|
+
"css": { "scope": "template" }
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
<a class="galley-demo-card" href="{{ article.url | default: '#' }}" data-dynamic-href="article.url">
|
|
2
|
+
<style>
|
|
3
|
+
.galley-demo-card {
|
|
4
|
+
background: var(--card);
|
|
5
|
+
border: 1px solid var(--border);
|
|
6
|
+
border-radius: var(--radius);
|
|
7
|
+
color: var(--card-foreground);
|
|
8
|
+
display: grid;
|
|
9
|
+
gap: 0.6rem;
|
|
10
|
+
padding: 1.25rem;
|
|
11
|
+
text-decoration: none;
|
|
12
|
+
transition: border-color 150ms ease;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.galley-demo-card:hover {
|
|
16
|
+
border-color: var(--primary);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.galley-demo-card h3 {
|
|
20
|
+
font-size: 1.1rem;
|
|
21
|
+
line-height: 1.3;
|
|
22
|
+
margin: 0;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.galley-demo-card__summary {
|
|
26
|
+
color: var(--muted-foreground);
|
|
27
|
+
font-size: 0.95rem;
|
|
28
|
+
line-height: 1.55;
|
|
29
|
+
margin: 0;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.galley-demo-card__byline {
|
|
33
|
+
color: var(--muted-foreground);
|
|
34
|
+
font-size: 0.8rem;
|
|
35
|
+
font-weight: 600;
|
|
36
|
+
letter-spacing: 0.04em;
|
|
37
|
+
margin: 0;
|
|
38
|
+
text-transform: uppercase;
|
|
39
|
+
}
|
|
40
|
+
</style>
|
|
41
|
+
<h3 data-dynamic-text="article.title">{{ article.title | escape }}</h3>
|
|
42
|
+
<p class="galley-demo-card__summary" data-dynamic-text="article.summary">{{ article.summary | escape }}</p>
|
|
43
|
+
<p class="galley-demo-card__byline">
|
|
44
|
+
<span data-dynamic-text="article.author">{{ article.author | escape }}</span>
|
|
45
|
+
·
|
|
46
|
+
<span data-dynamic-text="article.date">{{ article.date | escape }}</span>
|
|
47
|
+
</p>
|
|
48
|
+
</a>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"id": "demo-article-page",
|
|
4
|
+
"kind": "page-starter",
|
|
5
|
+
"version": "1.0.0",
|
|
6
|
+
"name": "Demo Article Page",
|
|
7
|
+
"summary": "Entry-hosted detail page for the demoarticles collection: the host entry's title, byline, and Portable Text body, with one local presentation field for the back link.",
|
|
8
|
+
"overview": "The worked example of an entry-hosted page starter. It declares context.post with source \"host\", so galley resolves the entry whose design field is being rendered and this one template becomes the page for every demo article. Everything the template shows about the article comes from typed context (post.title, post.summary, post.content); the only field is backLabel, a local presentation setting. host.json beside this manifest is what gives the demoarticles collection its design field.",
|
|
9
|
+
"tags": ["demo", "article", "detail", "entry-hosted"],
|
|
10
|
+
"family": "raybase/demo",
|
|
11
|
+
"catalog": {
|
|
12
|
+
"description": "Entry-hosted demo article detail page bound to the demoarticles collection.",
|
|
13
|
+
"sectionType": "starter",
|
|
14
|
+
"density": "medium",
|
|
15
|
+
"tone": ["plain"],
|
|
16
|
+
"typeAffinity": "neutral",
|
|
17
|
+
"selfContained": true,
|
|
18
|
+
"themeAware": true,
|
|
19
|
+
"motionLevel": "css",
|
|
20
|
+
"reducedMotionSafe": true,
|
|
21
|
+
"bestFor": ["Reading how entry-hosted detail pages wire a collection to one shared template."],
|
|
22
|
+
"avoidWhen": ["Any real site page. This is teaching material; unload it before deploy."]
|
|
23
|
+
},
|
|
24
|
+
"compatibility": { "frameworks": ["astro-emdash"], "galley": "^0.7.0", "raybaseCli": ">=0.0.0" },
|
|
25
|
+
"host": { "collection": "demoarticles", "contextKey": "post" },
|
|
26
|
+
"galley": {
|
|
27
|
+
"role": "surface",
|
|
28
|
+
"source": "./template.liquid",
|
|
29
|
+
"context": {
|
|
30
|
+
"post": { "kind": "entry", "collection": "demoarticles", "source": "host" }
|
|
31
|
+
},
|
|
32
|
+
"fields": {
|
|
33
|
+
"backLabel": { "label": "Back link label", "kind": "string", "default": "All demo articles" }
|
|
34
|
+
},
|
|
35
|
+
"dataSources": {},
|
|
36
|
+
"css": { "scope": "template" }
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"data": {},
|
|
3
|
+
"richText": {},
|
|
4
|
+
"collections": {},
|
|
5
|
+
"context": {
|
|
6
|
+
"post": {
|
|
7
|
+
"collection": "demoarticles",
|
|
8
|
+
"entryId": "demo-sample-article",
|
|
9
|
+
"data": {
|
|
10
|
+
"id": "demo-sample-article",
|
|
11
|
+
"title": "How this page is wired",
|
|
12
|
+
"summary": "Every value in the header and body comes from the host entry through typed context; only the back-link label is a template field.",
|
|
13
|
+
"author": "Raybase Demo",
|
|
14
|
+
"date": "July 2026",
|
|
15
|
+
"content": [
|
|
16
|
+
{
|
|
17
|
+
"_type": "block",
|
|
18
|
+
"_key": "sample-p1",
|
|
19
|
+
"style": "normal",
|
|
20
|
+
"markDefs": [],
|
|
21
|
+
"children": [
|
|
22
|
+
{
|
|
23
|
+
"_type": "span",
|
|
24
|
+
"_key": "sample-p1-text",
|
|
25
|
+
"text": "This body is Portable Text rendered through the portable_text filter. The data-dynamic-portable-text marker routes visual-editor edits back to the entry.",
|
|
26
|
+
"marks": []
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
<section class="galley-demo-article" data-rb-motion="fade-up">
|
|
2
|
+
<style>
|
|
3
|
+
.galley-demo-article {
|
|
4
|
+
display: grid;
|
|
5
|
+
gap: 2.5rem;
|
|
6
|
+
margin: 0 auto;
|
|
7
|
+
max-width: 44rem;
|
|
8
|
+
padding: 3rem 1rem 4rem;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.galley-demo-article__header {
|
|
12
|
+
display: grid;
|
|
13
|
+
gap: 1rem;
|
|
14
|
+
border-bottom: 1px solid var(--border);
|
|
15
|
+
padding-bottom: 2rem;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.galley-demo-article__byline {
|
|
19
|
+
color: var(--muted-foreground);
|
|
20
|
+
display: flex;
|
|
21
|
+
flex-wrap: wrap;
|
|
22
|
+
gap: 0.5rem;
|
|
23
|
+
font-size: 0.85rem;
|
|
24
|
+
font-weight: 600;
|
|
25
|
+
letter-spacing: 0.04em;
|
|
26
|
+
text-transform: uppercase;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.galley-demo-article h1 {
|
|
30
|
+
font-size: clamp(2rem, 5vw, 3rem);
|
|
31
|
+
line-height: 1.1;
|
|
32
|
+
margin: 0;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.galley-demo-article__summary {
|
|
36
|
+
color: var(--muted-foreground);
|
|
37
|
+
font-size: 1.15rem;
|
|
38
|
+
line-height: 1.6;
|
|
39
|
+
margin: 0;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.galley-demo-article__body {
|
|
43
|
+
font-size: 1.05rem;
|
|
44
|
+
line-height: 1.75;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.galley-demo-article__body h2 {
|
|
48
|
+
font-size: 1.4rem;
|
|
49
|
+
margin: 2rem 0 0.75rem;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.galley-demo-article__body p {
|
|
53
|
+
margin: 0 0 1.1rem;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.galley-demo-article__footer {
|
|
57
|
+
border-top: 1px solid var(--border);
|
|
58
|
+
padding-top: 1.5rem;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.galley-demo-article__back {
|
|
62
|
+
color: var(--primary);
|
|
63
|
+
font-weight: 600;
|
|
64
|
+
text-decoration: none;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.galley-demo-article__back:hover {
|
|
68
|
+
text-decoration: underline;
|
|
69
|
+
}
|
|
70
|
+
</style>
|
|
71
|
+
<header class="galley-demo-article__header">
|
|
72
|
+
<p class="galley-demo-article__byline">
|
|
73
|
+
<span data-dynamic-text="post.author">{{ post.author | escape }}</span>
|
|
74
|
+
<span aria-hidden="true">·</span>
|
|
75
|
+
<span data-dynamic-text="post.date">{{ post.date | escape }}</span>
|
|
76
|
+
</p>
|
|
77
|
+
<h1 data-dynamic-text="post.title">{{ post.title | escape }}</h1>
|
|
78
|
+
<p class="galley-demo-article__summary" data-dynamic-text="post.summary">{{ post.summary | escape }}</p>
|
|
79
|
+
</header>
|
|
80
|
+
<div class="galley-demo-article__body" data-dynamic-portable-text="post.content">{{ post.content | portable_text }}</div>
|
|
81
|
+
<footer class="galley-demo-article__footer">
|
|
82
|
+
<a class="galley-demo-article__back" href="/demo-articles">← <span data-dynamic-text="backLabel">{{ backLabel | escape }}</span></a>
|
|
83
|
+
</footer>
|
|
84
|
+
</section>
|