@plitzi/plitzi-builder 0.32.25 → 0.33.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 (83) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/index.d.ts +2 -1
  3. package/dist/index.html +4 -3
  4. package/dist/modules/App/AppContainer/containers/ContainerConnectors.d.ts +2 -0
  5. package/dist/modules/App/AppContainer/containers/ContainerCredentials.d.ts +2 -0
  6. package/dist/modules/App/AppProvider.d.ts +1 -2
  7. package/dist/modules/Builder/components/BuilderElementTools/ElementSettings.d.ts +5 -1
  8. package/dist/modules/Collaboration/CollaborationHelper.d.ts +53 -0
  9. package/dist/modules/Collaboration/components/CollaboratorArea/CollaboratorArea.d.ts +16 -0
  10. package/dist/modules/Collaboration/components/CollaboratorArea/CollaboratorCursor.d.ts +9 -0
  11. package/dist/modules/Collaboration/components/CollaboratorArea/index.d.ts +3 -0
  12. package/dist/modules/Collaboration/components/CollaboratorAvatar/CollaboratorAvatar.d.ts +10 -0
  13. package/dist/modules/Collaboration/components/CollaboratorAvatar/index.d.ts +3 -0
  14. package/dist/modules/Collaboration/hooks/useCollaboratorCursor.d.ts +22 -0
  15. package/dist/modules/Collaboration/hooks/useCollaboratorElements.d.ts +8 -0
  16. package/dist/modules/Collaboration/hooks/useCollaborators.d.ts +17 -0
  17. package/dist/modules/Connectors/Connectors.d.ts +2 -0
  18. package/dist/modules/Connectors/ConnectorsContext.d.ts +13 -0
  19. package/dist/modules/Connectors/ConnectorsContextProvider.d.ts +14 -0
  20. package/dist/modules/Connectors/components/ConnectorAdvancedEditor/ConnectorAdvancedEditor.d.ts +14 -0
  21. package/dist/modules/Connectors/components/ConnectorAdvancedEditor/index.d.ts +2 -0
  22. package/dist/modules/Connectors/components/ConnectorBasicEditor/ConnectorBasicEditor.d.ts +7 -0
  23. package/dist/modules/Connectors/components/ConnectorBasicEditor/index.d.ts +2 -0
  24. package/dist/modules/Connectors/components/ConnectorEndpointEditor/ConnectorEndpointEditor.d.ts +20 -0
  25. package/dist/modules/Connectors/components/ConnectorEndpointEditor/index.d.ts +2 -0
  26. package/dist/modules/Connectors/components/ConnectorEndpointsEditor/ConnectorEndpointsEditor.d.ts +13 -0
  27. package/dist/modules/Connectors/components/ConnectorEndpointsEditor/index.d.ts +2 -0
  28. package/dist/modules/Connectors/components/ConnectorForm/ConnectorForm.d.ts +8 -0
  29. package/dist/modules/Connectors/components/ConnectorForm/index.d.ts +3 -0
  30. package/dist/modules/Connectors/components/ConnectorList/ConnectorList.d.ts +9 -0
  31. package/dist/modules/Connectors/components/ConnectorList/index.d.ts +3 -0
  32. package/dist/modules/Connectors/components/ConnectorSection/ConnectorSection.d.ts +24 -0
  33. package/dist/modules/Connectors/components/ConnectorSection/ConnectorSectionContext.d.ts +8 -0
  34. package/dist/modules/Connectors/components/ConnectorSection/index.d.ts +3 -0
  35. package/dist/modules/Connectors/components/FieldGrid/FieldGrid.d.ts +22 -0
  36. package/dist/modules/Connectors/components/FieldGrid/index.d.ts +2 -0
  37. package/dist/modules/Connectors/components/FieldHelp/FieldHelp.d.ts +11 -0
  38. package/dist/modules/Connectors/components/FieldHelp/index.d.ts +2 -0
  39. package/dist/modules/Connectors/components/TokenInput/TokenInput.d.ts +19 -0
  40. package/dist/modules/Connectors/components/TokenInput/index.d.ts +2 -0
  41. package/dist/modules/Connectors/helpers/manifestDoc.d.ts +41 -0
  42. package/dist/modules/Connectors/helpers/parseManifest.d.ts +17 -0
  43. package/dist/modules/Connectors/helpers/summarizeManifest.d.ts +18 -0
  44. package/dist/modules/Connectors/helpers/updateManifest.d.ts +23 -0
  45. package/dist/modules/Connectors/helpers/validateManifest.d.ts +15 -0
  46. package/dist/modules/Connectors/index.d.ts +4 -0
  47. package/dist/modules/Credentials/Credentials.d.ts +9 -0
  48. package/dist/modules/Credentials/index.d.ts +1 -0
  49. package/dist/modules/Navigation/NavigationProvider.d.ts +6 -0
  50. package/dist/modules/Network/NetworkSubscriptionsContextProvider.d.ts +4 -0
  51. package/dist/modules/Network/contexts/BuilderSubscriptionsContext.d.ts +3 -4
  52. package/dist/modules/Network/hooks/useSubscriptionsManager.d.ts +9 -9
  53. package/dist/modules/Space/Models/SpaceCredentialForm.d.ts +4 -0
  54. package/dist/modules/Space/helpers/buildCredentialData.d.ts +17 -0
  55. package/dist/package.json.d.ts +15 -16
  56. package/dist/plitzi-builder-dev-vendor.js.map +1 -1
  57. package/dist/plitzi-builder-dev-vendor.js.map.gz +0 -0
  58. package/dist/plitzi-builder.css +1 -1
  59. package/dist/plitzi-builder.css.gz +0 -0
  60. package/dist/plitzi-builder.js +2234 -3054
  61. package/dist/plitzi-builder.js.gz +0 -0
  62. package/package.json +27 -28
  63. package/dist/modules/App/AppContainer/containers/ContainerCollections.d.ts +0 -2
  64. package/dist/modules/Builder/components/BuilderCollaborator/BuilderCollaboratorArea.d.ts +0 -13
  65. package/dist/modules/Builder/components/BuilderCollaborator/BuilderCollaboratorCursor.d.ts +0 -9
  66. package/dist/modules/Builder/components/BuilderCollaborator/BuilderCollaboratorHeaderUser.d.ts +0 -9
  67. package/dist/modules/Builder/hooks/useNormalizedCursor.d.ts +0 -25
  68. package/dist/modules/Collection/CollectionContextProvider.d.ts +0 -8
  69. package/dist/modules/Collection/Collections.d.ts +0 -2
  70. package/dist/modules/Collection/Models/CollectionFieldForm.d.ts +0 -41
  71. package/dist/modules/Collection/Models/CollectionForm.d.ts +0 -13
  72. package/dist/modules/Collection/Models/CollectionRecordForm/CollectionRecordForm.d.ts +0 -14
  73. package/dist/modules/Collection/Models/CollectionRecordForm/CollectionRecordFormHelper.d.ts +0 -19
  74. package/dist/modules/Collection/Models/CollectionRecordForm/index.d.ts +0 -3
  75. package/dist/modules/Collection/components/Collection/Collection.d.ts +0 -9
  76. package/dist/modules/Collection/components/Collection/index.d.ts +0 -3
  77. package/dist/modules/Collection/components/CollectionContainer/CollectionContainer.d.ts +0 -10
  78. package/dist/modules/Collection/components/CollectionContainer/CollectionRecord.d.ts +0 -13
  79. package/dist/modules/Collection/components/CollectionContainer/CollectionRecords.d.ts +0 -10
  80. package/dist/modules/Collection/components/CollectionContainer/index.d.ts +0 -3
  81. package/dist/modules/Collection/components/CollectionField.d.ts +0 -11
  82. package/dist/modules/Collection/index.d.ts +0 -1
  83. package/dist/modules/Navigation/NavigationContextProvider.d.ts +0 -7
