@plitzi/plitzi-builder 0.39.3 → 0.39.6

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 (152) hide show
  1. package/CHANGELOG.md +60 -0
  2. package/dist/index.d.ts +1 -1
  3. package/dist/modules/App/components/AppDirectory/ItemActions.d.ts +3 -1
  4. package/dist/modules/App/components/AppDirectory/protection.d.ts +16 -0
  5. package/dist/modules/App/components/AppHeader/HeaderMenu.d.ts +33 -0
  6. package/dist/modules/App/components/AppHeader/HeaderPopover.d.ts +19 -0
  7. package/dist/modules/App/components/AppHeader/QuotaBreakdown.d.ts +4 -5
  8. package/dist/modules/App/components/AppHeader/ReleaseCluster/DraftPanel.d.ts +22 -0
  9. package/dist/modules/App/components/AppHeader/ReleaseCluster/draftStatus.d.ts +7 -0
  10. package/dist/modules/App/components/AppHeader/ReleaseCluster/targetAttention.d.ts +14 -0
  11. package/dist/modules/App/components/AppHeader/ReleaseCluster/useDraftStatus.d.ts +12 -0
  12. package/dist/modules/App/components/AppHeader/useAnchoredOverlay.d.ts +16 -0
  13. package/dist/modules/App/components/ChangesSummary/ChangesSummary.d.ts +13 -0
  14. package/dist/modules/App/components/ChangesSummary/helpers.d.ts +9 -0
  15. package/dist/modules/App/components/ChangesSummary/index.d.ts +4 -0
  16. package/dist/modules/App/components/ChangesSummary/useVersionChanges.d.ts +16 -0
  17. package/dist/modules/App/components/EnvironmentSegments/EnvironmentSegments.d.ts +21 -0
  18. package/dist/modules/App/components/EnvironmentSegments/index.d.ts +2 -0
  19. package/dist/modules/App/components/PanelSections/PanelSections.d.ts +1 -1
  20. package/dist/modules/App/components/SnapshotPruneNotice/SnapshotPruneNotice.d.ts +1 -1
  21. package/dist/modules/App/components/SnapshotPruneNotice/helpers.d.ts +2 -2
  22. package/dist/modules/App/components/ViewSection/ViewSection.d.ts +5 -1
  23. package/dist/modules/App/helpers/age.d.ts +7 -0
  24. package/dist/modules/App/helpers/environments.d.ts +21 -0
  25. package/dist/modules/App/helpers/modalSizes.d.ts +12 -0
  26. package/dist/modules/App/hooks/useLatestSnapshots.d.ts +16 -0
  27. package/dist/modules/App/hooks/useSpaceTargets.d.ts +11 -0
  28. package/dist/modules/App/models/PublishSheet/AccessPicker.d.ts +20 -0
  29. package/dist/modules/App/models/PublishSheet/DeployProgress.d.ts +14 -0
  30. package/dist/modules/App/models/PublishSheet/DomainCard.d.ts +11 -0
  31. package/dist/modules/App/models/PublishSheet/DomainList.d.ts +23 -0
  32. package/dist/modules/App/models/PublishSheet/OwnAddressRow.d.ts +14 -0
  33. package/dist/modules/App/models/PublishSheet/PublishDone.d.ts +11 -0
  34. package/dist/modules/App/models/PublishSheet/PublishSheet.d.ts +20 -0
  35. package/dist/modules/App/models/PublishSheet/ReleaseHistory.d.ts +16 -0
  36. package/dist/modules/App/models/PublishSheet/RevisionList.d.ts +16 -0
  37. package/dist/modules/App/models/PublishSheet/RevisionOption.d.ts +11 -0
  38. package/dist/modules/App/models/PublishSheet/RevisionRow.d.ts +11 -0
  39. package/dist/modules/App/models/PublishSheet/RollbackConfirm.d.ts +12 -0
  40. package/dist/modules/App/models/PublishSheet/SaveFirst.d.ts +18 -0
  41. package/dist/modules/App/models/PublishSheet/ScheduleRow.d.ts +9 -0
  42. package/dist/modules/App/models/PublishSheet/ScheduledPublishes.d.ts +7 -0
  43. package/dist/modules/App/models/PublishSheet/SheetFooter.d.ts +24 -0
  44. package/dist/modules/App/models/PublishSheet/SheetFrame.d.ts +9 -0
  45. package/dist/modules/App/models/PublishSheet/SheetTabs.d.ts +8 -0
  46. package/dist/modules/App/models/PublishSheet/ShowWhat.d.ts +34 -0
  47. package/dist/modules/App/models/PublishSheet/TargetAutomation.d.ts +13 -0
  48. package/dist/modules/App/models/PublishSheet/TargetNotices.d.ts +10 -0
  49. package/dist/modules/App/models/PublishSheet/TargetSettings.d.ts +18 -0
  50. package/dist/modules/App/models/PublishSheet/VersionChoice.d.ts +21 -0
  51. package/dist/modules/App/models/PublishSheet/WhatHappens.d.ts +24 -0
  52. package/dist/modules/App/models/PublishSheet/helpers.d.ts +30 -0
  53. package/dist/modules/App/models/PublishSheet/index.d.ts +2 -0
  54. package/dist/modules/App/models/SnapshotForm/SnapshotForm.d.ts +26 -0
  55. package/dist/modules/App/models/SnapshotForm/index.d.ts +2 -0
  56. package/dist/modules/Builder/Builder.d.ts +5 -2
  57. package/dist/modules/Builder/BuilderPlugin.d.ts +1 -1
  58. package/dist/modules/Builder/components/BuilderArea/BuilderArea.d.ts +6 -1
  59. package/dist/modules/Builder/components/BuilderBreadcrumb/helpers.d.ts +8 -0
  60. package/dist/modules/Components/components/ComponentBanner/ComponentBanner.d.ts +10 -2
  61. package/dist/modules/Components/components/ComponentDetails/ComponentDetails.d.ts +10 -0
  62. package/dist/modules/Components/components/ComponentDetails/index.d.ts +3 -0
  63. package/dist/modules/Components/components/ComponentItem/ComponentItem.d.ts +4 -1
  64. package/dist/modules/Components/components/ComponentPreview/ComponentPreview.d.ts +10 -0
  65. package/dist/modules/Components/components/ComponentPreview/index.d.ts +3 -0
  66. package/dist/modules/Components/preview.d.ts +28 -0
  67. package/dist/modules/Components/useOpenComponent.d.ts +15 -6
  68. package/dist/modules/Connectors/helpers/summarizeManifest.d.ts +4 -1
  69. package/dist/modules/History/helpers.d.ts +1 -1
  70. package/dist/modules/Network/components/BuilderRefusal/BuilderRefusal.d.ts +7 -0
  71. package/dist/modules/Network/components/BuilderRefusal/index.d.ts +3 -0
  72. package/dist/modules/Network/components/BuilderRefusal/refusalOf.d.ts +12 -0
  73. package/dist/modules/Network/helpers/platformVersion.d.ts +24 -0
  74. package/dist/modules/Space/Models/SpaceCredentialForm/SpaceCredentialForm.d.ts +20 -0
  75. package/dist/modules/Space/Models/SpaceCredentialForm/components/CredentialEditor/CredentialEditor.d.ts +17 -0
  76. package/dist/modules/Space/Models/SpaceCredentialForm/components/CredentialEditor/index.d.ts +3 -0
  77. package/dist/modules/Space/Models/SpaceCredentialForm/components/CredentialFields/CredentialFields.d.ts +7 -0
  78. package/dist/modules/Space/Models/SpaceCredentialForm/components/CredentialFields/components/CredentialField/CredentialField.d.ts +10 -0
  79. package/dist/modules/Space/Models/SpaceCredentialForm/components/CredentialFields/components/CredentialField/index.d.ts +3 -0
  80. package/dist/modules/Space/Models/SpaceCredentialForm/components/CredentialFields/index.d.ts +3 -0
  81. package/dist/modules/Space/Models/SpaceCredentialForm/components/NamedValues/NamedValues.d.ts +3 -0
  82. package/dist/modules/Space/Models/SpaceCredentialForm/components/NamedValues/components/ValuesInput/ValuesInput.d.ts +8 -0
  83. package/dist/modules/Space/Models/SpaceCredentialForm/components/NamedValues/components/ValuesInput/index.d.ts +3 -0
  84. package/dist/modules/Space/Models/SpaceCredentialForm/components/NamedValues/index.d.ts +3 -0
  85. package/dist/modules/Space/Models/SpaceCredentialForm/components/ObtainGuide/ObtainGuide.d.ts +7 -0
  86. package/dist/modules/Space/Models/SpaceCredentialForm/components/ObtainGuide/index.d.ts +3 -0
  87. package/dist/modules/Space/Models/SpaceCredentialForm/components/ProviderPicker/ProviderPicker.d.ts +9 -0
  88. package/dist/modules/Space/Models/SpaceCredentialForm/components/ProviderPicker/components/ProviderOption/ProviderOption.d.ts +8 -0
  89. package/dist/modules/Space/Models/SpaceCredentialForm/components/ProviderPicker/components/ProviderOption/index.d.ts +3 -0
  90. package/dist/modules/Space/Models/SpaceCredentialForm/components/ProviderPicker/index.d.ts +3 -0
  91. package/dist/modules/Space/Models/SpaceCredentialForm/components/ProviderSummary/ProviderSummary.d.ts +9 -0
  92. package/dist/modules/Space/Models/SpaceCredentialForm/components/ProviderSummary/index.d.ts +3 -0
  93. package/dist/modules/Space/Models/SpaceCredentialForm/helpers.d.ts +26 -0
  94. package/dist/modules/Space/Models/SpaceCredentialForm/index.d.ts +4 -0
  95. package/dist/modules/Space/components/SpaceIssues/SpaceIssues.d.ts +3 -3
  96. package/dist/modules/Space/components/SpaceIssues/components/CodeGroup/CodeGroup.d.ts +23 -0
  97. package/dist/modules/Space/components/SpaceIssues/components/CodeGroup/index.d.ts +3 -0
  98. package/dist/modules/Space/components/SpaceIssues/components/CodeText/CodeText.d.ts +7 -0
  99. package/dist/modules/Space/components/SpaceIssues/components/CodeText/index.d.ts +3 -0
  100. package/dist/modules/Space/components/SpaceIssues/components/IssueGroup/IssueGroup.d.ts +2 -2
  101. package/dist/modules/Space/components/SpaceIssues/components/IssueItem/IssueItem.d.ts +2 -4
  102. package/dist/modules/Space/components/SpaceIssues/components/Message/Message.d.ts +9 -0
  103. package/dist/modules/Space/components/SpaceIssues/components/Message/index.d.ts +3 -0
  104. package/dist/modules/Space/components/SpaceIssues/components/SuggestionGroup/SuggestionGroup.d.ts +5 -2
  105. package/dist/modules/Space/components/SpaceIssues/components/SuggestionItem/SuggestionItem.d.ts +2 -2
  106. package/dist/modules/Space/components/SpaceIssues/helpers.d.ts +23 -1
  107. package/dist/modules/Space/hooks/useSpaceIssues.d.ts +8 -2
  108. package/dist/modules/StateManager/StateManager.d.ts +5 -0
  109. package/dist/modules/StateManager/components/ComputedTab/ComputedTab.d.ts +6 -0
  110. package/dist/modules/StateManager/components/ComputedTab/index.d.ts +3 -0
  111. package/dist/modules/StateManager/components/Kept/Kept.d.ts +7 -0
  112. package/dist/modules/StateManager/components/Kept/index.d.ts +3 -0
  113. package/dist/modules/StateManager/components/Scenarios/Scenarios.d.ts +6 -0
  114. package/dist/modules/StateManager/components/Scenarios/index.d.ts +3 -0
  115. package/dist/modules/StateManager/components/StateJson/StateJson.d.ts +7 -0
  116. package/dist/modules/StateManager/components/StateJson/index.d.ts +3 -0
  117. package/dist/modules/StateManager/components/StateRow/StateRow.d.ts +16 -0
  118. package/dist/modules/StateManager/components/StateRow/index.d.ts +3 -0
  119. package/dist/modules/StateManager/components/StateTab/StateTab.d.ts +8 -0
  120. package/dist/modules/StateManager/components/StateTab/index.d.ts +3 -0
  121. package/dist/modules/StateManager/components/SubPathRow/SubPathRow.d.ts +20 -0
  122. package/dist/modules/StateManager/components/SubPathRow/index.d.ts +3 -0
  123. package/dist/modules/StateManager/components/UseCounts/UseCounts.d.ts +9 -0
  124. package/dist/modules/StateManager/components/UseCounts/index.d.ts +3 -0
  125. package/dist/modules/StateManager/components/UsedBy/UsedBy.d.ts +7 -0
  126. package/dist/modules/StateManager/components/UsedBy/index.d.ts +3 -0
  127. package/dist/modules/StateManager/components/ValueEditor/ValueEditor.d.ts +12 -0
  128. package/dist/modules/StateManager/components/ValueEditor/index.d.ts +3 -0
  129. package/dist/modules/StateManager/components/ValueJson/ValueJson.d.ts +7 -0
  130. package/dist/modules/StateManager/components/ValueJson/index.d.ts +3 -0
  131. package/dist/modules/StateManager/components/VisitorTab/VisitorTab.d.ts +6 -0
  132. package/dist/modules/StateManager/components/VisitorTab/index.d.ts +3 -0
  133. package/dist/modules/StateManager/helpers.d.ts +54 -0
  134. package/dist/modules/StateManager/hooks/useCanvasVisitor.d.ts +21 -0
  135. package/dist/modules/StateManager/hooks/useStateChanges.d.ts +19 -0
  136. package/dist/modules/StateManager/layout.d.ts +2 -0
  137. package/dist/modules/Usages/components/UsageRow/components/UsageTreeGroup/UsageTreeGroup.d.ts +4 -2
  138. package/dist/modules/Usages/helpers/usageIndex.d.ts +6 -1
  139. package/dist/modules/Usages/index.d.ts +3 -0
  140. package/dist/package.json.d.ts +14 -14
  141. package/dist/plitzi-builder.css +1 -1
  142. package/dist/plitzi-builder.css.gz +0 -0
  143. package/dist/plitzi-builder.js +2841 -2670
  144. package/dist/plitzi-builder.js.gz +0 -0
  145. package/dist/plitzi-functions-worker.js +1 -1
  146. package/package.json +28 -28
  147. package/dist/modules/App/models/DeployForm/DeployForm.d.ts +0 -24
  148. package/dist/modules/App/models/DeployForm/InputEnvironment.d.ts +0 -2
  149. package/dist/modules/App/models/DeployForm/index.d.ts +0 -3
  150. package/dist/modules/App/models/PublishForm.d.ts +0 -20
  151. package/dist/modules/Space/Models/SpaceCredentialForm.d.ts +0 -63
  152. package/dist/modules/Space/helpers/buildCredentialData.d.ts +0 -17
