@plitzi/plitzi-builder 0.37.9 → 0.38.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +648 -0
- package/dist/config/index.d.ts +0 -4
- package/dist/index.html +2 -0
- package/dist/modules/AI/components/ChatMessage/components/{AITemplatePreview/AITemplatePreview.d.ts → AISnippetPreview/AISnippetPreview.d.ts} +3 -3
- package/dist/modules/AI/components/ChatMessage/components/{AITemplatePreview/components/AITemplateHeader/AITemplateHeader.d.ts → AISnippetPreview/components/AISnippetHeader/AISnippetHeader.d.ts} +3 -3
- package/dist/modules/AI/components/ChatMessage/components/AISnippetPreview/components/AISnippetHeader/index.d.ts +3 -0
- package/dist/modules/AI/components/ChatMessage/components/AISnippetPreview/index.d.ts +3 -0
- package/dist/modules/AI/hooks/useAiChat.d.ts +2 -1
- package/dist/modules/Actions/ActionsContext.d.ts +0 -1
- package/dist/modules/App/AppContainer/components/NotificationsSettings/NotificationsSettings.d.ts +7 -0
- package/dist/modules/App/AppContainer/components/NotificationsSettings/index.d.ts +2 -0
- package/dist/modules/App/AppContainer/containers/ContainerServer.d.ts +7 -0
- package/dist/modules/App/AppContainer/containers/ContainerSettings.d.ts +1 -0
- package/dist/modules/App/AppContainer/containers/GeneralSettings.d.ts +2 -0
- package/dist/modules/App/AppContext.d.ts +3 -0
- package/dist/modules/App/components/AppHeader/GridButton.d.ts +3 -0
- package/dist/modules/App/components/AppHeader/IssuesButton/helpers.d.ts +2 -0
- package/dist/modules/App/components/EmptyState/EmptyState.d.ts +12 -0
- package/dist/modules/App/components/EmptyState/index.d.ts +3 -0
- package/dist/modules/App/components/PanelSections/PanelSections.d.ts +27 -0
- package/dist/modules/App/components/PanelSections/index.d.ts +3 -0
- package/dist/modules/App/components/ResourceRow/ResourceRow.d.ts +19 -0
- package/dist/modules/App/components/ResourceRow/index.d.ts +3 -0
- package/dist/modules/App/components/SitemapDiagram/SitemapDiagram.d.ts +25 -0
- package/dist/modules/App/components/SitemapDiagram/components/SitemapChip/SitemapChip.d.ts +21 -0
- package/dist/modules/App/components/SitemapDiagram/components/SitemapChip/index.d.ts +3 -0
- package/dist/modules/App/components/SitemapDiagram/components/SitemapLegend/SitemapLegend.d.ts +3 -0
- package/dist/modules/App/components/SitemapDiagram/components/SitemapLegend/index.d.ts +2 -0
- package/dist/modules/App/components/SitemapDiagram/components/SitemapNode/SitemapNode.d.ts +15 -0
- package/dist/modules/App/components/SitemapDiagram/components/SitemapNode/index.d.ts +3 -0
- package/dist/modules/App/components/SitemapDiagram/components/SitemapPath/SitemapPath.d.ts +6 -0
- package/dist/modules/App/components/SitemapDiagram/components/SitemapPath/index.d.ts +3 -0
- package/dist/modules/App/components/SitemapDiagram/components/SitemapToolbar/SitemapToolbar.d.ts +16 -0
- package/dist/modules/App/components/SitemapDiagram/components/SitemapToolbar/index.d.ts +3 -0
- package/dist/modules/App/components/SitemapDiagram/helpers/schemaToSitemap.d.ts +10 -0
- package/dist/modules/App/components/SitemapDiagram/helpers/schemaToSitemap.test.d.ts +1 -0
- package/dist/modules/App/components/SitemapDiagram/helpers/searchSitemap.d.ts +12 -0
- package/dist/modules/App/components/SitemapDiagram/index.d.ts +4 -0
- package/dist/modules/App/components/SitemapDiagram/types.d.ts +36 -0
- package/dist/modules/App/components/ViewPage/ViewPage.d.ts +22 -0
- package/dist/modules/App/components/ViewPage/index.d.ts +3 -0
- package/dist/modules/App/components/ViewSection/ViewSection.d.ts +10 -0
- package/dist/modules/App/components/ViewSection/index.d.ts +3 -0
- package/dist/modules/App/helpers/utils.d.ts +10 -1
- package/dist/modules/App/hooks/useSitemapOpen.d.ts +7 -0
- package/dist/modules/Builder/BuilderHelper.d.ts +4 -4
- package/dist/modules/Builder/BuilderProvider.d.ts +1 -1
- package/dist/modules/Builder/Models/SnippetForm.d.ts +16 -0
- package/dist/modules/Builder/components/BuilderContextMenu/BuilderContextMenuItem.d.ts +6 -1
- package/dist/modules/Builder/components/BuilderElementTools/ElementAnchor.d.ts +11 -0
- package/dist/modules/Builder/components/BuilderElementTools/ElementDefinitionSettings.d.ts +3 -1
- package/dist/modules/Builder/components/BuilderElementTools/ElementFlagGate.d.ts +16 -0
- package/dist/modules/Builder/components/BuilderElementTools/NothingSelected.d.ts +6 -0
- package/dist/modules/Builder/helpers/reuse.d.ts +16 -0
- package/dist/modules/Builder/hooks/useSaveAsSnippet.d.ts +8 -0
- package/dist/modules/Components/Components.d.ts +8 -3
- package/dist/modules/Connectors/ConnectorsContext.d.ts +0 -2
- package/dist/modules/Connectors/helpers/manifestDoc.d.ts +0 -1
- package/dist/modules/Credentials/Credentials.d.ts +0 -7
- package/dist/modules/Elements/hooks/useDragElement.d.ts +2 -2
- package/dist/modules/Flags/Flags.d.ts +9 -0
- package/dist/modules/Flags/components/FlagForm/FlagForm.d.ts +15 -0
- package/dist/modules/Flags/components/FlagForm/FlagRule.d.ts +11 -0
- package/dist/modules/Flags/components/FlagForm/index.d.ts +3 -0
- package/dist/modules/Flags/components/FlagForm/ruleGroup.d.ts +5 -0
- package/dist/modules/Flags/components/FlagForm/ruleGroup.test.d.ts +1 -0
- package/dist/modules/Flags/components/FlagItem/FlagItem.d.ts +14 -0
- package/dist/modules/Flags/components/FlagItem/FlagPreviewOption.d.ts +13 -0
- package/dist/modules/Flags/components/FlagItem/FlagPreviewToggle.d.ts +9 -0
- package/dist/modules/Flags/components/FlagItem/index.d.ts +3 -0
- package/dist/modules/Flags/components/PublishFlagsForm/PublishFlagsForm.d.ts +21 -0
- package/dist/modules/Flags/components/PublishFlagsForm/index.d.ts +3 -0
- package/dist/modules/Flags/helpers/flagRuleFields.d.ts +11 -0
- package/dist/modules/Flags/index.d.ts +3 -0
- package/dist/modules/History/History.d.ts +5 -1
- package/dist/modules/History/components/ChangeGroup/ChangeGroup.d.ts +2 -1
- package/dist/modules/History/components/ChangeLine/ChangeLine.d.ts +3 -1
- package/dist/modules/History/components/SaveDetail/SaveDetail.d.ts +2 -1
- package/dist/modules/Keyboard/index.d.ts +4 -0
- package/dist/modules/Keyboard/platform.d.ts +7 -0
- package/dist/modules/Network/hooks/useBuilderNetwork.d.ts +12 -0
- package/dist/modules/Resources/components/Resource/subTypes/ResourceSnippet/ResourceSnippet.d.ts +13 -0
- package/dist/modules/Resources/components/Resource/subTypes/ResourceSnippet/SnippetContent.d.ts +8 -0
- package/dist/modules/Resources/components/Resource/subTypes/ResourceSnippet/UnreadableSnippet.d.ts +12 -0
- package/dist/modules/Resources/components/Resource/subTypes/ResourceSnippet/index.d.ts +3 -0
- package/dist/modules/Resources/components/ResourceManager/helpers/isSnippetFile.d.ts +3 -0
- package/dist/modules/Resources/components/ResourceManager/helpers/isSnippetFile.test.d.ts +1 -0
- package/dist/modules/Resources/components/ResourcesCdnBucket/ResourcesCdnBucket.d.ts +1 -1
- package/dist/modules/Runtime/components/RuntimeCodeNote/RuntimeCodeNote.d.ts +1 -4
- package/dist/modules/Space/components/SpaceIssues/SpaceIssues.d.ts +2 -1
- package/dist/modules/Space/components/SpaceIssues/components/ElementChip/ElementChip.d.ts +12 -0
- package/dist/modules/Space/components/SpaceIssues/components/ElementChip/index.d.ts +3 -0
- package/dist/modules/Space/components/SpaceIssues/components/IssueFix/IssueFix.d.ts +12 -0
- package/dist/modules/Space/components/SpaceIssues/components/IssueFix/index.d.ts +3 -0
- package/dist/modules/Space/components/SpaceIssues/components/IssueItem/IssueItem.d.ts +1 -5
- package/dist/modules/Space/components/SpaceIssues/components/SuggestionGroup/SuggestionGroup.d.ts +8 -0
- package/dist/modules/Space/components/SpaceIssues/components/SuggestionGroup/index.d.ts +3 -0
- package/dist/modules/Space/components/SpaceIssues/components/SuggestionItem/SuggestionItem.d.ts +12 -0
- package/dist/modules/Space/components/SpaceIssues/components/SuggestionItem/index.d.ts +3 -0
- package/dist/modules/Space/components/SpaceIssues/helpers.d.ts +2 -0
- package/dist/package.json.d.ts +16 -17
- package/dist/plitzi-builder-dev-vendor.js.map +1 -1
- package/dist/plitzi-builder-dev-vendor.js.map.gz +0 -0
- package/dist/plitzi-builder.css +1 -1
- package/dist/plitzi-builder.css.gz +0 -0
- package/dist/plitzi-builder.js +2803 -2496
- package/dist/plitzi-builder.js.gz +0 -0
- package/dist/plitzi-functions-worker.js +3 -3
- package/package.json +30 -31
- package/dist/modules/AI/components/ChatInput/helpers.d.ts +0 -1
- package/dist/modules/AI/components/ChatMessage/components/AITemplatePreview/components/AITemplateHeader/index.d.ts +0 -3
- package/dist/modules/AI/components/ChatMessage/components/AITemplatePreview/index.d.ts +0 -3
- package/dist/modules/App/AppContainer/containers/ContainerActions.d.ts +0 -2
- package/dist/modules/App/AppContainer/containers/ContainerConnectors.d.ts +0 -2
- package/dist/modules/App/AppContainer/containers/ContainerCredentials.d.ts +0 -2
- package/dist/modules/App/AppContainer/containers/ContainerFunctions.d.ts +0 -2
- package/dist/modules/App/AppContainer/containers/ContainerRuntime.d.ts +0 -2
- package/dist/modules/App/AppContainer/containers/ContainerVisitors.d.ts +0 -2
- package/dist/modules/App/components/WorkflowDiagram/WorkflowDiagram.d.ts +0 -37
- package/dist/modules/App/components/WorkflowDiagram/components/CustomEdge.d.ts +0 -3
- package/dist/modules/App/components/WorkflowDiagram/components/CustomNode.d.ts +0 -5
- package/dist/modules/App/components/WorkflowDiagram/helpers/schemaToSitemap.d.ts +0 -11
- package/dist/modules/App/components/WorkflowDiagram/helpers/sitemapToFlow.d.ts +0 -20
- package/dist/modules/App/components/WorkflowDiagram/index.d.ts +0 -3
- package/dist/modules/Builder/Models/TemplateForm.d.ts +0 -16
- package/dist/modules/Resources/components/Resource/subTypes/ResourceTemplate/ResourceTemplate.d.ts +0 -13
- package/dist/modules/Resources/components/Resource/subTypes/ResourceTemplate/TemplateContent.d.ts +0 -8
- package/dist/modules/Resources/components/Resource/subTypes/ResourceTemplate/index.d.ts +0 -3
- package/dist/patches/useSyncExternalStoreWithSelector.d.ts +0 -4
- /package/dist/modules/AI/components/ChatMessage/components/{AITemplatePreview/components/AITemplateHeader → AISnippetPreview/components/AISnippetHeader}/DisplayModeButton.d.ts +0 -0
- /package/dist/modules/AI/components/ChatMessage/components/{AITemplatePreview → AISnippetPreview}/components/ConfirmPanel/ConfirmPanel.d.ts +0 -0
- /package/dist/modules/AI/components/ChatMessage/components/{AITemplatePreview → AISnippetPreview}/components/ConfirmPanel/index.d.ts +0 -0
- /package/dist/modules/AI/components/ChatMessage/components/{AITemplatePreview → AISnippetPreview}/helpers.d.ts +0 -0
- /package/dist/modules/{AI/components → Keyboard}/KeyboardKey/KeyboardKey.d.ts +0 -0
- /package/dist/modules/{AI/components → Keyboard}/KeyboardKey/index.d.ts +0 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The two ways part of a page is reused, as the builder shows them wherever it offers them — the canvas overlay, the
|
|
3
|
+
* context menu, the Components panel: one icon and one line each, said once, so the two never end up looking alike.
|
|
4
|
+
*
|
|
5
|
+
* What tells them apart is what happens after: a component stays linked, a snippet is a copy.
|
|
6
|
+
*/
|
|
7
|
+
export declare const REUSE: {
|
|
8
|
+
readonly component: {
|
|
9
|
+
readonly icon: "fa-solid fa-cube";
|
|
10
|
+
readonly hint: "reusable, and editing it updates every instance";
|
|
11
|
+
};
|
|
12
|
+
readonly snippet: {
|
|
13
|
+
readonly icon: "fa-solid fa-object-group";
|
|
14
|
+
readonly hint: "a copy to drop anywhere, not linked to where it came from";
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Element } from '@plitzi/sdk-shared';
|
|
2
|
+
/**
|
|
3
|
+
* Saves an element on the canvas as a snippet: asks for its name and the bucket it goes in, uploads it, and says how
|
|
4
|
+
* that went — saved only once the upload answered, so a failed one is never announced as done. Returns whether it was
|
|
5
|
+
* saved.
|
|
6
|
+
*/
|
|
7
|
+
declare const useSaveAsSnippet: () => (element: Element) => Promise<boolean>;
|
|
8
|
+
export default useSaveAsSnippet;
|
|
@@ -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
|
|
3
|
-
*
|
|
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 {
|
|
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?:
|
|
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,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 @@
|
|
|
1
|
+
export {};
|
|
@@ -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,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,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>;
|
|
@@ -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,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;
|
package/dist/modules/Resources/components/Resource/subTypes/ResourceSnippet/ResourceSnippet.d.ts
ADDED
|
@@ -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;
|
package/dist/modules/Resources/components/Resource/subTypes/ResourceSnippet/SnippetContent.d.ts
ADDED
|
@@ -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;
|
package/dist/modules/Resources/components/Resource/subTypes/ResourceSnippet/UnreadableSnippet.d.ts
ADDED
|
@@ -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 @@
|
|
|
1
|
+
export {};
|
|
@@ -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,
|
|
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
|
|
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,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;
|
|
@@ -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;
|
package/dist/modules/Space/components/SpaceIssues/components/SuggestionGroup/SuggestionGroup.d.ts
ADDED
|
@@ -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;
|
package/dist/modules/Space/components/SpaceIssues/components/SuggestionItem/SuggestionItem.d.ts
ADDED
|
@@ -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;
|
|
@@ -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";
|
package/dist/package.json.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
"name": "@plitzi/plitzi-builder",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.38.1",
|
|
4
4
|
"homepage": "./",
|
|
5
5
|
"license": "AGPL-3.0",
|
|
6
6
|
"files": [
|
|
@@ -27,14 +27,14 @@ declare const _default: {
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@apollo/client": "^4.3.1",
|
|
30
|
-
"@codemirror/autocomplete": "^6",
|
|
31
|
-
"@codemirror/lint": "^6",
|
|
32
|
-
"@codemirror/state": "^6",
|
|
33
|
-
"@codemirror/view": "^6",
|
|
30
|
+
"@codemirror/autocomplete": "^6.20.3",
|
|
31
|
+
"@codemirror/lint": "^6.9.7",
|
|
32
|
+
"@codemirror/state": "^6.7.6",
|
|
33
|
+
"@codemirror/view": "^6.43.13",
|
|
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.
|
|
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,15 +50,14 @@ 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",
|
|
57
56
|
"graphql": "^17.0.2",
|
|
58
|
-
"graphql-ws": "^6.
|
|
59
|
-
"immer": "^11.1.
|
|
57
|
+
"graphql-ws": "^6.3.0",
|
|
58
|
+
"immer": "^11.1.21",
|
|
60
59
|
"jszip": "^3.10.2",
|
|
61
|
-
"react-hook-form": "^7.
|
|
60
|
+
"react-hook-form": "^7.89.0",
|
|
62
61
|
"react-router-dom": "^7.18.4",
|
|
63
62
|
"swr": "^2.5.1",
|
|
64
63
|
"uuid": "^14.0.2",
|
|
@@ -84,7 +83,7 @@ declare const _default: {
|
|
|
84
83
|
"css-loader": "^7.1.5",
|
|
85
84
|
"eslint": "^9.39.5",
|
|
86
85
|
"eslint-plugin-import": "^2.32.0",
|
|
87
|
-
"flow-bin": "^0.
|
|
86
|
+
"flow-bin": "^0.334.0",
|
|
88
87
|
"postcss": "^8.5.28",
|
|
89
88
|
"postcss-loader": "^8.2.1",
|
|
90
89
|
"postcss-scss": "^4.0.9",
|
|
@@ -94,20 +93,20 @@ declare const _default: {
|
|
|
94
93
|
"react-dom": "^19.3.0",
|
|
95
94
|
"react-refresh": "^0.19.0",
|
|
96
95
|
"react-test-renderer": "^19.3.0",
|
|
97
|
-
"sass": "^1.105.
|
|
98
|
-
"sass-embedded": "^1.105.
|
|
96
|
+
"sass": "^1.105.1",
|
|
97
|
+
"sass-embedded": "^1.105.1",
|
|
99
98
|
"sass-loader": "^17.0.1",
|
|
100
|
-
"stylelint": "^17.
|
|
99
|
+
"stylelint": "^17.16.0",
|
|
101
100
|
"stylelint-order": "^8.1.1",
|
|
102
101
|
"stylelint-scss": "^7.3.0",
|
|
103
102
|
"terser": "^5.51.2",
|
|
104
103
|
"typescript": "^6.0.3",
|
|
105
|
-
"vite": "^8.3.
|
|
106
|
-
"vite-plugin-dts": "^5.1.
|
|
104
|
+
"vite": "^8.3.2",
|
|
105
|
+
"vite-plugin-dts": "^5.1.2",
|
|
107
106
|
"vite-plugin-ejs": "^2.0.0",
|
|
108
107
|
"vite-plugin-mkcert": "^2.1.0",
|
|
109
108
|
"vite-plugin-react": "^4.0.1",
|
|
110
|
-
"vitest": "^5.0.
|
|
109
|
+
"vitest": "^5.0.3"
|
|
111
110
|
},
|
|
112
111
|
"scripts": {
|
|
113
112
|
"start": "vite dev --mode development",
|