@plitzi/plitzi-builder 0.38.16 → 0.38.17

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 (47) hide show
  1. package/CHANGELOG.md +56 -0
  2. package/dist/index.d.ts +4 -11
  3. package/dist/index.html +1 -1
  4. package/dist/modules/Builder/BuilderHelper.d.ts +3 -2
  5. package/dist/modules/Builder/components/BuilderElementTools/ElementMotion/ElementMotion.d.ts +1 -1
  6. package/dist/modules/Builder/components/BuilderElementTools/ElementMotion/components/MotionTiming/components/MotionTriggerOption/MotionTriggerOption.d.ts +1 -1
  7. package/dist/modules/Builder/components/BuilderElementTools/ElementMotion/helpers.d.ts +1 -1
  8. package/dist/modules/Connectors/components/TokenInput/TokenInput.d.ts +1 -1
  9. package/dist/modules/Flags/components/FlagItem/FlagItem.d.ts +2 -1
  10. package/dist/modules/History/components/ChangeEntry/ChangeEntry.d.ts +1 -1
  11. package/dist/modules/History/components/SnapshotMarker/SnapshotMarker.d.ts +1 -1
  12. package/dist/modules/History/helpers.d.ts +4 -4
  13. package/dist/modules/History/hooks/useSpaceChanges.d.ts +3 -3
  14. package/dist/modules/Network/contexts/BuilderSubscriptionsContext.d.ts +1 -1
  15. package/dist/modules/Network/helpers/authFailureLink.d.ts +9 -0
  16. package/dist/modules/Network/helpers/stripTypename.d.ts +15 -0
  17. package/dist/modules/Network/hooks/useBuilderNetwork.d.ts +1 -3
  18. package/dist/modules/Network/hooks/useGraphQL.d.ts +1 -1
  19. package/dist/modules/Network/hooks/useSubscriptionsManager.d.ts +1 -1
  20. package/dist/modules/Network/hooks/useWebsocket.d.ts +1 -1
  21. package/dist/modules/Queue/QueueContext.d.ts +2 -2
  22. package/dist/modules/Queue/hooks/useQueueManager.d.ts +1 -2
  23. package/dist/modules/Resources/components/Resource/components/PluginInUse/PluginInUse.d.ts +1 -1
  24. package/dist/modules/Resources/helpers.d.ts +1 -1
  25. package/dist/modules/Space/components/SpaceIssues/SpaceIssues.d.ts +1 -1
  26. package/dist/modules/Space/components/SpaceIssues/components/IssueGroup/IssueGroup.d.ts +1 -1
  27. package/dist/modules/Space/components/SpaceIssues/components/IssueItem/IssueItem.d.ts +1 -1
  28. package/dist/modules/Space/components/SpaceIssues/components/SuggestionGroup/SuggestionGroup.d.ts +1 -1
  29. package/dist/modules/Space/components/SpaceIssues/components/SuggestionItem/SuggestionItem.d.ts +1 -1
  30. package/dist/modules/Space/helpers/spaceIssues.d.ts +1 -1
  31. package/dist/modules/Space/hooks/useFixSpaceIssues.d.ts +1 -1
  32. package/dist/modules/Space/hooks/useShowSpaceIssues.d.ts +1 -1
  33. package/dist/modules/Space/hooks/useSpaceIssues.d.ts +1 -1
  34. package/dist/modules/Space/hooks/useSpaceQuota.d.ts +1 -1
  35. package/dist/modules/Undoable/UndoableContext.d.ts +2 -2
  36. package/dist/modules/Visitors/components/VisitorRoles/VisitorRoles.d.ts +1 -1
  37. package/dist/package.json.d.ts +16 -16
  38. package/dist/plitzi-builder-dev-vendor.js +7 -7
  39. package/dist/plitzi-builder-dev-vendor.js.gz +0 -0
  40. package/dist/plitzi-builder-dev-vendor.js.map +1 -1
  41. package/dist/plitzi-builder-dev-vendor.js.map.gz +0 -0
  42. package/dist/plitzi-builder-vendor.js +1 -1
  43. package/dist/plitzi-builder-vendor.js.gz +0 -0
  44. package/dist/plitzi-builder.js +2385 -2385
  45. package/dist/plitzi-builder.js.gz +0 -0
  46. package/dist/plitzi-functions-worker.js +1 -1
  47. package/package.json +30 -30
package/CHANGELOG.md CHANGED
@@ -1,5 +1,61 @@
1
1
  # @plitzi/plitzi-builder
2
2
 