@@ -0,0 +1,11 @@
1
+ import { PublishedEnvironment } from '../../helpers/environments';
2
+ import { SpaceSnapshot } from '@plitzi/sdk-shared';
3
+ export type RevisionRowProps = {
4
+ snapshot: SpaceSnapshot;
5
+ /** The domain being published: the version it shows says so instead of offering itself again. */
6
+ domain: string | undefined;
7
+ onPublish: (environment: PublishedEnvironment, revision: number) => void;
8
+ };
9
+ /** One version kept: its words, who kept it and when, where it is live, its own preview address and a way to publish it. */
10
+ declare const RevisionRow: ({ snapshot, domain, onPublish }: RevisionRowProps) => import('react').JSX.Element;
11
+ export default RevisionRow;
@@ -0,0 +1,12 @@
1
+ import { SpaceServedVersion } from '@plitzi/sdk-shared';
2
+ export type RollbackConfirmProps = {
3
+ domain: string;
4
+ version: SpaceServedVersion;
5
+ holdsACopy: boolean;
6
+ working: boolean;
7
+ onKeep: () => void;
8
+ onConfirm: () => void;
9
+ };
10
+ /** A rollback asked for, said before it happens: what goes back, how soon, and what it leaves as it is. */
11
+ declare const RollbackConfirm: ({ domain, version, holdsACopy, working, onKeep, onConfirm }: RollbackConfirmProps) => import('react').JSX.Element;
12
+ export default RollbackConfirm;
@@ -0,0 +1,18 @@
1
+ import { PublishedEnvironment } from '../../helpers/environments';
2
+ import { SpaceSnapshot, SpaceVersionChanges } from '@plitzi/sdk-shared';
3
+ export type SaveFirstProps = {
4
+ environment: PublishedEnvironment;
5
+ latest: SpaceSnapshot | undefined;
6
+ /** What changed in the editor since that version: nothing, and there is nothing to keep. */
7
+ changes: SpaceVersionChanges | undefined;
8
+ checked: boolean;
9
+ description: string;
10
+ onChecked: (checked: boolean) => void;
11
+ onDescription: (description: string) => void;
12
+ };
13
+ /**
14
+ * Whether what is in the editor is kept as the environment's next version before the domain shows its latest — the
15
+ * step Snapshot is, done here; required when the environment has none, and not offered when nothing changed.
16
+ */
17
+ declare const SaveFirst: ({ environment, latest, changes, checked, description, onChecked, onDescription }: SaveFirstProps) => import('react').JSX.Element;
18
+ export default SaveFirst;
@@ -0,0 +1,9 @@
1
+ export type ScheduleRowProps = {
2
+ /** The moment, as the person's own clock reads it (`datetime-local`). */
3
+ value: string;
4
+ onChange: (value: string | undefined) => void;
5
+ onCancel: () => void;
6
+ };
7
+ /** When to publish instead of now: one moment in the person's own time, and a way back to publishing now. */
8
+ declare const ScheduleRow: ({ value, onChange, onCancel }: ScheduleRowProps) => import('react').JSX.Element;
9
+ export default ScheduleRow;
@@ -0,0 +1,7 @@
1
+ /** A moment as the person reads it, in their own time, with UTC beside it — what the platform keeps. */
2
+ export declare const momentWords: (at: number) => string;
3
+ /** The space's publishes set for later on one domain — each with when, what and who — and a way to call one off. */
4
+ declare const ScheduledPublishes: ({ domain }: {
5
+ domain: string;
6
+ }) => import('react').JSX.Element | null;
7
+ export default ScheduledPublishes;
@@ -0,0 +1,24 @@
1
+ export type SheetFooterProps = {
2
+ /** "Roll back to …", when there is something to go back to and no rollback is being asked already. */
3
+ rollbackLabel?: string;
4
+ rollbackTitle: string;
5
+ /** A domain chosen in the publish view: Publish, Schedule and Cancel; otherwise only Close. */
6
+ publishing: boolean;
7
+ /** The plan that includes scheduling, when the space's does not; undefined while it may be offered at all. */
8
+ schedule?: {
9
+ lockedBy: string | undefined;
10
+ shown: boolean;
11
+ };
12
+ /** What Publish says, and whether it may be pressed. */
13
+ action: {
14
+ words: string;
15
+ disabled: boolean;
16
+ };
17
+ onRollBack: () => void;
18
+ onSchedule: () => void;
19
+ onClose: () => void;
20
+ onPublish: () => void;
21
+ };
22
+ /** The sheet's actions: going back on the left; scheduling, leaving and publishing on the right. */
23
+ declare const SheetFooter: ({ rollbackLabel, rollbackTitle, publishing, schedule, action, onRollBack, onSchedule, onClose, onPublish }: SheetFooterProps) => import('react').JSX.Element;
24
+ export default SheetFooter;
@@ -0,0 +1,9 @@
1
+ import { ReactNode } from 'react';
2
+ export type SheetFrameProps = {
3
+ children: ReactNode;
4
+ /** The view's actions: kept at the sheet's bottom edge, always in reach, while what is above them scrolls. */
5
+ footer?: ReactNode;
6
+ };
7
+ /** A view of the publish sheet: its content scrolling the sheet's height, its actions fixed under it. */
8
+ declare const SheetFrame: ({ children, footer }: SheetFrameProps) => import('react').JSX.Element;
9
+ export default SheetFrame;
@@ -0,0 +1,8 @@
1
+ export type SheetTabsProps = {
2
+ publishing: boolean;
3
+ onPublish: () => void;
4
+ onHistory: () => void;
5
+ };
6
+ /** The sheet's two views, at its top: publishing, and what was published where. */
7
+ declare const SheetTabs: ({ publishing, onPublish, onHistory }: SheetTabsProps) => import('react').JSX.Element;
8
+ export default SheetTabs;
@@ -0,0 +1,34 @@
1
+ import { PublishedEnvironment } from '../../helpers/environments';
2
+ import { Environment, SpaceSnapshot, SpaceVersionChanges } from '@plitzi/sdk-shared';
3
+ export type ShowWhatProps = {
4
+ domain: string;
5
+ environment: Environment;
6
+ /** Every save is offered only where Plitzi serves the domain: a copy is a version, deployed. */
7
+ offersDraft: boolean;
8
+ byEnvironment: Record<PublishedEnvironment, SpaceSnapshot | undefined>;
9
+ lockedBy: (environment: PublishedEnvironment) => string | undefined;
10
+ onEnvironment: (environment: Environment) => void;
11
+ version: {
12
+ follows: boolean;
13
+ revision: number | undefined;
14
+ snapshots: readonly SpaceSnapshot[];
15
+ loading: boolean;
16
+ onFollow: (follows: boolean) => void;
17
+ onPick: (revision: number) => void;
18
+ };
19
+ keep: {
20
+ shown: boolean;
21
+ changes: SpaceVersionChanges | undefined;
22
+ checked: boolean;
23
+ description: string;
24
+ onChecked: (checked: boolean) => void;
25
+ onDescription: (description: string) => void;
26
+ };
27
+ };
28
+ /**
29
+ * What the chosen domain will show, in the order anybody decides it: the environment (each said for what it is for),
30
+ * then which of its versions — the latest, or one — and, for the latest, whether the editor's changes are kept as a
31
+ * new one first.
32
+ */
33
+ declare const ShowWhat: ({ domain, environment, offersDraft, byEnvironment, lockedBy, onEnvironment, version, keep }: ShowWhatProps) => import('react').JSX.Element;
34
+ export default ShowWhat;
@@ -0,0 +1,13 @@
1
+ import { SpaceTarget } from '@plitzi/sdk-shared';
2
+ export type TargetAutomationProps = {
3
+ target: SpaceTarget;
4
+ /** The plan that includes it, when the space's does not. */
5
+ lockedBy: string | undefined;
6
+ onChanged: () => void;
7
+ };
8
+ /**
9
+ * What runs a target without a person at the builder: protected — only whoever manages the space moves
10
+ * it — and a deploy hook, a secret address a CI calls as its last step, shown the once it is made.
11
+ */
12
+ declare const TargetAutomation: ({ target, lockedBy, onChanged }: TargetAutomationProps) => import('react').JSX.Element;
13
+ export default TargetAutomation;
@@ -0,0 +1,10 @@
1
+ import { SpaceTarget } from '@plitzi/sdk-shared';
2
+ export type TargetNoticesProps = {
3
+ target: SpaceTarget;
4
+ working: boolean;
5
+ onDeployAgain: () => void;
6
+ onFollow: () => void;
7
+ };
8
+ /** What a domain holding a copy asks for before anything else: a deploy that failed, newer versions out, one running. */
9
+ declare const TargetNotices: ({ target, working, onDeployAgain, onFollow }: TargetNoticesProps) => import('react').JSX.Element;
10
+ export default TargetNotices;
@@ -0,0 +1,18 @@
1
+ import { SpaceTarget, SpaceTargets } from '@plitzi/sdk-shared';
2
+ export type TargetSettingsProps = {
3
+ target: SpaceTarget;
4
+ /** The plan that includes deploy automation, when the space's does not. */
5
+ lockedBy?: string;
6
+ catalog: SpaceTargets;
7
+ /** The target's settings as kept: its provider's and every target's. */
8
+ config: Record<string, string>;
9
+ onSaved: () => void;
10
+ onBack: () => void;
11
+ };
12
+ /**
13
+ * Where a domain's site is: served by Plitzi, or a copy of it on a provider — the mode, the provider
14
+ * and its own settings, and what signs in there — each provider's fields as the platform lists them, so a provider
15
+ * added there is offered here without a change to this form.
16
+ */
17
+ declare const TargetSettings: ({ target, lockedBy, catalog, config: kept, onSaved, onBack }: TargetSettingsProps) => import('react').JSX.Element;
18
+ export default TargetSettings;
@@ -0,0 +1,21 @@
1
+ import { PublishedEnvironment } from '../../helpers/environments';
2
+ import { SpaceSnapshot } from '@plitzi/sdk-shared';
3
+ export type VersionChoiceProps = {
4
+ domain: string;
5
+ environment: PublishedEnvironment;
6
+ /** The environment's newest version, when it has one. */
7
+ latest: SpaceSnapshot | undefined;
8
+ /** Follows the latest, or stays on one. */
9
+ follows: boolean;
10
+ revision: number | undefined;
11
+ snapshots: readonly SpaceSnapshot[];
12
+ loading: boolean;
13
+ onFollow: (follows: boolean) => void;
14
+ onPick: (revision: number) => void;
15
+ };
16
+ /**
17
+ * Which version of the environment the domain shows: always its latest — each one kept there shows at once — or one
18
+ * chosen from its list, which it stays on until another publish.
19
+ */
20
+ declare const VersionChoice: ({ domain, environment, latest, follows, revision, snapshots, loading, onFollow, onPick }: VersionChoiceProps) => import('react').JSX.Element;
21
+ export default VersionChoice;
@@ -0,0 +1,24 @@
1
+ import { Environment, SpacePublishCheck, SpaceServedVersion, SpaceTarget, SpaceVersionChanges } from '@plitzi/sdk-shared';
2
+ export type WhatHappensProps = {
3
+ target: SpaceTarget;
4
+ environment: Environment;
5
+ /** It follows the environment's latest, or stays on `revision`. */
6
+ follows: boolean;
7
+ /** The version it comes to: none yet for changes still to be kept. */
8
+ revision: number | undefined;
9
+ /** The editor's changes are kept as a new version first. */
10
+ keepsFirst: boolean;
11
+ served: SpaceServedVersion | undefined;
12
+ changes: SpaceVersionChanges | undefined;
13
+ comparing: boolean;
14
+ /** What the platform said publishing it there would do, on a domain holding a copy. */
15
+ check: SpacePublishCheck | undefined;
16
+ checking: boolean;
17
+ };
18
+ /**
19
+ * What publishing does, before anything does, in one place: what the domain will show instead of what, what visitors
20
+ * will see change — the same content said as such, never "nothing changes" beside a new version — and, on a domain
21
+ * holding a copy, whether it needs a deploy and why.
22
+ */
23
+ declare const WhatHappens: ({ target, environment, follows, revision, keepsFirst, served, changes, comparing, check, checking }: WhatHappensProps) => import('react').JSX.Element;
24
+ export default WhatHappens;
@@ -0,0 +1,30 @@
1
+ import { PublishedEnvironment } from '../../helpers/environments';
2
+ import { DeployMode, DeployStatus, Environment, SpaceServedVersion, SpaceTarget } from '@plitzi/sdk-shared';
3
+ /** How a target serves the space, in a few words. */
4
+ export declare const MODE_WORDS: Record<DeployMode, string>;
5
+ /** `version 12`, or the draft. */
6
+ export declare const versionName: ({ environment, revision }: SpaceServedVersion) => string;
7
+ /** Where a target's site is and how it is served: `GitHub Pages · Single-page app`, or `Plitzi`. */
8
+ export declare const targetWhere: (target: Pick<SpaceTarget, "mode" | "providerLabel">) => string;
9
+ /** A deploy's state in words, and whether it is still going. */
10
+ export declare const deployWords: (status: DeployStatus) => {
11
+ words: string;
12
+ going: boolean;
13
+ };
14
+ /** The steps a deploy goes through, and where this one is among them: what the progress view ticks. */
15
+ export declare const deploySteps: (status: DeployStatus) => {
16
+ label: string;
17
+ state: "done" | "current" | "todo" | "failed";
18
+ }[];
19
+ /**
20
+ * What a domain shows now, in the words its owner reads on its row: every save, the latest version of an environment
21
+ * (which it follows: each one kept there shows), or one version it stays on.
22
+ */
23
+ export declare const showsWords: ({ serves, revision }: Pick<SpaceTarget, "serves" | "revision">) => string;
24
+ /** What each environment is for, said where one is chosen: names alone mean nothing to somebody new. */
25
+ export declare const ENVIRONMENT_PURPOSE: Record<Environment, string>;
26
+ /**
27
+ * Where "your latest changes" are kept before they are published: the environment the domain shows already, or the one
28
+ * closest to the public the plan includes — none when the plan includes no versions at all.
29
+ */
30
+ export declare const latestEnvironmentOf: (shown: Environment | undefined, isLocked: (environment: PublishedEnvironment) => boolean) => PublishedEnvironment | undefined;
@@ -0,0 +1,2 @@
1
+ export { default } from './PublishSheet';
2
+ export type { PublishSheetProps } from './PublishSheet';
@@ -0,0 +1,26 @@
1
+ import { z } from 'zod';
2
+ import { PublishedEnvironment } from '../../helpers/environments';
3
+ import { MouseEvent } from 'react';
4
+ declare const snapshotFormSchema: z.ZodObject<{
5
+ environment: z.ZodEnum<{
6
+ production: "production";
7
+ staging: "staging";
8
+ development: "development";
9
+ }>;
10
+ description: z.ZodString;
11
+ }, z.core.$strip>;
12
+ export type SnapshotFormValues = z.infer<typeof snapshotFormSchema> & {
13
+ /** Pressed "Save and publish…": the publish sheet opens next, on this version. */
14
+ thenPublish: boolean;
15
+ };
16
+ export type SnapshotFormProps = {
17
+ environment?: PublishedEnvironment;
18
+ onClose?: (e?: MouseEvent) => void;
19
+ onSubmit?: (e: MouseEvent | undefined, values: SnapshotFormValues) => void;
20
+ };
21
+ /**
22
+ * Make a snapshot: which environment it goes to, what it changes against that environment's latest, what it is for —
23
+ * and only the notices that apply. One primary: snapshot and go on to publish it; snapshot alone stays beside it.
24
+ */
25
+ declare const SnapshotForm: ({ environment, onClose, onSubmit }: SnapshotFormProps) => import('react').JSX.Element;
26
+ export default SnapshotForm;
@@ -0,0 +1,2 @@
1
+ export { default } from './SnapshotForm';
2
+ export type { SnapshotFormProps, SnapshotFormValues } from './SnapshotForm';
@@ -1,10 +1,13 @@
1
+ import { ComponentGround } from '../Components/preview';
1
2
  export type BuilderProps = {
2
3
  pages?: string[];
3
4
  customCss?: string;
4
5
  externalStyle?: string;
6
+ /** What a component open in the canvas is drawn on: the ground around the instance it is shown as. */
7
+ ground?: ComponentGround;
5
8
  };
