@plitzi/plitzi-builder 0.33.1 → 0.34.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/CHANGELOG.md +44 -0
  2. package/dist/index.html +2 -3
  3. package/dist/modules/Actions/Actions.d.ts +2 -0
  4. package/dist/modules/Actions/ActionsContext.d.ts +24 -0
  5. package/dist/modules/Actions/ActionsContextProvider.d.ts +6 -0
  6. package/dist/modules/Actions/components/ActionCheck/ActionCheck.d.ts +5 -0
  7. package/dist/modules/Actions/components/ActionCheck/index.d.ts +3 -0
  8. package/dist/modules/Actions/components/ActionEvents/ActionEvents.d.ts +5 -0
  9. package/dist/modules/Actions/components/ActionEvents/index.d.ts +3 -0
  10. package/dist/modules/Actions/components/ActionForm/ActionForm.d.ts +16 -0
  11. package/dist/modules/Actions/components/ActionForm/index.d.ts +3 -0
  12. package/dist/modules/Actions/components/ActionList/ActionList.d.ts +9 -0
  13. package/dist/modules/Actions/components/ActionList/index.d.ts +3 -0
  14. package/dist/modules/Actions/components/ActionTestRun/ActionTestRun.d.ts +10 -0
  15. package/dist/modules/Actions/components/ActionTestRun/index.d.ts +3 -0
  16. package/dist/modules/Actions/components/ActionWebhookUrl/ActionWebhookUrl.d.ts +11 -0
  17. package/dist/modules/Actions/components/ActionWebhookUrl/index.d.ts +3 -0
  18. package/dist/modules/Actions/index.d.ts +5 -0
  19. package/dist/modules/App/AppContainer/containers/ContainerActions.d.ts +2 -0
  20. package/dist/modules/App/components/AppHeader/QuotaBreakdown.d.ts +19 -0
  21. package/dist/modules/App/components/AppHeader/QuotaMeter.d.ts +2 -0
  22. package/dist/modules/App/models/PageForm.d.ts +3 -3
  23. package/dist/modules/Builder/BuilderHelper.d.ts +8 -1
  24. package/dist/modules/Builder/components/BuilderElementTools/ElementDefinitionSettings.d.ts +6 -4
  25. package/dist/modules/Builder/components/BuilderSearch/BuilderSearch.d.ts +16 -0
  26. package/dist/modules/Builder/components/BuilderSearch/BuilderSearchContext.d.ts +5 -0
  27. package/dist/modules/Builder/components/BuilderSearch/components/BuilderSearchButton/BuilderSearchButton.d.ts +2 -0
  28. package/dist/modules/Builder/components/BuilderSearch/components/BuilderSearchButton/index.d.ts +3 -0
  29. package/dist/modules/Builder/components/BuilderSearch/components/BuilderSearchPanel/BuilderSearchPanel.d.ts +8 -0
  30. package/dist/modules/Builder/components/BuilderSearch/components/BuilderSearchPanel/index.d.ts +3 -0
  31. package/dist/modules/Builder/components/BuilderSearch/helpers.d.ts +2 -0
  32. package/dist/modules/Builder/components/BuilderSearch/index.d.ts +3 -0
  33. package/dist/modules/Builder/components/BuilderTree/BuilderTreeSearch/BuilderTreeSearch.d.ts +13 -0
  34. package/dist/modules/Builder/components/BuilderTree/BuilderTreeSearch/index.d.ts +2 -0
  35. package/dist/modules/Builder/components/ElementMatchItem/ElementMatchItem.d.ts +12 -0
  36. package/dist/modules/Builder/components/ElementMatchItem/index.d.ts +3 -0
  37. package/dist/modules/Builder/helpers/elementChain.d.ts +23 -0
  38. package/dist/modules/Builder/helpers/elementChain.test.d.ts +1 -0
  39. package/dist/modules/Builder/helpers/searchElements.d.ts +29 -0
  40. package/dist/modules/Builder/helpers/searchElements.test.d.ts +1 -0
  41. package/dist/modules/Builder/hooks/useRevealElement.d.ts +15 -0
  42. package/dist/modules/Elements/ElementHelper.d.ts +9 -2
  43. package/dist/modules/Fonts/FontPreviews/FontPreviews.d.ts +17 -0
  44. package/dist/modules/Fonts/FontPreviews/index.d.ts +2 -0
  45. package/dist/modules/Fonts/Fonts.d.ts +8 -0
  46. package/dist/modules/Fonts/components/AddGoogleFont/AddGoogleFont.d.ts +7 -0
  47. package/dist/modules/Fonts/components/AddGoogleFont/index.d.ts +2 -0
  48. package/dist/modules/Fonts/components/AddHostedFont/AddHostedFont.d.ts +17 -0
  49. package/dist/modules/Fonts/components/AddHostedFont/index.d.ts +2 -0
  50. package/dist/modules/Fonts/components/AddRemoteFont/AddRemoteFont.d.ts +13 -0
  51. package/dist/modules/Fonts/components/AddRemoteFont/index.d.ts +2 -0
  52. package/dist/modules/Fonts/components/AddSystemFont/AddSystemFont.d.ts +13 -0
  53. package/dist/modules/Fonts/components/AddSystemFont/index.d.ts +2 -0
  54. package/dist/modules/Fonts/components/FontRow/FontRow.d.ts +13 -0
  55. package/dist/modules/Fonts/components/FontRow/index.d.ts +2 -0
  56. package/dist/modules/Fonts/fontsBaseUrl.d.ts +9 -0
  57. package/dist/modules/Fonts/hooks/useFontCatalog.d.ts +21 -0
  58. package/dist/modules/Fonts/index.d.ts +2 -0
  59. package/dist/modules/Interactions/Interactions.d.ts +3 -2
  60. package/dist/modules/Interactions/components/Workflow/Workflow.d.ts +5 -1
  61. package/dist/modules/Interactions/components/Workflow/WorkflowContextProvider.d.ts +3 -1
  62. package/dist/modules/Interactions/components/Workflow/WorkflowFlow.d.ts +3 -1
  63. package/dist/modules/Interactions/components/Workflow/WorkflowNode/NodeHeader.d.ts +2 -2
  64. package/dist/modules/Interactions/components/Workflow/WorkflowNode/WorkflowNode.d.ts +2 -2
  65. package/dist/modules/Interactions/components/Workflow/helpers/nodeWarnings.d.ts +6 -9
  66. package/dist/modules/Segments/SegmentsReducer.d.ts +7 -3
  67. package/dist/modules/Space/helpers/elementsByRoot.d.ts +19 -0
  68. package/dist/modules/Space/helpers/elementsByRoot.test.d.ts +1 -0
  69. package/dist/modules/Space/hooks/useAccountUsage.d.ts +60 -0
  70. package/dist/modules/Space/hooks/useSpaceQuota.d.ts +52 -0
  71. package/dist/modules/Space/hooks/useSpaceQuota.test.d.ts +1 -0
  72. package/dist/modules/Variables/components/UrlParams/UrlParams.d.ts +17 -0
  73. package/dist/modules/Variables/components/UrlParams/index.d.ts +2 -0
  74. package/dist/package.json.d.ts +30 -31
  75. package/dist/plitzi-builder-dev-vendor.js +2350 -831
  76. package/dist/plitzi-builder-dev-vendor.js.gz +0 -0
  77. package/dist/plitzi-builder-dev-vendor.js.map +1 -1
  78. package/dist/plitzi-builder-dev-vendor.js.map.gz +0 -0
  79. package/dist/plitzi-builder-vendor.js +1 -1
  80. package/dist/plitzi-builder-vendor.js.gz +0 -0
  81. package/dist/plitzi-builder.css +1 -1
  82. package/dist/plitzi-builder.css.gz +0 -0
  83. package/dist/plitzi-builder.js +3228 -2956
  84. package/dist/plitzi-builder.js.gz +0 -0
  85. package/package.json +42 -43
  86. package/dist/modules/AI/helpers/getRootNode.d.ts +0 -9