3
+ ## 0.38.17
4
+
5
+ ### Patch Changes
6
+
7
+ - 4f8dc37: ## Packages
8
+
9
+ - **A library package is imported by its root and its folders, never by a file** (`@plitzi/sdk-shared`, `sdk-schema`,
10
+ `sdk-style`, `sdk-elements`, `sdk-interactions`, `sdk-auth`, `sdk-dev-tools`, `sdk-event-bridge`, `sdk-navigation`,
11
+ `sdk-plugins`, `sdk-variables`): each `exports` is now `"."` and `"./*"`, the latter a folder's `index`.
12
+ `@plitzi/sdk-shared/helpers/isRecord` becomes `import { isRecord } from '@plitzi/sdk-shared/helpers'`, and a default
13
+ export by the name its folder gives it — almost always its file's (`import usePlitzi from '…/hooks/usePlitzi'` →
14
+ `import { usePlitzi } from '@plitzi/sdk-shared/hooks'`). A file-level specifier now fails with `ERR_MODULE_NOT_FOUND`.
15
+ New entries where a folder barrel would have brought more than was asked for: `@plitzi/sdk-shared/project` and
16
+ `@plitzi/sdk-shared/plugins/bundle` (Node only), `@plitzi/sdk-interactions/declarations` (the global callbacks and
17
+ utility specs, without React), and `@plitzi/sdk-elements/elements/declarations`, which now also carries the
18
+ declarations' attribute types and the constants they are checked with. `RuleGroup` is exported by `@plitzi/sdk-shared`
19
+ with the document types that use it. `plitzi upgrade migrations` names every such import in a project, with the folder to
20
+ import it from instead.
21
+ - **`@plitzi/sdk-shared`'s root exports the document types, and only them** (`@plitzi/sdk-shared`): what the package
22
+ does is imported from its folder — `formatDate` from `@plitzi/sdk-shared/helpers`, `ThemeProvider` from
23
+ `@plitzi/sdk-shared/theme`, a GraphQL operation's types from `@plitzi/sdk-shared/network/graphql` — so a module that
24
+ imports a type from the root no longer loads every area of the package.
25
+ - **What one package alone used lives in that package** (`@plitzi/sdk-shared`, `@plitzi/sdk-elements`): the data
26
+ source hooks moved from `@plitzi/sdk-shared/dataSource/hooks` to `@plitzi/sdk-elements/dataSource`
27
+ (`useRegisterSource`, `useResolvedVariables`), and the Apollo links the builder's client is built with into the
28
+ builder.
29
+ - **The builder's panels are an entry of their own** (`@plitzi/sdk-style`, `@plitzi/sdk-variables`,
30
+ `@plitzi/sdk-elements`): the style inspector, the advanced style editor and `BuilderStyleContextProvider` are imported
31
+ from `@plitzi/sdk-style/builder`; the variables' lists and forms from `@plitzi/sdk-variables/builder`; the elements'
32
+ settings panels (`defaultElementsSettings`) from `@plitzi/sdk-elements/builder`. Each package's root keeps what a page
33
+ and a server use — `generateCache` no longer loads the inspector, on a server 227 modules down to 21.
34
+
35
+ ## CLI
36
+ - **`plitzi upgrade`'s `renames` part is now `migrations`** (`@plitzi/cli`): what a version changed that a project's
37
+ own source must follow, one file per change in the CLI's `src/migrations/changes/` with the version it shipped in —
38
+ rewritten with `--write` when it has one right answer, said otherwise. The `--json` report carries `migrations` (each
39
+ with its `migration`, `since`, `file`, `line`, `what` and whether it was `written`) in place of `renames` and
40
+ `changes`. The changes of 0.38.0 (`canTemplate` → `canSnippet`, the `*Template` authoring names), 0.38.9 (a
41
+ `formControl` without `required` is optional) and 0.38.12 (`usePlitziServiceContext` → `usePlitzi`) are no longer
42
+ looked for: a project still on one of those versions makes them by hand.
43
+
44
+ - Updated dependencies [4f8dc37]
45
+ - @plitzi/plitzi-sdk@0.38.17
46
+ - @plitzi/sdk-auth@0.38.17
47
+ - @plitzi/sdk-authoring@0.38.17
48
+ - @plitzi/sdk-dev-tools@0.38.17
49
+ - @plitzi/sdk-elements@0.38.17
50
+ - @plitzi/sdk-event-bridge@0.38.17
51
+ - @plitzi/sdk-interactions@0.38.17
52
+ - @plitzi/sdk-navigation@0.38.17
53
+ - @plitzi/sdk-plugins@0.38.17
54
+ - @plitzi/sdk-schema@0.38.17
55
+ - @plitzi/sdk-shared@0.38.17
56
+ - @plitzi/sdk-style@0.38.17
57
+ - @plitzi/sdk-variables@0.38.17
58
+
3
59
  ## 0.38.16
4
60
 
5
61
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -1,14 +1,7 @@
1
- import { default as ComponentProvider } from '@plitzi/sdk-elements/Component/ComponentProvider';
2
- import { default as withElement } from '@plitzi/sdk-elements/Element/hocs/withElement';
3
- import { default as useElement } from '@plitzi/sdk-elements/Element/hooks/useElement';
4
- import { default as useRscData } from '@plitzi/sdk-elements/Element/hooks/useRscData';
5
- import { default as JsxManager } from '@plitzi/sdk-elements/Element/JsxManager';
6
- import { default as PluginManager } from '@plitzi/sdk-elements/Element/PluginManager';
7
- import { default as PluginRemote } from '@plitzi/sdk-elements/Element/PluginRemote';
8
- import { default as ReplicaProvider } from '@plitzi/sdk-elements/Element/ReplicaProvider';
9
- import { default as RootElement } from '@plitzi/sdk-elements/Element/RootElement';
10
- import { default as ComponentContext } from '@plitzi/sdk-shared/elements/ComponentContext';
11
- import { default as usePlitzi, PlitziProvider } from '@plitzi/sdk-shared/hooks/usePlitzi';
1
+ import { withElement, useElement, useRscData, JsxManager, PluginManager, PluginRemote, ReplicaProvider, RootElement } from '@plitzi/sdk-elements';
2
+ import { ComponentProvider } from '@plitzi/sdk-elements/Component';
3
+ import { ComponentContext } from '@plitzi/sdk-shared/elements';
4
+ import { usePlitzi, PlitziProvider } from '@plitzi/sdk-shared/hooks';
12
5
  import { useBuilderStore } from '@plitzi/sdk-shared/store';
