@plitzi/plitzi-builder 0.37.8 → 0.37.9

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 (103) hide show
  1. package/CHANGELOG.md +247 -0
  2. package/dist/index.html +2 -2
  3. package/dist/modules/App/components/AppHeader/QuotaBreakdown.d.ts +7 -6
  4. package/dist/modules/App/components/VersionContents/PluginList.d.ts +7 -0
  5. package/dist/modules/App/components/VersionContents/VersionContents.d.ts +14 -0
  6. package/dist/modules/App/components/VersionContents/helpers.d.ts +8 -0
  7. package/dist/modules/App/components/VersionContents/helpers.test.d.ts +1 -0
  8. package/dist/modules/App/components/VersionContents/index.d.ts +2 -0
  9. package/dist/modules/App/components/VersionContents/useVersionContents.d.ts +8 -0
  10. package/dist/modules/Builder/BuilderProvider.d.ts +1 -1
  11. package/dist/modules/Components/Components.d.ts +6 -0
  12. package/dist/modules/Components/components/ComponentBanner/ComponentBanner.d.ts +7 -0
  13. package/dist/modules/Components/components/ComponentBanner/index.d.ts +1 -0
  14. package/dist/modules/Components/components/ComponentForm/ComponentForm.d.ts +19 -0
  15. package/dist/modules/Components/components/ComponentForm/SlotChoice.d.ts +8 -0
  16. package/dist/modules/Components/components/ComponentForm/index.d.ts +1 -0
  17. package/dist/modules/Components/components/ComponentItem/ComponentItem.d.ts +12 -0
  18. package/dist/modules/Components/components/ComponentItem/index.d.ts +1 -0
  19. package/dist/modules/Components/components/InstanceTools/InstanceTools.d.ts +10 -0
  20. package/dist/modules/Components/components/InstanceTools/SlotRow.d.ts +13 -0
  21. package/dist/modules/Components/components/InstanceTools/index.d.ts +1 -0
  22. package/dist/modules/Components/components/PropsEditor/PropRow.d.ts +14 -0
  23. package/dist/modules/Components/components/PropsEditor/PropsEditor.d.ts +11 -0
  24. package/dist/modules/Components/components/PropsEditor/index.d.ts +2 -0
  25. package/dist/modules/Components/helpers.d.ts +17 -0
  26. package/dist/modules/Components/helpers.test.d.ts +1 -0
  27. package/dist/modules/Components/index.d.ts +2 -0
  28. package/dist/modules/Components/slotChoices.d.ts +9 -0
  29. package/dist/modules/Components/useOpenComponent.d.ts +13 -0
  30. package/dist/modules/Components/useSaveAsComponent.d.ts +7 -0
  31. package/dist/modules/Elements/ElementHelper.d.ts +3 -2
  32. package/dist/modules/Elements/hooks/useDragElement.d.ts +3 -2
  33. package/dist/modules/Functions/Functions.d.ts +4 -3
  34. package/dist/modules/Functions/components/FunctionInspector/FunctionInspector.d.ts +20 -0
  35. package/dist/modules/Functions/components/FunctionInspector/components/InspectorSection/InspectorSection.d.ts +10 -0
  36. package/dist/modules/Functions/components/FunctionInspector/components/InspectorSection/index.d.ts +3 -0
  37. package/dist/modules/Functions/components/FunctionInspector/components/TaskTest/TaskTest.d.ts +16 -0
  38. package/dist/modules/Functions/components/FunctionInspector/components/TaskTest/index.d.ts +3 -0
  39. package/dist/modules/Functions/components/FunctionInspector/components/TimeLimit/TimeLimit.d.ts +16 -0
  40. package/dist/modules/Functions/components/FunctionInspector/components/TimeLimit/index.d.ts +3 -0
  41. package/dist/modules/Functions/components/FunctionInspector/components/TryField/TryField.d.ts +10 -0
  42. package/dist/modules/Functions/components/FunctionInspector/components/TryField/index.d.ts +3 -0
  43. package/dist/modules/Functions/components/FunctionInspector/components/TryResult/TryResult.d.ts +9 -0
  44. package/dist/modules/Functions/components/FunctionInspector/components/TryResult/index.d.ts +3 -0
  45. package/dist/modules/Functions/components/FunctionInspector/index.d.ts +3 -0
  46. package/dist/modules/Functions/components/FunctionsEditor/FunctionsEditor.d.ts +20 -0
  47. package/dist/modules/Functions/components/FunctionsEditor/index.d.ts +3 -0
  48. package/dist/modules/Functions/components/FunctionsGuide/FunctionsGuide.d.ts +7 -0
  49. package/dist/modules/Functions/components/FunctionsGuide/index.d.ts +3 -0
  50. package/dist/modules/Functions/components/FunctionsHeader/FunctionsHeader.d.ts +17 -0
  51. package/dist/modules/Functions/components/FunctionsHeader/index.d.ts +3 -0
  52. package/dist/modules/Functions/components/FunctionsProblems/FunctionsProblems.d.ts +2 -1
  53. package/dist/modules/Functions/components/FunctionsSidebar/FunctionsSidebar.d.ts +30 -0
  54. package/dist/modules/Functions/components/FunctionsSidebar/components/FileItem/FileItem.d.ts +14 -0
  55. package/dist/modules/Functions/components/FunctionsSidebar/components/FileItem/index.d.ts +3 -0
  56. package/dist/modules/Functions/components/FunctionsSidebar/components/FolderItem/FolderItem.d.ts +7 -0
  57. package/dist/modules/Functions/components/FunctionsSidebar/components/FolderItem/index.d.ts +3 -0
  58. package/dist/modules/Functions/components/FunctionsSidebar/components/NewFile/NewFile.d.ts +7 -0
  59. package/dist/modules/Functions/components/FunctionsSidebar/components/NewFile/index.d.ts +3 -0
  60. package/dist/modules/Functions/components/FunctionsSidebar/components/NewTask/NewTask.d.ts +13 -0
  61. package/dist/modules/Functions/components/FunctionsSidebar/components/NewTask/index.d.ts +3 -0
  62. package/dist/modules/Functions/components/FunctionsSidebar/components/RouteItem/RouteItem.d.ts +9 -0
  63. package/dist/modules/Functions/components/FunctionsSidebar/components/RouteItem/index.d.ts +3 -0
  64. package/dist/modules/Functions/components/FunctionsSidebar/components/SidebarSection/SidebarSection.d.ts +13 -0
  65. package/dist/modules/Functions/components/FunctionsSidebar/components/SidebarSection/index.d.ts +3 -0
  66. package/dist/modules/Functions/components/FunctionsSidebar/components/TaskItem/TaskItem.d.ts +16 -0
  67. package/dist/modules/Functions/components/FunctionsSidebar/components/TaskItem/index.d.ts +3 -0
  68. package/dist/modules/Functions/components/FunctionsSidebar/index.d.ts +3 -0
  69. package/dist/modules/Functions/components/FunctionsWelcome/FunctionsWelcome.d.ts +6 -0
  70. package/dist/modules/Functions/components/FunctionsWelcome/index.d.ts +3 -0
  71. package/dist/modules/Functions/editor/paths.d.ts +9 -0
  72. package/dist/modules/Functions/editor/source.d.ts +60 -0
  73. package/dist/modules/Functions/editor/source.test.d.ts +1 -0
  74. package/dist/modules/Functions/editor/typescriptWorker.d.ts +26 -0
  75. package/dist/modules/Functions/editor/useFunctionsTypeScript.d.ts +5 -2
  76. package/dist/modules/Functions/helpers.d.ts +119 -1
  77. package/dist/modules/Interactions/components/Workflow/helpers/nodeOptions.d.ts +22 -0
  78. package/dist/modules/Interactions/components/Workflow/helpers/nodeOptions.test.d.ts +1 -0
  79. package/dist/modules/Queue/QueueContext.d.ts +2 -5
  80. package/dist/modules/Space/hooks/useSpaceUsage.d.ts +36 -0
  81. package/dist/modules/Undoable/UndoableContext.d.ts +2 -5
  82. package/dist/package.json.d.ts +4 -3
  83. package/dist/plitzi-builder.css +1 -1
  84. package/dist/plitzi-builder.css.gz +0 -0
  85. package/dist/plitzi-builder.js +1564 -1519
  86. package/dist/plitzi-builder.js.gz +0 -0
  87. package/dist/plitzi-functions-worker.js +3 -3
  88. package/package.json +18 -17
  89. package/dist/modules/Builder/BuilderPopup.d.ts +0 -6
  90. package/dist/modules/Functions/components/FunctionsDeclared/FunctionsDeclared.d.ts +0 -10
  91. package/dist/modules/Functions/components/FunctionsDeclared/index.d.ts +0 -3
  92. package/dist/modules/Functions/components/FunctionsFiles/FunctionsFiles.d.ts +0 -11
  93. package/dist/modules/Functions/components/FunctionsFiles/index.d.ts +0 -3
  94. package/dist/modules/Functions/components/FunctionsTry/FunctionsTry.d.ts +0 -13
  95. package/dist/modules/Functions/components/FunctionsTry/index.d.ts +0 -3
  96. package/dist/modules/Segments/Segment.d.ts +0 -11
  97. package/dist/modules/Segments/Segments.d.ts +0 -2
  98. package/dist/modules/Segments/SegmentsContextProvider.d.ts +0 -7
  99. package/dist/modules/Segments/SegmentsReducer.d.ts +0 -133
  100. package/dist/modules/Segments/index.d.ts +0 -3
  101. package/dist/modules/Segments/models/PublishForm.d.ts +0 -19
  102. package/dist/modules/Segments/models/SegmentForm.d.ts +0 -17
  103. package/dist/modules/Space/hooks/useAccountUsage.d.ts +0 -60
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plitzi/plitzi-builder",
3
- "version": "0.37.8",
3
+ "version": "0.37.9",
4
4
  "homepage": "./",