@@ -0,0 +1,9 @@
1
+ import { Server } from '@plitzi/sdk-shared';
2
+ /**
3
+ * Where the canvas and the panels address an uploaded face from.
4
+ *
5
+ * What the deployment declared, and otherwise the page server's own `/fonts` — which is where a self-hosted
6
+ * server keeps them. Guessing is confined to this one function so the canvas and the editor cannot disagree about
7
+ * which origin a font came from.
8
+ */
9
+ export declare const fontsBaseUrl: (server: Pick<Server, "fontsBaseUrl" | "ssrServer">) => string | undefined;
@@ -0,0 +1,21 @@
1
+ import { FontStyle } from '@plitzi/sdk-shared';
2
+ export type FontCatalogEntry = {
3
+ family: string;
4
+ category: string;
5
+ weights: number[];
6
+ styles: FontStyle[];
7
+ subsets: string[];
8
+ };
9
+ /**
10
+ * The Google catalog, through this deployment's own endpoint.
11
+ *
12
+ * `unavailable` is a state of its own, not an empty result: a server with no API key cannot ask Google what exists,
13
+ * and telling somebody "no fonts matched" when nothing was searched would send them looking for a typo.
14
+ */
15
+ declare const useFontCatalog: (query: string, enabled: boolean) => {
16
+ fonts: FontCatalogEntry[];
17
+ loading: boolean;
18
+ unavailable: boolean;
19
+ error: string | undefined;
20
+ };
21
+ export default useFontCatalog;
@@ -0,0 +1,2 @@
1
+ export { default } from './Fonts';
2
+ export * from './Fonts';
@@ -1,9 +1,10 @@
1
1
  import { Element } from '@plitzi/sdk-shared';