13
6
  import { AppProps } from './App';
14
7
  import { ComponentPlugin, RenderMode, Server } from '@plitzi/sdk-shared';
package/dist/index.html CHANGED
@@ -53,7 +53,7 @@
53
53
  webKey: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxIiwib3JpZ2lucyI6WyJodHRwczovL3dlYnNpdGUucGxpdHppLmFwcCIsImh0dHBzOi8vcGxpdHppLmxvY2FsIiwiaHR0cHM6Ly9hcHAucGxpdHppLmxvY2FsIiwiaHR0cHM6Ly9hcHAucGxpdHppLmxvY2FsOjMwMDAiLCJodHRwczovL2FwcC5wbGl0emkubG9jYWw6MzAwMSIsImh0dHBzOi8vc3NyLnBsaXR6aS5sb2NhbCIsImh0dHBzOi8vc2VydmVyLnBsaXR6aS5sb2NhbCIsImh0dHA6Ly9sb2NhbGhvc3Q6MzAwMCIsImh0dHA6Ly9sb2NhbGhvc3Q6ODA4MCIsImh0dHA6Ly8xMjcuMC4wLjE6ODA4MCIsImh0dHBzOi8vZGV2LnBsaXR6aS5jb20iLCJodHRwczovL3BsaXR6aS5jb20iLCJodHRwczovL3N0Zy5wbGl0emkuY29tIl0sImlzcyI6Imh0dHBzOi8vc2VydmVyLnBsaXR6aS5sb2NhbCIsImF1ZCI6WyJodHRwczovL3BsaXR6aS5sb2NhbCIsImh0dHBzOi8vYXBwLnBsaXR6aS5sb2NhbCIsImh0dHBzOi8vYXBwLnBsaXR6aS5sb2NhbDozMDAwIiwiaHR0cHM6Ly9hcHAucGxpdHppLmxvY2FsOjMwMDEiLCJodHRwczovL2FwaS5wbGl0emkubG9jYWwiLCJodHRwczovL3Nzci5wbGl0emkubG9jYWwiLCJodHRwczovL3NlcnZlci5wbGl0emkubG9jYWwiLCJodHRwczovL21jcC5wbGl0emkubG9jYWwiLCJodHRwczovL2F1dGgucGxpdHppLmxvY2FsIiwiaHR0cDovLzEyNy4wLjAuMTo1MzAwIiwiaHR0cDovL2xvY2FsaG9zdDo1MTgwIl0sInNjb3BlIjoic3BhY2U6cmVuZGVyIiwiaWF0IjoxNzkwMjEzMjg5LCJqdGkiOiJhZDgyN2EyMjliZjhlMzk3IiwibmJmIjoxNzkwMjEzMjg5fQ.dedpVVA5Nv3Xr7nEOZ8UmEJcIamF9AHGnLgqQyDV8-k',
54
54
  // The actor. Without it the builder loads and every write is refused, since authorization is
55
55
  // can(actor, space, permission). Both halves come from `yarn token 1 --user admin` in plitzi-sdk-server.
56
- userKey: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxIiwiaXNzIjoiaHR0cHM6Ly9zZXJ2ZXIucGxpdHppLmxvY2FsIiwiYXVkIjpbImh0dHBzOi8vcGxpdHppLmxvY2FsIiwiaHR0cHM6Ly9hcHAucGxpdHppLmxvY2FsIiwiaHR0cHM6Ly9hcHAucGxpdHppLmxvY2FsOjMwMDAiLCJodHRwczovL2FwcC5wbGl0emkubG9jYWw6MzAwMSIsImh0dHBzOi8vYXBpLnBsaXR6aS5sb2NhbCIsImh0dHBzOi8vc3NyLnBsaXR6aS5sb2NhbCIsImh0dHBzOi8vc2VydmVyLnBsaXR6aS5sb2NhbCIsImh0dHBzOi8vbWNwLnBsaXR6aS5sb2NhbCIsImh0dHBzOi8vYXV0aC5wbGl0emkubG9jYWwiLCJodHRwOi8vMTI3LjAuMC4xOjUzMDAiLCJodHRwOi8vbG9jYWxob3N0OjUxODAiXSwic2NvcGUiOiJ1c2VyIiwiZXhwIjoxNzkxNTQ1ODcxLCJpYXQiOjE3OTE0NTk0NzEsImp0aSI6IjMwNjQ3NmFlN2YzOTgwMmMiLCJuYmYiOjE3OTE0NTk0NzF9.1yw4JxzN9qkssRYSHAqg4hjFRvatT82PkYVGwF3SP_I',
56
+ userKey: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxIiwiaXNzIjoiaHR0cHM6Ly9zZXJ2ZXIucGxpdHppLmxvY2FsIiwiYXVkIjpbImh0dHBzOi8vcGxpdHppLmxvY2FsIiwiaHR0cHM6Ly9hcHAucGxpdHppLmxvY2FsIiwiaHR0cHM6Ly9hcHAucGxpdHppLmxvY2FsOjMwMDAiLCJodHRwczovL2FwcC5wbGl0emkubG9jYWw6MzAwMSIsImh0dHBzOi8vYXBpLnBsaXR6aS5sb2NhbCIsImh0dHBzOi8vc3NyLnBsaXR6aS5sb2NhbCIsImh0dHBzOi8vc2VydmVyLnBsaXR6aS5sb2NhbCIsImh0dHBzOi8vbWNwLnBsaXR6aS5sb2NhbCIsImh0dHBzOi8vYXV0aC5wbGl0emkubG9jYWwiLCJodHRwOi8vMTI3LjAuMC4xOjUzMDAiLCJodHRwOi8vbG9jYWxob3N0OjUxODAiXSwic2NvcGUiOiJ1c2VyIiwiZXhwIjoxNzkyMjc4MTE2LCJpYXQiOjE3OTIxOTE3MTYsImp0aSI6ImViZTJhZGZmOWNlMmEyMjQiLCJuYmYiOjE3OTIxOTE3MTZ9.LGVl_ka6p_TFxiWcuIvnnUUMueSH472eE2UkrMhylyY',
57
57
  environment: 'main',