6
9
  declare const Builder: {
7
- ({ pages, customCss, externalStyle }: BuilderProps): import('react').JSX.Element;
8
- Plugin: (_props: import('./BuilderPlugin').BuilderPluginProps) => undefined;
10
+ ({ pages, customCss, externalStyle, ground }: BuilderProps): import('react').JSX.Element;
11
+ Plugin: import('react').FC<import('./BuilderPlugin').BuilderPluginProps>;
9
12
  };
10
13
  export default Builder;
@@ -7,5 +7,5 @@ export type BuilderPluginProps = {
7
7
  definition?: ComponentDefinition;
8
8
  assets?: Asset[];
9
9
  };
10
- declare const BuilderPlugin: (_props: BuilderPluginProps) => undefined;
10
+ declare const BuilderPlugin: FC<BuilderPluginProps>;
11
11
  export default BuilderPlugin;
@@ -1,4 +1,5 @@
1
1
  import { DisplayMode } from '@plitzi/sdk-shared';
2
+ import { ComponentGround } from '../../../Components/preview';
2
3
  export type BuilderAreaProps = {
3
4
  className?: string;
4
5
  customCss?: string;
@@ -11,6 +12,10 @@ export type BuilderAreaProps = {
11
12
  debugMode?: boolean;
12
13
  /** The canvas alone, its frame — size, padding, shadow — drawn by whoever places it: the Tests area's devices. */
13
14
  bare?: boolean;
15
+ /** What a component open in the canvas is drawn on: the ground around the instance it is shown as. */
16
+ ground?: ComponentGround;
17
+ /** A canvas the test studio plays in; a thumbnail is never one, and taking it over would leave the studio none. */
18
+ studio?: boolean;
14
19
  };
15
- declare const _default: import('react').MemoExoticComponent<({ className, customCss, externalStyle, displayMode, showHeader, headerTitle, mobilePreview, previewMode, debugMode, bare }: BuilderAreaProps) => import('react').JSX.Element>;
20
+ declare const _default: import('react').MemoExoticComponent<({ className, customCss, externalStyle, displayMode, showHeader, headerTitle, mobilePreview, previewMode, debugMode, bare, ground, studio }: BuilderAreaProps) => import('react').JSX.Element>;
16
21
  export default _default;
@@ -0,0 +1,8 @@
1
+ import { Element } from '@plitzi/sdk-shared';
2
+ export type BreadcrumbStep = {
3
+ id: string;
4
+ label: string;
5
+ type: string;
6
+ };
7
+ /** The way from the root to an element, each step its label and type; an id the document lacks is one unknown step. */
8
+ export declare const pathOf: (flat: Record<string, Element>, id?: string) => BreadcrumbStep[];
@@ -1,7 +1,15 @@
1
+ import { ComponentPlacement } from '../../preview';
1
2
  import { SpaceComponent } from '@plitzi/sdk-shared';
2
3
  export type ComponentBannerProps = {
3
4
  component: SpaceComponent;
5
+ /** Every place it is drawn: the one it is shown as is picked among them. */
6
+ placements: ComponentPlacement[];
7
+ shownAs?: string;
8
+ onShowAs: (instanceId: string) => void;
4
9
  };
5
- /** Says the canvas is a component, not a page — every instance of it changes with what is edited here. */
6
- declare const ComponentBanner: ({ component }: ComponentBannerProps) => import('react').JSX.Element;
10
+ /**
11
+ * Says the canvas is a component, not a page — every instance of it changes with what is edited here — and which of
12
+ * its instances it is shown as: that one's words, on the ground it sits on.
13
+ */
14
+ declare const ComponentBanner: ({ component, placements, shownAs, onShowAs }: ComponentBannerProps) => import('react').JSX.Element;
7
15
  export default ComponentBanner;
@@ -0,0 +1,10 @@
1
+ import { SpaceComponent } from '@plitzi/sdk-shared';
2
+ export type ComponentDetailsProps = {
3
+ component: SpaceComponent;
4
+ };
5
+ /**
6
+ * A component opened in the list: what it looks like, and every place it is drawn — each a link that takes you there,
7
+ * opening its page, layout or component and selecting the instance.
8
+ */
9
+ declare const ComponentDetails: ({ component }: ComponentDetailsProps) => import('react').JSX.Element;
10
+ export default ComponentDetails;
@@ -0,0 +1,3 @@
1
+ import { default as ComponentDetails } from './ComponentDetails';
2
+ export * from './ComponentDetails';
3
+ export default ComponentDetails;
@@ -7,6 +7,9 @@ export type ComponentItemProps = {
7
7
  open: boolean;
8
8
  pageFolders: PageFolder[];
9
9
  };
10
- /** One component of the space: dragged onto a page to place it, opened to edit its tree, renamed, removed. */
10
+ /**
11
+ * One component of the space: dragged onto a page to place it, unfolded to see it and where it is placed, opened to
12
+ * edit its tree — marked while it is — renamed, removed.
13
+ */
11
14
  declare const ComponentItem: ({ component, instances, open, pageFolders }: ComponentItemProps) => import('react').JSX.Element;
12
15
  export default ComponentItem;
@@ -0,0 +1,10 @@
1
+ import { SpaceComponent } from '@plitzi/sdk-shared';
2
+ export type ComponentPreviewProps = {
3
+ component: SpaceComponent;
4
+ };
5
+ /**
6
+ * A component as its first instance shows it — that instance's words, on the ground it sits on — drawn in a canvas of
7
+ * its own at a desktop's width and scaled down to the panel. A picture: nothing in it is picked or pressed.
8
+ */
9
+ declare const ComponentPreview: ({ component }: ComponentPreviewProps) => import('react').JSX.Element;
10
+ export default ComponentPreview;
@@ -0,0 +1,3 @@
1
+ import { default as ComponentPreview } from './ComponentPreview';
2
+ export * from './ComponentPreview';
3
+ export default ComponentPreview;
@@ -0,0 +1,28 @@
1
+ import { Schema, SpaceComponent, Style } from '@plitzi/sdk-shared';
2
+ /** One place a component is drawn: its instance, and the page, layout or component it is in, by name. */
3
+ export type ComponentPlacement = {
4
+ instanceId: string;
5
+ where: string;
6
+ };
7
+ /**
8
+ * What a component is drawn on where it is placed — the nearest background and text colour around an instance — so
9
+ * the canvas shows it as its instance is seen. A card made for a dark section has white words: on the canvas's own
10
+ * white it was a blank canvas.
11
+ */
12
+ export type ComponentGround = {
13
+ background?: string;
14
+ color?: string;
15
+ };
16
+ /** What a component is shown with while it is edited or previewed: its props' values, and the ground under it. */
17
+ export type ComponentPreview = {
18
+ props: Record<string, unknown>;
19
+ ground: ComponentGround;
20
+ };
21
+ /** Every place a component is drawn, in the order the document holds them. */
22
+ export declare const placementsOf: (schema: Pick<Schema, "flat" | "components">, componentId: string) => ComponentPlacement[];
23
+ /**
24
+ * A component as one of its instances shows it: the props that instance writes (a bound one is the page's to resolve,
25
+ * and keeps its default) over the defaults, and the ground around it. With no instance — none placed, or the one asked
26
+ * for gone — the defaults alone, on the canvas's own ground.
27
+ */
28
+ export declare const previewOf: (schema: Pick<Schema, "flat" | "components">, style: Pick<Style, "platform">, component: SpaceComponent, instanceId?: string) => ComponentPreview;
@@ -1,13 +1,22 @@
1
+ import { ComponentGround, ComponentPlacement } from './preview';
1
2
  import { SpaceComponent } from '@plitzi/sdk-shared';
3
+ export type OpenComponent = {
4
+ component?: SpaceComponent;
5
+ scope: Record<string, unknown>;
6
+ /** What it is drawn on: the ground around the instance it is shown as. */
7
+ ground: ComponentGround;
8
+ /** Every place it is drawn, and the one it is shown as. */
9
+ placements: ComponentPlacement[];
10
+ shownAs?: string;
11
+ showAs: (instanceId: string) => void;
12
+ };
2
13
  /**
3
14
  * The component open in the canvas, and the scope the builder is drawn in while it is.
4
15
  *
5
16
  * The scope lays the component's tree over the pages' — ids are one namespace, so every tool that finds an element by
6
- * id finds the component's — and hands its props their defaults. With nothing open it is empty, and a scope with
7
- * nothing of its own reads straight through to the store.
17
+ * id finds the component's — and hands its props the values of one of its instances (the first, or the one picked in
18
+ * the banner), over their defaults: a component reads its words from its props, and with defaults alone most drew
19
+ * empty. With nothing open it is empty, and a scope with nothing of its own reads straight through to the store.
8
20
  */
9
- declare const useOpenComponent: () => {
10
- component?: SpaceComponent;
11
- scope: Record<string, unknown>;
12
- };
21
+ declare const useOpenComponent: () => OpenComponent;
13
22
  export default useOpenComponent;
@@ -14,5 +14,8 @@ export declare const summarize: {
14
14
  };
15
15
  /** `GET /api/posts` — the request itself, which is what identifies an endpoint at a glance. */
16
16
  export declare const summarizeEndpoint: (endpoint: ConnectorReadEndpoint | ConnectorWriteEndpoint) => string;
17
- /** True when a read endpoint maps the response by hand, so a collapsed header can say it was customized. */
17
+ /**
18
+ * True when a read endpoint maps the response by hand, so a collapsed header can say it was customized. A path the form
19
+ * cleared is an empty string: any of the others still says so.
20
+ */
18
21
  export declare const hasResponseMapping: (endpoint: ConnectorReadEndpoint) => boolean;
@@ -34,7 +34,7 @@ export declare const ORIGIN_TONE: Record<ChangeOrigin, string>;
34
34
  /** Each action in its own colour and shape, so a folded row is scanned by its icons before its words. */
35
35
  export declare const ACTION_TONE: Record<ChangeAction, string>;
36
36
  export declare const ACTION_ICON: Record<ChangeAction, string>;
37
- export declare const MUTED = "text-zinc-500 dark:text-zinc-400";
37
+ export declare const MUTED = "text-ui-fg-subtle";
38
38
  /** When, in the reader's own time zone: this is a person looking back at their day, not a log line. */
39
39
  export declare const formatTime: (at: number) => string;
40
40
  /** Just the time of day, for a save listed under a row that already says the date. */
@@ -0,0 +1,7 @@
1
+ import { BuilderRefusal as Refusal } from './refusalOf';
2
+ export type BuilderRefusalProps = {
3
+ refusal: Refusal;
4
+ onRetry: () => void;
5
+ };
6
+ declare const _default: import('react').MemoExoticComponent<({ refusal, onRetry }: BuilderRefusalProps) => import('react').JSX.Element>;
7
+ export default _default;
@@ -0,0 +1,3 @@
1
+ export { default } from './BuilderRefusal';
2
+ export { refusalOf } from './refusalOf';
3
+ export type { BuilderRefusal, BuilderRefusalKind } from './refusalOf';
@@ -0,0 +1,12 @@
1
+ /** Why the builder could not open its space, as the person reads it: what happened, what to do, and the way out. */
2
+ export type BuilderRefusalKind = 'signedOut' | 'notFound' | 'unreachable' | 'outdated' | 'other';
3
+ export type BuilderRefusal = {
4
+ kind: BuilderRefusalKind;
5
+ title: string;
6
+ description: string;
7
+ };
8
+ /**
9
+ * The refusal a failed load reads as. A credential the server no longer takes and a session that ended are the same thing
10
+ * to the person — sign in again — and a space they cannot reach is said as not found, as the API says it.
11
+ */
12
+ export declare const refusalOf: (error: unknown) => BuilderRefusal;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * What the platform says of this builder's version (`@plitzi/sdk-shared/clients`): a builder older than the platform —
3
+ * a tab left open across a release — is answered and told what is current, once; one older than the platform takes is
4
+ * refused (426) and has to be reloaded. Heard on whichever request comes back with it, said by the network provider.
5
+ */
6
+ export type PlatformHeard = {
7
+ kind: 'behind';
8
+ current: string;
9
+ } | {
10
+ kind: 'outdated';
11
+ message: string;
12
+ };
13
+ type Listener = (heard: PlatformHeard) => void;
14
+ export declare const onPlatformVersion: (listener: Listener) => (() => void);
15
+ /** A version heard: said to every listener, a `behind` once for each version of the platform. */
16
+ export declare const hearPlatform: (heard: PlatformHeard) => void;
17
+ /** A fetch that hears the platform's version on every answer it brings back. */
18
+ export declare const versionedFetch: <Init>(fetchImpl: (input: URL | RequestInfo, init?: Init) => Promise<Response>) => (input: URL | RequestInfo, init?: Init) => Promise<Response>;
19
+ /**
20
+ * A request of the builder's to the platform's API: it says which builder it is, as its GraphQL link does, and hears
21
+ * the platform's version on the answer — every call the builder makes past GraphQL goes through it.
22
+ */
23
+ export declare const platformFetch: (input: URL | RequestInfo, init?: RequestInit | undefined) => Promise<Response>;
24
+ export {};
@@ -0,0 +1,20 @@
1
+ import { SpaceCredentialFormValues } from './helpers';
2
+ import { SpaceCredentialProvider } from '@plitzi/sdk-shared';
3
+ import { MouseEvent } from 'react';
4
+ export type SpaceCredentialFormProps = {
5
+ name?: string;
6
+ /** The kind it is: fixed when editing; a new one starts on it, or on choosing one when none is given. */
7
+ provider?: SpaceCredentialProvider;
8
+ /** The kinds the caller can use (a CDN takes a storage key); every kind when none. */
9
+ providers?: SpaceCredentialProvider[];
10
+ /**
11
+ * Replaces the values of a credential that already exists. Its kind is fixed — a CDN, a domain, a deploy or a flow
12
+ * reads its values as that kind's — and nothing it holds is shown: every value is typed again and all are replaced.
13
+ */
14
+ editing?: boolean;
15
+ onClose?: (e?: MouseEvent) => void;
16
+ onSubmit?: (e: MouseEvent | undefined, values: SpaceCredentialFormValues) => void;
17
+ };
18
+ /** A space's credential: what it signs in to, chosen first, then that provider's own fields. */
19
+ declare const SpaceCredentialForm: ({ name, provider: providerProp, providers, editing, onSubmit, onClose }: SpaceCredentialFormProps) => import('react').JSX.Element;
20
+ export default SpaceCredentialForm;
@@ -0,0 +1,17 @@
1
+ import { SpaceCredentialFormValues } from '../../helpers';
2
+ import { SpaceCredentialProvider } from '@plitzi/sdk-shared';
3
+ import { MouseEvent } from 'react';
4
+ export type CredentialEditorProps = {
5
+ provider: SpaceCredentialProvider;
6
+ name?: string;
7
+ editing: boolean;
8
+ onChangeProvider?: () => void;
9
+ onClose?: (e?: MouseEvent) => void;
10
+ onSubmit?: (e: MouseEvent | undefined, values: SpaceCredentialFormValues) => void;
11
+ };
12
+ /**
13
+ * One kind's credential filled in: what it is at the top, its fields — named by the provider's own words, a secret
14
+ * typed unseen — and where the provider issues one beside them.
15
+ */
16
+ declare const CredentialEditor: ({ provider, name, editing, onChangeProvider, onClose, onSubmit }: CredentialEditorProps) => import('react').JSX.Element;
17
+ export default CredentialEditor;
@@ -0,0 +1,3 @@
1
+ import { default as CredentialEditor } from './CredentialEditor';
2
+ export * from './CredentialEditor';
3
+ export default CredentialEditor;
@@ -0,0 +1,7 @@
1
+ import { SpaceCredentialProvider } from '@plitzi/sdk-shared';
2
+ export type CredentialFieldsProps = {
3
+ provider: SpaceCredentialProvider;
4
+ };
5
+ /** A kind's fields, in its catalogue's order. */
6
+ declare const CredentialFields: ({ provider }: CredentialFieldsProps) => import('react').JSX.Element;
7
+ export default CredentialFields;
@@ -0,0 +1,10 @@
1
+ import { CredentialField as Field } from '@plitzi/sdk-shared/credentials';
2
+ export type CredentialFieldProps = {
3
+ field: Field;
4
+ };
5
+ /**
6
+ * One field of a credential as its kind declares it: a choice as a select, a secret typed unseen until asked to show
7
+ * it — to check a pasted value — and what to write said under it.
8
+ */
9
+ declare const CredentialField: ({ field }: CredentialFieldProps) => import('react').JSX.Element;
10
+ export default CredentialField;