2
2
  export type InteractionsProps = {
3
3
  className?: string;
4
- idRef?: string;
4
+ /** The element these interactions belong to, by the one name it answers to — the key the runtime wires them by. */
5
+ id?: string;
5
6
  interactions?: Element['definition']['interactions'];
6
7
  onChange?: (interactions: Element['definition']['interactions']) => void;
7
8
  };
8
- declare const Interactions: ({ className, idRef, interactions, onChange }: InteractionsProps) => import("react").JSX.Element;
9
+ declare const Interactions: ({ className, id, interactions, onChange }: InteractionsProps) => import("react").JSX.Element;
9
10
  export default Interactions;
@@ -5,8 +5,12 @@ export type WorkflowProps = {
5
5
  callbackTitle?: string;
6
6
  nodeDefinitions?: InteractionCallback[];
7
7
  direction?: 'horizontal' | 'vertical';
8
+ /** What a new step is: `callback` for a page flow, `task` for a server action. */
9
+ stepType?: ElementInteraction['type'];
10
+ /** What a new TRIGGER starts as. A server action defaults to `call`; an element's flows have no obvious one. */
11
+ defaultTrigger?: string;
8
12
  dataSource?: Record<string, Source['meta']>;
9
13
  onChange?: (nodes: Record<string, ElementInteraction>) => void;
10
14
  };
11
- declare const Workflow: ({ nodes: nodesProp, triggerTitle, callbackTitle, nodeDefinitions, direction, dataSource, onChange }: WorkflowProps) => import("react").JSX.Element;
15
+ declare const Workflow: ({ nodes: nodesProp, triggerTitle, callbackTitle, nodeDefinitions, direction, dataSource, stepType, defaultTrigger, onChange }: WorkflowProps) => import("react").JSX.Element;
12
16
  export default Workflow;
