@pantheon-systems/puck-css 0.4.2 → 0.4.3

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 (200) hide show
  1. package/dist/core/config.d.ts +3 -0
  2. package/dist/core/config.d.ts.map +1 -1
  3. package/dist/core/config.js +5 -6
  4. package/dist/core/config.js.map +1 -1
  5. package/dist/core/featureConfig.d.ts +2 -0
  6. package/dist/core/featureConfig.d.ts.map +1 -1
  7. package/dist/core/featureConfig.js +4 -0
  8. package/dist/core/featureConfig.js.map +1 -1
  9. package/dist/core/types.d.ts +58 -1
  10. package/dist/core/types.d.ts.map +1 -1
  11. package/dist/data/dal/index.d.ts +5 -1
  12. package/dist/data/dal/index.d.ts.map +1 -1
  13. package/dist/data/dal/index.js +22 -1
  14. package/dist/data/dal/index.js.map +1 -1
  15. package/dist/data/dal/init.d.ts.map +1 -1
  16. package/dist/data/dal/init.js +22 -14
  17. package/dist/data/dal/init.js.map +1 -1
  18. package/dist/data/dal/p1-store.d.ts +15 -1
  19. package/dist/data/dal/p1-store.d.ts.map +1 -1
  20. package/dist/data/dal/p1-store.js +51 -5
  21. package/dist/data/dal/p1-store.js.map +1 -1
  22. package/dist/data/dal/types.d.ts +13 -1
  23. package/dist/data/dal/types.d.ts.map +1 -1
  24. package/dist/data/page-store.d.ts +17 -2
  25. package/dist/data/page-store.d.ts.map +1 -1
  26. package/dist/data/page-store.js +47 -5
  27. package/dist/data/page-store.js.map +1 -1
  28. package/dist/editor/P1App.d.ts.map +1 -1
  29. package/dist/editor/P1App.js +1 -1
  30. package/dist/editor/P1App.js.map +1 -1
  31. package/dist/editor/P1PuckProvider.d.ts.map +1 -1
  32. package/dist/editor/P1PuckProvider.js +175 -66
  33. package/dist/editor/P1PuckProvider.js.map +1 -1
  34. package/dist/editor/plugin/P1Plugin.d.ts +16 -1
  35. package/dist/editor/plugin/P1Plugin.d.ts.map +1 -1
  36. package/dist/editor/plugin/P1Plugin.js +35 -4
  37. package/dist/editor/plugin/P1Plugin.js.map +1 -1
  38. package/dist/editor/plugin/createP1Overrides.d.ts.map +1 -1
  39. package/dist/editor/plugin/createP1Overrides.js +4 -1
  40. package/dist/editor/plugin/createP1Overrides.js.map +1 -1
  41. package/dist/editor/useDocuments.d.ts +4 -1
  42. package/dist/editor/useDocuments.d.ts.map +1 -1
  43. package/dist/editor/useDocuments.js +5 -2
  44. package/dist/editor/useDocuments.js.map +1 -1
  45. package/dist/editor/useP1Editor.d.ts +12 -0
  46. package/dist/editor/useP1Editor.d.ts.map +1 -1
  47. package/dist/editor/useP1Editor.js +40 -5
  48. package/dist/editor/useP1Editor.js.map +1 -1
  49. package/dist/editor/useP1Plugin.d.ts +1 -1
  50. package/dist/editor/useP1Plugin.d.ts.map +1 -1
  51. package/dist/editor/useP1Plugin.js +2 -0
  52. package/dist/editor/useP1Plugin.js.map +1 -1
  53. package/dist/editor/useRealtime.d.ts +9 -4
  54. package/dist/editor/useRealtime.d.ts.map +1 -1
  55. package/dist/editor/useRealtime.js +11 -6
  56. package/dist/editor/useRealtime.js.map +1 -1
  57. package/dist/features/content-type-templates/editor/useTemplateEditor.d.ts +20 -0
  58. package/dist/features/content-type-templates/editor/useTemplateEditor.d.ts.map +1 -0
  59. package/dist/features/content-type-templates/editor/useTemplateEditor.js +62 -0
  60. package/dist/features/content-type-templates/editor/useTemplateEditor.js.map +1 -0
  61. package/dist/features/content-type-templates/editor/useTemplatePermissions.d.ts +7 -0
  62. package/dist/features/content-type-templates/editor/useTemplatePermissions.d.ts.map +1 -0
  63. package/dist/features/content-type-templates/editor/useTemplatePermissions.js +12 -0
  64. package/dist/features/content-type-templates/editor/useTemplatePermissions.js.map +1 -0
  65. package/dist/features/content-type-templates/editor/useTemplateScaffold.d.ts +19 -0
  66. package/dist/features/content-type-templates/editor/useTemplateScaffold.d.ts.map +1 -0
  67. package/dist/features/content-type-templates/editor/useTemplateScaffold.js +37 -0
  68. package/dist/features/content-type-templates/editor/useTemplateScaffold.js.map +1 -0
  69. package/dist/features/content-type-templates/hooks/useTemplateList.d.ts +41 -0
  70. package/dist/features/content-type-templates/hooks/useTemplateList.d.ts.map +1 -0
  71. package/dist/features/content-type-templates/hooks/useTemplateList.js +72 -0
  72. package/dist/features/content-type-templates/hooks/useTemplateList.js.map +1 -0
  73. package/dist/features/content-type-templates/index.d.ts +18 -0
  74. package/dist/features/content-type-templates/index.d.ts.map +1 -0
  75. package/dist/features/content-type-templates/index.js +13 -0
  76. package/dist/features/content-type-templates/index.js.map +1 -0
  77. package/dist/features/content-type-templates/permissions/createPuckPermissions.d.ts +68 -0
  78. package/dist/features/content-type-templates/permissions/createPuckPermissions.d.ts.map +1 -0
  79. package/dist/features/content-type-templates/permissions/createPuckPermissions.js +90 -0
  80. package/dist/features/content-type-templates/permissions/createPuckPermissions.js.map +1 -0
  81. package/dist/features/content-type-templates/permissions/role-permissions.d.ts +49 -0
  82. package/dist/features/content-type-templates/permissions/role-permissions.d.ts.map +1 -0
  83. package/dist/features/content-type-templates/permissions/role-permissions.js +79 -0
  84. package/dist/features/content-type-templates/permissions/role-permissions.js.map +1 -0
  85. package/dist/features/content-type-templates/permissions/useContentRole.d.ts +37 -0
  86. package/dist/features/content-type-templates/permissions/useContentRole.d.ts.map +1 -0
  87. package/dist/features/content-type-templates/permissions/useContentRole.js +34 -0
  88. package/dist/features/content-type-templates/permissions/useContentRole.js.map +1 -0
  89. package/dist/features/content-type-templates/permissions/useResolveContentRole.d.ts +38 -0
  90. package/dist/features/content-type-templates/permissions/useResolveContentRole.d.ts.map +1 -0
  91. package/dist/features/content-type-templates/permissions/useResolveContentRole.js +83 -0
  92. package/dist/features/content-type-templates/permissions/useResolveContentRole.js.map +1 -0
  93. package/dist/features/content-type-templates/stores/index.d.ts +9 -0
  94. package/dist/features/content-type-templates/stores/index.d.ts.map +1 -0
  95. package/dist/features/content-type-templates/stores/index.js +8 -0
  96. package/dist/features/content-type-templates/stores/index.js.map +1 -0
  97. package/dist/features/content-type-templates/stores/template-store-api.d.ts +17 -0
  98. package/dist/features/content-type-templates/stores/template-store-api.d.ts.map +1 -0
  99. package/dist/features/content-type-templates/stores/template-store-api.js +56 -0
  100. package/dist/features/content-type-templates/stores/template-store-api.js.map +1 -0
  101. package/dist/features/content-type-templates/stores/template-store.d.ts +54 -0
  102. package/dist/features/content-type-templates/stores/template-store.d.ts.map +1 -0
  103. package/dist/features/content-type-templates/stores/template-store.js +80 -0
  104. package/dist/features/content-type-templates/stores/template-store.js.map +1 -0
  105. package/dist/features/content-type-templates/types.d.ts +114 -0
  106. package/dist/features/content-type-templates/types.d.ts.map +1 -0
  107. package/dist/features/content-type-templates/types.js +7 -0
  108. package/dist/features/content-type-templates/types.js.map +1 -0
  109. package/dist/features/content-type-templates/ui/ActionBarPinButton.d.ts +3 -0
  110. package/dist/features/content-type-templates/ui/ActionBarPinButton.d.ts.map +1 -0
  111. package/dist/features/content-type-templates/ui/ActionBarPinButton.js +77 -0
  112. package/dist/features/content-type-templates/ui/ActionBarPinButton.js.map +1 -0
  113. package/dist/features/content-type-templates/ui/TemplateManagerOverlay.d.ts +18 -0
  114. package/dist/features/content-type-templates/ui/TemplateManagerOverlay.d.ts.map +1 -0
  115. package/dist/features/content-type-templates/ui/TemplateManagerOverlay.js +167 -0
  116. package/dist/features/content-type-templates/ui/TemplateManagerOverlay.js.map +1 -0
  117. package/dist/features/content-type-templates/ui/TemplatePinPanel.d.ts +18 -0
  118. package/dist/features/content-type-templates/ui/TemplatePinPanel.d.ts.map +1 -0
  119. package/dist/features/content-type-templates/ui/TemplatePinPanel.js +11 -0
  120. package/dist/features/content-type-templates/ui/TemplatePinPanel.js.map +1 -0
  121. package/dist/features/content-type-templates/ui/TemplateSelector.d.ts +41 -0
  122. package/dist/features/content-type-templates/ui/TemplateSelector.d.ts.map +1 -0
  123. package/dist/features/content-type-templates/ui/TemplateSelector.js +32 -0
  124. package/dist/features/content-type-templates/ui/TemplateSelector.js.map +1 -0
  125. package/dist/features/content-type-templates/ui/dataToTemplate.d.ts +25 -0
  126. package/dist/features/content-type-templates/ui/dataToTemplate.d.ts.map +1 -0
  127. package/dist/features/content-type-templates/ui/dataToTemplate.js +37 -0
  128. package/dist/features/content-type-templates/ui/dataToTemplate.js.map +1 -0
  129. package/dist/features/content-type-templates/validation/structural-validation.d.ts +29 -0
  130. package/dist/features/content-type-templates/validation/structural-validation.d.ts.map +1 -0
  131. package/dist/features/content-type-templates/validation/structural-validation.js +69 -0
  132. package/dist/features/content-type-templates/validation/structural-validation.js.map +1 -0
  133. package/dist/index.d.ts +8 -1
  134. package/dist/index.d.ts.map +1 -1
  135. package/dist/index.js +6 -1
  136. package/dist/index.js.map +1 -1
  137. package/dist/p1/editor/connect/connect-field-modal.d.ts.map +1 -1
  138. package/dist/p1/editor/connect/connect-field-modal.js +23 -1
  139. package/dist/p1/editor/connect/connect-field-modal.js.map +1 -1
  140. package/dist/p1/editor/connect/field-connect-plugin.d.ts.map +1 -1
  141. package/dist/p1/editor/connect/field-connect-plugin.js +2 -6
  142. package/dist/p1/editor/connect/field-connect-plugin.js.map +1 -1
  143. package/dist/p1/pages/conflict-resolution-panel.d.ts +17 -0
  144. package/dist/p1/pages/conflict-resolution-panel.d.ts.map +1 -0
  145. package/dist/p1/pages/conflict-resolution-panel.js +74 -0
  146. package/dist/p1/pages/conflict-resolution-panel.js.map +1 -0
  147. package/dist/p1/pages/content-type-template-list.d.ts +7 -0
  148. package/dist/p1/pages/content-type-template-list.d.ts.map +1 -0
  149. package/dist/p1/pages/content-type-template-list.js +108 -0
  150. package/dist/p1/pages/content-type-template-list.js.map +1 -0
  151. package/dist/p1/pages/create-content-type-form.d.ts +7 -0
  152. package/dist/p1/pages/create-content-type-form.d.ts.map +1 -0
  153. package/dist/p1/pages/create-content-type-form.js +102 -0
  154. package/dist/p1/pages/create-content-type-form.js.map +1 -0
  155. package/dist/p1/pages/create-page-form.d.ts +8 -1
  156. package/dist/p1/pages/create-page-form.d.ts.map +1 -1
  157. package/dist/p1/pages/create-page-form.js +67 -8
  158. package/dist/p1/pages/create-page-form.js.map +1 -1
  159. package/dist/p1/pages/create-template-form.d.ts +6 -1
  160. package/dist/p1/pages/create-template-form.d.ts.map +1 -1
  161. package/dist/p1/pages/create-template-form.js +61 -15
  162. package/dist/p1/pages/create-template-form.js.map +1 -1
  163. package/dist/p1/pages/hooks.d.ts +6 -1
  164. package/dist/p1/pages/hooks.d.ts.map +1 -1
  165. package/dist/p1/pages/hooks.js +13 -2
  166. package/dist/p1/pages/hooks.js.map +1 -1
  167. package/dist/p1/pages/index.d.ts +5 -0
  168. package/dist/p1/pages/index.d.ts.map +1 -1
  169. package/dist/p1/pages/index.js +5 -0
  170. package/dist/p1/pages/index.js.map +1 -1
  171. package/dist/p1/pages/migration-conflict-queue.d.ts +8 -0
  172. package/dist/p1/pages/migration-conflict-queue.d.ts.map +1 -0
  173. package/dist/p1/pages/migration-conflict-queue.js +62 -0
  174. package/dist/p1/pages/migration-conflict-queue.js.map +1 -0
  175. package/dist/p1/pages/migration-preview-panel.d.ts +12 -0
  176. package/dist/p1/pages/migration-preview-panel.d.ts.map +1 -0
  177. package/dist/p1/pages/migration-preview-panel.js +157 -0
  178. package/dist/p1/pages/migration-preview-panel.js.map +1 -0
  179. package/dist/p1/pages/migration-status-panel.d.ts +7 -0
  180. package/dist/p1/pages/migration-status-panel.d.ts.map +1 -0
  181. package/dist/p1/pages/migration-status-panel.js +198 -0
  182. package/dist/p1/pages/migration-status-panel.js.map +1 -0
  183. package/dist/p1/pages/structure-page.d.ts.map +1 -1
  184. package/dist/p1/pages/structure-page.js +75 -18
  185. package/dist/p1/pages/structure-page.js.map +1 -1
  186. package/dist/p1/pages/structure-tabs.d.ts +11 -0
  187. package/dist/p1/pages/structure-tabs.d.ts.map +1 -0
  188. package/dist/p1/pages/structure-tabs.js +45 -0
  189. package/dist/p1/pages/structure-tabs.js.map +1 -0
  190. package/dist/pds/components/P1EditorHeader.d.ts +6 -2
  191. package/dist/pds/components/P1EditorHeader.d.ts.map +1 -1
  192. package/dist/pds/components/P1EditorHeader.js +6 -3
  193. package/dist/pds/components/P1EditorHeader.js.map +1 -1
  194. package/dist/pds/components/PageNavigator.d.ts +7 -2
  195. package/dist/pds/components/PageNavigator.d.ts.map +1 -1
  196. package/dist/pds/components/PageNavigator.js +28 -7
  197. package/dist/pds/components/PageNavigator.js.map +1 -1
  198. package/dist/pds/components/PageNavigator.module.css +70 -0
  199. package/package.json +3 -3
  200. package/src/styles.css +331 -0
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  /**
3
3
  * PageNavigator component.
4
4
  *
@@ -13,11 +13,25 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
13
  import { useState, useCallback } from 'react';
14
14
  import { createPortal } from 'react-dom';
15
15
  import styles from './PageNavigator.module.css';
16
- export function PageNavigator({ documents, currentDocument, onSelect, onClose, open, isMainBranch, onCreateDocument, portalStyle, }) {
16
+ export function PageNavigator({ documents, currentDocument, onSelect, onClose, open, isMainBranch, onCreateDocument, templates, templatesLoading, portalStyle, }) {
17
17
  const [query, setQuery] = useState('');
18
- const [isCreating, setIsCreating] = useState(false);
18
+ const [creationStep, setCreationStep] = useState('idle');
19
+ const [selectedTemplate, setSelectedTemplate] = useState(null);
19
20
  const [newPath, setNewPath] = useState('');
20
21
  const [createError, setCreateError] = useState(null);
22
+ const hasTemplates = templates && templates.length > 0;
23
+ const handleNewPageClick = useCallback(() => {
24
+ if (hasTemplates) {
25
+ setCreationStep('template');
26
+ }
27
+ else {
28
+ setCreationStep('path');
29
+ }
30
+ }, [hasTemplates]);
31
+ const handleTemplateSelect = useCallback((template) => {
32
+ setSelectedTemplate(template);
33
+ setCreationStep('path');
34
+ }, []);
21
35
  const handleCreate = useCallback(async (e) => {
22
36
  e.preventDefault();
23
37
  if (!newPath.trim() || !onCreateDocument)
@@ -26,9 +40,10 @@ export function PageNavigator({ documents, currentDocument, onSelect, onClose, o
26
40
  const normalizedPath = path.startsWith('/') ? path : `/${path}`;
27
41
  setCreateError(null);
28
42
  try {
29
- await onCreateDocument(path);
43
+ await onCreateDocument(path, selectedTemplate);
30
44
  setNewPath('');
31
- setIsCreating(false);
45
+ setCreationStep('idle');
46
+ setSelectedTemplate(null);
32
47
  // Navigate to the newly created page
33
48
  onSelect({ id: normalizedPath, path: normalizedPath, archived: false });
34
49
  onClose();
@@ -36,7 +51,13 @@ export function PageNavigator({ documents, currentDocument, onSelect, onClose, o
36
51
  catch (err) {
37
52
  setCreateError(err instanceof Error ? err.message : 'Failed to create page');
38
53
  }
39
- }, [newPath, onCreateDocument, onSelect, onClose]);
54
+ }, [newPath, onCreateDocument, selectedTemplate, onSelect, onClose]);
55
+ const handleCancel = useCallback(() => {
56
+ setCreationStep('idle');
57
+ setNewPath('');
58
+ setCreateError(null);
59
+ setSelectedTemplate(null);
60
+ }, []);
40
61
  if (!open)
41
62
  return null;
42
63
  // Filter: exclude archived, exclude internal _* paths (e.g. /_registry/, _registry/)
@@ -54,7 +75,7 @@ export function PageNavigator({ documents, currentDocument, onSelect, onClose, o
54
75
  const isCurrent = currentDocument !== null && doc.id === currentDocument.id;
55
76
  const isLiveOnly = isMainBranch === false && doc.inherited === true;
56
77
  return (_jsx("li", { children: _jsx("button", { type: "button", "data-testid": "page-navigator-item", "data-inherited": isLiveOnly ? 'true' : undefined, className: `${styles.item}${isCurrent ? ` ${styles.itemCurrent}` : ''}${isLiveOnly ? ` ${styles.itemInherited}` : ''}`, onClick: () => { onSelect(doc); setQuery(''); }, "aria-current": isCurrent ? 'page' : undefined, children: doc.path }) }, doc.id));
57
- }), filtered.length === 0 && (_jsx("li", { className: styles.empty, children: "No pages found" }))] }), _jsx("div", { className: styles.footer, children: isCreating ? (_jsxs("form", { "data-testid": "page-navigator-create-form", className: styles.createForm, onSubmit: handleCreate, children: [_jsx("input", { autoFocus: true, type: "text", "data-testid": "page-navigator-create-input", className: styles.createInput, placeholder: "page-path", value: newPath, onChange: (e) => setNewPath(e.target.value) }), _jsxs("div", { className: styles.createActions, children: [_jsx("button", { type: "submit", className: styles.createSubmit, children: "Create" }), _jsx("button", { type: "button", "data-testid": "page-navigator-create-cancel", className: styles.createCancel, onClick: () => { setIsCreating(false); setNewPath(''); setCreateError(null); }, children: "Cancel" })] }), createError && (_jsx("div", { "data-testid": "page-navigator-create-error", className: styles.createError, children: createError }))] })) : (_jsx("button", { type: "button", "data-testid": "page-navigator-new", className: styles.newButton, onClick: onCreateDocument ? () => setIsCreating(true) : undefined, children: "+ New page" })) })] }));
78
+ }), filtered.length === 0 && (_jsx("li", { className: styles.empty, children: "No pages found" }))] }), _jsx("div", { className: styles.footer, children: creationStep === 'template' ? (_jsx("div", { "data-testid": "template-selector", className: styles.templateSelector, children: templatesLoading ? (_jsx("div", { "data-testid": "template-selector-loading", className: styles.templateSelectorLoading, children: "Loading templates..." })) : (_jsxs(_Fragment, { children: [_jsx("div", { className: styles.templateSelectorHeader, children: "Choose a template" }), _jsxs("div", { className: styles.templateSelectorGrid, children: [_jsxs("button", { type: "button", className: styles.templateOption, onClick: () => handleTemplateSelect(null), children: [_jsx("span", { className: styles.templateOptionLabel, children: "Blank Page" }), _jsx("span", { className: styles.templateOptionDesc, children: "Start from scratch" })] }), (templates ?? []).map((t) => (_jsxs("button", { type: "button", className: styles.templateOption, onClick: () => handleTemplateSelect(t), children: [_jsx("span", { className: styles.templateOptionLabel, children: t.label || t.name }), t.description && (_jsx("span", { className: styles.templateOptionDesc, children: t.description }))] }, t.id)))] }), _jsx("button", { type: "button", className: styles.createCancel, onClick: handleCancel, children: "Cancel" })] })) })) : creationStep === 'path' ? (_jsxs("form", { "data-testid": "page-navigator-create-form", className: styles.createForm, onSubmit: handleCreate, children: [selectedTemplate && (_jsxs("div", { className: styles.selectedTemplateBadge, children: ["Template: ", selectedTemplate.label || selectedTemplate.name] })), _jsx("input", { autoFocus: true, type: "text", "data-testid": "page-navigator-create-input", className: styles.createInput, placeholder: "page-path", value: newPath, onChange: (e) => setNewPath(e.target.value) }), _jsxs("div", { className: styles.createActions, children: [_jsx("button", { type: "submit", className: styles.createSubmit, children: "Create" }), _jsx("button", { type: "button", "data-testid": "page-navigator-create-cancel", className: styles.createCancel, onClick: handleCancel, children: "Cancel" })] }), createError && (_jsx("div", { "data-testid": "page-navigator-create-error", className: styles.createError, children: createError }))] })) : (_jsx("button", { type: "button", "data-testid": "page-navigator-new", className: styles.newButton, onClick: onCreateDocument ? handleNewPageClick : undefined, children: "+ New page" })) })] }));
58
79
  return portalStyle ? createPortal(content, document.body) : content;
59
80
  }
60
81
  //# sourceMappingURL=PageNavigator.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PageNavigator.js","sourceRoot":"","sources":["../../../src/pds/components/PageNavigator.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;AAEH,OAAc,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,MAAM,MAAM,4BAA4B,CAAC;AA4BhD,MAAM,UAAU,aAAa,CAAC,EAC5B,SAAS,EACT,eAAe,EACf,QAAQ,EACR,OAAO,EACP,IAAI,EACJ,YAAY,EACZ,gBAAgB,EAChB,WAAW,GACQ;IACnB,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IACvC,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACpD,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IAC3C,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAgB,IAAI,CAAC,CAAC;IAEpE,MAAM,YAAY,GAAG,WAAW,CAC9B,KAAK,E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AI,EAAC,QAAQ,EAAC,SAAS,EAAE,MAAM,CAAC,YAAY,uBAE3C,EACT,iBACE,IAAI,EAAC,QAAQ,iBACD,8BAA8B,EAC1C,SAAS,EAAE,MAAM,CAAC,YAAY,EAC9B,OAAO,EAAE,YAAY,uBAGd,IACL,EACL,WAAW,IAAI,CACd,6BAAiB,6BAA6B,EAAC,SAAS,EAAE,MAAM,CAAC,WAAW,YACzE,WAAW,GACR,CACP,IACI,CACR,CAAC,CAAC,CAAC,CACF,iBACE,IAAI,EAAC,QAAQ,iBACD,oBAAoB,EAChC,SAAS,EAAE,MAAM,CAAC,SAAS,EAC3B,OAAO,EAAE,gBAAgB,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,SAAS,2BAGnD,CACV,GACG,IACF,CACP,CAAC;IAEF,OAAO,WAAW,CAAC,CAAC,CAAC,YAAY,CAAC,OAAO,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;AACtE,CAAC"}
@@ -253,6 +253,76 @@
253
253
  background: var(--pds-color-bg-default-secondary, oklch(0.9702 0 0));
254
254
  }
255
255
 
256
+ /* ── Template selector ─────────────────────────────────────────────────── */
257
+
258
+ .templateSelector {
259
+ width: 100%;
260
+ }
261
+
262
+ .templateSelectorHeader {
263
+ font-family: var(--pds-typography-ff-default, 'Inter', sans-serif);
264
+ font-size: var(--pds-typography-size-s, 0.875rem);
265
+ font-weight: var(--pds-typography-fw-semibold, 600);
266
+ color: var(--pds-color-fg-default, oklch(0.2046 0 0));
267
+ margin-bottom: 0.512rem;
268
+ }
269
+
270
+ .templateSelectorGrid {
271
+ display: flex;
272
+ flex-direction: column;
273
+ gap: 0.25rem;
274
+ margin-bottom: 0.512rem;
275
+ }
276
+
277
+ .templateSelectorLoading {
278
+ padding: 0.64rem;
279
+ font-family: var(--pds-typography-ff-default, 'Inter', sans-serif);
280
+ font-size: var(--pds-typography-size-s, 0.875rem);
281
+ color: var(--pds-color-fg-default-secondary, oklch(0.5103 0 0));
282
+ font-style: italic;
283
+ }
284
+
285
+ .templateOption {
286
+ display: flex;
287
+ flex-direction: column;
288
+ align-items: flex-start;
289
+ gap: 0.125rem;
290
+ padding: 0.5rem 0.64rem;
291
+ background: var(--pds-color-bg-default, oklch(1.0000 0 0));
292
+ border: 1px solid var(--pds-color-border-input, oklch(0.8853 0 0));
293
+ border-radius: var(--pds-border-radius-default, 0.188rem);
294
+ cursor: pointer;
295
+ text-align: left;
296
+ width: 100%;
297
+ font-family: var(--pds-typography-ff-default, 'Inter', sans-serif);
298
+ }
299
+
300
+ .templateOption:hover {
301
+ background: var(--pds-color-bg-default-secondary, oklch(0.9702 0 0));
302
+ border-color: var(--pds-color-interactive-focus, oklch(0.5558 0.2372 267.79));
303
+ }
304
+
305
+ .templateOptionLabel {
306
+ font-size: var(--pds-typography-size-s, 0.875rem);
307
+ font-weight: var(--pds-typography-fw-semibold, 600);
308
+ color: var(--pds-color-fg-default, oklch(0.2046 0 0));
309
+ }
310
+
311
+ .templateOptionDesc {
312
+ font-size: var(--pds-typography-size-xs, 0.75rem);
313
+ color: var(--pds-color-fg-default-secondary, oklch(0.5103 0 0));
314
+ }
315
+
316
+ .selectedTemplateBadge {
317
+ font-family: var(--pds-typography-ff-default, 'Inter', sans-serif);
318
+ font-size: var(--pds-typography-size-xs, 0.75rem);
319
+ color: var(--pds-color-interactive-link-default, oklch(0.5558 0.2372 267.79));
320
+ background: var(--pds-color-status-info-background, oklch(0.9683 0.0161 245.08));
321
+ padding: 0.25rem 0.5rem;
322
+ border-radius: var(--pds-border-radius-default, 0.188rem);
323
+ margin-bottom: 0.25rem;
324
+ }
325
+
256
326
  /* ── Mobile: full-width dropdown with horizontal scroll for long paths ── */
