@pantheon-systems/create-p1-starter-kit 0.8.0 → 0.10.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.
- package/README.md +114 -0
- package/lib/cli.js +1 -1
- package/lib/messages.js +1 -1
- package/package.json +11 -5
- package/template/.env.example +27 -6
- package/template/__tests__/ai-generate.test.ts +74 -0
- package/template/__tests__/auth-route.test.ts +1 -1
- package/template/__tests__/chatbot-flag-wiring.test.ts +21 -1
- package/template/__tests__/editor-integration.test.ts +1 -1
- package/template/__tests__/editor-route-group.test.ts +1 -1
- package/template/__tests__/page-seo-meta-templates.test.ts +143 -0
- package/template/__tests__/page-seo-meta.test.ts +98 -0
- package/template/__tests__/paragraph-block.test.ts +24 -22
- package/template/__tests__/paragraph-editor-text.test.ts +79 -0
- package/template/__tests__/puck-root-guidance.test.ts +109 -0
- package/template/__tests__/puck-root-meta.test.ts +102 -0
- package/template/__tests__/puck-root-selects.test.ts +86 -0
- package/template/__tests__/remote-datasource-fetchers.test.ts +2 -2
- package/template/__tests__/seo-metadata-meta.test.ts +180 -0
- package/template/__tests__/seo-metadata-site-defaults.test.ts +80 -0
- package/template/__tests__/styles-canvas-scope.test.ts +50 -0
- package/template/app/[...puckPath]/page.tsx +22 -4
- package/template/app/layout.tsx +11 -1
- package/template/app/p1/(editor)/[[...p1]]/editor-client.tsx +29 -4
- package/template/app/styles.css +18 -1
- package/template/components/p1-lockup.tsx +6 -26
- package/template/components/puck/data-list-block/data-list-block.tsx +8 -0
- package/template/components/puck/data-list-block/index.ts +1 -0
- package/template/components/puck/grid-block.tsx +1 -1
- package/template/components/puck/paragraph-block.tsx +7 -2
- package/template/components/puck/paragraph-editor-text.tsx +84 -0
- package/template/components/puck/paragraph-markdown.tsx +15 -0
- package/template/components/puck/root.tsx +185 -4
- package/template/constants/assets.ts +1 -0
- package/template/eslint.config.js +20 -4
- package/template/lib/chatbot-flag/ai-generate.ts +23 -0
- package/template/lib/chatbot-flag/draft-request-channel.ts +12 -0
- package/template/lib/monsters-api.ts +14 -8
- package/template/lib/page-seo.ts +44 -11
- package/template/lib/remote-datasources.ts +26 -31
- package/template/lib/seo-metadata.consts.ts +21 -0
- package/template/lib/seo-metadata.ts +96 -15
- package/template/lib/swapi.ts +5 -5
- package/template/middleware.ts +15 -0
- package/template/next.config.mjs +11 -0
- package/template/package.json +14 -11
- package/template/pnpm-workspace.yaml +3 -0
- package/template/public/images/p1_logo.svg +5 -12
- package/template/public/images/p1_logo_reverse.svg +5 -0
- package/template/puck.config.tsx +3 -1
- package/template/tsconfig/nextjs.json +1 -1
- package/template/vitest.config.ts +20 -0
- package/template/next-env.d.ts +0 -6
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
<svg
|
|
2
|
-
<
|
|
3
|
-
<path d="
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
<path d="M12.4397 13.3102C12.5066 13.3102 12.7741 13.1764 12.7741 12.1063C12.7741 11.0361 12.5735 10.9023 12.4397 10.9023H7.22266L8.22593 13.3102H12.4397Z" fill="#23232D"/>
|
|
7
|
-
<path d="M9.36461 16.1862H12.8426C12.9095 16.1862 13.1771 16.0524 13.1771 14.9823C13.1771 13.9121 12.9764 13.7783 12.8426 13.7783H8.36133L9.36461 16.1862Z" fill="#23232D"/>
|
|
8
|
-
<path d="M12.4403 19.5305H7.69141L8.69468 21.9384H12.4403C12.5071 21.9384 12.7747 21.8046 12.7747 20.7345C12.7078 19.6643 12.5071 19.5305 12.4403 19.5305Z" fill="#23232D"/>
|
|
9
|
-
<path d="M12.9088 16.6545H6.55469L7.55797 19.0624H12.9088C12.9757 19.0624 13.2432 18.9286 13.2432 17.8585C13.1763 16.7883 12.9757 16.6545 12.9088 16.6545Z" fill="#23232D"/>
|
|
10
|
-
<path d="M3.6118 16.1863L2.47475 13.3102H5.08328L6.28721 16.1863H8.76196L6.55475 10.9023H1.13705C0.735737 10.9023 0.468196 10.9023 0.267541 11.5043C0.066885 12.24 0 13.6446 0 16.3869C0 19.1292 -2.59134e-07 20.5338 0.267541 21.2696C0.468196 21.8715 0.668852 21.8715 1.13705 21.8715H5.8859L3.6118 16.1863Z" fill="#23232D"/>
|
|
11
|
-
<path d="M21.0527 23.9409V9.39014H26.5117C27.6315 9.39014 28.569 9.59847 29.3242 10.0151C30.0859 10.4318 30.6621 11.0047 31.0527 11.7339C31.4434 12.4631 31.6387 13.2899 31.6387 14.2144C31.6387 15.1453 31.4401 15.9754 31.043 16.7046C30.6523 17.4272 30.0729 17.9969 29.3047 18.4136C28.5365 18.8237 27.5924 19.0288 26.4727 19.0288H22.8594V16.8608H26.1113C26.7689 16.8608 27.306 16.7502 27.7227 16.5288C28.1458 16.3009 28.4551 15.9884 28.6504 15.5913C28.8522 15.1877 28.9531 14.7287 28.9531 14.2144C28.9531 13.6935 28.8522 13.2378 28.6504 12.8472C28.4551 12.45 28.1458 12.144 27.7227 11.9292C27.306 11.7078 26.7656 11.5972 26.1016 11.5972H23.6895V23.9409H21.0527ZM38.7676 9.39014V23.9409H36.1504V11.9585H36.0625L32.6641 14.1362V11.7144L36.2773 9.39014H38.7676Z" fill="#23232D"/>
|
|
12
|
-
</svg>
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="1066 986 2401 1944">
|
|
2
|
+
<g transform="translate(0,4750) scale(0.1,-0.1)" fill="currentColor">
|
|
3
|
+
<path d="M31555 37353 c-105 -343 -302 -965 -332 -1048 -87 -241 -173 -419 -284 -590 -322 -495 -787 -772 -1484 -885 -323 -53 -316 -53 -1507 -57 l-1118 -4 0 -1695 0 -1694 1925 0 1925 0 0 -5490 0 -5490 1900 0 1900 0 0 8520 0 8520 -1449 0 -1450 0 -26 -87z M10860 35245 l0 -2135 5130 0 5130 0 0 -2890 0 -2890 -5130 0 -5130 0 0 -2338 0 -2337 2135 -2135 2135 -2135 0 2332 0 2333 2993 2 2992 3 3 2138 2 2137 2135 0 2135 0 0 2794 0 2795 -157 158 c-845 849 -3390 3431 -3963 4020 l-275 283 -5067 0 -5068 0 0 -2135z"/>
|
|
4
|
+
</g>
|
|
5
|
+
</svg>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="1066 986 2401 1944">
|
|
2
|
+
<g transform="translate(0,4750) scale(0.1,-0.1)" fill="#ffffff">
|
|
3
|
+
<path d="M31555 37353 c-105 -343 -302 -965 -332 -1048 -87 -241 -173 -419 -284 -590 -322 -495 -787 -772 -1484 -885 -323 -53 -316 -53 -1507 -57 l-1118 -4 0 -1695 0 -1694 1925 0 1925 0 0 -5490 0 -5490 1900 0 1900 0 0 8520 0 8520 -1449 0 -1450 0 -26 -87z M10860 35245 l0 -2135 5130 0 5130 0 0 -2890 0 -2890 -5130 0 -5130 0 0 -2338 0 -2337 2135 -2135 2135 -2135 0 2332 0 2333 2993 2 2992 3 3 2138 2 2137 2135 0 2135 0 0 2794 0 2795 -157 158 c-845 849 -3390 3431 -3963 4020 l-275 283 -5067 0 -5068 0 0 -2135z"/>
|
|
4
|
+
</g>
|
|
5
|
+
</svg>
|
package/template/puck.config.tsx
CHANGED
|
@@ -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;
|
|
@@ -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: {
|
package/template/next-env.d.ts
DELETED