58
58
  functionsWorkerUrl: '/plitzi-functions-worker.js',
59
59
  sdkIconsStylePath: '',
@@ -1,5 +1,6 @@
1
- import { BuilderContextValue, ComponentDefinition, Element, Schema, Style } from '@plitzi/sdk-shared';
2
- import { NetworkContextValue } from '@plitzi/sdk-shared/network/NetworkContext';
1
+ import { ComponentDefinition, Element, Schema, Style } from '@plitzi/sdk-shared';
2
+ import { BuilderContextValue } from '@plitzi/sdk-shared/builder';
3
+ import { NetworkContextValue } from '@plitzi/sdk-shared/network';
3
4
  export declare const getClipboardDataProcessed: (clipboardData?: DataTransfer) => Promise<{
4
5
  dataType: "text";
5
6
  data: string[];
@@ -1,4 +1,4 @@
1
- import { ElementMotion as Motion } from '@plitzi/sdk-shared/schema/motion';
1
+ import { ElementMotion as Motion } from '@plitzi/sdk-shared/schema';
2
2
  export type ElementMotionProps = {
3
3
  motion?: Motion;
4
4
  /** Whether the element holds children — what arriving one by one is about. */
@@ -1,4 +1,4 @@
1
- import { MotionTrigger } from '@plitzi/sdk-shared/schema/motion';
1
+ import { MotionTrigger } from '@plitzi/sdk-shared/schema';
2
2
  export type MotionTriggerOptionProps = {
3
3
  trigger: MotionTrigger;
4
4
  label: string;
@@ -1,4 +1,4 @@
1
- import { ElementMotion, MotionEnter, MotionLoop, MotionTrigger } from '@plitzi/sdk-shared/schema/motion';
1
+ import { ElementMotion, MotionEnter, MotionLoop, MotionTrigger } from '@plitzi/sdk-shared/schema';
2
2
  export type Timing = 'duration' | 'delay' | 'stagger';
3
3
  /** What the fields hold while typed: the presets as chosen, the timings as written. */
4
4
  export type Draft = {
@@ -1,4 +1,4 @@
1
- import { ConnectorTokenScope } from '@plitzi/sdk-shared';
1
+ import { ConnectorTokenScope } from '@plitzi/sdk-shared/connectors';
2
2
  export type TokenInputProps = {
3
3
  label: string;
4
4
  /** Hover text. The same line is available in full under the section's help toggle via `FieldHelp`. */
@@ -1,5 +1,6 @@
1
1
  import { Field } from '@plitzi/plitzi-ui/QueryBuilder';
2
- import { FlagResolution, SchemaFlag } from '@plitzi/sdk-shared';
2
+ import { SchemaFlag } from '@plitzi/sdk-shared';
3
+ import { FlagResolution } from '@plitzi/sdk-shared/flags';
3
4
  export type FlagItemProps = {
4
5
  name: string;
5
6
  flag: SchemaFlag;
@@ -1,4 +1,4 @@
1
- import { ChangeEntry as Entry } from '@plitzi/sdk-shared';
1
+ import { ChangeEntry as Entry } from '@plitzi/sdk-shared/history';
2
2
  export type ChangeEntryProps = {
3
3
  entry: Entry;
4
4
  };
@@ -1,4 +1,4 @@
1
- import { TSnapshotMarker } from '@plitzi/sdk-shared';
1
+ import { TSnapshotMarker } from '@plitzi/sdk-shared/network';
2
2
  export type SnapshotMarkerProps = {
3
3
  snapshot: TSnapshotMarker;
4
4
  };
@@ -1,5 +1,5 @@
1
- import { ChangeEntry, ChangeKind, ChangeOrigin, TSnapshotMarker, TSpaceChanges } from '@plitzi/sdk-shared';
2
- import { ChangeAction } from '@plitzi/sdk-shared/history';
1
+ import { ChangeEntry, ChangeKind, ChangeOrigin, ChangeAction } from '@plitzi/sdk-shared/history';
2
+ import { TSnapshotMarker, TSpaceChanges } from '@plitzi/sdk-shared/network';
3
3
  export type ChangeRecord = TSpaceChanges['changes'][number];
4
4
  /** Saves close enough together to read as one piece of work. A guess to revisit against real sessions (RFC 0003). */
5
5
  export declare const GROUP_WINDOW_MS = 60000;
@@ -46,11 +46,11 @@ export declare const ORIGIN_FILTERS: ('' | ChangeOrigin)[];
46
46
  export declare const originFilterLabel: (origin: "" | ChangeOrigin) => string;
47
47
  export declare const KIND_LABEL: Record<ChangeKind, string>;
48
48
  /** What a row of saves did, each thing on its own line and said once — ten keystrokes in one text are one line. */
49
- export declare const groupLines: (group: ChangeGroup) => import('@plitzi/sdk-shared').ChangeLine[];
49
+ export declare const groupLines: (group: ChangeGroup) => import('@plitzi/sdk-shared/history').ChangeLine[];
50
50
  /** How many lines a folded row shows before it says how many more there are. */
51
51
  export declare const FOLDED_LINES = 5;
52
52
  /** What the detail of an entry shows: the fields that changed, less the tree. */
53
- export declare const detailOf: (entry: ChangeEntry) => import('@plitzi/sdk-shared').FieldChange[];
53
+ export declare const detailOf: (entry: ChangeEntry) => import('@plitzi/sdk-shared/history').FieldChange[];
54
54
  /**
55
55
  * The entries a save's detail lists: what was edited in more than its place in the tree. An add, a removal or a move is
56
56
  * already its line, and the line is the link to the element.
@@ -1,4 +1,4 @@
1
- import { ChangeOrigin } from '@plitzi/sdk-shared';
1
+ import { ChangeOrigin } from '@plitzi/sdk-shared/history';
2
2
  export type ChangeFilters = {
3
3
  origin?: ChangeOrigin;
4
4
  entityId?: string;
@@ -11,8 +11,8 @@ export type ChangeFilters = {
11
11
  * that is when there is something new to show — and every loaded page is revalidated, since a filter can move rows.
12
12
  */
13
13
  declare const useSpaceChanges: (filters: ChangeFilters) => {
14
- changes: Omit<import('@plitzi/sdk-shared').SpaceChange, "environment" | "spaceId">[];
15
- snapshots: import('@plitzi/sdk-shared').TSnapshotMarker[];
14
+ changes: Omit<import('@plitzi/sdk-shared/history').SpaceChange, "environment" | "spaceId">[];
15
+ snapshots: import('@plitzi/sdk-shared/network').TSnapshotMarker[];
16
16
  complete: boolean;
17
17
  loading: boolean;
18
18
  error: Error | undefined;
@@ -1,4 +1,4 @@
1
- import { RTCallback, RTEvent, RTMessageManagedClient } from '@plitzi/sdk-shared';
1
+ import { RTCallback, RTEvent, RTMessageManagedClient } from '@plitzi/sdk-shared/websockets';
2
2
  export type BuilderSubscriptionsContextValue = {
3
3
  includeSubscriptions: boolean;
4
4
  supportRealTime: boolean;
@@ -0,0 +1,9 @@
1
+ import { ErrorLink } from '@apollo/client/link/error';
2
+ /**
3
+ * Turns a GraphQL transport refusal into a session signal. A session dies at the server — revoked from another
4
+ * device, an account deactivated — and the client finds out from whichever request happens to be refused next. This
5
+ * is what makes that request count for something instead of surfacing as one failed query.
6
+ *
7
+ * Only transport-level refusals are read: a GraphQL error inside a 200 is the schema's business, not the session's.
8
+ */
9
+ export declare const createAuthFailureLink: (uri?: string) => ErrorLink;
@@ -0,0 +1,15 @@
1
+ import { ApolloLink } from '@apollo/client/core';
2
+ type WithoutTypename<T> = T extends Array<infer U> ? Array<WithoutTypename<U>> : T extends object ? {
3
+ [K in keyof T as K extends '__typename' ? never : K]: WithoutTypename<T[K]>;
4
+ } : T;
5
+ /**
6
+ * Recursively removes __typename from objects and arrays.
7
+ * Optimized to avoid creating new objects/arrays if not needed.
8
+ */
9
+ export declare function stripTypenameDeep<T>(value: T): WithoutTypename<T>;
10
+ /**
11
+ * ApolloLink that strips __typename from the result data.
12
+ * Uses optimized stripTypenameDeep.
13
+ */
14
+ export declare const createStripTypenameLink: () => ApolloLink;
15
+ export {};
@@ -1,6 +1,4 @@
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';
1
+ import { BuilderMutationsMap, BuilderQueriesMap, BuilderNetworkContextValue, SpaceEventMap } from '@plitzi/sdk-shared/network';
4
2
  export type BuilderNetwork = BuilderNetworkContextValue<BuilderQueriesMap, BuilderMutationsMap, SpaceEventMap>;
5
3
  /**
6
4
  * The builder's network: its queries, mutations and the space's events, typed by what the builder asks for.
@@ -1,4 +1,4 @@
1
- import { BuilderQueriesMap } from '@plitzi/sdk-shared';
1
+ import { BuilderQueriesMap } from '@plitzi/sdk-shared/network';
2
2
  import { KeyedMutator, SWRConfiguration } from 'swr';
3
3
  declare function useGraphQL<K extends keyof BuilderQueriesMap>(queryKey: K | null, transform?: undefined, variables?: Record<string, unknown>, config?: SWRConfiguration<BuilderQueriesMap[K]>): {
4
4
  data: BuilderQueriesMap[K] | undefined;
@@ -1,5 +1,5 @@
1
1
  import { ApolloClient } from '@apollo/client/core';
2
- import { SpaceEventMap, SpaceEventName } from '@plitzi/sdk-shared';
2
+ import { SpaceEventMap, SpaceEventName } from '@plitzi/sdk-shared/network';
3
3
  import { ReactNode } from 'react';
4
4
  export type UseSubscriptionsManagerProps = {
5
5
  onMessage?: (message: ReactNode, type?: 'info' | 'success' | 'warning' | 'error' | 'default') => void;
@@ -1,4 +1,4 @@
1
- import { RTEvent, RTMessageManagedClient } from '@plitzi/sdk-shared/websockets/RTCodec';
1
+ import { RTEvent, RTMessageManagedClient } from '@plitzi/sdk-shared/websockets';
2
2
  export type UseWebsocketProps<T> = {
3
3
  isBinary?: boolean;
4
4
  url: string;
@@ -1,7 +1,7 @@
1
1
  import { ReducerMiddlewareCallback } from '@plitzi/plitzi-ui/hooks/useReducerWithMiddleware';
2
- import { SchemaReducerActions } from '@plitzi/sdk-schema/SchemaReducer';
2
+ import { SchemaReducerActions } from '@plitzi/sdk-schema';
3
3
  import { Schema, Style } from '@plitzi/sdk-shared';
4
- import { StyleReducerActions } from '@plitzi/sdk-style/StyleReducer';
4
+ import { StyleReducerActions } from '@plitzi/sdk-style';
5
5
  import { ActionDispatch } from 'react';
6
6
  export type QueueItem<TState, TDispatchAction> = {
7
7
  action: TDispatchAction;
@@ -1,6 +1,5 @@
1
1
  import { QueuedChange } from '../QueueContext';
2
- import { BuilderMutationsMap, BuilderQueriesMap } from '@plitzi/sdk-shared';
3
- import { NetworkContextValue } from '@plitzi/sdk-shared/network/NetworkContext';
2
+ import { BuilderMutationsMap, BuilderQueriesMap, NetworkContextValue } from '@plitzi/sdk-shared/network';
4
3
  export type UseQueueManagerProps = {
5
4
  delay?: number;
6
5
  mutate: NetworkContextValue<BuilderQueriesMap, BuilderMutationsMap>['mutate'];
@@ -1,4 +1,4 @@
1
- import { RootElements } from '@plitzi/sdk-schema/helpers/elementTree';
1
+ import { RootElements } from '@plitzi/sdk-schema';
2
2
  export type PluginInUseProps = {
3
3
  usage: RootElements[];
4
4
  };
@@ -1,4 +1,4 @@
1
- import { RootElements } from '@plitzi/sdk-schema/helpers/elementTree';
1
+ import { RootElements } from '@plitzi/sdk-schema';
2
2
  import { ComponentDefinition, Schema } from '@plitzi/sdk-shared';
3
3
  /** The plugin a plugin resource installed: the main one of the bundle its manifest roots. */
4
4
  export declare const mainPluginOf: (plugins: Record<string, ComponentDefinition>, root: string) => ComponentDefinition | undefined;
@@ -1,4 +1,4 @@
1
- import { TSpaceIssues } from '@plitzi/sdk-shared';
1
+ import { TSpaceIssues } from '@plitzi/sdk-shared/network';
2
2
  export type SpaceIssuesProps = {
3
3
  issues: TSpaceIssues;
4
4
  /** Said above the list — why it is being shown, when that is not simply because someone asked. */
@@ -1,5 +1,5 @@
1
1
  import { IssueSeverity } from '../../helpers';
2
- import { TSpaceIssue } from '@plitzi/sdk-shared';
2
+ import { TSpaceIssue } from '@plitzi/sdk-shared/network';
3
3
  export type IssueGroupProps = {
4
4
  title: string;
5
5
  issues: TSpaceIssue[];
@@ -1,5 +1,5 @@
1
1
  import { IssueSeverity } from '../../helpers';
2
- import { TSpaceIssue } from '@plitzi/sdk-shared';
2
+ import { TSpaceIssue } from '@plitzi/sdk-shared/network';
3
3
  export type IssueItemProps = {
4
4
  issue: TSpaceIssue;
5
5
  severity: IssueSeverity;
@@ -1,4 +1,4 @@
1
- import { TSpaceSuggestion } from '@plitzi/sdk-shared';
1
+ import { TSpaceSuggestion } from '@plitzi/sdk-shared/network';
2
2
  export type SuggestionGroupProps = {
3
3
  suggestions: TSpaceSuggestion[];
4
4
  onDismiss: () => void;
@@ -1,4 +1,4 @@
1
- import { TSpaceSuggestion } from '@plitzi/sdk-shared';
1
+ import { TSpaceSuggestion } from '@plitzi/sdk-shared/network';
2
2
  export type SuggestionItemProps = {
3
3
  suggestion: TSpaceSuggestion;
4
4
  /** Called once an element is on screen, so whatever holds the list can get out of the way. */
@@ -1,4 +1,4 @@
1
- import { TSpaceIssue, TSpaceIssues } from '@plitzi/sdk-shared';
1
+ import { TSpaceIssue, TSpaceIssues } from '@plitzi/sdk-shared/network';
2
2
  /** What the server answers a publish of a space that would ship broken with, carrying the issues it found. */
3
3
  export declare const SPACE_INVALID = "SPACE_INVALID";
4
4
  /** Said above the list when it is shown instead of the publish someone asked for. */
@@ -5,5 +5,5 @@
5
5
  * editors as a schema update. Here the returned schema is applied as a change that already happened on the server —
6
6
  * from subscriptions — so the save queue does not send it straight back. Resolves with the changes made.
7
7
  */
8
- declare const useFixSpaceIssues: () => () => Promise<import('@plitzi/sdk-shared/network/graphql/builder/Mutations/Space/SpaceFixIssuesMutation').TSpaceFix[]>;
8
+ declare const useFixSpaceIssues: () => () => Promise<import('@plitzi/sdk-shared/network').TSpaceFix[]>;
9
9
  export default useFixSpaceIssues;
@@ -1,4 +1,4 @@
1
- import { TSpaceIssues } from '@plitzi/sdk-shared';
1
+ import { TSpaceIssues } from '@plitzi/sdk-shared/network';
2
2
  /**
3
3
  * Opens the list of what is wrong with the space. The same list whether someone asked for it or a publish was refused
4
4
  * over it — only the line above it changes — and following an element out of it closes it, so the element is what is
@@ -1,4 +1,4 @@
1
- import { TSpaceIssues } from '@plitzi/sdk-shared';
1
+ import { TSpaceIssues } from '@plitzi/sdk-shared/network';
2
2
  /**
3
3
  * What is wrong with the space as it is SAVED, read by the same linter the publish gate runs.
4
4
  *
@@ -1,4 +1,4 @@
1
- import { TSpaceQuota } from '@plitzi/sdk-shared';
1
+ import { TSpaceQuota } from '@plitzi/sdk-shared/network';
2
2
  /** A quota figure as it is shown: whole units, grouped. */
3
3
  export declare const format: (value: number) => string;
4
4
  /** How close one ceiling is, as the three states a UI treats differently. */
@@ -1,8 +1,8 @@
1
1
  import { UndoableReducerActions } from './UndoableReducer';
2
2
  import { ReducerMiddlewareCallback } from '@plitzi/plitzi-ui/hooks/useReducerWithMiddleware';
3
- import { SchemaReducerActions } from '@plitzi/sdk-schema/SchemaReducer';
3
+ import { SchemaReducerActions } from '@plitzi/sdk-schema';
4
4
  import { Schema, Style } from '@plitzi/sdk-shared';
5
- import { StyleReducerActions } from '@plitzi/sdk-style/StyleReducer';
5
+ import { StyleReducerActions } from '@plitzi/sdk-style';
6
6
  import { ActionDispatch } from 'react';
7
7
  export type UndoableItem<TState, TDispatchAction> = {
8
8
  action: TDispatchAction;
@@ -1,4 +1,4 @@
1
- import { VisitorRoles as TVisitorRoles } from '@plitzi/sdk-shared/auth/visitorRoles';
1
+ import { VisitorRoles as TVisitorRoles } from '@plitzi/sdk-shared/auth';
2
2
  export type VisitorRolesProps = {
3
3
  /** The roles the space declares (`settings.visitorRoles`), as the builder's document holds them. */
4
4
  roles: TVisitorRoles;
@@ -1,6 +1,6 @@
1
1
  declare const _default: {
2
2
  "name": "@plitzi/plitzi-builder",
3
- "version": "0.38.16",
3
+ "version": "0.38.17",
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.3.1",
29
+ "@apollo/client": "^4.3.4",
30
30
  "@codemirror/autocomplete": "^6.20.3",
31
31
  "@codemirror/lint": "^6.9.7",
32
32
  "@codemirror/state": "^6.7.6",
33
- "@codemirror/view": "^6.43.13",
33
+ "@codemirror/view": "^6.43.14",
34
34
  "@fortawesome/fontawesome-free": "^7.3.1",
35
35
  "@plitzi/nexus": "^1.4.0",
36
36
  "@plitzi/plitzi-sdk": "workspace:*",
@@ -53,14 +53,14 @@ declare const _default: {
53
53
  "clsx": "^2.1.1",
54
54
  "comlink": "^4.4.2",
55
55
  "graphql": "^17.0.2",
56
- "graphql-ws": "^6.3.0",
56
+ "graphql-ws": "^6.4.1",
57
57
  "immer": "^11.1.21",
58
58
  "jszip": "^3.10.2",
59
- "react-hook-form": "^7.89.0",
59
+ "react-hook-form": "^7.90.0",
60
60
  "react-router-dom": "^7.18.4",
61
61
  "swr": "^2.5.1",
62
- "uuid": "^14.0.2",
63
- "zod": "^4.6.5"
62
+ "uuid": "^14.0.3",
63
+ "zod": "^4.6.7"
64
64
  },
65
65
  "peerDependencies": {
66
66
  "react": "^19",
@@ -71,23 +71,23 @@ declare const _default: {
71
71
  "@tailwindcss/forms": "^0.5.11",
72
72
  "@tailwindcss/postcss": "^4.3.3",
73
73
  "eslint": "^9.39.5",
74
- "postcss": "^8.5.28",
74
+ "postcss": "^8.5.30",
75
75
  "postcss-scss": "^4.0.9",
76
- "prettier": "^3.9.9",
77
- "react": "^19.3.0",
78
- "react-dom": "^19.3.0",
79
- "sass": "^1.105.1",
80
- "sass-embedded": "^1.105.1",
76
+ "prettier": "^3.9.10",
77
+ "react": "^19.3.1",
78
+ "react-dom": "^19.3.1",
79
+ "sass": "^1.105.2",
80
+ "sass-embedded": "^1.105.2",
81
81
  "stylelint": "^17.16.0",
82
- "stylelint-order": "^8.1.1",
82
+ "stylelint-order": "^8.1.2",
83
83
  "stylelint-scss": "^7.3.0",
84
84
  "terser": "^5.51.2",
85
85
  "typescript": "^6.0.3",
86
- "vite": "^8.3.2",
86
+ "vite": "^8.3.4",
87
87
  "vite-plugin-dts": "^5.1.2",
88
88
  "vite-plugin-ejs": "^2.0.0",
89
89
  "vite-plugin-mkcert": "^2.1.0",
90
- "vitest": "^5.0.3"
90
+ "vitest": "^5.0.5"
91
91
  },
92
92
  "scripts": {
93
93
  "start": "vite dev --mode development",
@@ -5,7 +5,7 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __getProtoOf = Object.getPrototypeOf;
7
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
8
+ var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod, mod.exports), cb = null), mod.exports);
9
9
  var __copyProps = (to, from, except, desc) => {
10
10
  if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
11
11
  key = keys[i];
@@ -796,7 +796,7 @@ var require_react_development = /* @__PURE__ */ __commonJSMin(((exports, module)
796
796
  exports.useTransition = function() {
797
797
  return resolveDispatcher().useTransition();
798
798
  };
799
- exports.version = "19.3.0";
799
+ exports.version = "19.3.1";
800
800
  "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
801
801
  })();
802
802
  }));
@@ -1207,7 +1207,7 @@ var require_react_dom_development = /* @__PURE__ */ __commonJSMin(((exports) =>
1207
1207
  exports.useFormStatus = function() {
1208
1208
  return resolveDispatcher().useHostTransitionStatus();
1209
1209
  };
1210
- exports.version = "19.3.0";
1210
+ exports.version = "19.3.1";
1211
1211
  "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
1212
1212
  })();
1213
1213
  }));
@@ -16978,7 +16978,7 @@ var require_react_dom_client_development = /* @__PURE__ */ __commonJSMin(((expor
16978
16978
  };
16979
16979
  (function() {
16980
16980
  var isomorphicReactPackageVersion = React.version;
16981
- if ("19.3.0" !== isomorphicReactPackageVersion) throw Error("Incompatible React versions: The \"react\" and \"react-dom\" packages must have the exact same version. Instead got:\n - react: " + (isomorphicReactPackageVersion + "\n - react-dom: 19.3.0\nLearn more: https://react.dev/warnings/version-mismatch"));
16981
+ if ("19.3.1" !== isomorphicReactPackageVersion) throw Error("Incompatible React versions: The \"react\" and \"react-dom\" packages must have the exact same version. Instead got:\n - react: " + (isomorphicReactPackageVersion + "\n - react-dom: 19.3.1\nLearn more: https://react.dev/warnings/version-mismatch"));
16982
16982
  })();
16983
16983
  "function" === typeof Map && null != Map.prototype && "function" === typeof Map.prototype.forEach && "function" === typeof Set && null != Set.prototype && "function" === typeof Set.prototype.clear && "function" === typeof Set.prototype.forEach || console.error("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://react.dev/link/react-polyfills");
16984
16984
  ReactDOMSharedInternals.findDOMNode = function(componentOrElement) {
@@ -16996,10 +16996,10 @@ var require_react_dom_client_development = /* @__PURE__ */ __commonJSMin(((expor
16996
16996
  if (!(function() {
16997
16997
  var internals = {
16998
16998
  bundleType: 1,
16999
- version: "19.3.0",
16999
+ version: "19.3.1",
17000
17000
  rendererPackageName: "react-dom",
17001
17001
  currentDispatcherRef: ReactSharedInternals,
17002
- reconcilerVersion: "19.3.0"
17002
+ reconcilerVersion: "19.3.1"
17003
17003
  };
17004
17004
  internals.overrideHookState = overrideHookState;
17005
17005
  internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -17053,7 +17053,7 @@ var require_react_dom_client_development = /* @__PURE__ */ __commonJSMin(((expor
17053
17053
  listenToAllSupportedEvents(container);
17054
17054
  return new ReactDOMHydrationRoot(initialChildren);
17055
17055
  };
17056
- exports.version = "19.3.0";
17056
+ exports.version = "19.3.1";
17057
17057
  "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
17058
17058
  })();
17059
17059
  }));