@@ -0,0 +1,15 @@
1
+ import { ConnectorManifestDraft } from '@plitzi/sdk-shared';
2
+ export type ManifestValidation = {
3
+ /** What blocks the save: the engine could not execute this manifest. */
4
+ errors: string[];
5
+ /** What saves but probably does not do what the author meant — shown, never blocking. */
6
+ warnings: string[];
7
+ };
8
+ /**
9
+ * Panel-facing wrapper over the one shared manifest validator.
10
+ *
11
+ * The rules themselves live in sdk-shared because three places apply them — this form, the MCP write ops and the
12
+ * mutation that stores the row — and a manifest that the panel accepts but the server rejects is the worst of the
13
+ * three outcomes. All this adds is the flat strings the form renders.
14
+ */
15
+ export declare const validateManifest: (manifest: ConnectorManifestDraft) => ManifestValidation;
@@ -0,0 +1,4 @@
1
+ import { default as Connectors } from './Connectors';
2
+ export { default as ConnectorsContext } from './ConnectorsContext';
3
+ export { default as ConnectorsContextProvider } from './ConnectorsContextProvider';
4
+ export default Connectors;
@@ -0,0 +1,9 @@
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
+ declare const Credentials: () => import("react").JSX.Element;
9
+ export default Credentials;
@@ -0,0 +1 @@
1
+ export { default } from './Credentials';
@@ -0,0 +1,6 @@
1
+ import { ReactNode } from 'react';
2
+ export type NavigationProviderProps = {
3
+ children?: ReactNode;
4
+ };
5
+ declare const NavigationProvider: ({ children }: NavigationProviderProps) => import("react").JSX.Element | "Not Found" | "Access Denied";
6
+ export default NavigationProvider;
@@ -4,5 +4,9 @@ export type NetworkSubscriptionsContextProviderProps = {
4
4
  includeSubscriptions?: boolean;
5
5
  includeRealTime?: boolean;
6
6
  };
