@plitzi/plitzi-builder 0.37.9 → 0.37.10

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 (133) hide show
  1. package/CHANGELOG.md +600 -0
  2. package/dist/config/index.d.ts +0 -4
  3. package/dist/index.html +2 -0
  4. package/dist/modules/AI/components/ChatMessage/components/{AITemplatePreview/AITemplatePreview.d.ts → AISnippetPreview/AISnippetPreview.d.ts} +3 -3
  5. package/dist/modules/AI/components/ChatMessage/components/{AITemplatePreview/components/AITemplateHeader/AITemplateHeader.d.ts → AISnippetPreview/components/AISnippetHeader/AISnippetHeader.d.ts} +3 -3
  6. package/dist/modules/AI/components/ChatMessage/components/AISnippetPreview/components/AISnippetHeader/index.d.ts +3 -0
  7. package/dist/modules/AI/components/ChatMessage/components/AISnippetPreview/index.d.ts +3 -0
  8. package/dist/modules/AI/hooks/useAiChat.d.ts +2 -1
  9. package/dist/modules/Actions/ActionsContext.d.ts +0 -1
  10. package/dist/modules/App/AppContainer/components/NotificationsSettings/NotificationsSettings.d.ts +7 -0
  11. package/dist/modules/App/AppContainer/components/NotificationsSettings/index.d.ts +2 -0
  12. package/dist/modules/App/AppContainer/containers/ContainerServer.d.ts +7 -0
  13. package/dist/modules/App/AppContainer/containers/ContainerSettings.d.ts +1 -0
  14. package/dist/modules/App/AppContainer/containers/GeneralSettings.d.ts +2 -0
  15. package/dist/modules/App/AppContext.d.ts +3 -0
  16. package/dist/modules/App/components/AppHeader/GridButton.d.ts +3 -0
  17. package/dist/modules/App/components/AppHeader/IssuesButton/helpers.d.ts +2 -0
  18. package/dist/modules/App/components/EmptyState/EmptyState.d.ts +12 -0
  19. package/dist/modules/App/components/EmptyState/index.d.ts +3 -0
  20. package/dist/modules/App/components/PanelSections/PanelSections.d.ts +27 -0
  21. package/dist/modules/App/components/PanelSections/index.d.ts +3 -0
  22. package/dist/modules/App/components/ResourceRow/ResourceRow.d.ts +19 -0
  23. package/dist/modules/App/components/ResourceRow/index.d.ts +3 -0
  24. package/dist/modules/App/components/SitemapDiagram/SitemapDiagram.d.ts +25 -0
  25. package/dist/modules/App/components/SitemapDiagram/components/SitemapChip/SitemapChip.d.ts +21 -0
  26. package/dist/modules/App/components/SitemapDiagram/components/SitemapChip/index.d.ts +3 -0
  27. package/dist/modules/App/components/SitemapDiagram/components/SitemapLegend/SitemapLegend.d.ts +3 -0
  28. package/dist/modules/App/components/SitemapDiagram/components/SitemapLegend/index.d.ts +2 -0
  29. package/dist/modules/App/components/SitemapDiagram/components/SitemapNode/SitemapNode.d.ts +15 -0
  30. package/dist/modules/App/components/SitemapDiagram/components/SitemapNode/index.d.ts +3 -0
  31. package/dist/modules/App/components/SitemapDiagram/components/SitemapPath/SitemapPath.d.ts +6 -0
  32. package/dist/modules/App/components/SitemapDiagram/components/SitemapPath/index.d.ts +3 -0
  33. package/dist/modules/App/components/SitemapDiagram/components/SitemapToolbar/SitemapToolbar.d.ts +16 -0
  34. package/dist/modules/App/components/SitemapDiagram/components/SitemapToolbar/index.d.ts +3 -0
  35. package/dist/modules/App/components/SitemapDiagram/helpers/schemaToSitemap.d.ts +10 -0
  36. package/dist/modules/App/components/SitemapDiagram/helpers/schemaToSitemap.test.d.ts +1 -0
  37. package/dist/modules/App/components/SitemapDiagram/helpers/searchSitemap.d.ts +12 -0
  38. package/dist/modules/App/components/SitemapDiagram/index.d.ts +4 -0
  39. package/dist/modules/App/components/SitemapDiagram/types.d.ts +36 -0
  40. package/dist/modules/App/components/ViewPage/ViewPage.d.ts +22 -0
  41. package/dist/modules/App/components/ViewPage/index.d.ts +3 -0
  42. package/dist/modules/App/components/ViewSection/ViewSection.d.ts +10 -0
  43. package/dist/modules/App/components/ViewSection/index.d.ts +3 -0
  44. package/dist/modules/App/helpers/utils.d.ts +10 -1
  45. package/dist/modules/App/hooks/useSitemapOpen.d.ts +7 -0
  46. package/dist/modules/Builder/BuilderHelper.d.ts +4 -4
  47. package/dist/modules/Builder/BuilderProvider.d.ts +1 -1
  48. package/dist/modules/Builder/Models/SnippetForm.d.ts +16 -0
  49. package/dist/modules/Builder/components/BuilderContextMenu/BuilderContextMenuItem.d.ts +6 -1
  50. package/dist/modules/Builder/components/BuilderElementTools/ElementAnchor.d.ts +11 -0
  51. package/dist/modules/Builder/components/BuilderElementTools/ElementDefinitionSettings.d.ts +3 -1
  52. package/dist/modules/Builder/components/BuilderElementTools/ElementFlagGate.d.ts +16 -0
  53. package/dist/modules/Builder/components/BuilderElementTools/NothingSelected.d.ts +6 -0
  54. package/dist/modules/Builder/helpers/reuse.d.ts +16 -0
  55. package/dist/modules/Builder/hooks/useSaveAsSnippet.d.ts +8 -0
  56. package/dist/modules/Components/Components.d.ts +8 -3
  57. package/dist/modules/Connectors/ConnectorsContext.d.ts +0 -2
  58. package/dist/modules/Connectors/helpers/manifestDoc.d.ts +0 -1
  59. package/dist/modules/Credentials/Credentials.d.ts +0 -7
  60. package/dist/modules/Elements/hooks/useDragElement.d.ts +2 -2
  61. package/dist/modules/Flags/Flags.d.ts +9 -0
  62. package/dist/modules/Flags/components/FlagForm/FlagForm.d.ts +15 -0
  63. package/dist/modules/Flags/components/FlagForm/FlagRule.d.ts +11 -0
  64. package/dist/modules/Flags/components/FlagForm/index.d.ts +3 -0
  65. package/dist/modules/Flags/components/FlagForm/ruleGroup.d.ts +5 -0
  66. package/dist/modules/Flags/components/FlagForm/ruleGroup.test.d.ts +1 -0
  67. package/dist/modules/Flags/components/FlagItem/FlagItem.d.ts +14 -0
  68. package/dist/modules/Flags/components/FlagItem/FlagPreviewOption.d.ts +13 -0
  69. package/dist/modules/Flags/components/FlagItem/FlagPreviewToggle.d.ts +9 -0
  70. package/dist/modules/Flags/components/FlagItem/index.d.ts +3 -0
  71. package/dist/modules/Flags/components/PublishFlagsForm/PublishFlagsForm.d.ts +21 -0
  72. package/dist/modules/Flags/components/PublishFlagsForm/index.d.ts +3 -0
  73. package/dist/modules/Flags/helpers/flagRuleFields.d.ts +11 -0
  74. package/dist/modules/Flags/index.d.ts +3 -0
  75. package/dist/modules/History/History.d.ts +5 -1
  76. package/dist/modules/History/components/ChangeGroup/ChangeGroup.d.ts +2 -1
  77. package/dist/modules/History/components/ChangeLine/ChangeLine.d.ts +3 -1
  78. package/dist/modules/History/components/SaveDetail/SaveDetail.d.ts +2 -1
  79. package/dist/modules/Keyboard/index.d.ts +4 -0
  80. package/dist/modules/Keyboard/platform.d.ts +7 -0
  81. package/dist/modules/Network/hooks/useBuilderNetwork.d.ts +12 -0
  82. package/dist/modules/Resources/components/Resource/subTypes/ResourceSnippet/ResourceSnippet.d.ts +13 -0
  83. package/dist/modules/Resources/components/Resource/subTypes/ResourceSnippet/SnippetContent.d.ts +8 -0
  84. package/dist/modules/Resources/components/Resource/subTypes/ResourceSnippet/UnreadableSnippet.d.ts +12 -0
  85. package/dist/modules/Resources/components/Resource/subTypes/ResourceSnippet/index.d.ts +3 -0
  86. package/dist/modules/Resources/components/ResourceManager/helpers/isSnippetFile.d.ts +3 -0
  87. package/dist/modules/Resources/components/ResourceManager/helpers/isSnippetFile.test.d.ts +1 -0
  88. package/dist/modules/Resources/components/ResourcesCdnBucket/ResourcesCdnBucket.d.ts +1 -1
  89. package/dist/modules/Runtime/components/RuntimeCodeNote/RuntimeCodeNote.d.ts +1 -4
  90. package/dist/modules/Space/components/SpaceIssues/SpaceIssues.d.ts +2 -1
  91. package/dist/modules/Space/components/SpaceIssues/components/ElementChip/ElementChip.d.ts +12 -0
  92. package/dist/modules/Space/components/SpaceIssues/components/ElementChip/index.d.ts +3 -0
  93. package/dist/modules/Space/components/SpaceIssues/components/IssueFix/IssueFix.d.ts +12 -0
  94. package/dist/modules/Space/components/SpaceIssues/components/IssueFix/index.d.ts +3 -0
  95. package/dist/modules/Space/components/SpaceIssues/components/IssueItem/IssueItem.d.ts +1 -5
  96. package/dist/modules/Space/components/SpaceIssues/components/SuggestionGroup/SuggestionGroup.d.ts +8 -0
  97. package/dist/modules/Space/components/SpaceIssues/components/SuggestionGroup/index.d.ts +3 -0
  98. package/dist/modules/Space/components/SpaceIssues/components/SuggestionItem/SuggestionItem.d.ts +12 -0
  99. package/dist/modules/Space/components/SpaceIssues/components/SuggestionItem/index.d.ts +3 -0
  100. package/dist/modules/Space/components/SpaceIssues/helpers.d.ts +2 -0
  101. package/dist/package.json.d.ts +2 -3
  102. package/dist/plitzi-builder.css +1 -1
  103. package/dist/plitzi-builder.css.gz +0 -0
  104. package/dist/plitzi-builder.js +2803 -2496
  105. package/dist/plitzi-builder.js.gz +0 -0
  106. package/dist/plitzi-functions-worker.js +3 -3
  107. package/package.json +16 -17
  108. package/dist/modules/AI/components/ChatInput/helpers.d.ts +0 -1
  109. package/dist/modules/AI/components/ChatMessage/components/AITemplatePreview/components/AITemplateHeader/index.d.ts +0 -3
  110. package/dist/modules/AI/components/ChatMessage/components/AITemplatePreview/index.d.ts +0 -3
  111. package/dist/modules/App/AppContainer/containers/ContainerActions.d.ts +0 -2
  112. package/dist/modules/App/AppContainer/containers/ContainerConnectors.d.ts +0 -2
  113. package/dist/modules/App/AppContainer/containers/ContainerCredentials.d.ts +0 -2
  114. package/dist/modules/App/AppContainer/containers/ContainerFunctions.d.ts +0 -2
  115. package/dist/modules/App/AppContainer/containers/ContainerRuntime.d.ts +0 -2
  116. package/dist/modules/App/AppContainer/containers/ContainerVisitors.d.ts +0 -2
  117. package/dist/modules/App/components/WorkflowDiagram/WorkflowDiagram.d.ts +0 -37
  118. package/dist/modules/App/components/WorkflowDiagram/components/CustomEdge.d.ts +0 -3
  119. package/dist/modules/App/components/WorkflowDiagram/components/CustomNode.d.ts +0 -5
  120. package/dist/modules/App/components/WorkflowDiagram/helpers/schemaToSitemap.d.ts +0 -11
  121. package/dist/modules/App/components/WorkflowDiagram/helpers/sitemapToFlow.d.ts +0 -20
  122. package/dist/modules/App/components/WorkflowDiagram/index.d.ts +0 -3
  123. package/dist/modules/Builder/Models/TemplateForm.d.ts +0 -16
  124. package/dist/modules/Resources/components/Resource/subTypes/ResourceTemplate/ResourceTemplate.d.ts +0 -13
  125. package/dist/modules/Resources/components/Resource/subTypes/ResourceTemplate/TemplateContent.d.ts +0 -8
  126. package/dist/modules/Resources/components/Resource/subTypes/ResourceTemplate/index.d.ts +0 -3
  127. package/dist/patches/useSyncExternalStoreWithSelector.d.ts +0 -4
  128. /package/dist/modules/AI/components/ChatMessage/components/{AITemplatePreview/components/AITemplateHeader → AISnippetPreview/components/AISnippetHeader}/DisplayModeButton.d.ts +0 -0
  129. /package/dist/modules/AI/components/ChatMessage/components/{AITemplatePreview → AISnippetPreview}/components/ConfirmPanel/ConfirmPanel.d.ts +0 -0
  130. /package/dist/modules/AI/components/ChatMessage/components/{AITemplatePreview → AISnippetPreview}/components/ConfirmPanel/index.d.ts +0 -0
  131. /package/dist/modules/AI/components/ChatMessage/components/{AITemplatePreview → AISnippetPreview}/helpers.d.ts +0 -0
  132. /package/dist/modules/{AI/components → Keyboard}/KeyboardKey/KeyboardKey.d.ts +0 -0
  133. /package/dist/modules/{AI/components → Keyboard}/KeyboardKey/index.d.ts +0 -0