@@ -6,8 +6,10 @@ export type WorkflowContextProviderProps = {
6
6
  direction: 'horizontal' | 'vertical';
7
7
  dataSource?: Record<string, Source['meta']>;
8
8
  nodeDefinitions?: InteractionCallback[];
9
+ /** Default action for a new trigger, when the flow kind has an obvious one. */
10
+ defaultTrigger?: string;
9
11
  onChange: (nodes: Record<string, ElementInteraction>, debounced?: boolean) => void;
10
12
  setFlowId: (flowId: string) => void;
11
13
  };
12
- declare const WorkflowContextProvider: ({ children, nodes, direction, dataSource, nodeDefinitions, setFlowId, onChange }: WorkflowContextProviderProps) => import("react").JSX.Element;
14
+ declare const WorkflowContextProvider: ({ children, nodes, direction, dataSource, nodeDefinitions, defaultTrigger, setFlowId, onChange }: WorkflowContextProviderProps) => import("react").JSX.Element;
13
15
  export default WorkflowContextProvider;
@@ -4,6 +4,8 @@ export type WorkflowFlowProps = {
4
4
  nodes?: Record<string, ElementInteraction>;
5
5
  triggerTitle?: string;
6
6
  callbackTitle?: string;
7
+ /** `callback` in a page flow; server-action steps are `task`. */
8
+ stepType?: ElementInteraction['type'];
7
9
  };
8
- declare const WorkflowFlow: ({ trigger, nodes, triggerTitle, callbackTitle }: WorkflowFlowProps) => import("react").JSX.Element;
10
+ declare const WorkflowFlow: ({ trigger, nodes, triggerTitle, callbackTitle, stepType }: WorkflowFlowProps) => import("react").JSX.Element;
9
11
  export default WorkflowFlow;