7
+ /**
8
+ * The realtime transport: one socket, and the fan-out of its messages to whoever registered for them. What the
9
+ * messages MEAN belongs to the Collaboration module.
10
+ */
7
11
  declare const NetworkSubscriptionsContextProvider: ({ children, includeRealTime, includeSubscriptions }: NetworkSubscriptionsContextProviderProps) => import("react").JSX.Element;
8
12
  export default NetworkSubscriptionsContextProvider;
@@ -1,11 +1,10 @@
1
- import { RTCallback, RTEvent, RTMessageManagedClient, SubscriptionCollaborator } from '@plitzi/sdk-shared';
1
+ import { RTCallback, RTEvent, RTMessageManagedClient } from '@plitzi/sdk-shared';
2
2
  export type BuilderSubscriptionsContextValue = {
3
3
  includeSubscriptions: boolean;
4
4
  supportRealTime: boolean;
5
5
  subscriptionsPush: (data: RTMessageManagedClient) => void;
6
- subscriptionsRegisterCallback: (type: RTEvent, callback: RTCallback) => void;
7
- subscriptionsUnregisterCallback: (type: RTEvent) => void;
8
- subscriptionsCollaborators: SubscriptionCollaborator[];
6
+ subscriptionsRegisterCallback: (type: RTEvent, callback: RTCallback, subscriberId?: string) => void;
7
+ subscriptionsUnregisterCallback: (type: RTEvent, subscriberId?: string) => void;
9
8
  };
10
9
  declare const BuilderSubscriptionsContext: import('react').Context<BuilderSubscriptionsContextValue>;
11
10
  export default BuilderSubscriptionsContext;
@@ -1,5 +1,5 @@
1
1
  import { ApolloClient } from '@apollo/client/core';
