@pantheon-systems/puck-css 0.13.0 → 0.14.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 (130) hide show
  1. package/dist/core/index.d.ts +1 -1
  2. package/dist/core/index.d.ts.map +1 -1
  3. package/dist/core/plugin-types.d.ts +9 -0
  4. package/dist/core/plugin-types.d.ts.map +1 -1
  5. package/dist/core/types.d.ts +6 -0
  6. package/dist/core/types.d.ts.map +1 -1
  7. package/dist/data/data-list-block/builtin-components/cards.d.ts +1 -0
  8. package/dist/data/data-list-block/builtin-components/cards.d.ts.map +1 -1
  9. package/dist/data/data-list-block/builtin-components/cards.js +16 -16
  10. package/dist/data/data-list-block/builtin-components/cards.js.map +1 -1
  11. package/dist/data/data-list-block/builtin-components/listing.d.ts +1 -0
  12. package/dist/data/data-list-block/builtin-components/listing.d.ts.map +1 -1
  13. package/dist/data/data-list-block/builtin-components/listing.js +4 -3
  14. package/dist/data/data-list-block/builtin-components/listing.js.map +1 -1
  15. package/dist/data/data-list-block/builtin-components/rows.d.ts +1 -0
  16. package/dist/data/data-list-block/builtin-components/rows.d.ts.map +1 -1
  17. package/dist/data/data-list-block/builtin-components/rows.js +3 -3
  18. package/dist/data/data-list-block/builtin-components/rows.js.map +1 -1
  19. package/dist/data/data-list-block/create-data-list-block.d.ts +1 -0
  20. package/dist/data/data-list-block/create-data-list-block.d.ts.map +1 -1
  21. package/dist/data/data-list-block/create-data-list-block.js +7 -4
  22. package/dist/data/data-list-block/create-data-list-block.js.map +1 -1
  23. package/dist/data/data-list-block/data-list.css +314 -0
  24. package/dist/data/fields.d.ts.map +1 -1
  25. package/dist/data/fields.js +7 -2
  26. package/dist/data/fields.js.map +1 -1
  27. package/dist/data/paths.d.ts +6 -0
  28. package/dist/data/paths.d.ts.map +1 -1
  29. package/dist/data/paths.js +3 -0
  30. package/dist/data/paths.js.map +1 -1
  31. package/dist/data/query-provider.d.ts +14 -0
  32. package/dist/data/query-provider.d.ts.map +1 -1
  33. package/dist/data/query-provider.js +20 -9
  34. package/dist/data/query-provider.js.map +1 -1
  35. package/dist/data/utils.d.ts +14 -0
  36. package/dist/data/utils.d.ts.map +1 -1
  37. package/dist/data/utils.js +19 -1
  38. package/dist/data/utils.js.map +1 -1
  39. package/dist/editor/P1PuckProvider.d.ts.map +1 -1
  40. package/dist/editor/P1PuckProvider.js +15 -5
  41. package/dist/editor/P1PuckProvider.js.map +1 -1
  42. package/dist/editor/components/VersionBannerOverride.d.ts +7 -1
  43. package/dist/editor/components/VersionBannerOverride.d.ts.map +1 -1
  44. package/dist/editor/components/VersionBannerOverride.js +15 -10
  45. package/dist/editor/components/VersionBannerOverride.js.map +1 -1
  46. package/dist/editor/composePlugins.d.ts +9 -3
  47. package/dist/editor/composePlugins.d.ts.map +1 -1
  48. package/dist/editor/composePlugins.js +3 -8
  49. package/dist/editor/composePlugins.js.map +1 -1
  50. package/dist/editor/defaultPlugins.d.ts.map +1 -1
  51. package/dist/editor/defaultPlugins.js +2 -0
  52. package/dist/editor/defaultPlugins.js.map +1 -1
  53. package/dist/editor/freshFieldTypes.d.ts +12 -0
  54. package/dist/editor/freshFieldTypes.d.ts.map +1 -0
  55. package/dist/editor/freshFieldTypes.js +11 -0
  56. package/dist/editor/freshFieldTypes.js.map +1 -0
  57. package/dist/editor/plugin/P1Plugin.d.ts +10 -0
  58. package/dist/editor/plugin/P1Plugin.d.ts.map +1 -1
  59. package/dist/editor/plugin/P1Plugin.js +1 -1
  60. package/dist/editor/plugin/P1Plugin.js.map +1 -1
  61. package/dist/editor/stablePluginDeps.d.ts +9 -0
  62. package/dist/editor/stablePluginDeps.d.ts.map +1 -0
  63. package/dist/editor/stablePluginDeps.js +15 -0
  64. package/dist/editor/stablePluginDeps.js.map +1 -0
  65. package/dist/editor/useP1Editor.d.ts +8 -0
  66. package/dist/editor/useP1Editor.d.ts.map +1 -1
  67. package/dist/editor/useP1Editor.js +42 -6
  68. package/dist/editor/useP1Editor.js.map +1 -1
  69. package/dist/editor/useP1Plugin.d.ts +3 -1
  70. package/dist/editor/useP1Plugin.d.ts.map +1 -1
  71. package/dist/editor/useP1Plugin.js +6 -0
  72. package/dist/editor/useP1Plugin.js.map +1 -1
  73. package/dist/features/content-type-templates/permissions/role-permissions.d.ts +8 -0
  74. package/dist/features/content-type-templates/permissions/role-permissions.d.ts.map +1 -1
  75. package/dist/features/content-type-templates/permissions/role-permissions.js +3 -0
  76. package/dist/features/content-type-templates/permissions/role-permissions.js.map +1 -1
  77. package/dist/features/localization/authority.d.ts +26 -0
  78. package/dist/features/localization/authority.d.ts.map +1 -0
  79. package/dist/features/localization/authority.js +17 -0
  80. package/dist/features/localization/authority.js.map +1 -0
  81. package/dist/features/localization/index.d.ts +11 -0
  82. package/dist/features/localization/index.d.ts.map +1 -0
  83. package/dist/features/localization/index.js +7 -0
  84. package/dist/features/localization/index.js.map +1 -0
  85. package/dist/features/localization/prop-target.d.ts +26 -0
  86. package/dist/features/localization/prop-target.d.ts.map +1 -0
  87. package/dist/features/localization/prop-target.js +15 -0
  88. package/dist/features/localization/prop-target.js.map +1 -0
  89. package/dist/features/localization/puck-overrides.d.ts +12 -0
  90. package/dist/features/localization/puck-overrides.d.ts.map +1 -0
  91. package/dist/features/localization/puck-overrides.js +12 -0
  92. package/dist/features/localization/puck-overrides.js.map +1 -0
  93. package/dist/features/localization/relation.d.ts +14 -0
  94. package/dist/features/localization/relation.d.ts.map +1 -0
  95. package/dist/features/localization/relation.js +7 -0
  96. package/dist/features/localization/relation.js.map +1 -0
  97. package/dist/features/localization/translatable.d.ts +24 -0
  98. package/dist/features/localization/translatable.d.ts.map +1 -0
  99. package/dist/features/localization/translatable.js +30 -0
  100. package/dist/features/localization/translatable.js.map +1 -0
  101. package/dist/features/localization/types.d.ts +17 -0
  102. package/dist/features/localization/types.d.ts.map +1 -0
  103. package/dist/features/localization/types.js +2 -0
  104. package/dist/features/localization/types.js.map +1 -0
  105. package/dist/features/localization/ui/AuthorityFieldControl.d.ts +32 -0
  106. package/dist/features/localization/ui/AuthorityFieldControl.d.ts.map +1 -0
  107. package/dist/features/localization/ui/AuthorityFieldControl.js +36 -0
  108. package/dist/features/localization/ui/AuthorityFieldControl.js.map +1 -0
  109. package/dist/features/localization/ui/TranslatabilityToggle.d.ts +17 -0
  110. package/dist/features/localization/ui/TranslatabilityToggle.d.ts.map +1 -0
  111. package/dist/features/localization/ui/TranslatabilityToggle.js +16 -0
  112. package/dist/features/localization/ui/TranslatabilityToggle.js.map +1 -0
  113. package/dist/features/localization/useLocalizationData.d.ts +37 -0
  114. package/dist/features/localization/useLocalizationData.d.ts.map +1 -0
  115. package/dist/features/localization/useLocalizationData.js +88 -0
  116. package/dist/features/localization/useLocalizationData.js.map +1 -0
  117. package/dist/p1/editor/hooks/useLiveEditorContext.d.ts.map +1 -1
  118. package/dist/p1/editor/hooks/useLiveEditorContext.js +2 -1
  119. package/dist/p1/editor/hooks/useLiveEditorContext.js.map +1 -1
  120. package/dist/pds/components/PageNotFound.d.ts +27 -0
  121. package/dist/pds/components/PageNotFound.d.ts.map +1 -0
  122. package/dist/pds/components/PageNotFound.js +24 -0
  123. package/dist/pds/components/PageNotFound.js.map +1 -0
  124. package/dist/pds/components/PageNotFound.module.css +51 -0
  125. package/dist/pds/index.d.ts +2 -0
  126. package/dist/pds/index.d.ts.map +1 -1
  127. package/dist/pds/index.js +1 -0
  128. package/dist/pds/index.js.map +1 -1
  129. package/package.json +3 -3
  130. package/src/data/data-list-block/data-list.css +314 -0