@@ -1,9 +1,9 @@
1
- import { ElementInteraction, InteractionCallback } from '@plitzi/sdk-shared';
1
+ import { ElementInteraction, InteractionCallback, InteractionCallbackType } from '@plitzi/sdk-shared';
2
2
  export type NodeHeaderProps = {
3
3
  className?: string;
4
4
  id?: string;
5
5
  title?: string;
6
- type?: 'trigger' | 'callback' | 'utility' | 'globalCallback';
6
+ type?: InteractionCallbackType;
7
7
  action?: string;
8
8
  elementId?: string;
9
9
  canDelete?: boolean;
@@ -1,9 +1,9 @@
1
1
  import { RuleGroup } from '@plitzi/plitzi-ui/QueryBuilder';
2
- import { InteractionCallbackParamValues } from '@plitzi/sdk-shared';
2
+ import { InteractionCallbackParamValues, InteractionCallbackType } from '@plitzi/sdk-shared';
3
3
  export type WorkflowNodeProps = {
4
4
  id?: string;
5
5
  title?: string;
6
- type?: 'trigger' | 'callback' | 'utility' | 'globalCallback';
6
+ type?: InteractionCallbackType;
7
7
  canDelete?: boolean;
8
8
  action?: string;
9
9
  elementId?: string;
@@ -1,22 +1,19 @@
1
1
  import { ElementInteraction, InteractionCallback } from '@plitzi/sdk-shared';
2
2
  type NodeShape = Pick<ElementInteraction, 'type' | 'action' | 'elementId'>;
3
+ /** `danger`: the step will not run. `warning`: it runs but is misconfigured. */
3
4
  export type WarningLevel = 'warning' | 'danger';
4
5
  export interface NodeWarning {
5
6
  level: WarningLevel;
6
7
  message: string;
7
8
  }
8
- /** FontAwesome classes (icon + color) per level — shared by the node and flow indicators so they stay consistent. */
9
+ /** Icon + color per level, shared by the node and flow indicators. */
9
10
  export declare const WARNING_ICON: Record<WarningLevel, string>;
10
- /** The definition a stored node resolves to, matched by type, action and (for element callbacks) target — mirrors
11
- * how WorkflowNode renders it. Undefined means the node points at nothing the runtime knows. */
11
+ /** Definition a stored node resolves to; undefined means nothing known matches it. */
12
12
  export declare const findNodeDefinition: (node: NodeShape, nodeDefinitions: InteractionCallback[] | undefined) => InteractionCallback | undefined;
13
- /** The node targets an element that exists but has no idRef (a flagged, unreferenced definition), so the runtime
14
- * cannot wire it — surfaced separately from the generic "not recognized" case. */
15
- export declare const isTargetUnreferenced: (node: Pick<ElementInteraction, "elementId">, nodeDefinitions: InteractionCallback[] | undefined) => boolean;
16
- export declare const getNodeWarnings: (node: NodeShape, nodeDefinition: InteractionCallback | undefined, targetUnreferenced: boolean) => NodeWarning[];
17
- /** The most severe level among a node's warnings (danger wins), or undefined when there are none. */
13
+ /** Malformations of a stored node, checked against the definitions the editor renders from. */
14
+ export declare const getNodeWarnings: (node: NodeShape, nodeDefinition: InteractionCallback | undefined) => NodeWarning[];
18
15
  export declare const worstLevel: (warnings: NodeWarning[]) => WarningLevel | undefined;
19
- /** Flow-level rollup: how many steps are malformed and the worst severity among them (drives the flow indicator). */
16
+ /** Flow rollup for the flow indicator: malformed-step count and worst severity. */
20
17
  export declare const summarizeFlow: (nodes: Record<string, ElementInteraction>, nodeDefinitions: InteractionCallback[] | undefined) => {
21
18
  count: number;
22
19
  level: WarningLevel | undefined;
@@ -1,4 +1,4 @@
1
- import { DisplayMode, Element, SchemaVariable, Segment, Style, StyleItem, TagType, DropPosition, StyleVariableCategory, StyleVariableValue, StyleCategory, StyleState } from '@plitzi/sdk-shared';
1
+ import { DisplayMode, Element, ReducerActionOrigin, SchemaVariable, Segment, Style, StyleItem, TagType, DropPosition, StyleVariableCategory, StyleVariableValue, StyleCategory, StyleState } from '@plitzi/sdk-shared';
2
2
  export declare const SegmentsActions: {
3
3
  readonly SEGMENTS_ADD: "SEGMENTS_ADD";
4
4
  readonly SEGMENTS_UPDATE: "SEGMENTS_UPDATE";
@@ -9,6 +9,7 @@ export declare const SegmentsActions: {
9
9
  readonly SEGMENTS_MOVE_ELEMENT: "SEGMENTS_MOVE_ELEMENT";
10
10
  readonly SEGMENTS_CLONE_ELEMENT: "SEGMENTS_CLONE_ELEMENT";
11
11
  readonly SEGMENTS_UPDATE_ELEMENT: "SEGMENTS_UPDATE_ELEMENT";
12
+ readonly SEGMENTS_RENAME_ELEMENT: "SEGMENTS_RENAME_ELEMENT";
12
13
  readonly SEGMENTS_UPDATE_ELEMENTS: "SEGMENTS_UPDATE_ELEMENTS";
13
14
  readonly SEGMENTS_SPACE_ADD_VARIABLE: "SEGMENTS_SPACE_ADD_VARIABLE";
14
15
  readonly SEGMENTS_SPACE_UPDATE_VARIABLE: "SEGMENTS_SPACE_UPDATE_VARIABLE";
@@ -24,10 +25,9 @@ export declare const SegmentsActions: {
24
25
  readonly SEGMENTS_STYLE_UPDATE_VARIABLE: "SEGMENTS_STYLE_UPDATE_VARIABLE";
25
26
  readonly SEGMENTS_STYLE_REMOVE_VARIABLE: "SEGMENTS_STYLE_REMOVE_VARIABLE";
26
27
  };
27
- type SegmentsReducerActionsBase = {
28
+ type SegmentsReducerActionsBase = ReducerActionOrigin & {
28
29
  segmentId: string;
29
30
  segment?: Segment;
30
- fromSubscriptions?: boolean;
31
31
  };
32
32
  export type SegmentsReducerActions = ({
33
33
  type: 'SEGMENTS_ADD';
@@ -60,6 +60,10 @@ export type SegmentsReducerActions = ({
60
60
  } & SegmentsReducerActionsBase) | ({
61
61
  type: 'SEGMENTS_UPDATE_ELEMENT';
62
62
  element: Element;
63
+ } & SegmentsReducerActionsBase) | ({
64
+ type: 'SEGMENTS_RENAME_ELEMENT';
65
+ elementId: string;
66
+ id: string;
63
67
  } & SegmentsReducerActionsBase) | ({
64
68
  type: 'SEGMENTS_UPDATE_ELEMENTS';
65
69
  elements: Element[];
@@ -0,0 +1,19 @@
1
+ import { Element } from '@plitzi/sdk-shared';
2
+ /** One root of the schema — a page, or a layout several pages render inside — and how many elements it holds. */
3
+ export interface RootElements {
4
+ page: string;
5
+ elements: number;
6
+ }
7
+ /**
8
+ * The element count, grouped by the page that holds it, off the LIVE schema.
9
+ *
10
+ * The same grouping the API answers for every other space, done here for the one being edited: those figures are
11
+ * whatever was last saved, and this one moves with the element someone just dropped — which is the whole reason the
12
+ * meter is in the editor rather than on a dashboard.
13
+ *
14
+ * It is a grouping, not a second measurement: it adds up to the element count exactly. Layouts are roots too and are
15
+ * listed as themselves rather than shared out over the pages that render inside them — their elements are authored
16
+ * once, and splitting them between pages would report a total that no page has.
17
+ */
18
+ declare const elementsByRoot: (flat: Record<string, Element>) => RootElements[];
19
+ export default elementsByRoot;
@@ -0,0 +1,60 @@
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;
@@ -0,0 +1,52 @@
1
+ import { TSpaceQuota } from '@plitzi/sdk-shared';
2
+ /** A quota figure as it is shown: whole units, grouped. */
3
+ export declare const format: (value: number) => string;
4
+ /** How close one ceiling is, as the three states a UI treats differently. */
5
+ export type QuotaLevel = 'ok' | 'near' | 'over';
6
+ export interface QuotaReading {
7
+ /** Stable across renders, so a warning can be shown once rather than on every keystroke. */
8
+ id: string;
9
+ scope: 'space' | 'account';
10
+ metric: 'elements' | 'views';
11
+ label: string;
12
+ used: number;
13
+ /** The ceiling. 0 when the plan does not enforce one — see `unlimited`. */
14
+ quota: number;
15
+ /**
16
+ * There is no ceiling on this plane.
17
+ *
18
+ * Kept as a reading rather than dropped, because the figure is still worth showing: someone on an unlimited plan
19
+ * still wants to know their space holds 588 elements. What `unlimited` decides is that it can never be `near` or
20
+ * `over`, so it never colours the meter and never raises a warning.
21
+ */
22
+ unlimited: boolean;
23
+ percent: number | null;
24
+ level: QuotaLevel;
25
+ }
26
+ export declare const readingsFor: (quota: TSpaceQuota, liveSpaceElements: number) => QuotaReading[];
27
+ /**
28
+ * Whether this plan has an allowance that comes back — the only case where a reset date says anything.
29
+ *
30
+ * The counters roll with the period on every plan, Lifetime included, so a date is always available; that is not the
31
+ * same as it being worth showing. With no ceiling on page views there is nothing to get back, and "resets 1 Sep"
32
+ * next to "Unlimited" reads as a limit that is not there. Elements never decide it: a schema is a stock, not a
33
+ * flow, and it does not empty when the month does.
34
+ */
35
+ export declare const refillsPeriodically: (readings: QuotaReading[]) => boolean;
36
+ /**
37
+ * The plan ceilings this space is edited against, with the element counts corrected to the live schema.
38
+ *
39
+ * Element caps are the ones reached WHILE editing — someone drops a component and crosses one — so they are counted
40
+ * off the store rather than off the server, and move as the page does. Page views are spent by visitors, so they come
41
+ * from the server and are refreshed on a timer.
42
+ */
43
+ declare const useSpaceQuota: () => {
44
+ quota: TSpaceQuota | undefined;
45
+ readings: QuotaReading[];
46
+ enforced: QuotaReading[];
47
+ worst: QuotaReading | undefined;
48
+ featured: QuotaReading | undefined;
49
+ liveElements: number;
50
+ error: Error | undefined;
51
+ };
52
+ export default useSpaceQuota;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,17 @@
1
+ export type UrlParamsProps = {
2
+ className?: string;
3
+ };
4
+ /**
5
+ * The URL the page is being tried on.
6
+ *
7
+ * The editor's own address says nothing about the page inside it, so a route that takes a `:slug`, a variable that
8
+ * switches on `?plan=pro` or a binding that reads the hostname had no way to be exercised without publishing. What
9
+ * is set here is laid over the browser's own values in `NavigationProvider`, which is the one place that publishes
10
+ * `navigation.*` — so the canvas, the preview pane, the variable list and every server-driven element resolve
11
+ * against the same tested URL rather than each against its own idea of one.
12
+ *
13
+ * The route params of the page being edited are listed even when empty, because the page declaring one is the fact
14
+ * an author needs to see; a query param has no such declaration, so those are added by hand.
15
+ */
16
+ declare const UrlParams: ({ className }: UrlParamsProps) => import("react").JSX.Element;
17
+ export default UrlParams;
@@ -0,0 +1,2 @@
1
+ export { default } from './UrlParams';
2
+ export * from './UrlParams';
@@ -1,6 +1,6 @@
1
1
  declare const _default: {
2
2
  "name": "@plitzi/plitzi-builder",
3
- "version": "0.33.1",
3
+ "version": "0.34.0",
4
4
  "homepage": "./",
5
5
  "license": "AGPL-3.0",
6
6
  "files": [
@@ -26,11 +26,11 @@ declare const _default: {
26
26
  "./plitzi-builder-dev-vendor.js.map": "./dist/plitzi-builder-dev-vendor.js.map"
27
27
  },
28
28
  "dependencies": {
29
- "@apollo/client": "^4.2.11",
29
+ "@apollo/client": "^4.3.0",
30
30
  "@fortawesome/fontawesome-free": "^7.3.1",
31
- "@plitzi/nexus": "^1.1.0",
31
+ "@plitzi/nexus": "^1.1.4",
32
32
  "@plitzi/plitzi-sdk": "workspace:*",
33
- "@plitzi/plitzi-ui": "^1.6.19",
33
+ "@plitzi/plitzi-ui": "^1.6.21",
34
34
  "@plitzi/sdk-auth": "workspace:*",
35
35
  "@plitzi/sdk-dev-tools": "workspace:*",
36
36
  "@plitzi/sdk-elements": "workspace:*",
@@ -42,64 +42,63 @@ declare const _default: {
42
42
  "@plitzi/sdk-shared": "workspace:*",
43
43
  "@plitzi/sdk-style": "workspace:*",
44
44
  "@plitzi/sdk-variables": "workspace:*",
45
- "@tanstack/react-virtual": "^3.14.9",
46
- "@xyflow/react": "^12.11.3",
45
+ "@tanstack/react-virtual": "^3.14.12",
46
+ "@xyflow/react": "^12.11.6",
47
47
  "apollo-upload-client": "^20.0.0",
48
48
  "clsx": "^2.1.1",
49
49
  "graphql": "^17.0.2",
50
50
  "graphql-ws": "^6.2.1",
51
- "immer": "^11.1.16",
52
- "jszip": "^3.10.1",
53
- "react-hook-form": "^7.85.0",
54
- "react-router-dom": "^7.18.2",
51
+ "immer": "^11.1.18",
52
+ "jszip": "^3.10.2",
53
+ "react-hook-form": "^7.88.0",
54
+ "react-router-dom": "^7.18.3",
55
55
  "swr": "^2.5.1",
56
- "uuid": "^14.0.1",
57
- "zod": "^4.4.3"
56
+ "uuid": "^14.0.2",
57
+ "zod": "^4.6.4"
58
58
  },
59
59
  "peerDependencies": {
60
60
  "react": "^19",
61
61
  "react-dom": "^19"
62
62
  },
63
63
  "devDependencies": {
64
- "@babel/compat-data": "^8.0.0",
65
- "@babel/core": "^8.0.1",
64
+ "@babel/compat-data": "^8.0.5",
65
+ "@babel/core": "^8.0.5",
66
66
  "@babel/helper-builder-react-jsx-experimental": "^7.12.11",
67
67
  "@babel/helper-validator-identifier": "^8.0.4",
68
68
  "@babel/plugin-proposal-class-properties": "^7.18.6",
69
69
  "@babel/plugin-transform-private-methods": "^8.0.1",
70
70
  "@babel/plugin-transform-runtime": "^8.0.1",
71
71
  "@babel/polyfill": "^7.12.1",
72
- "@babel/preset-env": "^8.0.2",
72
+ "@babel/preset-env": "^8.0.5",
73
73
  "@babel/preset-react": "^8.0.1",
74
74
  "@tailwindcss/postcss": "^4.3.3",
75
- "css-loader": "^7.1.4",
76
- "cypress": "15.20.1",
75
+ "css-loader": "^7.1.5",
77
76
  "eslint": "^9.39.5",
78
77
  "eslint-plugin-import": "^2.32.0",
79
- "flow-bin": "^0.327.0",
80
- "postcss": "^8.5.26",
78
+ "flow-bin": "^0.331.0",
79
+ "postcss": "^8.5.28",
81
80
  "postcss-loader": "^8.2.1",
82
81
  "postcss-scss": "^4.0.9",
83
82
  "prettier": "^3.9.6",
84
83
  "prop-types": "^15.8.1",
85
- "react": "^19.2.8",
86
- "react-dom": "^19.2.8",
87
- "react-refresh": "^0.18.0",
88
- "react-test-renderer": "^19.2.8",
89
- "sass": "^1.102.0",
90
- "sass-embedded": "^1.102.0",
91
- "sass-loader": "^17.0.0",
92
- "stylelint": "^17.14.1",
84
+ "react": "^19.3.0",
85
+ "react-dom": "^19.3.0",
86
+ "react-refresh": "^0.19.0",
87
+ "react-test-renderer": "^19.3.0",
88
+ "sass": "^1.104.1",
89
+ "sass-embedded": "^1.104.1",
90
+ "sass-loader": "^17.0.1",
91
+ "stylelint": "^17.15.0",
93
92
  "stylelint-order": "^8.1.1",
94
93
  "stylelint-scss": "^7.2.0",
95
- "terser": "^5.50.0",
94
+ "terser": "^5.51.2",
96
95
  "typescript": "^6.0.3",
97
- "vite": "^8.2.1",
98
- "vite-plugin-dts": "^5.0.3",
96
+ "vite": "^8.3.0",
97
+ "vite-plugin-dts": "^5.1.0",
99
98
  "vite-plugin-ejs": "^2.0.0",
100
99
  "vite-plugin-mkcert": "^2.1.0",
101
100
  "vite-plugin-react": "^4.0.1",
102
- "vitest": "^4.1.10"
101
+ "vitest": "^5.0.0"
103
102
  },
104
103
  "scripts": {
105
104
  "start": "vite dev --mode development",