257
327
 
258
328
  @media (max-width: 767px) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pantheon-systems/puck-css",
3
- "version": "0.4.2",
3
+ "version": "0.4.3",
4
4
  "description": "Puck editor integration with Collaborative State System",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -76,7 +76,7 @@
76
76
  "fast-json-patch": "^3.1.1",
77
77
  "jsep": "^1.4.0",
78
78
  "yjs": "^13.6.29",
79
- "@pantheon-systems/css-client": "0.4.2"
79
+ "@pantheon-systems/css-client": "0.4.3"
80
80
  },
81
81
  "devDependencies": {
82
82
  "@floating-ui/react": "^0.27.19",
@@ -108,7 +108,7 @@
108
108
  "license": "MIT",
109
109
  "scripts": {
110
110
  "dev": "vite --config vite.config.preview.ts",
111
- "build": "tsc && find src -name '*.module.css' | while read f; do dest=\"dist/${f#src/}\"; mkdir -p \"$(dirname \"$dest\")\"; cp \"$f\" \"$dest\"; done && (cp node_modules/@pantheon-systems/pds-toolkit-react/dist/css/pds-core.css src/pds/theme/pds-core.css && node scripts/generate-pds-content.cjs) || true",
111
+ "build": "tsc; find src -name '*.module.css' | while read f; do dest=\"dist/${f#src/}\"; mkdir -p \"$(dirname \"$dest\")\"; cp \"$f\" \"$dest\"; done; (cp node_modules/@pantheon-systems/pds-toolkit-react/dist/css/pds-core.css src/pds/theme/pds-core.css && node scripts/generate-pds-content.cjs) || true",
112
112
  "clean": "rm -rf dist *.tsbuildinfo",
113
113
  "lint": "eslint src",
114
114
  "test": "vitest run",
package/src/styles.css CHANGED
@@ -2397,3 +2397,334 @@ svg.lucide-layers {
2397
2397
 
2398
2398
  /* 5. Nav tooltips are handled purely by PuckEditorTheme.css — Puck's own
2399
2399
  _NavItem-linkLabel_ spans are restyled as hover tooltips. */
2400
+
2401
+ /* ============================================
2402
+ Template Selector
2403
+ ============================================ */
2404
+
2405
+ .template-selector {
2406
+ width: 100%;
2407
+ }
2408
+
2409
+ .template-selector__grid {
2410
+ display: grid;
2411
+ grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
2412
+ gap: 16px;
2413
+ padding: 16px 0;
2414
+ }
2415
+
2416
+ .template-selector__option {
2417
+ /* Extend PDS button styles */
2418
+ min-height: 100px;
2419
+ text-align: left;
2420
+ padding: 16px;
2421
+ width: 100%;
2422
+ display: flex;
2423
+ flex-direction: column;
2424
+ align-items: flex-start;
2425
+ border: 2px solid var(--puck-css-border);
2426
+ border-radius: 8px;
2427
+ transition: all 0.2s ease;
2428
+ }
2429
+
2430
+ .template-selector__option:hover {
2431
+ border-color: var(--puck-css-primary);
2432
+ background-color: var(--puck-css-bg-secondary);
2433
+ }
2434
+
2435
+ .template-selector__option[aria-pressed="true"] {
2436
+ border-color: var(--puck-css-primary);
2437
+ background-color: var(--puck-css-primary);
2438
+ color: white;
2439
+ }
2440
+
2441
+ .template-selector__option[aria-pressed="true"] .template-selector__option-description {
2442
+ color: rgba(255, 255, 255, 0.9);
2443
+ }
2444
+
2445
+ .template-selector__option-content {
2446
+ width: 100%;
2447
+ }
2448
+
2449
+ .template-selector__option-label {
2450
+ font-size: 16px;
2451
+ font-weight: 600;
2452
+ margin-bottom: 8px;
2453
+ }
2454
+
2455
+ .template-selector__option-description {
2456
+ font-size: 14px;
2457
+ color: var(--puck-css-text-secondary);
2458
+ line-height: 1.4;
2459
+ }
2460
+
2461
+ .template-selector--loading,
2462
+ .template-selector--error {
2463
+ padding: 32px;
2464
+ text-align: center;
2465
+ }
2466
+
2467
+ .template-selector__loading-message {
2468
+ font-size: 16px;
2469
+ color: var(--puck-css-text-secondary);
2470
+ }
2471
+
2472
+ .template-selector__error-message {
2473
+ color: var(--puck-css-diff-removed);
2474
+ }
2475
+
2476
+ .template-selector__error-message strong {
2477
+ display: block;
2478
+ margin-bottom: 8px;
2479
+ font-size: 16px;
2480
+ }
2481
+
2482
+ .template-selector__error-message p {
2483
+ font-size: 14px;
2484
+ margin: 0;
2485
+ }
2486
+
2487
+ /* ── Template Manager Overlay ─────────────────────────────────────────── */
2488
+
2489
+ .template-manager-overlay {
2490
+ position: fixed;
2491
+ inset: 0;
2492
+ z-index: 10001;
2493
+ background: var(--pds-color-bg-default, #fff);
2494
+ display: flex;
2495
+ flex-direction: column;
2496
+ }
2497
+
2498
+ .template-manager-overlay__header {
2499
+ display: flex;
2500
+ align-items: center;
2501
+ justify-content: space-between;
2502
+ padding: 0.75rem 1.5rem;
2503
+ border-bottom: 1px solid var(--pds-color-border-default, #e5e7eb);
2504
+ flex-shrink: 0;
2505
+ }
2506
+
2507
+ .template-manager-overlay__title {
2508
+ font-size: 1.125rem;
2509
+ font-weight: 600;
2510
+ margin: 0;
2511
+ }
2512
+
2513
+ .template-manager-overlay__close {
2514
+ background: none;
2515
+ border: none;
2516
+ font-size: 1rem;
2517
+ cursor: pointer;
2518
+ color: var(--pds-color-fg-default-secondary, #6b7280);
2519
+ padding: 0.25rem 0.5rem;
2520
+ }
2521
+
2522
+ .template-manager-overlay__close:hover {
2523
+ color: var(--pds-color-fg-default, #1f2937);
2524
+ }
2525
+
2526
+ .template-manager-overlay__error {
2527
+ padding: 0.5rem 1.5rem;
2528
+ background: #fef2f2;
2529
+ color: #991b1b;
2530
+ font-size: 0.875rem;
2531
+ }
2532
+
2533
+ .template-manager-overlay__list {
2534
+ padding: 1.5rem;
2535
+ overflow-y: auto;
2536
+ flex: 1;
2537
+ max-width: 800px;
2538
+ margin: 0 auto;
2539
+ width: 100%;
2540
+ }
2541
+
2542
+ .template-manager-overlay__loading,
2543
+ .template-manager-overlay__empty {
2544
+ padding: 2rem;
2545
+ text-align: center;
2546
+ color: var(--pds-color-fg-default-secondary, #6b7280);
2547
+ font-size: 0.875rem;
2548
+ }
2549
+
2550
+ .template-manager-overlay__template-list {
2551
+ list-style: none;
2552
+ padding: 0;
2553
+ margin: 1rem 0 0;
2554
+ display: flex;
2555
+ flex-direction: column;
2556
+ gap: 0.5rem;
2557
+ }
2558
+
2559
+ .template-manager-overlay__template-item {
2560
+ display: flex;
2561
+ align-items: center;
2562
+ justify-content: space-between;
2563
+ padding: 0.75rem 1rem;
2564
+ border: 1px solid var(--pds-color-border-default, #e5e7eb);
2565
+ border-radius: 0.375rem;
2566
+ }
2567
+
2568
+ .template-manager-overlay__template-item:hover {
2569
+ background: var(--pds-color-bg-default-secondary, #f9fafb);
2570
+ }
2571
+
2572
+ .template-manager-overlay__template-info {
2573
+ display: flex;
2574
+ flex-direction: column;
2575
+ gap: 0.125rem;
2576
+ }
2577
+
2578
+ .template-manager-overlay__template-label {
2579
+ font-weight: 600;
2580
+ font-size: 0.875rem;
2581
+ }
2582
+
2583
+ .template-manager-overlay__template-meta {
2584
+ font-size: 0.75rem;
2585
+ color: var(--pds-color-fg-default-secondary, #6b7280);
2586
+ }
2587
+
2588
+ .template-manager-overlay__template-actions {
2589
+ display: flex;
2590
+ gap: 0.5rem;
2591
+ }
2592
+
2593
+ /* ── Template Editor (create/edit mode) ───────────────────────────────── */
2594
+
2595
+ .template-manager-overlay__editor {
2596
+ display: grid;
2597
+ grid-template-columns: 300px 1fr;
2598
+ flex: 1;
2599
+ overflow: hidden;
2600
+ }
2601
+
2602
+ .template-manager-overlay__editor-sidebar {
2603
+ border-right: 1px solid var(--pds-color-border-default, #e5e7eb);
2604
+ padding: 1rem;
2605
+ overflow-y: auto;
2606
+ display: flex;
2607
+ flex-direction: column;
2608
+ gap: 1rem;
2609
+ }
2610
+
2611
+ .template-manager-overlay__editor-canvas {
2612
+ overflow: hidden;
2613
+ }
2614
+
2615
+ .template-manager-overlay__metadata {
2616
+ display: flex;
2617
+ flex-direction: column;
2618
+ gap: 0.75rem;
2619
+ }
2620
+
2621
+ .template-manager-overlay__field {
2622
+ display: flex;
2623
+ flex-direction: column;
2624
+ gap: 0.25rem;
2625
+ }
2626
+
2627
+ .template-manager-overlay__field-label {
2628
+ font-size: 0.75rem;
2629
+ font-weight: 600;
2630
+ color: var(--pds-color-fg-default-secondary, #6b7280);
2631
+ text-transform: uppercase;
2632
+ letter-spacing: 0.05em;
2633
+ }
2634
+
2635
+ .template-manager-overlay__input,
2636
+ .template-manager-overlay__textarea {
2637
+ padding: 0.375rem 0.5rem;
2638
+ border: 1px solid var(--pds-color-border-default, #e5e7eb);
2639
+ border-radius: 0.25rem;
2640
+ font-size: 0.875rem;
2641
+ font-family: inherit;
2642
+ width: 100%;
2643
+ box-sizing: border-box;
2644
+ }
2645
+
2646
+ .template-manager-overlay__input:focus,
2647
+ .template-manager-overlay__textarea:focus {
2648
+ outline: none;
2649
+ border-color: var(--pds-color-interactive-focus, #3b82f6);
2650
+ box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
2651
+ }
2652
+
2653
+ .template-manager-overlay__input:disabled {
2654
+ background: var(--pds-color-bg-default-secondary, #f9fafb);
2655
+ color: var(--pds-color-fg-default-secondary, #6b7280);
2656
+ }
2657
+
2658
+ .template-manager-overlay__save-actions {
2659
+ display: flex;
2660
+ gap: 0.5rem;
2661
+ margin-top: auto;
2662
+ padding-top: 1rem;
2663
+ border-top: 1px solid var(--pds-color-border-default, #e5e7eb);
2664
+ }
2665
+
2666
+ .template-manager-overlay__puck-loading {
2667
+ display: flex;
2668
+ align-items: center;
2669
+ justify-content: center;
2670
+ height: 100%;
2671
+ color: var(--pds-color-fg-default-secondary, #6b7280);
2672
+ }
2673
+
2674
+ /* ── Template Pin Panel ───────────────────────────────────────────────── */
2675
+
2676
+ .template-pin-panel {
2677
+ border: 1px solid var(--pds-color-border-default, #e5e7eb);
2678
+ border-radius: 0.375rem;
2679
+ padding: 0.75rem;
2680
+ }
2681
+
2682
+ .template-pin-panel--empty {
2683
+ color: var(--pds-color-fg-default-secondary, #6b7280);
2684
+ font-size: 0.8125rem;
2685
+ font-style: italic;
2686
+ }
2687
+
2688
+ .template-pin-panel__header {
2689
+ font-size: 0.75rem;
2690
+ font-weight: 600;
2691
+ color: var(--pds-color-fg-default-secondary, #6b7280);
2692
+ text-transform: uppercase;
2693
+ letter-spacing: 0.05em;
2694
+ margin-bottom: 0.5rem;
2695
+ }
2696
+
2697
+ .template-pin-panel__list {
2698
+ list-style: none;
2699
+ padding: 0;
2700
+ margin: 0;
2701
+ display: flex;
2702
+ flex-direction: column;
2703
+ gap: 0.25rem;
2704
+ }
2705
+
2706
+ .template-pin-panel__item {
2707
+ display: flex;
2708
+ align-items: center;
2709
+ justify-content: space-between;
2710
+ padding: 0.375rem 0.5rem;
2711
+ border-radius: 0.25rem;
2712
+ font-size: 0.8125rem;
2713
+ }
2714
+
2715
+ .template-pin-panel__item:hover {
2716
+ background: var(--pds-color-bg-default-secondary, #f9fafb);
2717
+ }
2718
+
2719
+ .template-pin-panel__type {
2720
+ font-weight: 500;
2721
+ }
2722
+
2723
+ .template-pin-panel__pin-label {
2724
+ display: flex;
2725
+ align-items: center;
2726
+ gap: 0.25rem;
2727
+ font-size: 0.75rem;
2728
+ color: var(--pds-color-fg-default-secondary, #6b7280);
2729
+ cursor: pointer;
2730
+ }