@@ -0,0 +1,15 @@
1
+ export const ROOT_SLOT_ID = '__root__';
2
+ export function resolvePropTarget(id, fieldType, name) {
3
+ if (!id)
4
+ return null;
5
+ if (name.includes('.') || name.includes('['))
6
+ return null;
7
+ const suffix = `_${fieldType ?? ''}_${name}`;
8
+ if (!id.endsWith(suffix))
9
+ return null;
10
+ const slotId = id.slice(0, -suffix.length);
11
+ if (!slotId)
12
+ return null;
13
+ return { slotId: slotId === 'root' ? ROOT_SLOT_ID : slotId, propName: name };
14
+ }
15
+ //# sourceMappingURL=prop-target.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prop-target.js","sourceRoot":"","sources":["../../../src/features/localization/prop-target.ts"],"names":[],"mappings":"AASA,MAAM,CAAC,MAAM,YAAY,GAAG,UAAU,CAAC;AAkBvC,MAAM,UAAU,iBAAiB,CAC/B,EAAsB,EACtB,SAA6B,EAC7B,IAAY;IAEZ,IAAI,CAAC,EAAE;QAAE,OAAO,IAAI,CAAC;IACrB,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC;QAAE,OAAO,IAAI,CAAC;IAE1D,MAAM,MAAM,GAAG,IAAI,SAAS,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC;IAC7C,IAAI,CAAC,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC;QAAE,OAAO,IAAI,CAAC;IACtC,MAAM,MAAM,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAC3C,IAAI,CAAC,MAAM;QAAE,OAAO,IAAI,CAAC;IAEzB,OAAO,EAAE,MAAM,EAAE,MAAM,KAAK,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AAC/E,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Localization Puck Overrides
3
+ *
4
+ * Contributes the per-prop fields-panel controls via the fieldTypes override:
5
+ * a single connected control per field renders the authority break/reset
6
+ * control on a translation and the translatability toggle on the canonical
7
+ * page. It reads the current document and client from P1 context at render
8
+ * time, so the override is inert on documents that are neither.
9
+ */
10
+ import type { P1FeaturePluginDeps } from '../../core/plugin-types.js';
11
+ export declare function buildLocalizationOverrides(_deps: P1FeaturePluginDeps): Record<string, unknown>;
12
+ //# sourceMappingURL=puck-overrides.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"puck-overrides.d.ts","sourceRoot":"","sources":["../../../src/features/localization/puck-overrides.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAatE,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,mBAAmB,GACzB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAYzB"}
@@ -0,0 +1,12 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { AuthorityFieldControl } from './ui/AuthorityFieldControl.js';
3
+ export function buildLocalizationOverrides(_deps) {
4
+ const localizedField = (props) => _jsx(AuthorityFieldControl, { ...props });
5
+ return {
6
+ fieldTypes: {
7
+ text: localizedField,
8
+ textarea: localizedField,
9
+ },
10
+ };
11
+ }
12
+ //# sourceMappingURL=puck-overrides.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"puck-overrides.js","sourceRoot":"","sources":["../../../src/features/localization/puck-overrides.tsx"],"names":[],"mappings":";AAYA,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAYtE,MAAM,UAAU,0BAA0B,CACxC,KAA0B;IAE1B,MAAM,cAAc,GAAG,CAAC,KAAyB,EAAE,EAAE,CAAC,KAAC,qBAAqB,OAAK,KAAK,GAAI,CAAC;IAE3F,OAAO;QAIL,UAAU,EAAE;YACV,IAAI,EAAE,cAAc;YACpB,QAAQ,EAAE,cAAc;SACzB;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Document Relation
3
+ *
4
+ * Whether a document derives from another one, which is what every localization
5
+ * control gates on. A document's locale says which language it is written in and
6
+ * nothing about what it inherits — a site may author its canonical pages in a
7
+ * locale — so the page it was localized from is the only thing that answers this.
8
+ */
9
+ import type { Document } from '@pantheon-systems/css-client';
10
+ /** The document is a translation: it was localized from a canonical page. */
11
+ export declare function isTranslationDocument(document: Document | null | undefined): boolean;
12
+ /** The document is a canonical page: it exists and was localized from nothing. */
13
+ export declare function isCanonicalDocument(document: Document | null | undefined): boolean;
14
+ //# sourceMappingURL=relation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"relation.d.ts","sourceRoot":"","sources":["../../../src/features/localization/relation.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAE7D,6EAA6E;AAC7E,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAEpF;AAED,kFAAkF;AAClF,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAElF"}
@@ -0,0 +1,7 @@
1
+ export function isTranslationDocument(document) {
2
+ return document?.localizedFromId != null;
3
+ }
4
+ export function isCanonicalDocument(document) {
5
+ return Boolean(document) && document?.localizedFromId == null;
6
+ }
7
+ //# sourceMappingURL=relation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"relation.js","sourceRoot":"","sources":["../../../src/features/localization/relation.ts"],"names":[],"mappings":"AAYA,MAAM,UAAU,qBAAqB,CAAC,QAAqC;IACzE,OAAO,QAAQ,EAAE,eAAe,IAAI,IAAI,CAAC;AAC3C,CAAC;AAGD,MAAM,UAAU,mBAAmB,CAAC,QAAqC;IACvE,OAAO,OAAO,CAAC,QAAQ,CAAC,IAAI,QAAQ,EAAE,eAAe,IAAI,IAAI,CAAC;AAChE,CAAC"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Translatability Storage
3
+ *
4
+ * Per-prop translatability lives on the CANONICAL page snapshot at
5
+ * root.props._localeTranslatable, shape { [slotId]: { [propName]: boolean } }.
6
+ * Absence means translatable (true); only an explicit false is non-translatable.
7
+ * The map applies to all languages, so it lives on the canonical document and is
8
+ * edited as part of that document's content, travelling with the editor's own
9
+ * saves rather than out of band.
10
+ */
11
+ type Snapshot = Record<string, unknown>;
12
+ /**
13
+ * Whether a prop is translatable. Defaults to true; false only when an explicit
14
+ * false is stored for the (slotId, propName) pair.
15
+ */
16
+ export declare function isPropTranslatable(map: unknown, slotId: string, propName: string): boolean;
17
+ /**
18
+ * Return a new snapshot with the prop's translatability set. A false is stored
19
+ * explicitly; setting it back to true prunes the entry (and any emptied slot),
20
+ * keeping the map minimal. The input snapshot is not mutated.
21
+ */
22
+ export declare function applyTranslatable(snapshot: Snapshot, slotId: string, propName: string, translatable: boolean): Snapshot;
23
+ export {};
24
+ //# sourceMappingURL=translatable.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"translatable.d.ts","sourceRoot":"","sources":["../../../src/features/localization/translatable.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,KAAK,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAUxC;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAE1F;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,OAAO,GACpB,QAAQ,CA2BV"}
@@ -0,0 +1,30 @@
1
+ function readMap(snapshot) {
2
+ const root = (snapshot.root ?? {});
3
+ const props = (root.props ?? {});
4
+ return props._localeTranslatable ?? {};
5
+ }
6
+ export function isPropTranslatable(map, slotId, propName) {
7
+ return map?.[slotId]?.[propName] !== false;
8
+ }
9
+ export function applyTranslatable(snapshot, slotId, propName, translatable) {
10
+ const root = (snapshot.root ?? {});
11
+ const props = (root.props ?? {});
12
+ const map = readMap(snapshot);
13
+ const currentSlot = map[slotId] ?? {};
14
+ const nextSlot = translatable
15
+ ? Object.fromEntries(Object.entries(currentSlot).filter(([key]) => key !== propName))
16
+ : { ...currentSlot, [propName]: false };
17
+ const nextMap = Object.fromEntries(Object.entries(map).filter(([key]) => key !== slotId));
18
+ if (Object.keys(nextSlot).length > 0) {
19
+ nextMap[slotId] = nextSlot;
20
+ }
21
+ const nextProps = { ...props };
22
+ if (Object.keys(nextMap).length > 0) {
23
+ nextProps._localeTranslatable = nextMap;
24
+ }
25
+ else {
26
+ delete nextProps._localeTranslatable;
27
+ }
28
+ return { ...snapshot, root: { ...root, props: nextProps } };
29
+ }
30
+ //# sourceMappingURL=translatable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"translatable.js","sourceRoot":"","sources":["../../../src/features/localization/translatable.ts"],"names":[],"mappings":"AAeA,SAAS,OAAO,CAAC,QAAkB;IACjC,MAAM,IAAI,GAAG,CAAC,QAAQ,CAAC,IAAI,IAAI,EAAE,CAA4B,CAAC;IAC9D,MAAM,KAAK,GAAG,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE,CAA4B,CAAC;IAC5D,OAAQ,KAAK,CAAC,mBAAuC,IAAI,EAAE,CAAC;AAC9D,CAAC;AAMD,MAAM,UAAU,kBAAkB,CAAC,GAAY,EAAE,MAAc,EAAE,QAAgB;IAC/E,OAAQ,GAAmC,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,QAAQ,CAAC,KAAK,KAAK,CAAC;AAC9E,CAAC;AAOD,MAAM,UAAU,iBAAiB,CAC/B,QAAkB,EAClB,MAAc,EACd,QAAgB,EAChB,YAAqB;IAErB,MAAM,IAAI,GAAG,CAAC,QAAQ,CAAC,IAAI,IAAI,EAAE,CAA4B,CAAC;IAC9D,MAAM,KAAK,GAAG,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE,CAA4B,CAAC;IAC5D,MAAM,GAAG,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;IAE9B,MAAM,WAAW,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;IACtC,MAAM,QAAQ,GAA4B,YAAY;QACpD,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,GAAG,KAAK,QAAQ,CAAC,CAAC;QACrF,CAAC,CAAC,EAAE,GAAG,WAAW,EAAE,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,CAAC;IAE1C,MAAM,OAAO,GAAoB,MAAM,CAAC,WAAW,CACjD,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,GAAG,KAAK,MAAM,CAAC,CACtD,CAAC;IACF,IAAI,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACrC,OAAO,CAAC,MAAM,CAAC,GAAG,QAAQ,CAAC;IAC7B,CAAC;IAID,MAAM,SAAS,GAAG,EAAE,GAAG,KAAK,EAAE,CAAC;IAC/B,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACpC,SAAS,CAAC,mBAAmB,GAAG,OAAO,CAAC;IAC1C,CAAC;SAAM,CAAC;QACN,OAAO,SAAS,CAAC,mBAAmB,CAAC;IACvC,CAAC;IAED,OAAO,EAAE,GAAG,QAAQ,EAAE,IAAI,EAAE,EAAE,GAAG,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,CAAC;AAC9D,CAAC"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Localization - Core Types
3
+ *
4
+ * Client-facing localization types are re-exported from css-client; this module
5
+ * carries the editor-side shapes used by the create-translation UI.
6
+ */
7
+ export type { LocalizationRelation, CreateTranslationParams, CreateTranslationResult, TranslationVariant, ListTranslationsResult, } from '@pantheon-systems/css-client';
8
+ /**
9
+ * A canonical page eligible to be translated, as the create-page UI consumes it.
10
+ */
11
+ export interface TranslatablePage {
12
+ /** Canonical document id */
13
+ id: string;
14
+ /** Canonical document path */
15
+ path: string;
16
+ }
17
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/features/localization/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,YAAY,EACV,oBAAoB,EACpB,uBAAuB,EACvB,uBAAuB,EACvB,kBAAkB,EAClB,sBAAsB,GACvB,MAAM,8BAA8B,CAAC;AAEtC;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,4BAA4B;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,8BAA8B;IAC9B,IAAI,EAAE,MAAM,CAAC;CACd"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/features/localization/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Authority Field Control
3
+ *
4
+ * Per-prop localization controls for the fields panel, rendered as the
5
+ * fieldTypes override for text/textarea props. The two controls live on
6
+ * different documents:
7
+ * - authority break/reset (translation only): break inheritance from the
8
+ * canonical (authority 'locale') or reset back to inheriting;
9
+ * - translatability toggle (canonical page only): mark whether the prop is
10
+ * natural-language text worth translating (default on). This decision is
11
+ * shared across languages, so it belongs to the canonical page.
12
+ *
13
+ * Document-scoped state and writes come from useLocalizationData; this control
14
+ * projects them onto one prop. The prop the field addresses comes from the props
15
+ * Puck passes to a fieldTypes override, and a field addressing no prop the
16
+ * stored maps can key carries no controls.
17
+ */
18
+ import React from 'react';
19
+ interface AuthorityFieldControlProps {
20
+ children: React.ReactNode;
21
+ name: string;
22
+ id?: string;
23
+ field?: {
24
+ type?: string;
25
+ };
26
+ readOnly?: boolean;
27
+ onChange?: (value: unknown, ui?: unknown) => void;
28
+ value?: unknown;
29
+ }
30
+ export declare function AuthorityFieldControl(props: AuthorityFieldControlProps): React.ReactElement;
31
+ export {};
32
+ //# sourceMappingURL=AuthorityFieldControl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AuthorityFieldControl.d.ts","sourceRoot":"","sources":["../../../../src/features/localization/ui/AuthorityFieldControl.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,UAAU,0BAA0B;IAClC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,EAAE,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IAClD,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,0BAA0B,GAAG,KAAK,CAAC,YAAY,CA4E3F"}
@@ -0,0 +1,36 @@
1
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { resolveAuthority } from '../authority.js';
3
+ import { resolvePropTarget } from '../prop-target.js';
4
+ import { isPropTranslatable } from '../translatable.js';
5
+ import { useLocalizationData } from '../useLocalizationData.js';
6
+ import { TranslatabilityToggle } from './TranslatabilityToggle.js';
7
+ export function AuthorityFieldControl(props) {
8
+ const { children, name, id, field, readOnly } = props;
9
+ const { isTranslation, isCanonical, loaded, authority, translatableMap, busy, setAuthority, setTranslatable, } = useLocalizationData();
10
+ const target = resolvePropTarget(id, field?.type, name);
11
+ if (target === null || (!isTranslation && !isCanonical))
12
+ return _jsx(_Fragment, { children: children });
13
+ const { slotId, propName } = target;
14
+ const broken = resolveAuthority(authority, slotId, propName) === 'locale';
15
+ const translatable = isPropTranslatable(translatableMap, slotId, propName);
16
+ const buttonStyle = {
17
+ fontSize: 'var(--puck-font-size-xxxs, 12px)',
18
+ fontWeight: 500,
19
+ background: 'var(--puck-color-white, #fff)',
20
+ border: '1px solid var(--puck-color-grey-09, #dcdcdc)',
21
+ borderRadius: 4,
22
+ padding: '2px 6px',
23
+ cursor: busy ? 'default' : 'pointer',
24
+ };
25
+ return (_jsxs("div", { style: { paddingBottom: 2 }, children: [children, !readOnly && loaded && (_jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: 8, marginTop: 4 }, children: [isTranslation &&
26
+ (broken ? (_jsx("button", { type: "button", "data-testid": "loc-authority-reset", title: "Reset to inherit from the canonical page", onClick: (e) => {
27
+ e.preventDefault();
28
+ e.stopPropagation();
29
+ setAuthority({ slotId, propName, authority: 'canonical' });
30
+ }, style: { ...buttonStyle, color: 'var(--puck-color-azure-04, #0158ad)' }, children: "Reset" })) : (_jsx("button", { type: "button", "data-testid": "loc-authority-break", title: "Break inheritance and edit this prop for this language", onClick: (e) => {
31
+ e.preventDefault();
32
+ e.stopPropagation();
33
+ setAuthority({ slotId, propName, authority: 'locale' });
34
+ }, style: { ...buttonStyle, color: 'var(--puck-color-grey-05, #767676)' }, children: "Inherited" }))), isCanonical && (_jsx(TranslatabilityToggle, { translatable: translatable, onToggle: (next) => setTranslatable({ slotId, propName, translatable: next }) }))] }))] }));
35
+ }
36
+ //# sourceMappingURL=AuthorityFieldControl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AuthorityFieldControl.js","sourceRoot":"","sources":["../../../../src/features/localization/ui/AuthorityFieldControl.tsx"],"names":[],"mappings":";AAmBA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA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,QAAQ,EAAE,GAAG,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,aACxE,aAAa;wBACZ,CAAC,MAAM,CAAC,CAAC,CAAC,CACR,iBACE,IAAI,EAAC,QAAQ,iBACD,qBAAqB,EACjC,KAAK,EAAC,0CAA0C,EAChD,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;gCACb,CAAC,CAAC,cAAc,EAAE,CAAC;gCACnB,CAAC,CAAC,eAAe,EAAE,CAAC;gCACpB,YAAY,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,CAAC,CAAC;4BAC7D,CAAC,EACD,KAAK,EAAE,EAAE,GAAG,WAAW,EAAE,KAAK,EAAE,qCAAqC,EAAE,sBAGhE,CACV,CAAC,CAAC,CAAC,CACF,iBACE,IAAI,EAAC,QAAQ,iBACD,qBAAqB,EACjC,KAAK,EAAC,wDAAwD,EAC9D,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;gCACb,CAAC,CAAC,cAAc,EAAE,CAAC;gCACnB,CAAC,CAAC,eAAe,EAAE,CAAC;gCACpB,YAAY,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC,CAAC;4BAC1D,CAAC,EACD,KAAK,EAAE,EAAE,GAAG,WAAW,EAAE,KAAK,EAAE,oCAAoC,EAAE,0BAG/D,CACV,CAAC,EACH,WAAW,IAAI,CACd,KAAC,qBAAqB,IACpB,YAAY,EAAE,YAAY,EAC1B,QAAQ,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,eAAe,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,GAC7E,CACH,IACG,CACP,IACG,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Translatability Toggle
3
+ *
4
+ * Presentational per-prop toggle. On (checked) means the prop is natural-language
5
+ * text worth translating (the default); off marks it non-translatable. The
6
+ * decision is shared across all languages, so the write target is the canonical
7
+ * page — handled by the caller via onToggle.
8
+ */
9
+ import React from 'react';
10
+ interface TranslatabilityToggleProps {
11
+ translatable: boolean;
12
+ onToggle: (next: boolean) => void;
13
+ readOnly?: boolean;
14
+ }
15
+ export declare function TranslatabilityToggle({ translatable, onToggle, readOnly, }: TranslatabilityToggleProps): React.ReactElement;
16
+ export {};
17
+ //# sourceMappingURL=TranslatabilityToggle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TranslatabilityToggle.d.ts","sourceRoot":"","sources":["../../../../src/features/localization/ui/TranslatabilityToggle.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,UAAU,0BAA0B;IAClC,YAAY,EAAE,OAAO,CAAC;IACtB,QAAQ,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAClC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,wBAAgB,qBAAqB,CAAC,EACpC,YAAY,EACZ,QAAQ,EACR,QAAQ,GACT,EAAE,0BAA0B,GAAG,KAAK,CAAC,YAAY,CA0BjD"}
@@ -0,0 +1,16 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ export function TranslatabilityToggle({ translatable, onToggle, readOnly, }) {
3
+ return (_jsxs("label", { style: {
4
+ display: 'inline-flex',
5
+ alignItems: 'center',
6
+ gap: 4,
7
+ fontSize: 'var(--puck-font-size-xxxs, 12px)',
8
+ marginBlockEnd: 0,
9
+ color: 'var(--puck-color-grey-05, #767676)',
10
+ }, title: "Translatable text. Turn off for values that should not be translated (e.g. a date or SKU).", children: [_jsx("input", { type: "checkbox", "data-testid": "loc-translatable-toggle", checked: translatable, disabled: readOnly, onChange: () => {
11
+ if (readOnly)
12
+ return;
13
+ onToggle(!translatable);
14
+ } }), _jsx("span", { children: "Translatable" })] }));
15
+ }
16
+ //# sourceMappingURL=TranslatabilityToggle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TranslatabilityToggle.js","sourceRoot":"","sources":["../../../../src/features/localization/ui/TranslatabilityToggle.tsx"],"names":[],"mappings":";AAiBA,MAAM,UAAU,qBAAqB,CAAC,EACpC,YAAY,EACZ,QAAQ,EACR,QAAQ,GACmB;IAC3B,OAAO,CACL,iBACE,KAAK,EAAE;YACL,OAAO,EAAE,aAAa;YACtB,UAAU,EAAE,QAAQ;YACpB,GAAG,EAAE,CAAC;YACN,QAAQ,EAAE,kCAAkC;YAC5C,cAAc,EAAE,CAAC;YACjB,KAAK,EAAE,oCAAoC;SAC5C,EACD,KAAK,EAAC,4FAA4F,aAElG,gBACE,IAAI,EAAC,UAAU,iBACH,yBAAyB,EACrC,OAAO,EAAE,YAAY,EACrB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,GAAG,EAAE;oBACb,IAAI,QAAQ;wBAAE,OAAO;oBACrB,QAAQ,CAAC,CAAC,YAAY,CAAC,CAAC;gBAC1B,CAAC,GACD,EACF,0CAAyB,IACnB,CACT,CAAC;AACJ,CAAC"}
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Localization Data
3
+ *
4
+ * The document-scoped state behind the per-prop controls: a translation's
5
+ * authority overrides, and the translatability map the canonical page carries in
6
+ * its own content. One control mounts per field in the panel and they share a
7
+ * query key per document, so a panel of any width costs one request and a write
8
+ * lands in every control at once.
9
+ */
10
+ import type { AuthorityOverridesResult, PropAuthority } from '@pantheon-systems/css-client';
11
+ import type { PropTarget } from './prop-target.js';
12
+ export interface LocalizationData {
13
+ /** The current document is a translation of a canonical page. */
14
+ isTranslation: boolean;
15
+ /** The current document is a canonical page. */
16
+ isCanonical: boolean;
17
+ /** Resolved authority overrides for a translation; null on a canonical page. */
18
+ authority: AuthorityOverridesResult | null;
19
+ /** The canonical page's translatability map, as the editor currently holds it. */
20
+ translatableMap: unknown;
21
+ /**
22
+ * The document's answer has arrived. A control rendered without it would show
23
+ * a guessed authority, and a click on that guess writes the wrong thing, so a
24
+ * read that failed leaves this false rather than falling back to a default.
25
+ */
26
+ loaded: boolean;
27
+ /** A write is in flight. */
28
+ busy: boolean;
29
+ setAuthority: (target: PropTarget & {
30
+ authority: PropAuthority;
31
+ }) => void;
32
+ setTranslatable: (target: PropTarget & {
33
+ translatable: boolean;
34
+ }) => void;
35
+ }
36
+ export declare function useLocalizationData(): LocalizationData;
37
+ //# sourceMappingURL=useLocalizationData.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useLocalizationData.d.ts","sourceRoot":"","sources":["../../../src/features/localization/useLocalizationData.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH,OAAO,KAAK,EAAE,wBAAwB,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAK5F,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAOnD,MAAM,WAAW,gBAAgB;IAC/B,iEAAiE;IACjE,aAAa,EAAE,OAAO,CAAC;IACvB,gDAAgD;IAChD,WAAW,EAAE,OAAO,CAAC;IACrB,gFAAgF;IAChF,SAAS,EAAE,wBAAwB,GAAG,IAAI,CAAC;IAC3C,kFAAkF;IAClF,eAAe,EAAE,OAAO,CAAC;IACzB;;;;OAIG;IACH,MAAM,EAAE,OAAO,CAAC;IAChB,4BAA4B;IAC5B,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,MAAM,EAAE,UAAU,GAAG;QAAE,SAAS,EAAE,aAAa,CAAA;KAAE,KAAK,IAAI,CAAC;IAC1E,eAAe,EAAE,CAAC,MAAM,EAAE,UAAU,GAAG;QAAE,YAAY,EAAE,OAAO,CAAA;KAAE,KAAK,IAAI,CAAC;CAC3E;AAED,wBAAgB,mBAAmB,IAAI,gBAAgB,CAuHtD"}
@@ -0,0 +1,88 @@
1
+ import { useCallback, useEffect } from 'react';
2
+ import { useMutation, useQuery } from '@tanstack/react-query';
3
+ import { createUsePuck } from '@puckeditor/core';
4
+ import { useP1PuckOptional } from '../../core/P1PuckContext.js';
5
+ import { useP1SdkQueryClient } from '../../data/query-provider.js';
6
+ import { needsOverride } from './authority.js';
7
+ import { isCanonicalDocument, isTranslationDocument } from './relation.js';
8
+ import { applyTranslatable } from './translatable.js';
9
+ const AUTHORITY_KEY = 'p1-localization-authority';
10
+ const usePuckState = createUsePuck();
11
+ export function useLocalizationData() {
12
+ const css = useP1PuckOptional();
13
+ const client = css?.client;
14
+ const siteId = css?.siteId;
15
+ const branchId = css?.branchId;
16
+ const currentDocument = css?.currentDocument;
17
+ const documentId = currentDocument?.id;
18
+ const notifications = css?.notifications;
19
+ const isTranslation = isTranslationDocument(currentDocument);
20
+ const isCanonical = isCanonicalDocument(currentDocument);
21
+ const addressable = Boolean(client && siteId && branchId);
22
+ const queryClient = useP1SdkQueryClient();
23
+ const authorityKey = [AUTHORITY_KEY, siteId, branchId, documentId];
24
+ const authorityQuery = useQuery({
25
+ queryKey: authorityKey,
26
+ queryFn: async () => {
27
+ if (!client || !siteId || !branchId || !documentId)
28
+ return null;
29
+ return client.translations.getAuthorityOverrides(siteId, branchId, documentId);
30
+ },
31
+ enabled: addressable && isTranslation && Boolean(documentId),
32
+ }, queryClient);
33
+ const authority = authorityQuery.data ?? null;
34
+ const readError = authorityQuery.error;
35
+ useEffect(() => {
36
+ if (!readError)
37
+ return;
38
+ notifications?.addError(readError instanceof Error
39
+ ? `Could not read which fields this translation owns: ${readError.message}`
40
+ : 'Could not read which fields this translation owns.');
41
+ }, [readError, notifications]);
42
+ const authorityMutation = useMutation({
43
+ scope: { id: `${AUTHORITY_KEY}:${documentId ?? ''}` },
44
+ mutationFn: async ({ slotId, propName, authority: target, }) => {
45
+ if (!client || !siteId || !branchId || !documentId)
46
+ return null;
47
+ return needsOverride(authority, slotId, target)
48
+ ? client.translations.setAuthorityOverride(siteId, branchId, documentId, {
49
+ slotId,
50
+ propName,
51
+ authority: target,
52
+ })
53
+ : client.translations.clearAuthorityOverride(siteId, branchId, documentId, {
54
+ slotId,
55
+ propName,
56
+ });
57
+ },
58
+ onSuccess: (result) => {
59
+ if (result)
60
+ queryClient.setQueryData(authorityKey, result);
61
+ },
62
+ onError: (err) => {
63
+ notifications?.addError(err instanceof Error
64
+ ? `Could not change what owns this field: ${err.message}`
65
+ : 'Could not change what owns this field.');
66
+ },
67
+ }, queryClient);
68
+ const translatableMap = usePuckState((s) => s.appState.data.root.props?._localeTranslatable);
69
+ const dispatch = usePuckState((s) => s.dispatch);
70
+ const setTranslatable = useCallback(({ slotId, propName, translatable }) => {
71
+ dispatch({
72
+ type: 'setData',
73
+ recordHistory: true,
74
+ data: (previous) => applyTranslatable(previous, slotId, propName, translatable),
75
+ });
76
+ }, [dispatch]);
77
+ return {
78
+ isTranslation,
79
+ isCanonical,
80
+ loaded: isTranslation ? authorityQuery.isSuccess : true,
81
+ authority,
82
+ translatableMap,
83
+ busy: authorityMutation.isPending,
84
+ setAuthority: authorityMutation.mutate,
85
+ setTranslatable,
86
+ };
87
+ }
88
+ //# sourceMappingURL=useLocalizationData.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useLocalizationData.js","sourceRoot":"","sources":["../../../src/features/localization/useLocalizationData.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAa,MAAM,kBAAkB,CAAC;AAE5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAE3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD,MAAM,aAAa,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AACH,wBAAgB,oBAAoB,CAAC,YAAY,EAAE,MAAM;;;;;;;;EAkBxD"}
1
+ {"version":3,"file":"useLiveEditorContext.d.ts","sourceRoot":"","sources":["../../../../src/p1/editor/hooks/useLiveEditorContext.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,6DAA6D,CAAC;AAQ9G;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAAC,YAAY,EAAE,MAAM;;;;;;;;EAoBxD"}
@@ -1,5 +1,6 @@
1
1
  "use client";
2
2
  import { useP1PuckOptional } from "../../../core/P1PuckContext";
3
+ import { ensureLeadingSlash } from "../../../data/paths";
3
4
  import { useEditorContext } from "./useEditorContext";
4
5
  const EMPTY_REGISTRY = [];
5
6
  const EMPTY_ROUTES = [];
@@ -7,7 +8,7 @@ const EMPTY_TEMPLATE_KEYS = [];
7
8
  const EMPTY_PREVIEW_PARAMS = {};
8
9
  export function useLiveEditorContext(fallbackPath) {
9
10
  const p1Puck = useP1PuckOptional();
10
- const path = p1Puck?.currentDocument?.path ?? fallbackPath;
11
+ const path = ensureLeadingSlash(p1Puck?.currentDocument?.path ?? fallbackPath);
11
12
  const branchId = p1Puck?.branchId;
12
13
  const { data: editorContext } = useEditorContext(path, branchId);
13
14
  const hasLoaded = editorContext !== undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"useLiveEditorContext.js","sourceRoot":"","sources":["../../../../src/p1/editor/hooks/useLiveEditorContext.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAGhE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,MAAM,cAAc,GAAiC,EAAE,CAAC;AACxD,MAAM,YAAY,GAAe,EAAE,CAAC;AACpC,MAAM,mBAAmB,GAAa,EAAE,CAAC;AACz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,EAAE,eAAe,EAAE,IAAI,IAAI,YAAY,CAAC,CAAC;IAC/E,MAAM,QAAQ,GAAG,MAAM,EAAE,QAAQ,CAAC;IAElC,MAAM,EAAE,IAAI,EAAE,aAAa,EAAE,GAAG,gBAAgB,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IACjE,MAAM,SAAS,GAAG,aAAa,KAAK,SAAS,CAAC;IAE9C,OAAO;QACL,IAAI;QACJ,QAAQ;QACR,SAAS;QACT,QAAQ,EAAE,aAAa,EAAE,wBAAwB,IAAI,cAAc;QACnE,MAAM,EAAE,aAAa,EAAE,MAAM,IAAI,YAAY;QAC7C,iBAAiB,EAAE,aAAa,EAAE,iBAAiB,IAAI,mBAAmB;QAC1E,kBAAkB,EAChB,aAAa,EAAE,kBAAkB,IAAI,oBAAoB;KAC5D,CAAC;AACJ,CAAC"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * PageNotFound component.
3
+ *
4
+ * Canvas state for an editor path that has no page behind it. Typography comes
5
+ * from the PDS composite utilities (`pds-heading-xl`, `pds-copy-m`), which
6
+ * `P1App` adopts into the document alongside the rest of pds-core.
7
+ *
8
+ * Landing here is a normal way to reach a page that has not been made yet, so
9
+ * the panel offers to make it rather than reporting a failure. Users who cannot
10
+ * create pages are only offered the way back to the home page, and are not asked
11
+ * a question they cannot answer.
12
+ *
13
+ * This is the editor's own state — the public site's 404 is unrelated and
14
+ * unaffected.
15
+ */
16
+ import React from 'react';
17
+ export interface PageNotFoundProps {
18
+ /** Whether the current user may create the missing page. */
19
+ canCreate?: boolean;
20
+ /** Create the page. Rejects with an Error whose message is shown. */
21
+ onCreate?: () => Promise<void>;
22
+ /** Navigate to the site's home page. */
23
+ onOpenHome: () => void;
24
+ 'data-testid'?: string;
25
+ }
26
+ export declare function PageNotFound({ canCreate, onCreate, onOpenHome, 'data-testid': dataTestId, }: PageNotFoundProps): React.ReactElement;
27
+ //# sourceMappingURL=PageNotFound.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PageNotFound.d.ts","sourceRoot":"","sources":["../../../src/pds/components/PageNotFound.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAgC,MAAM,OAAO,CAAC;AAIrD,MAAM,WAAW,iBAAiB;IAChC,4DAA4D;IAC5D,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,qEAAqE;IACrE,QAAQ,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/B,wCAAwC;IACxC,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,wBAAgB,YAAY,CAAC,EAC3B,SAAiB,EACjB,QAAQ,EACR,UAAU,EACV,aAAa,EAAE,UAAU,GAC1B,EAAE,iBAAiB,GAAG,KAAK,CAAC,YAAY,CAmDxC"}
@@ -0,0 +1,24 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useCallback, useState } from 'react';
3
+ import { Button } from '@pantheon-systems/pds-toolkit-react';
4
+ import styles from './PageNotFound.module.css';
5
+ export function PageNotFound({ canCreate = false, onCreate, onOpenHome, 'data-testid': dataTestId, }) {
6
+ const [creating, setCreating] = useState(false);
7
+ const [error, setError] = useState(null);
8
+ const offersCreate = canCreate && !!onCreate;
9
+ const handleCreate = useCallback(async () => {
10
+ if (!onCreate)
11
+ return;
12
+ setCreating(true);
13
+ setError(null);
14
+ try {
15
+ await onCreate();
16
+ }
17
+ catch (err) {
18
+ setError(err instanceof Error ? err.message : String(err));
19
+ setCreating(false);
20
+ }
21
+ }, [onCreate]);
22
+ return (_jsx("div", { className: styles.panel, "data-testid": dataTestId, children: _jsxs("div", { className: styles.content, children: [_jsx("h2", { className: `pds-heading-xl ${styles.heading}`, children: "This page doesn't exist" }), offersCreate && _jsx("p", { className: `pds-copy-m ${styles.message}`, children: "Do you want to create it?" }), _jsxs("div", { className: styles.actions, children: [offersCreate && (_jsx(Button, { label: creating ? 'Creating page…' : 'Create page', onClick: () => void handleCreate(), disabled: creating, variant: "primary", size: "m", "data-testid": "editor-page-not-found-create" })), _jsx(Button, { label: "Open home page", onClick: onOpenHome, variant: "secondary", size: "m", "data-testid": "editor-page-not-found-home" })] }), error && (_jsx("p", { className: `pds-copy-s ${styles.error}`, role: "alert", children: error }))] }) }));
23
+ }
24
+ //# sourceMappingURL=PageNotFound.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PageNotFound.js","sourceRoot":"","sources":["../../../src/pds/components/PageNotFound.tsx"],"names":[],"mappings":";AAgBA,OAAc,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAC7D,OAAO,MAAM,MAAM,2BAA2B,CAAC;AAY/C,MAAM,UAAU,YAAY,CAAC,EAC3B,SAAS,GAAG,KAAK,EACjB,QAAQ,EACR,UAAU,EACV,aAAa,EAAE,UAAU,GACP;IAClB,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAChD,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAgB,IAAI,CAAC,CAAC;IACxD,MAAM,YAAY,GAAG,SAAS,IAAI,CAAC,CAAC,QAAQ,CAAC;IAE7C,MAAM,YAAY,GAAG,WAAW,CAAC,KAAK,IAAI,EAAE;QAC1C,IAAI,CAAC,QAAQ;YAAE,OAAO;QACtB,WAAW,CAAC,IAAI,CAAC,CAAC;QAClB,QAAQ,CAAC,IAAI,CAAC,CAAC;QACf,IAAI,CAAC;YACH,MAAM,QAAQ,EAAE,CAAC;QACnB,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,QAAQ,CAAC,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;YAC3D,WAAW,CAAC,KAAK,CAAC,CAAC;QACrB,CAAC;IACH,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,OAAO,CACL,cAAK,SAAS,EAAE,MAAM,CAAC,KAAK,iBAAe,UAAU,YACnD,eAAK,SAAS,EAAE,MAAM,CAAC,OAAO,aAC5B,aAAI,SAAS,EAAE,kBAAkB,MAAM,CAAC,OAAO,EAAE,wCAAmC,EACnF,YAAY,IAAI,YAAG,SAAS,EAAE,cAAc,MAAM,CAAC,OAAO,EAAE,0CAA+B,EAE5F,eAAK,SAAS,EAAE,MAAM,CAAC,OAAO,aAC3B,YAAY,IAAI,CACf,KAAC,MAAM,IACL,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,aAAa,EAClD,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,YAAY,EAAE,EAClC,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAC,SAAS,EACjB,IAAI,EAAC,GAAG,iBACI,8BAA8B,GAC1C,CACH,EACD,KAAC,MAAM,IACL,KAAK,EAAC,gBAAgB,EACtB,OAAO,EAAE,UAAU,EACnB,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,GAAG,iBACI,4BAA4B,GACxC,IACE,EAEL,KAAK,IAAI,CACR,YAAG,SAAS,EAAE,cAAc,MAAM,CAAC,KAAK,EAAE,EAAE,IAAI,EAAC,OAAO,YACrD,KAAK,GACJ,CACL,IACG,GACF,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,51 @@
1
+ /* ============================================================================
2
+ * PageNotFound — CSS Module
3
+ *
4
+ * Canvas state for an editor path with no page behind it. The block is centred
5
+ * in the canvas but its text is left-aligned, per the design: it reads as a page
6
+ * about to be authored, not as a centred error dialog.
7
+ *
8
+ * Typography is owned by the PDS composite utilities on the elements themselves
9
+ * (pds-heading-xl / pds-copy-m / pds-copy-s), which set family, size, weight,
10
+ * line height and letter spacing with !important. Only colour and rhythm here.
11
+ * ============================================================================ */
12
+
13
+ .panel {
14
+ display: flex;
15
+ align-items: center;
16
+ justify-content: center;
17
+ height: 100%;
18
+ min-height: 100%;
19
+ padding: var(--pds-spacing-2xl, 2rem);
20
+ font-family: var(--pds-typography-ff-default, 'Inter', sans-serif);
21
+ }
22
+
23
+ .content {
24
+ display: flex;
25
+ flex-direction: column;
26
+ align-items: flex-start;
27
+ text-align: left;
28
+ max-width: 40rem;
29
+ }
30
+
31
+ .heading {
32
+ margin: 0;
33
+ color: var(--pds-color-foreground-default, oklch(0.2178 0 0));
34
+ }
35
+
36
+ .message {
37
+ margin: var(--pds-spacing-2xs, 0.5rem) 0 0;
38
+ color: var(--pds-color-foreground-default-secondary, oklch(0.4778 0.0020 247.87));
39
+ }
40
+
41
+ .actions {
42
+ display: flex;
43
+ flex-wrap: wrap;
44
+ gap: var(--pds-spacing-2xs, 0.5rem);
45
+ margin-top: var(--pds-spacing-l, 1.25rem);
46
+ }
47
+
48
+ .error {
49
+ margin: var(--pds-spacing-s, 0.75rem) 0 0;
50
+ color: var(--pds-color-status-critical-foreground, oklch(0.4501 0.1581 26.35));
51
+ }
@@ -31,6 +31,8 @@ export { DocStateBadge } from './components/DocStateBadge.js';
31
31
  export { PublishControl } from './components/PublishControl.js';
32
32
  export { LoadingMessage } from './components/LoadingMessage.js';
33
33
  export type { LoadingMessageProps } from './components/LoadingMessage.js';
34
+ export { PageNotFound } from './components/PageNotFound.js';
35
+ export type { PageNotFoundProps } from './components/PageNotFound.js';
34
36
  export { LoadingOverlay } from './components/LoadingOverlay.js';
35
37
  export type { LoadingOverlayProps } from './components/LoadingOverlay.js';
36
38
  export { deriveDocState } from './utils/deriveDocState.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/pds/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,eAAO,MAAM,oBAAoB,EAAG,mBAA4B,CAAC;AAMjE;;;;GAIG;AAEH,wBAAgB,qBAAqB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