@plitzi/plitzi-builder 0.32.25 → 0.33.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +41 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.html +4 -3
- package/dist/modules/App/AppContainer/containers/ContainerConnectors.d.ts +2 -0
- package/dist/modules/App/AppContainer/containers/ContainerCredentials.d.ts +2 -0
- package/dist/modules/App/AppProvider.d.ts +1 -2
- package/dist/modules/Builder/components/BuilderElementTools/ElementSettings.d.ts +5 -1
- package/dist/modules/Collaboration/CollaborationHelper.d.ts +53 -0
- package/dist/modules/Collaboration/components/CollaboratorArea/CollaboratorArea.d.ts +16 -0
- package/dist/modules/Collaboration/components/CollaboratorArea/CollaboratorCursor.d.ts +9 -0
- package/dist/modules/Collaboration/components/CollaboratorArea/index.d.ts +3 -0
- package/dist/modules/Collaboration/components/CollaboratorAvatar/CollaboratorAvatar.d.ts +10 -0
- package/dist/modules/Collaboration/components/CollaboratorAvatar/index.d.ts +3 -0
- package/dist/modules/Collaboration/hooks/useCollaboratorCursor.d.ts +22 -0
- package/dist/modules/Collaboration/hooks/useCollaboratorElements.d.ts +8 -0
- package/dist/modules/Collaboration/hooks/useCollaborators.d.ts +17 -0
- package/dist/modules/Connectors/Connectors.d.ts +2 -0
- package/dist/modules/Connectors/ConnectorsContext.d.ts +13 -0
- package/dist/modules/Connectors/ConnectorsContextProvider.d.ts +14 -0
- package/dist/modules/Connectors/components/ConnectorAdvancedEditor/ConnectorAdvancedEditor.d.ts +14 -0
- package/dist/modules/Connectors/components/ConnectorAdvancedEditor/index.d.ts +2 -0
- package/dist/modules/Connectors/components/ConnectorBasicEditor/ConnectorBasicEditor.d.ts +7 -0
- package/dist/modules/Connectors/components/ConnectorBasicEditor/index.d.ts +2 -0
- package/dist/modules/Connectors/components/ConnectorEndpointEditor/ConnectorEndpointEditor.d.ts +20 -0
- package/dist/modules/Connectors/components/ConnectorEndpointEditor/index.d.ts +2 -0
- package/dist/modules/Connectors/components/ConnectorEndpointsEditor/ConnectorEndpointsEditor.d.ts +13 -0
- package/dist/modules/Connectors/components/ConnectorEndpointsEditor/index.d.ts +2 -0
- package/dist/modules/Connectors/components/ConnectorForm/ConnectorForm.d.ts +8 -0
- package/dist/modules/Connectors/components/ConnectorForm/index.d.ts +3 -0
- package/dist/modules/Connectors/components/ConnectorList/ConnectorList.d.ts +9 -0
- package/dist/modules/Connectors/components/ConnectorList/index.d.ts +3 -0
- package/dist/modules/Connectors/components/ConnectorSection/ConnectorSection.d.ts +24 -0
- package/dist/modules/Connectors/components/ConnectorSection/ConnectorSectionContext.d.ts +8 -0
- package/dist/modules/Connectors/components/ConnectorSection/index.d.ts +3 -0
- package/dist/modules/Connectors/components/FieldGrid/FieldGrid.d.ts +22 -0
- package/dist/modules/Connectors/components/FieldGrid/index.d.ts +2 -0
- package/dist/modules/Connectors/components/FieldHelp/FieldHelp.d.ts +11 -0
- package/dist/modules/Connectors/components/FieldHelp/index.d.ts +2 -0
- package/dist/modules/Connectors/components/TokenInput/TokenInput.d.ts +19 -0
- package/dist/modules/Connectors/components/TokenInput/index.d.ts +2 -0
- package/dist/modules/Connectors/helpers/manifestDoc.d.ts +41 -0
- package/dist/modules/Connectors/helpers/parseManifest.d.ts +17 -0
- package/dist/modules/Connectors/helpers/summarizeManifest.d.ts +18 -0
- package/dist/modules/Connectors/helpers/updateManifest.d.ts +23 -0
- package/dist/modules/Connectors/helpers/validateManifest.d.ts +15 -0
- package/dist/modules/Connectors/index.d.ts +4 -0
- package/dist/modules/Credentials/Credentials.d.ts +9 -0
- package/dist/modules/Credentials/index.d.ts +1 -0
- package/dist/modules/Navigation/NavigationProvider.d.ts +6 -0
- package/dist/modules/Network/NetworkSubscriptionsContextProvider.d.ts +4 -0
- package/dist/modules/Network/contexts/BuilderSubscriptionsContext.d.ts +3 -4
- package/dist/modules/Network/hooks/useSubscriptionsManager.d.ts +9 -9
- package/dist/modules/Space/Models/SpaceCredentialForm.d.ts +4 -0
- package/dist/modules/Space/helpers/buildCredentialData.d.ts +17 -0
- package/dist/package.json.d.ts +15 -16
- package/dist/plitzi-builder-dev-vendor.js.map +1 -1
- package/dist/plitzi-builder-dev-vendor.js.map.gz +0 -0
- package/dist/plitzi-builder.css +1 -1
- package/dist/plitzi-builder.css.gz +0 -0
- package/dist/plitzi-builder.js +2234 -3054
- package/dist/plitzi-builder.js.gz +0 -0
- package/package.json +27 -28
- package/dist/modules/App/AppContainer/containers/ContainerCollections.d.ts +0 -2
- package/dist/modules/Builder/components/BuilderCollaborator/BuilderCollaboratorArea.d.ts +0 -13
- package/dist/modules/Builder/components/BuilderCollaborator/BuilderCollaboratorCursor.d.ts +0 -9
- package/dist/modules/Builder/components/BuilderCollaborator/BuilderCollaboratorHeaderUser.d.ts +0 -9
- package/dist/modules/Builder/hooks/useNormalizedCursor.d.ts +0 -25
- package/dist/modules/Collection/CollectionContextProvider.d.ts +0 -8
- package/dist/modules/Collection/Collections.d.ts +0 -2
- package/dist/modules/Collection/Models/CollectionFieldForm.d.ts +0 -41
- package/dist/modules/Collection/Models/CollectionForm.d.ts +0 -13
- package/dist/modules/Collection/Models/CollectionRecordForm/CollectionRecordForm.d.ts +0 -14
- package/dist/modules/Collection/Models/CollectionRecordForm/CollectionRecordFormHelper.d.ts +0 -19
- package/dist/modules/Collection/Models/CollectionRecordForm/index.d.ts +0 -3
- package/dist/modules/Collection/components/Collection/Collection.d.ts +0 -9
- package/dist/modules/Collection/components/Collection/index.d.ts +0 -3
- package/dist/modules/Collection/components/CollectionContainer/CollectionContainer.d.ts +0 -10
- package/dist/modules/Collection/components/CollectionContainer/CollectionRecord.d.ts +0 -13
- package/dist/modules/Collection/components/CollectionContainer/CollectionRecords.d.ts +0 -10
- package/dist/modules/Collection/components/CollectionContainer/index.d.ts +0 -3
- package/dist/modules/Collection/components/CollectionField.d.ts +0 -11
- package/dist/modules/Collection/index.d.ts +0 -1
- package/dist/modules/Navigation/NavigationContextProvider.d.ts +0 -7
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ConnectorAuth, ConnectorManifestDraft, ConnectorReadEndpoint, ConnectorWriteEndpoint } from '@plitzi/sdk-shared';
|
|
2
|
+
export type EndpointKind = 'read' | 'write';
|
|
3
|
+
/**
|
|
4
|
+
* Immutable setters for the parts of a manifest the basic editor exposes.
|
|
5
|
+
*
|
|
6
|
+
* They live outside the components because the nesting is the awkward part — `endpoints.read.list.query` is four
|
|
7
|
+
* levels down — and every field would otherwise repeat the same spread chain, which is exactly where a typo
|
|
8
|
+
* silently drops a sibling key.
|
|
9
|
+
*/
|
|
10
|
+
export declare const setConnection: <K extends keyof ConnectorManifestDraft>(manifest: ConnectorManifestDraft, key: K, value: ConnectorManifestDraft[K]) => ConnectorManifestDraft;
|
|
11
|
+
/** An empty name and value mean the scheme is incomplete, so the whole `auth` block goes rather than half of it. */
|
|
12
|
+
export declare const setAuth: <K extends keyof ConnectorAuth>(manifest: ConnectorManifestDraft, key: K, value: ConnectorAuth[K]) => ConnectorManifestDraft;
|
|
13
|
+
export declare const setReadEndpoint: (manifest: ConnectorManifestDraft, name: string, endpoint: ConnectorReadEndpoint) => ConnectorManifestDraft;
|
|
14
|
+
export declare const setWriteEndpoint: (manifest: ConnectorManifestDraft, name: string, endpoint: ConnectorWriteEndpoint) => ConnectorManifestDraft;
|
|
15
|
+
export declare const removeEndpoint: (manifest: ConnectorManifestDraft, kind: EndpointKind, name: string) => ConnectorManifestDraft;
|
|
16
|
+
/**
|
|
17
|
+
* Renames an endpoint in place.
|
|
18
|
+
*
|
|
19
|
+
* The key is the name elements address the endpoint by, so the entry is rebuilt in order rather than deleted and
|
|
20
|
+
* appended — a list that reshuffles itself while being typed in is its own kind of broken.
|
|
21
|
+
*/
|
|
22
|
+
export declare const renameEndpoint: (manifest: ConnectorManifestDraft, kind: EndpointKind, from: string, to: string) => ConnectorManifestDraft;
|
|
23
|
+
export declare const setMediaBaseUrl: (manifest: ConnectorManifestDraft, baseUrl: string) => ConnectorManifestDraft;
|
|
@@ -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,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
|
|
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 {
|
|
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
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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
|
|
17
|
-
unsubscribe: (
|
|
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;
|
package/dist/package.json.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
"name": "@plitzi/plitzi-builder",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.33.1",
|
|
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.
|
|
29
|
+
"@apollo/client": "^4.2.11",
|
|
30
30
|
"@fortawesome/fontawesome-free": "^7.3.1",
|
|
31
|
-
"@plitzi/nexus": "^1.
|
|
31
|
+
"@plitzi/nexus": "^1.1.0",
|
|
32
32
|
"@plitzi/plitzi-sdk": "workspace:*",
|
|
33
|
-
"@plitzi/plitzi-ui": "^1.6.
|
|
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.
|
|
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.
|
|
52
|
-
"immer": "^11.1.
|
|
50
|
+
"graphql-ws": "^6.2.1",
|
|
51
|
+
"immer": "^11.1.16",
|
|
53
52
|
"jszip": "^3.10.1",
|
|
54
|
-
"react-hook-form": "^7.
|
|
53
|
+
"react-hook-form": "^7.85.0",
|
|
55
54
|
"react-router-dom": "^7.18.2",
|
|
56
|
-
"swr": "^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.
|
|
76
|
+
"cypress": "15.20.1",
|
|
78
77
|
"eslint": "^9.39.5",
|
|
79
78
|
"eslint-plugin-import": "^2.32.0",
|
|
80
|
-
"flow-bin": "^0.
|
|
81
|
-
"postcss": "^8.5.
|
|
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.
|
|
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.
|
|
95
|
+
"terser": "^5.50.0",
|
|
97
96
|
"typescript": "^6.0.3",
|
|
98
|
-
"vite": "^8.2.
|
|
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",
|