5
5
  "license": "AGPL-3.0",
6
6
  "files": [
@@ -30,22 +30,23 @@
30
30
  "@codemirror/autocomplete": "^6",
31
31
  "@codemirror/lint": "^6",
32
32
  "@codemirror/state": "^6",
33
+ "@codemirror/view": "^6",
33
34
  "@fortawesome/fontawesome-free": "^7.3.1",
34
- "@plitzi/nexus": "^1.3.1",
35
- "@plitzi/plitzi-sdk": "0.37.8",
36
- "@plitzi/plitzi-ui": "^1.6.24",
37
- "@plitzi/sdk-auth": "0.37.8",
38
- "@plitzi/sdk-authoring": "0.37.8",
39
- "@plitzi/sdk-dev-tools": "0.37.8",
40
- "@plitzi/sdk-elements": "0.37.8",
41
- "@plitzi/sdk-event-bridge": "0.37.8",
42
- "@plitzi/sdk-interactions": "0.37.8",
43
- "@plitzi/sdk-navigation": "0.37.8",
44
- "@plitzi/sdk-plugins": "0.37.8",
45
- "@plitzi/sdk-schema": "0.37.8",
46
- "@plitzi/sdk-shared": "0.37.8",
47
- "@plitzi/sdk-style": "0.37.8",
48
- "@plitzi/sdk-variables": "0.37.8",
35
+ "@plitzi/nexus": "^1.4.0",
36
+ "@plitzi/plitzi-sdk": "0.37.9",
37
+ "@plitzi/plitzi-ui": "^1.6.26",
38
+ "@plitzi/sdk-auth": "0.37.9",
39
+ "@plitzi/sdk-authoring": "0.37.9",
40
+ "@plitzi/sdk-dev-tools": "0.37.9",
41
+ "@plitzi/sdk-elements": "0.37.9",
42
+ "@plitzi/sdk-event-bridge": "0.37.9",
43
+ "@plitzi/sdk-interactions": "0.37.9",
44
+ "@plitzi/sdk-navigation": "0.37.9",
45
+ "@plitzi/sdk-plugins": "0.37.9",
46
+ "@plitzi/sdk-schema": "0.37.9",
47
+ "@plitzi/sdk-shared": "0.37.9",
48
+ "@plitzi/sdk-style": "0.37.9",
49
+ "@plitzi/sdk-variables": "0.37.9",
49
50
  "@tanstack/react-virtual": "^3.14.13",
50
51
  "@typescript/vfs": "^1.6.5",
51
52
  "@valtown/codemirror-ts": "^2.3.1",
@@ -78,7 +79,7 @@
78
79
  "@babel/polyfill": "^7.12.1",
79
80
  "@babel/preset-env": "^8.0.6",
80
81
  "@babel/preset-react": "^8.0.1",
81
- "@plitzi/sdk-server": "0.37.8",
82
+ "@plitzi/sdk-server": "0.37.9",
82
83
  "@tailwindcss/postcss": "^4.3.3",
83
84
  "css-loader": "^7.1.5",
84
85
  "eslint": "^9.39.5",
@@ -1,6 +0,0 @@
1
- export type BuilderPopupProps = {
2
- previewMode?: boolean;
3
- segmentIdentifier?: string;
4
- };
5
- declare const BuilderPopup: ({ previewMode, segmentIdentifier }: BuilderPopupProps) => import('react').JSX.Element;
6
- export default BuilderPopup;
@@ -1,10 +0,0 @@
1
- import { FunctionsManifest } from '@plitzi/sdk-shared';
2
- export type FunctionsDeclaredProps = {
3
- manifest: FunctionsManifest;
4
- };
5
- /**
6
- * What the saved code declares — its steps, its routes and every host it may reach — so whoever reviews the space sees
7
- * what it does and where it goes without reading the code.
8
- */
9
- declare const FunctionsDeclared: ({ manifest }: FunctionsDeclaredProps) => import('react').JSX.Element;
10
- export default FunctionsDeclared;
@@ -1,3 +0,0 @@
1
- import { default as FunctionsDeclared } from './FunctionsDeclared';
2
- export * from './FunctionsDeclared';
3
- export default FunctionsDeclared;
@@ -1,11 +0,0 @@
1
- export type FunctionsFilesProps = {
2
- files: string[];
3
- selected: string;
4
- /** The files whose text differs from what was last saved. */
5
- modified: string[];
6
- onSelect: (file: string) => void;
7
- onAdd: (file: string) => void;
8
- onRemove: (file: string) => void;
9
- };
10
- declare const FunctionsFiles: ({ files, selected, modified, onSelect, onAdd, onRemove }: FunctionsFilesProps) => import('react').JSX.Element;
11
- export default FunctionsFiles;
@@ -1,3 +0,0 @@
1
- import { default as FunctionsFiles } from './FunctionsFiles';
2
- export * from './FunctionsFiles';
3
- export default FunctionsFiles;
@@ -1,13 +0,0 @@
1
- import { ActionRunReport, FunctionTaskManifest } from '@plitzi/sdk-shared';
2
- export type FunctionsTryProps = {
3
- tasks: FunctionTaskManifest[];
4
- /** Why it cannot run now — unsaved edits, say — or nothing. */
5
- disabledReason?: string;
6
- onTry: (task: string, params: Record<string, unknown>) => Promise<ActionRunReport | undefined>;
7
- };
8
- /**
9
- * One task of the saved draft, run in the sandbox as you — the value it answers, what it logged, how long it took and
10
- * why it failed. Its fetches and its writes are real, and it counts like any other run.
11
- */
12
- declare const FunctionsTry: ({ tasks, disabledReason, onTry }: FunctionsTryProps) => import('react').JSX.Element;
13
- export default FunctionsTry;
@@ -1,3 +0,0 @@
1
- import { default as FunctionsTry } from './FunctionsTry';
2
- export * from './FunctionsTry';
3
- export default FunctionsTry;
@@ -1,11 +0,0 @@
1
- import { SchemaVariable, Segment as TSegment } from '@plitzi/sdk-shared';
2
- export type SegmentProps = {
3
- id?: string;
4
- identifier?: string;
5
- name?: string;
6
- description?: string;
7
- variables?: SchemaVariable[];
8
- onParentRefresh?: (identifier: string, segment?: TSegment) => void;
9
- };
10
- declare const Segment: ({ id, identifier, name, description, variables, onParentRefresh }: SegmentProps) => import('react').JSX.Element;
11
- export default Segment;
@@ -1,2 +0,0 @@
1
- declare const Segments: () => import('react').JSX.Element;
2
- export default Segments;
@@ -1,7 +0,0 @@
1
- import { ReactNode } from 'react';
2
- export type SegmentsContextProviderProps = {
3
- children: ReactNode;
4
- includeSubscriptions?: boolean;
5
- };
6
- declare const SegmentsContextProvider: ({ children, includeSubscriptions }: SegmentsContextProviderProps) => import('react').JSX.Element;
7
- export default SegmentsContextProvider;
@@ -1,133 +0,0 @@
1
- import { DisplayMode, Element, ReducerActionOrigin, SchemaVariable, Segment, Style, StyleItem, TagType, DropPosition, StyleVariableCategory, StyleVariableValue, StyleCategory, StyleTarget } from '@plitzi/sdk-shared';
2
- export declare const SegmentsActions: {
3
- readonly SEGMENTS_ADD: "SEGMENTS_ADD";
4
- readonly SEGMENTS_UPDATE: "SEGMENTS_UPDATE";
5
- readonly SEGMENTS_REMOVE: "SEGMENTS_REMOVE";
6
- readonly SEGMENTS_ADD_TEMPLATE: "SEGMENTS_ADD_TEMPLATE";
7
- readonly SEGMENTS_ADD_ELEMENT: "SEGMENTS_ADD_ELEMENT";
8
- readonly SEGMENTS_REMOVE_ELEMENT: "SEGMENTS_REMOVE_ELEMENT";
9
- readonly SEGMENTS_MOVE_ELEMENT: "SEGMENTS_MOVE_ELEMENT";
10
- readonly SEGMENTS_CLONE_ELEMENT: "SEGMENTS_CLONE_ELEMENT";
11
- readonly SEGMENTS_UPDATE_ELEMENT: "SEGMENTS_UPDATE_ELEMENT";
12
- readonly SEGMENTS_RENAME_ELEMENT: "SEGMENTS_RENAME_ELEMENT";
13
- readonly SEGMENTS_UPDATE_ELEMENTS: "SEGMENTS_UPDATE_ELEMENTS";
14
- readonly SEGMENTS_SPACE_ADD_VARIABLE: "SEGMENTS_SPACE_ADD_VARIABLE";
15
- readonly SEGMENTS_SPACE_UPDATE_VARIABLE: "SEGMENTS_SPACE_UPDATE_VARIABLE";
16
- readonly SEGMENTS_SPACE_REMOVE_VARIABLE: "SEGMENTS_SPACE_REMOVE_VARIABLE";
17
- readonly SEGMENTS_STYLE_ADD_SELECTOR: "SEGMENTS_STYLE_ADD_SELECTOR";
18
- readonly SEGMENTS_STYLE_UPDATE_SELECTOR: "SEGMENTS_STYLE_UPDATE_SELECTOR";
19
- readonly SEGMENTS_STYLE_REMOVE_SELECTOR: "SEGMENTS_STYLE_REMOVE_SELECTOR";
20
- readonly SEGMENTS_STYLE_REMOVE_SELECTORS: "SEGMENTS_STYLE_REMOVE_SELECTORS";
21
- readonly SEGMENTS_STYLE_ADD_SELECTOR_VARIABLE: "SEGMENTS_STYLE_ADD_SELECTOR_VARIABLE";
22
- readonly SEGMENTS_STYLE_UPDATE_SELECTOR_VARIABLE: "SEGMENTS_STYLE_UPDATE_SELECTOR_VARIABLE";
23
- readonly SEGMENTS_STYLE_REMOVE_SELECTOR_VARIABLE: "SEGMENTS_STYLE_REMOVE_SELECTOR_VARIABLE";
24
- readonly SEGMENTS_STYLE_ADD_VARIABLE: "SEGMENTS_STYLE_ADD_VARIABLE";
25
- readonly SEGMENTS_STYLE_UPDATE_VARIABLE: "SEGMENTS_STYLE_UPDATE_VARIABLE";
26
- readonly SEGMENTS_STYLE_REMOVE_VARIABLE: "SEGMENTS_STYLE_REMOVE_VARIABLE";
27
- };
28
- type SegmentsReducerActionsBase = ReducerActionOrigin & {
29
- segmentId: string;
30
- segment?: Segment;
31
- };
32
- export type SegmentsReducerActions = ({
33
- type: 'SEGMENTS_ADD';
34
- } & SegmentsReducerActionsBase) | ({
35
- type: 'SEGMENTS_UPDATE';
36
- } & SegmentsReducerActionsBase) | ({
37
- type: 'SEGMENTS_REMOVE';
38
- } & SegmentsReducerActionsBase) | ({
39
- type: 'SEGMENTS_ADD_ELEMENT';
40
- to: Element['id'];
41
- data: Element;
42
- dropPosition: DropPosition;
43
- initialItems: Record<string, Element>;
44
- variables: SchemaVariable[];
45
- } & SegmentsReducerActionsBase) | ({
46
- type: 'SEGMENTS_REMOVE_ELEMENT';
47
- elementId: string;
48
- } & SegmentsReducerActionsBase) | ({
49
- type: 'SEGMENTS_CLONE_ELEMENT';
50
- to: string;
51
- data: Element;
52
- dropPosition: DropPosition;
53
- initialItems: Record<string, Element>;
54
- } & SegmentsReducerActionsBase) | ({
55
- type: 'SEGMENTS_MOVE_ELEMENT';
56
- from: string;
57
- to: string;
58
- elementId: string;
59
- dropPosition: DropPosition;
60
- } & SegmentsReducerActionsBase) | ({
61
- type: 'SEGMENTS_UPDATE_ELEMENT';
62
- element: Element;
63
- } & SegmentsReducerActionsBase) | ({
64
- type: 'SEGMENTS_RENAME_ELEMENT';
65
- elementId: string;
66
- id: string;
67
- } & SegmentsReducerActionsBase) | ({
68
- type: 'SEGMENTS_UPDATE_ELEMENTS';
69
- elements: Element[];
70
- } & SegmentsReducerActionsBase) | ({
71
- type: 'SEGMENTS_SPACE_ADD_VARIABLE' | 'SEGMENTS_SPACE_UPDATE_VARIABLE';
72
- variable: SchemaVariable;
73
- } & SegmentsReducerActionsBase) | ({
74
- type: 'SEGMENTS_SPACE_REMOVE_VARIABLE';
75
- name: string;
76
- } & SegmentsReducerActionsBase) | ({
77
- type: 'SEGMENTS_STYLE_ADD_SELECTOR';
78
- displayMode: DisplayMode;
79
- selector: string;
80
- selectorType: TagType;
81
- path?: StyleCategory;
82
- value?: StyleItem['attributes'];
83
- params: StyleTarget;
84
- } & SegmentsReducerActionsBase) | ({
85
- type: 'SEGMENTS_STYLE_UPDATE_SELECTOR';
86
- displayMode: DisplayMode;
87
- selector: string;
88
- path?: StyleCategory;
89
- value?: StyleItem['attributes'];
90
- params: StyleTarget & {
91
- styleSelector: string;
92
- };
93
- } & SegmentsReducerActionsBase) | ({
94
- type: 'SEGMENTS_STYLE_REMOVE_SELECTOR';
95
- displayMode: DisplayMode;
96
- selector: string;
97
- } & SegmentsReducerActionsBase) | ({
98
- type: 'SEGMENTS_STYLE_REMOVE_SELECTORS';
99
- displayMode: DisplayMode;
100
- selectors: string[];
101
- } & SegmentsReducerActionsBase) | ({
102
- type: 'SEGMENTS_STYLE_ADD_SELECTOR_VARIABLE' | 'SEGMENTS_STYLE_UPDATE_SELECTOR_VARIABLE';
103
- displayMode: DisplayMode;
104
- selector: string;
105
- category: StyleVariableCategory;
106
- name: string;
107
- value: StyleVariableValue;
108
- } & SegmentsReducerActionsBase) | ({
109
- type: 'SEGMENTS_STYLE_REMOVE_SELECTOR_VARIABLE';
110
- displayMode: DisplayMode;
111
- selector: string;
112
- category: StyleVariableCategory;
113
- name: string;
114
- } & SegmentsReducerActionsBase) | ({
115
- type: 'SEGMENTS_STYLE_ADD_VARIABLE' | 'SEGMENTS_STYLE_UPDATE_VARIABLE';
116
- category: StyleVariableCategory;
117
- name: string;
118
- value: StyleVariableValue;
119
- } & SegmentsReducerActionsBase) | ({
120
- type: 'SEGMENTS_STYLE_REMOVE_VARIABLE';
121
- category: StyleVariableCategory;
122
- name: string;
123
- } & SegmentsReducerActionsBase) | ({
124
- type: 'SEGMENTS_ADD_TEMPLATE';
125
- to: string;
126
- data: Element;
127
- dropPosition: DropPosition;
128
- initialItems: Record<string, Element>;
129
- templatePlatform: Style['platform'];
130
- variables: SchemaVariable[];
131
- } & SegmentsReducerActionsBase);
132
- declare const SegmentsReducer: (state: Record<string, Segment>, action: SegmentsReducerActions) => Omit<Record<string, Segment>, string>;
133
- export default SegmentsReducer;
@@ -1,3 +0,0 @@
1
- import { default as Segments } from './Segments';
2
- export * from './Segments';
3
- export default Segments;
@@ -1,19 +0,0 @@
1
- import { z } from 'zod';
2
- import { Environment } from '@plitzi/sdk-shared';
3
- import { MouseEvent } from 'react';
4
- declare const publishFormSchema: 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 PublishFormProps = {
13
- environment?: Exclude<Environment, 'main'>;
14
- description?: string;
15
- onClose?: (e?: MouseEvent) => void;
16
- onSubmit?: (e: MouseEvent | undefined, values: z.infer<typeof publishFormSchema>) => void;
17
- };
18
- declare const PublishForm: ({ environment, description, onClose, onSubmit }: PublishFormProps) => import('react').JSX.Element;
19
- export default PublishForm;
@@ -1,17 +0,0 @@
1
- import { z } from 'zod';
2
- import { MouseEvent } from 'react';
3
- declare const segmentFormSchema: z.ZodObject<{
4
- identifier: z.ZodString;
5
- name: z.ZodString;
6
- description: z.ZodString;
7
- }, z.core.$strip>;
8
- export type SegmentFormProps = {
9
- className?: string;
10
- identifier?: string;
11
- name?: string;
12
- description?: string;
13
- onClose?: (e?: MouseEvent) => void;
14
- onSubmit?: (e: MouseEvent | undefined, values: z.infer<typeof segmentFormSchema>) => void;
15
- };
16
- declare const SegmentForm: ({ identifier, name, description, onSubmit, onClose }: SegmentFormProps) => import('react').JSX.Element;
17
- export default SegmentForm;
@@ -1,60 +0,0 @@
1
- /** One page of a space and what it spent of the allowance this period. */
2
- export interface UsagePage {
3
- path: string;
4
- views: number;
5
- }
6
- /** One page of a space and how many elements it holds — a grouping of `elements`, so it adds up to it exactly. */
7
- export interface UsagePageElements {
8
- page: string;
9
- elements: number;
10
- }
11
- export interface UsageSpace {
12
- id: number;
13
- name: string;
14
- /** Page views this space spent this period — the same window the ceilings are judged over. */
15
- views: number;
16
- elements: number;
17
- /**
18
- * What the page rows add up to, which is not the same as `views`: an RSC refresh and a server action are charged to
19
- * the space and answered at their own endpoints, so they belong to no page.
20
- */
21
- pagesTotal: number;
22
- pages: UsagePage[];
23
- elementsByPage: UsagePageElements[];
24
- /** This space's share of the account total, as a percentage — what the bar beside it is drawn from. */
25
- viewsShare: number;
26
- elementsShare: number;
27
- /** More than one page, so its per-page rows say something its total does not. */
28
- multiPage: boolean;
29
- }
30
- export interface UsageKind {
31
- kind: string;
32
- label: string;
33
- origin: number;
34
- cached: number;
35
- weight: number;
36
- cachedWeight: number;
37
- }
38
- export interface AccountUsage {
39
- planName: string;
40
- periodEndsAt: string;
41
- usageByKind: UsageKind[];
42
- spaces: UsageSpace[];
43
- }
44
- /**
45
- * Where the account's allowance actually went — by space, and by page inside each one.
46
- *
47
- * The ceilings themselves come over GraphQL (`SpaceQuota`) and are what the header meter is made of: this space, this
48
- * account, and the two numbers each. This is the other half of the answer, and it is only worth a request when
49
- * somebody asks the question, which is why `enabled` exists — nothing is fetched until the panel is opened.
50
- *
51
- * It reads the API role rather than the GraphQL one because that is where the endpoint lives and where the same
52
- * figures are already served to the dashboard; the builder's user token rides in the header every other call uses.
53
- * Fetched once per panel: these are period totals, not something that moves while somebody reads them.
54
- */
55
- declare const useAccountUsage: (enabled: boolean) => {
56
- usage: AccountUsage | undefined;
57
- error: string | undefined;
58
- loading: boolean;
59
- };
60
- export default useAccountUsage;