@@ -1,6 +1,11 @@
1
+ export type ComponentsProps = {
2
+ /** What the catalog is searched for: the elements above and these alike. */
3
+ filter: string;
4
+ };
1
5
  /**
2
- * The space's components: what each is called and how many places render it. A component is placed by dragging it
3
- * onto a page, and edited by opening it in the canvas, where its tree is edited like a page's.
6
+ * The space's components, at the foot of the element catalog: placed the way an element is, by dragging it onto a
7
+ * page — with what each is called and how many places render it. Edited by opening it in the canvas, where its tree is
8
+ * edited like a page's.
4
9
  */
5
- declare const Components: () => import('react').JSX.Element;
10
+ declare const Components: ({ filter }: ComponentsProps) => import('react').JSX.Element;
6
11
  export default Components;
@@ -3,8 +3,6 @@ export type ConnectorsContextValue = {
3
3
  connectors: Record<string, SpaceConnector>;
4
4
  isLoading: boolean;
5
5
  error: string;
6
- /** True when the space has at least one deployment that can run server code, which is what resolves connectors. */
7
- hasServerRendering: boolean;
8
6
  addConnector: (name: string, manifest: ConnectorManifestDraft) => Promise<SpaceConnector | undefined>;
9
7
  updateConnector: (identifier: string, name: string, manifest: ConnectorManifestDraft) => Promise<SpaceConnector | undefined>;
10
8
  removeConnector: (identifier: string) => Promise<boolean>;
@@ -38,4 +38,3 @@ export declare const fieldDocs: {
38
38
  readonly mediaBaseUrl: "Host to prepend to relative image and file URLs the CMS returns. Only values under keys ending in url, src or href are rewritten.";
39
39
  readonly writeBodyPath: "Key to wrap the submitted values in, e.g. data. Leave empty to send them at the root.";
40
40
  };
41
- export declare const CONNECTOR_SERVER_ONLY_NOTE = "Connectors resolve on the server before the page reaches the browser. A space published without server rendering has no server to resolve them.";
@@ -1,9 +1,2 @@
1
- /**
2
- * Manages the space's secrets in one place.
3
- *
4
- * Credentials were only reachable from the modals that consume them — a deployment form, a CDN row — so a secret
5
- * could not be prepared before the thing that needs it existed. A connector needs exactly that ordering: the CMS
6
- * token has to exist before there is a manifest to reference it from.
7
- */
8
1
  declare const Credentials: () => import('react').JSX.Element;
9
2
  export default Credentials;
@@ -1,10 +1,10 @@
1
- import { Template } from '@plitzi/sdk-shared';
1
+ import { Snippet } from '@plitzi/sdk-shared';
2
2
  import { DragEvent } from 'react';
3
3
  export type UseDragElementProps = {
4
4
  attributes?: Record<string, unknown>;
5
5
  type: string;
6
6
  variables?: object[];
7
- manifest?: Template;
7
+ manifest?: Snippet;
8
8
  /** What the dropped element is called in the builder's tree, instead of its type's default label. */
9
9
  label?: string;
10
10
  };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * The space's feature flags: declared and ruled here, previewed in the canvas, and published on their own.
3
+ *
4
+ * Forcing one here is the canvas's `qa` layer — what the author looks at, never saved. Flags are not part of a
5
+ * snapshot: each environment has one set, shared by every revision it serves, and publishing them switches what the
6
+ * environment serves now without shipping whatever else the draft holds.
7
+ */
8
+ declare const Flags: () => import('react').JSX.Element;
9
+ export default Flags;
@@ -0,0 +1,15 @@
1
+ import { Field } from '@plitzi/plitzi-ui/QueryBuilder';
2
+ import { SchemaFlag } from '@plitzi/sdk-shared';
3
+ import { MouseEvent } from 'react';
4
+ export type FlagFormProps = {
5
+ name?: string;
6
+ flag?: SchemaFlag;
7
+ isNewRecord?: boolean;
8
+ /** The names already declared, so a new flag cannot take one. */
9
+ takenNames?: string[];
10
+ fields: Record<string, Field>;
11
+ onSubmit: (name: string, flag: SchemaFlag) => void;
12
+ onClose: (e?: MouseEvent) => void;
13
+ };
14
+ declare const FlagForm: ({ name, flag, isNewRecord, takenNames, fields, onSubmit, onClose }: FlagFormProps) => import('react').JSX.Element;
15
+ export default FlagForm;
@@ -0,0 +1,11 @@
1
+ import { Field } from '@plitzi/plitzi-ui/QueryBuilder';
2
+ export type FlagRuleProps = {
3
+ index: number;
4
+ last: boolean;
5
+ fields: Record<string, Field>;
6
+ onRemove: (index: number) => void;
7
+ onMove: (from: number, to: number) => void;
8
+ };
9
+ /** One rule of a flag: the value it gives, and when. Rules are read top to bottom and the first that matches wins. */
10
+ declare const FlagRule: ({ index, last, fields, onRemove, onMove }: FlagRuleProps) => import('react').JSX.Element;
11
+ export default FlagRule;
@@ -0,0 +1,3 @@
1
+ import { default as FlagForm } from './FlagForm';
2
+ export * from './FlagForm';
3
+ export default FlagForm;
@@ -0,0 +1,5 @@
1
+ import { RuleGroup } from '@plitzi/plitzi-ui/QueryBuilder';
2
+ /** What a new rule starts as: no conditions yet. */
3
+ export declare const EMPTY_WHEN: RuleGroup;
4
+ /** A rule's `when` as the query builder edits it: `and` or `or` over a list of conditions and groups. */
5
+ export declare const isRuleGroup: (value: unknown) => value is RuleGroup;
@@ -0,0 +1,14 @@
1
+ import { Field } from '@plitzi/plitzi-ui/QueryBuilder';
2
+ import { FlagResolution, SchemaFlag } from '@plitzi/sdk-shared';
3
+ export type FlagItemProps = {
4
+ name: string;
5
+ flag: SchemaFlag;
6
+ resolution?: FlagResolution;
7
+ forced?: boolean;
8
+ fields: Record<string, Field>;
9
+ onUpdate: (name: string, flag: SchemaFlag) => void;
10
+ onRemove: (name: string) => void;
11
+ onForce: (name: string, value: boolean | undefined) => void;
12
+ };
13
+ declare const FlagItem: ({ name, flag, resolution, forced, fields, onUpdate, onRemove, onForce }: FlagItemProps) => import('react').JSX.Element;
14
+ export default FlagItem;
@@ -0,0 +1,13 @@
1
+ export type FlagPreviewOptionValue = {
2
+ label: string;
3
+ value: boolean | undefined;
4
+ title: string;
5
+ };
6
+ export type FlagPreviewOptionProps = {
7
+ name: string;
8
+ option: FlagPreviewOptionValue;
9
+ active: boolean;
10
+ onForce: (name: string, value: boolean | undefined) => void;
11
+ };
12
+ declare const FlagPreviewOption: ({ name, option, active, onForce }: FlagPreviewOptionProps) => import('react').JSX.Element;
13
+ export default FlagPreviewOption;
@@ -0,0 +1,9 @@
1
+ export type FlagPreviewToggleProps = {
2
+ name: string;
3
+ /** What the canvas is forced to, if anything. */
4
+ forced?: boolean;
5
+ onForce: (name: string, value: boolean | undefined) => void;
6
+ };
7
+ /** Forces a flag in the canvas only — what an author looks at, never what is saved or published. */
8
+ declare const FlagPreviewToggle: ({ name, forced, onForce }: FlagPreviewToggleProps) => import('react').JSX.Element;
9
+ export default FlagPreviewToggle;
@@ -0,0 +1,3 @@
1
+ import { default as FlagItem } from './FlagItem';
2
+ export * from './FlagItem';
3
+ export default FlagItem;
@@ -0,0 +1,21 @@
1
+ import { z } from 'zod';
2
+ import { MouseEvent } from 'react';
3
+ declare const publishFlagsSchema: z.ZodObject<{
4
+ environment: z.ZodEnum<{
5
+ production: "production";
6
+ staging: "staging";
7
+ development: "development";
8
+ }>;
9
+ description: z.ZodString;
10
+ }, z.core.$strip>;
11
+ export type PublishFlagsValues = z.infer<typeof publishFlagsSchema>;
12
+ export type PublishFlagsFormProps = {
13
+ onClose?: (e?: MouseEvent) => void;
14
+ onSubmit?: (e: MouseEvent | undefined, values: PublishFlagsValues) => void;
15
+ };
16
+ /**
17
+ * Where the draft's flags go, and why. Not the snapshot form: flags are no part of a snapshot, and saying so is the
18
+ * point — an author turning a flag in production must know the half-finished page they are also editing stays.
19
+ */
20
+ declare const PublishFlagsForm: ({ onClose, onSubmit }: PublishFlagsFormProps) => import('react').JSX.Element;
21
+ export default PublishFlagsForm;
@@ -0,0 +1,3 @@
1
+ import { default as PublishFlagsForm } from './PublishFlagsForm';
2
+ export * from './PublishFlagsForm';
3
+ export default PublishFlagsForm;
@@ -0,0 +1,11 @@
1
+ import { Field } from '@plitzi/plitzi-ui/QueryBuilder';
2
+ import { QueryParams, RouteParams } from '@plitzi/sdk-shared';
3
+ /**
4
+ * What a flag's rule may be written over: everything a variable's `when` sees — the environment, the host, the URL the
5
+ * builder is previewing — and the visitor, whose roles are offered from the ones this space declares.
6
+ */
7
+ export declare const flagRuleFields: ({ routeParams, queryParams, visitorRoles }: {
8
+ routeParams: RouteParams;
9
+ queryParams: QueryParams;
10
+ visitorRoles: string[];
11
+ }) => Record<string, Field>;
@@ -0,0 +1,3 @@
1
+ import { default as Flags } from './Flags';
2
+ export * from './Flags';
3
+ export default Flags;
@@ -1,7 +1,11 @@
1
+ export type HistoryProps = {
2
+ /** Closes the dialog the history is read in, once a line has taken the author to its element. */
3
+ onDismiss: () => void;
4
+ };
1
5
  /**
2
6
  * The space's change history: every save of its schema and style, by whoever made it — a person, an agent, the
3
7
  * autofix — newest first, with the published revisions marked where they fall. Read-only: it answers "what changed,
4
8
  * who did it and what exactly", and never writes anything back.
5
9
  */
6
- declare const History: () => import('react').JSX.Element;
10
+ declare const History: ({ onDismiss }: HistoryProps) => import('react').JSX.Element;
7
11
  export default History;
@@ -1,10 +1,11 @@
1
1
  import { ChangeGroup as Group } from '../../helpers';
2
2
  export type ChangeGroupProps = {
3
3
  group: Group;
4
+ onDismiss: () => void;
4
5
  };
5
6
  /**
6
7
  * A row of the timeline: who, from where and when, and what it did — one line per thing. Unfolded, every save it groups
7
8
  * on its own, with the fields each one changed.
8
9
  */
9
- declare const ChangeGroup: ({ group }: ChangeGroupProps) => import('react').JSX.Element;
10
+ declare const ChangeGroup: ({ group, onDismiss }: ChangeGroupProps) => import('react').JSX.Element;
10
11
  export default ChangeGroup;
@@ -1,10 +1,12 @@
1
1
  import { ChangeLine as Line } from '@plitzi/sdk-shared/history';
2
2
  export type ChangeLineProps = {
3
3
  line: Line;
4
+ /** Makes way for the element once it is on screen: the history is read in a dialog over it. */
5
+ onDismiss: () => void;
4
6
  };
5
7
  /**
6
8
  * One thing a save did. When it is about an element that is still in the space, the line is the way to it — the same
7
9
  * way the problems list takes someone to an element.
8
10
  */
9
- declare const ChangeLine: ({ line }: ChangeLineProps) => import('react').JSX.Element;
11
+ declare const ChangeLine: ({ line, onDismiss }: ChangeLineProps) => import('react').JSX.Element;
10
12
  export default ChangeLine;
@@ -1,7 +1,8 @@
1
1
  import { ChangeRecord } from '../../helpers';
2
2
  export type SaveDetailProps = {
3
3
  change: ChangeRecord;
4
+ onDismiss: () => void;
4
5
  };
5
6
  /** One save of a row: its number and time in a narrow column, what it did beside it, and the fields each edit changed. */
6
- declare const SaveDetail: ({ change }: SaveDetailProps) => import('react').JSX.Element;
7
+ declare const SaveDetail: ({ change, onDismiss }: SaveDetailProps) => import('react').JSX.Element;
7
8
  export default SaveDetail;
@@ -0,0 +1,4 @@
1
+ import { default as KeyboardKey } from './KeyboardKey';
2
+ export * from './KeyboardKey';
3
+ export * from './platform';
4
+ export default KeyboardKey;
@@ -0,0 +1,7 @@
1
+ export declare const isMac: boolean;
2
+ /** The modifier a shortcut is written with on this machine: the command key on a Mac, Control everywhere else. */
3
+ export declare const modifierKey: string;
4
+ /** A shortcut as this machine writes it: `⌘C` on a Mac, `Ctrl+C` everywhere else. */
5
+ export declare const withModifier: (key: string) => string;
6
+ /** The key that removes what is selected, as its keycap reads. */
7
+ export declare const deleteKey: string;
@@ -0,0 +1,12 @@
1
+ import { BuilderMutationsMap, BuilderQueriesMap } from '@plitzi/sdk-shared';
2
+ import { BuilderNetworkContextValue } from '@plitzi/sdk-shared/network/NetworkContext';
3
+ import { SpaceEventMap } from '@plitzi/sdk-shared/network/spaceEvents';
4
+ export type BuilderNetwork = BuilderNetworkContextValue<BuilderQueriesMap, BuilderMutationsMap, SpaceEventMap>;
5
+ /**
6
+ * The builder's network: its queries, mutations and the space's events, typed by what the builder asks for.
7
+ *
8
+ * The context is shared with the SDK, which fills it with less, so it is typed for both. Inside the builder its value
9
+ * is always the one `NetworkContextProvider` writes — that is what makes this the one place it is read as that.
10
+ */
11
+ declare const useBuilderNetwork: () => BuilderNetwork;
12
+ export default useBuilderNetwork;
@@ -0,0 +1,13 @@
1
+ import { MouseEvent } from 'react';
2
+ export type ResourceSnippetProps = {
3
+ className?: string;
4
+ id: string;
5
+ src: string;
6
+ title?: string;
7
+ removing?: boolean;
8
+ isLoading?: boolean;
9
+ onClick?: () => void;
10
+ onRemove?: (e: MouseEvent) => void;
11
+ };
12
+ declare const ResourceSnippet: ({ className, title, src, removing, isLoading, onClick, onRemove }: ResourceSnippetProps) => import('react').JSX.Element | undefined;
13
+ export default ResourceSnippet;
@@ -0,0 +1,8 @@
1
+ import { Snippet } from '@plitzi/sdk-shared';
2
+ export type SnippetContentProps = {
3
+ baseElementId: string;
4
+ schema: Snippet['schema'];
5
+ style: Snippet['style'];
6
+ };
7
+ declare const SnippetContent: ({ baseElementId, schema, style }: SnippetContentProps) => import('react').JSX.Element;
8
+ export default SnippetContent;
@@ -0,0 +1,12 @@
1
+ import { MouseEvent } from 'react';
2
+ export type UnreadableSnippetProps = {
3
+ className?: string;
4
+ title?: string;
5
+ onRemove?: (e: MouseEvent) => void;
6
+ };
7
+ /**
8
+ * A file among the snippets that is not one — unreachable, or a JSON of some other shape. Shown rather than left out,
9
+ * so whoever put it there sees it and can take it away.
10
+ */
11
+ declare const UnreadableSnippet: ({ className, title, onRemove }: UnreadableSnippetProps) => import('react').JSX.Element;
12
+ export default UnreadableSnippet;
@@ -0,0 +1,3 @@
1
+ import { default as ResourceSnippet } from './ResourceSnippet';
2
+ export * from './ResourceSnippet';
3
+ export default ResourceSnippet;
@@ -0,0 +1,3 @@
1
+ /** Whether a JSON being uploaded is a snippet — which decides it goes among the snippets rather than the files. */
2
+ declare const isSnippetFile: (file: File) => Promise<boolean>;
3
+ export default isSnippetFile;
@@ -10,7 +10,7 @@ export type ResourcesCdnBucketProps = {
10
10
  onChange?: () => void;
11
11
  };
12
12
  /**
13
- * One bucket of a CDN and the space's files in it. A public one takes uploads — plugins, images, templates — and serves
13
+ * One bucket of a CDN and the space's files in it. A public one takes uploads — plugins, images, snippets — and serves
14
14
  * them at its domain; a private one keeps the space's server code, written when it is saved or pushed, and serves
15
15
  * nothing.
16
16
  */
@@ -4,9 +4,6 @@ export type RuntimeCodeNoteProps = {
4
4
  /** How long a runtime may go unused before it is stopped; 0 when the platform never stops one. */
5
5
  idleMinutes: number;
6
6
  };
7
- /**
8
- * Where a runtime's code comes from, said where the question comes up: nothing in the builder changes it. It is a
9
- * project of the space owner's own — Node, its packages — packed and pushed from there, and published with the space.
10
- */
7
+ /** How a runtime gets here: it is written in a project of the author's and pushed, never edited in the builder. */
11
8
  declare const RuntimeCodeNote: ({ pushed, idleMinutes }: RuntimeCodeNoteProps) => import('react').JSX.Element;
12
9
  export default RuntimeCodeNote;
@@ -10,7 +10,8 @@ export type SpaceIssuesProps = {
10
10
  };
11
11
  /**
12
12
  * Everything the linter found in the saved space: errors first, since they are what stops a publish, then what renders
13
- * but most likely not as meant. Each one names its element and takes you to it.
13
+ * but most likely not as meant, then the shorter ways to the same page. Each one names its elements and takes you to
14
+ * them.
14
15
  */
15
16
  declare const SpaceIssues: ({ issues, intro, onDismiss, onFix }: SpaceIssuesProps) => import('react').JSX.Element;
16
17
  export default SpaceIssues;
@@ -0,0 +1,12 @@
1
+ export type ElementChipProps = {
2
+ elementId: string;
3
+ /** Called once the element is on screen, so whatever holds the list can get out of the way. */
4
+ onDismiss: () => void;
5
+ };
6
+ /**
7
+ * An element named in the list, and the way to it: a link that opens its page or layout, unfolds the tree down to it
8
+ * and selects it. One deleted since the space was saved is named but not linked — there is nothing left to take anyone
9
+ * to, and what named it goes away with the next save.
10
+ */
11
+ declare const ElementChip: ({ elementId, onDismiss }: ElementChipProps) => import('react').JSX.Element;
12
+ export default ElementChip;
@@ -0,0 +1,3 @@
1
+ import { default as ElementChip } from './ElementChip';
2
+ export * from './ElementChip';
3
+ export default ElementChip;
@@ -0,0 +1,12 @@
1
+ export type IssueFixProps = {
2
+ /** What to write instead, as the code table has it: Markdown whose `code` is in backticks. */
3
+ fix: string;
4
+ /** What leads it — a problem's fix, or a suggestion's short way. */
5
+ label?: string;
6
+ };
7
+ /**
8
+ * What to write instead, under the problem it settles — the row the issue's code is filed under, so the panel says the
9
+ * fix the authoring page and an agent over MCP are told, not one of its own.
10
+ */
11
+ declare const IssueFix: ({ fix, label }: IssueFixProps) => import('react').JSX.Element;
12
+ export default IssueFix;
@@ -0,0 +1,3 @@
1
+ import { default as IssueFix } from './IssueFix';
2
+ export * from './IssueFix';
3
+ export default IssueFix;
@@ -6,10 +6,6 @@ export type IssueItemProps = {
6
6
  /** Called once the element is on screen, so whatever holds the list can get out of the way. */
7
7
  onDismiss: () => void;
8
8
  };
9
- /**
10
- * One issue, and the way to it: the element it names is a link that opens its page or layout, unfolds the tree down
11
- * to it and selects it. An element deleted since the space was saved is named but not linked — there is nothing left
12
- * to take anyone to, and the issue goes away with the next save.
13
- */
9
+ /** One issue, what to write instead, and the element it names — a link to it. */
14
10
  declare const IssueItem: ({ issue, severity, onDismiss }: IssueItemProps) => import('react').JSX.Element;
15
11
  export default IssueItem;
@@ -0,0 +1,8 @@
1
+ import { TSpaceSuggestion } from '@plitzi/sdk-shared';
2
+ export type SuggestionGroupProps = {
3
+ suggestions: TSpaceSuggestion[];
4
+ onDismiss: () => void;
5
+ };
6
+ /** The shorter ways to the same page, the ones that save the most elements first. Nothing in it blocks a publish. */
7
+ declare const SuggestionGroup: ({ suggestions, onDismiss }: SuggestionGroupProps) => import('react').JSX.Element | null;
8
+ export default SuggestionGroup;
@@ -0,0 +1,3 @@
1
+ import { default as SuggestionGroup } from './SuggestionGroup';
2
+ export * from './SuggestionGroup';
3
+ export default SuggestionGroup;
@@ -0,0 +1,12 @@
1
+ import { TSpaceSuggestion } from '@plitzi/sdk-shared';
2
+ export type SuggestionItemProps = {
3
+ suggestion: TSpaceSuggestion;
4
+ /** Called once an element is on screen, so whatever holds the list can get out of the way. */
5
+ onDismiss: () => void;
6
+ };
7
+ /**
8
+ * A shorter way to the same page: what it is, the short way, what taking it saves, and the elements it is about —
9
+ * the copies of a header, the buttons holding a text — each a link to it.
10
+ */
11
+ declare const SuggestionItem: ({ suggestion, onDismiss }: SuggestionItemProps) => import('react').JSX.Element;
12
+ export default SuggestionItem;
@@ -0,0 +1,3 @@
1
+ import { default as SuggestionItem } from './SuggestionItem';
2
+ export * from './SuggestionItem';
3
+ export default SuggestionItem;
@@ -2,3 +2,5 @@ export type IssueSeverity = 'error' | 'warning';
2
2
  export declare const SEVERITY_TEXT: Record<IssueSeverity, string>;
3
3
  export declare const SEVERITY_ICON: Record<IssueSeverity, string>;
4
4
  export declare const MUTED = "text-zinc-500 dark:text-zinc-400";
5
+ /** A suggestion is no problem at all: it reads in the accent, beside the red and the amber of what is wrong. */
6
+ export declare const SUGGESTION_TEXT = "text-indigo-600 dark:text-indigo-400";
@@ -1,6 +1,6 @@
1
1
  declare const _default: {
2
2
  "name": "@plitzi/plitzi-builder",
3
- "version": "0.37.9",
3
+ "version": "0.37.10",
4
4
  "homepage": "./",
5
5
  "license": "AGPL-3.0",
6
6
  "files": [
@@ -34,7 +34,7 @@ declare const _default: {
34
34
  "@fortawesome/fontawesome-free": "^7.3.1",
35
35
  "@plitzi/nexus": "^1.4.0",
36
36
  "@plitzi/plitzi-sdk": "workspace:*",
37
- "@plitzi/plitzi-ui": "^1.6.26",
37
+ "@plitzi/plitzi-ui": "^1.6.29",
38
38
  "@plitzi/sdk-auth": "workspace:*",
39
39
  "@plitzi/sdk-authoring": "workspace:*",
40
40
  "@plitzi/sdk-dev-tools": "workspace:*",
@@ -50,7 +50,6 @@ declare const _default: {
50
50
  "@tanstack/react-virtual": "^3.14.13",
51
51
  "@typescript/vfs": "^1.6.5",
52
52
  "@valtown/codemirror-ts": "^2.3.1",
53
- "@xyflow/react": "^12.11.6",
54
53
  "apollo-upload-client": "^20.0.0",
55
54
  "clsx": "^2.1.1",
56
55
  "comlink": "^4.4.2",