2
- import { BuilderSubscriptionsMap } from '@plitzi/sdk-shared';
2
+ import { SpaceEventMap, SpaceEventName } from '@plitzi/sdk-shared';
3
3
  import { ReactNode } from 'react';
4
4
  export type UseSubscriptionsManagerProps = {
5
5
  onMessage?: (message: ReactNode, type?: 'info' | 'success' | 'warning' | 'error' | 'default') => void;
@@ -7,15 +7,15 @@ export type UseSubscriptionsManagerProps = {
7
7
  environment?: string;
8
8
  disabled?: boolean;
9
9
  };
10
- type Subscription = {
11
- closed: boolean;
12
- unsubscribe(): void;
13
- name: keyof BuilderSubscriptionsMap;
14
- };
10
+ type SpaceEventHandler<T extends SpaceEventName> = (payload: SpaceEventMap[T]) => void;
11
+ /**
12
+ * One websocket subscription for the whole space, fanned out here by event name. Every edit travels on the same
13
+ * stream, so registering interest in one is a map entry rather than another subscription: the socket is opened once,
14
+ * on the first registration, and closed when the last one goes.
15
+ */
15
16
  declare const useSubscriptionsManager: ({ onMessage, client, environment, disabled }: UseSubscriptionsManagerProps) => {
16
- subscribe: <T extends keyof BuilderSubscriptionsMap>(subscriptionKey: T, variables: Record<string, unknown>, callback: (result: ApolloClient.SubscribeResult<BuilderSubscriptionsMap[T]>) => void) => false | import('@apollo/client').SubscriptionObservable<ApolloClient.SubscribeResult<BuilderSubscriptionsMap[T]>> | null;
17
- unsubscribe: (subscriptionKey: keyof BuilderSubscriptionsMap | (keyof BuilderSubscriptionsMap)[]) => void;
17
+ subscribe: <T extends SpaceEventName>(event: T, callback: SpaceEventHandler<T>) => (all?: boolean) => void;
18
+ unsubscribe: <T extends SpaceEventName>(event: T | T[], all?: boolean, callback?: SpaceEventHandler<T>) => void;
18
19
  stop: () => void;
19
- subscriptions: import('react').RefObject<Subscription[]>;
20
20
  };
21
21
  export default useSubscriptionsManager;
@@ -11,6 +11,10 @@ export declare const spaceCredentialFormSchema: z.ZodDiscriminatedUnion<[z.ZodOb
11
11
  name: z.ZodString;
12
12
  accessKeyId: z.ZodString;
13
13
  secretAccessKey: z.ZodString;
14
+ }, z.core.$strip>, z.ZodObject<{
15
+ provider: z.ZodLiteral<"custom">;
16
+ name: z.ZodString;
17
+ data: z.ZodString;
14
18
  }, z.core.$strip>, z.ZodObject<{
15
19
  provider: z.ZodLiteral<"ssr">;
16
20
  name: z.ZodString;
@@ -0,0 +1,17 @@
1
+ import { spaceCredentialFormSchema } from '../Models/SpaceCredentialForm';
2
+ import { default as z } from 'zod';
3
+ /**
4
+ * Turns a submitted credential form into the bag the API stores.
5
+ *
6
+ * Each provider keeps a different shape, and a `custom` credential keeps whatever keys its connector manifest names —
7
+ * which is why the value is parsed here rather than typed: the set of keys is the author's, not ours.
8
+ */
9
+ export declare const buildCredentialData: (values: z.infer<typeof spaceCredentialFormSchema>) => Record<string, string> | {
10
+ type: "basic";
11
+ user: string;
12
+ pass: string;
13
+ } | {
14
+ type: "token";
15
+ token: string;
16
+ };
17
+ export default buildCredentialData;
@@ -1,6 +1,6 @@
1
1
  declare const _default: {
2
2
  "name": "@plitzi/plitzi-builder",
3
- "version": "0.32.25",
3
+ "version": "0.33.0",
4
4
  "homepage": "./",
5
5
  "license": "AGPL-3.0",
6
6
  "files": [
@@ -26,13 +26,12 @@ 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.9",
29
+ "@apollo/client": "^4.2.11",
30
30
  "@fortawesome/fontawesome-free": "^7.3.1",
31
- "@plitzi/nexus": "^1.0.0",
31
+ "@plitzi/nexus": "^1.1.0",
32
32
  "@plitzi/plitzi-sdk": "workspace:*",
33
- "@plitzi/plitzi-ui": "^1.6.18",
33
+ "@plitzi/plitzi-ui": "^1.6.19",
34
34
  "@plitzi/sdk-auth": "workspace:*",
35
- "@plitzi/sdk-collections": "workspace:*",
36
35
  "@plitzi/sdk-dev-tools": "workspace:*",
37
36
  "@plitzi/sdk-elements": "workspace:*",
38
37
  "@plitzi/sdk-event-bridge": "workspace:*",
@@ -44,16 +43,16 @@ declare const _default: {
44
43
  "@plitzi/sdk-style": "workspace:*",
45
44
  "@plitzi/sdk-variables": "workspace:*",
46
45
  "@tanstack/react-virtual": "^3.14.9",
47
- "@xyflow/react": "^12.11.2",
46
+ "@xyflow/react": "^12.11.3",
48
47
  "apollo-upload-client": "^20.0.0",
49
48
  "clsx": "^2.1.1",
50
49
  "graphql": "^17.0.2",
51
- "graphql-ws": "^6.2.0",
52
- "immer": "^11.1.15",
50
+ "graphql-ws": "^6.2.1",
51
+ "immer": "^11.1.16",
53
52
  "jszip": "^3.10.1",
54
- "react-hook-form": "^7.83.0",
53
+ "react-hook-form": "^7.85.0",
55
54
  "react-router-dom": "^7.18.2",
56
- "swr": "^2.4.2",
55
+ "swr": "^2.5.1",
57
56
  "uuid": "^14.0.1",
58
57
  "zod": "^4.4.3"
59
58
  },
@@ -74,11 +73,11 @@ declare const _default: {
74
73
  "@babel/preset-react": "^8.0.1",
75
74
  "@tailwindcss/postcss": "^4.3.3",
76
75
  "css-loader": "^7.1.4",
77
- "cypress": "15.19.0",
76
+ "cypress": "15.20.1",
78
77
  "eslint": "^9.39.5",
79
78
  "eslint-plugin-import": "^2.32.0",
80
- "flow-bin": "^0.325.0",
81
- "postcss": "^8.5.25",
79
+ "flow-bin": "^0.327.0",
80
+ "postcss": "^8.5.26",
82
81
  "postcss-loader": "^8.2.1",
83
82
  "postcss-scss": "^4.0.9",
84
83
  "prettier": "^3.9.6",
@@ -88,14 +87,14 @@ declare const _default: {
88
87
  "react-refresh": "^0.18.0",
89
88
  "react-test-renderer": "^19.2.8",
90
89
  "sass": "^1.102.0",
91
- "sass-embedded": "^1.100.0",
90
+ "sass-embedded": "^1.102.0",
92
91
  "sass-loader": "^17.0.0",
93
92
  "stylelint": "^17.14.1",
94
93
  "stylelint-order": "^8.1.1",
95
94
  "stylelint-scss": "^7.2.0",
96
- "terser": "^5.49.0",
95
+ "terser": "^5.50.0",
97
96
  "typescript": "^6.0.3",
98
- "vite": "^8.2.0",
97
+ "vite": "^8.2.1",
99
98
  "vite-plugin-dts": "^5.0.3",
100
99
  "vite-plugin-ejs": "^2.0.0",
101
100
  "vite-plugin-mkcert": "^2.1.0",