@pantheon-systems/create-p1-starter-kit 0.8.0 → 0.11.0

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.
Files changed (61) hide show
  1. package/README.md +114 -0
  2. package/lib/cli.js +1 -1
  3. package/lib/messages.js +1 -1
  4. package/package.json +11 -5
  5. package/template/.env.example +27 -6
  6. package/template/__tests__/ai-generate.test.ts +74 -0
  7. package/template/__tests__/auth-route.test.ts +1 -1
  8. package/template/__tests__/chatbot-flag-wiring.test.ts +21 -1
  9. package/template/__tests__/editor-integration.test.ts +1 -1
  10. package/template/__tests__/editor-route-group.test.ts +1 -1
  11. package/template/__tests__/image-block.test.tsx +48 -0
  12. package/template/__tests__/page-seo-meta-templates.test.ts +145 -0
  13. package/template/__tests__/page-seo-meta.test.ts +97 -0
  14. package/template/__tests__/page-seo.test.ts +4 -6
  15. package/template/__tests__/paragraph-block.test.ts +24 -22
  16. package/template/__tests__/paragraph-editor-text.test.ts +79 -0
  17. package/template/__tests__/published-page-404.test.ts +65 -0
  18. package/template/__tests__/puck-root-guidance.test.ts +109 -0
  19. package/template/__tests__/puck-root-meta.test.ts +102 -0
  20. package/template/__tests__/puck-root-selects.test.ts +86 -0
  21. package/template/__tests__/remote-datasource-fetchers.test.ts +2 -2
  22. package/template/__tests__/seo-metadata-meta.test.ts +180 -0
  23. package/template/__tests__/seo-metadata-site-defaults.test.ts +80 -0
  24. package/template/__tests__/styles-canvas-scope.test.ts +50 -0
  25. package/template/app/[...puckPath]/page.tsx +67 -67
  26. package/template/app/layout.tsx +11 -1
  27. package/template/app/not-found.tsx +11 -0
  28. package/template/app/p1/(editor)/[[...p1]]/editor-client.tsx +29 -4
  29. package/template/app/page.tsx +20 -22
  30. package/template/app/styles.css +18 -1
  31. package/template/components/content-unavailable.tsx +22 -0
  32. package/template/components/p1-lockup.tsx +6 -26
  33. package/template/components/page-missing.tsx +49 -0
  34. package/template/components/puck/data-list-block/data-list-block.tsx +8 -0
  35. package/template/components/puck/data-list-block/index.ts +1 -0
  36. package/template/components/puck/grid-block.tsx +1 -1
  37. package/template/components/puck/image-block.tsx +22 -1
  38. package/template/components/puck/paragraph-block.tsx +7 -2
  39. package/template/components/puck/paragraph-editor-text.tsx +84 -0
  40. package/template/components/puck/paragraph-markdown.tsx +15 -0
  41. package/template/components/puck/root.tsx +185 -4
  42. package/template/constants/assets.ts +1 -0
  43. package/template/eslint.config.js +20 -4
  44. package/template/lib/chatbot-flag/ai-generate.ts +23 -0
  45. package/template/lib/chatbot-flag/draft-request-channel.ts +12 -0
  46. package/template/lib/monsters-api.ts +14 -8
  47. package/template/lib/page-seo.ts +46 -16
  48. package/template/lib/remote-datasources.ts +26 -31
  49. package/template/lib/seo-metadata.consts.ts +21 -0
  50. package/template/lib/seo-metadata.ts +96 -15
  51. package/template/lib/swapi.ts +5 -5
  52. package/template/middleware.ts +15 -0
  53. package/template/next.config.mjs +11 -0
  54. package/template/package.json +15 -12
  55. package/template/pnpm-workspace.yaml +3 -0
  56. package/template/public/images/p1_logo.svg +5 -12
  57. package/template/public/images/p1_logo_reverse.svg +5 -0
  58. package/template/puck.config.tsx +3 -1
  59. package/template/tsconfig/nextjs.json +1 -1
  60. package/template/vitest.config.ts +20 -0
  61. package/template/next-env.d.ts +0 -6
@@ -12,6 +12,7 @@ import { quoteBlock } from "./components/puck/quote-block";
12
12
  import { puckRoot } from "./components/puck/root";
13
13
  import { spacerBlock } from "./components/puck/spacer-block";
14
14
  import { welcomeBlock } from "./components/puck/welcome-block";
15
+ import { dataListBlock } from "./components/puck/data-list-block";
15
16
 
16
17
  export const config = {
17
18
  categories: {
@@ -25,7 +26,7 @@ export const config = {
25
26
  },
26
27
  data: {
27
28
  title: "Data",
28
- components: ["GridBlock"],
29
+ components: ["GridBlock", "DataListBlock"],
29
30
  },
30
31
  layout: {
31
32
  title: "Layout",
@@ -52,6 +53,7 @@ export const config = {
52
53
  DividerBlock: dividerBlock,
53
54
  SpacerBlock: spacerBlock,
54
55
  ButtonBlock: buttonBlock,
56
+ DataListBlock: dataListBlock,
55
57
  P1WelcomeBlock: welcomeBlock,
56
58
  },
57
59
  } as Config;
@@ -14,7 +14,7 @@
14
14
  "noEmit": true,
15
15
  "resolveJsonModule": true,
16
16
  "strict": false,
17
- "target": "es5"
17
+ "target": "es2022"
18
18
  },
19
19
  "include": ["src", "next-env.d.ts"],
20
20
  "exclude": ["node_modules"]
@@ -1,8 +1,28 @@
1
+ import { resolve } from "path";
1
2
  import { defineConfig } from "vitest/config";
2
3
  import react from "@vitejs/plugin-react";
3
4
 
4
5
  export default defineConfig({
5
6
  plugins: [react()],
7
+ resolve: {
8
+ alias: {
9
+ "@pantheon-systems/puck-css/fields": resolve(
10
+ __dirname,
11
+ "../..",
12
+ "packages/puck-css/src/data/fields.tsx",
13
+ ),
14
+ "@pantheon-systems/pds-toolkit-react": resolve(
15
+ __dirname,
16
+ "../..",
17
+ "packages/puck-css/src/__mocks__/@pantheon-systems/pds-toolkit-react.ts",
18
+ ),
19
+ "@puckeditor/core": resolve(
20
+ __dirname,
21
+ "../..",
22
+ "packages/puck-css/src/__mocks__/@puckeditor/core.ts",
23
+ ),
24
+ },
25
+ },
6
26
  test: {
7
27
  environment: "node",
8
28
  typecheck: {
@@ -1,6 +0,0 @@
1
- /// <reference types="next" />
2
- /// <reference types="next/image-types/global" />
3
- import "./.next/types/routes.d.ts";
4
-
5
- // NOTE: This file should not be edited
6
- // see https://nextjs.org/docs/app/api-reference/config/typescript for more information.