@plitzi/sdk-shared 0.37.8 → 0.37.10
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 +817 -0
- package/dist/actions/functions.d.ts +12 -3
- package/dist/actions/functions.mjs +8 -5
- package/dist/actions/index.d.ts +2 -2
- package/dist/actions/index.mjs +6 -6
- package/dist/actions/triggerParams.mjs +7 -6
- package/dist/actions/validateDocument.d.ts +3 -0
- package/dist/actions/validateDocument.mjs +89 -88
- package/dist/auth/failureChannel.d.ts +8 -2
- package/dist/auth/failureChannel.mjs +1 -3
- package/dist/authoring/elementCallbacks.d.ts +65 -0
- package/dist/authoring/elementCallbacks.mjs +72 -8
- package/dist/authoring/index.mjs +3 -3
- package/dist/builder/contexts/BuilderContext.d.ts +18 -7
- package/dist/builder/contexts/BuilderContext.mjs +2 -3
- package/dist/connectors/index.d.ts +1 -1
- package/dist/connectors/index.mjs +2 -2
- package/dist/connectors/validateManifest.d.ts +3 -0
- package/dist/connectors/validateManifest.mjs +77 -76
- package/dist/dataSource/computed.mjs +25 -29
- package/dist/dataSource/globalSources.d.ts +15 -0
- package/dist/dataSource/globalSources.mjs +13 -0
- package/dist/dataSource/index.d.ts +2 -0
- package/dist/dataSource/index.mjs +8 -7
- package/dist/devTools/DevToolsContext.mjs +2 -3
- package/dist/devTools/utils/PlitziConsole.d.ts +9 -0
- package/dist/devTools/utils/PlitziConsole.mjs +27 -7
- package/dist/elements/ComponentContext.mjs +2 -3
- package/dist/flags/flagsCookie.d.ts +26 -0
- package/dist/flags/flagsCookie.mjs +20 -0
- package/dist/flags/index.d.ts +3 -0
- package/dist/flags/index.mjs +4 -0
- package/dist/flags/resolveFlags.d.ts +60 -0
- package/dist/flags/resolveFlags.mjs +38 -0
- package/dist/flags/schemaFlag.d.ts +11 -0
- package/dist/flags/schemaFlag.mjs +9 -0
- package/dist/flags/useFlagResolution.d.ts +13 -0
- package/dist/flags/useFlagResolution.mjs +43 -0
- package/dist/helpers/eventTarget.d.ts +10 -0
- package/dist/helpers/eventTarget.mjs +4 -0
- package/dist/helpers/images.d.ts +18 -0
- package/dist/helpers/images.mjs +13 -0
- package/dist/helpers/index.d.ts +3 -0
- package/dist/helpers/index.mjs +21 -18
- package/dist/helpers/interval.d.ts +18 -0
- package/dist/helpers/interval.mjs +7 -0
- package/dist/helpers/isRecord.d.ts +2 -0
- package/dist/helpers/isRecord.mjs +4 -0
- package/dist/helpers/scroll.d.ts +42 -0
- package/dist/helpers/scroll.mjs +30 -0
- package/dist/helpers/sharedContext.d.ts +14 -0
- package/dist/helpers/sharedContext.mjs +9 -0
- package/dist/helpers/twigWrapper/Evaluator/Evaluator.d.ts +9 -1
- package/dist/helpers/twigWrapper/Evaluator/Evaluator.mjs +13 -8
- package/dist/helpers/twigWrapper/Evaluator/index.d.ts +1 -1
- package/dist/helpers/twigWrapper/TemplateCache/TemplateCache.mjs +1 -1
- package/dist/helpers/twigWrapper/filters/filters.mjs +38 -2
- package/dist/helpers/twigWrapper/index.d.ts +1 -0
- package/dist/helpers/twigWrapper/processTwig/processTwig.d.ts +2 -1
- package/dist/helpers/twigWrapper/processTwig/processTwig.mjs +3 -3
- package/dist/helpers/utils.mjs +4 -2
- package/dist/history/describe.mjs +4 -1
- package/dist/history/diff.d.ts +1 -1
- package/dist/history/diff.mjs +11 -9
- package/dist/history/types.d.ts +1 -1
- package/dist/hooks/index.mjs +5 -5
- package/dist/hooks/usePlitziServiceContext.d.ts +1 -2
- package/dist/hooks/usePlitziServiceContext.mjs +3 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +90 -77
- package/dist/navigation/routes.mjs +6 -4
- package/dist/network/NetworkContext.mjs +2 -3
- package/dist/network/NetworkInternalContext.d.ts +2 -4
- package/dist/network/NetworkInternalContext.mjs +2 -3
- package/dist/network/graphql/builder/Mutations/Space/SpaceAddSnippetMutation.d.ts +2 -0
- package/dist/network/graphql/builder/Mutations/Space/SpaceAddSnippetMutation.mjs +4 -0
- package/dist/network/graphql/builder/Mutations/Space/components/SpaceAddComponentMutation.d.ts +4 -0
- package/dist/network/graphql/builder/Mutations/Space/components/SpaceAddComponentMutation.mjs +4 -0
- package/dist/network/graphql/builder/Mutations/Space/components/SpaceDetachInstanceMutation.d.ts +4 -0
- package/dist/network/graphql/builder/Mutations/Space/components/SpaceDetachInstanceMutation.mjs +4 -0
- package/dist/network/graphql/builder/Mutations/Space/components/SpaceRemoveComponentMutation.d.ts +4 -0
- package/dist/network/graphql/builder/Mutations/Space/components/SpaceRemoveComponentMutation.mjs +4 -0
- package/dist/network/graphql/builder/Mutations/Space/components/SpaceUpdateComponentMutation.d.ts +4 -0
- package/dist/network/graphql/builder/Mutations/Space/components/SpaceUpdateComponentMutation.mjs +4 -0
- package/dist/network/graphql/builder/Mutations/Space/flags/SpacePublishFlagsMutation.d.ts +12 -0
- package/dist/network/graphql/builder/Mutations/Space/flags/SpacePublishFlagsMutation.mjs +4 -0
- package/dist/network/graphql/builder/Mutations/Space/flags/SpaceRemoveFlagMutation.d.ts +2 -0
- package/dist/network/graphql/builder/Mutations/Space/flags/SpaceRemoveFlagMutation.mjs +4 -0
- package/dist/network/graphql/builder/Mutations/Space/flags/SpaceSetFlagMutation.d.ts +3 -0
- package/dist/network/graphql/builder/Mutations/Space/flags/SpaceSetFlagMutation.mjs +4 -0
- package/dist/network/graphql/builder/Mutations/index.d.ts +13 -30
- package/dist/network/graphql/builder/Mutations/index.mjs +164 -200
- package/dist/network/graphql/builder/Queries/InitQuery.d.ts +4 -3
- package/dist/network/graphql/builder/Queries/InitQuery.mjs +1 -1
- package/dist/network/graphql/builder/Queries/Space/SpaceActionTasksQuery.d.ts +1 -1
- package/dist/network/graphql/builder/Queries/Space/SpaceActionTasksQuery.mjs +1 -1
- package/dist/network/graphql/builder/Queries/Space/SpaceIssuesQuery.d.ts +16 -2
- package/dist/network/graphql/builder/Queries/Space/SpaceIssuesQuery.mjs +1 -1
- package/dist/network/graphql/builder/Queries/Space/SpaceVersionContentsQuery.d.ts +7 -0
- package/dist/network/graphql/builder/Queries/Space/SpaceVersionContentsQuery.mjs +4 -0
- package/dist/network/graphql/builder/Queries/index.d.ts +3 -5
- package/dist/network/graphql/builder/Queries/index.mjs +36 -38
- package/dist/network/graphql/builder/Subscriptions/SpaceEventSubscription.d.ts +1 -1
- package/dist/network/graphql/sdk/Queries/InitQuery.d.ts +2 -3
- package/dist/network/graphql/sdk/Queries/InitQuery.mjs +1 -1
- package/dist/network/graphql/sdk/Queries/index.d.ts +0 -4
- package/dist/network/graphql/sdk/Queries/index.mjs +2 -8
- package/dist/network/index.mjs +8 -7
- package/dist/network/spaceEvents.d.ts +25 -195
- package/dist/network/spaceEvents.mjs +156 -241
- package/dist/realtime/client.mjs +123 -95
- package/dist/realtime/topics.mjs +18 -17
- package/dist/schema/SchemaContext.mjs +2 -3
- package/dist/schema/anchor.d.ts +8 -0
- package/dist/schema/anchor.mjs +4 -0
- package/dist/schema/index.d.ts +2 -0
- package/dist/schema/index.mjs +6 -4
- package/dist/schema/schemaConstants.d.ts +2 -0
- package/dist/schema/schemaConstants.mjs +4 -3
- package/dist/schema/serverElements.d.ts +6 -2
- package/dist/schema/serverElements.mjs +17 -16
- package/dist/schema/snippet.d.ts +7 -0
- package/dist/schema/snippet.mjs +9 -0
- package/dist/schema/wire.d.ts +11 -0
- package/dist/schema/wire.mjs +27 -0
- package/dist/server/actions/useImagesSync.d.ts +9 -0
- package/dist/server/actions/useImagesSync.mjs +7 -0
- package/dist/server/rsc/refreshRsc.d.ts +3 -1
- package/dist/server/rsc/refreshRsc.mjs +17 -16
- package/dist/source/export.d.ts +107 -0
- package/dist/source/export.mjs +4 -0
- package/dist/source/index.d.ts +4 -0
- package/dist/source/index.mjs +3 -0
- package/dist/source/snapshot.d.ts +51 -0
- package/dist/source/snapshot.mjs +81 -0
- package/dist/state/paintedState.mjs +13 -12
- package/dist/state/runtimeStatePersist.mjs +50 -49
- package/dist/store/index.d.ts +45 -45
- package/dist/store/renderSettings.d.ts +1 -0
- package/dist/store/renderSettings.mjs +9 -5
- package/dist/style/breakpoints.d.ts +11 -0
- package/dist/style/breakpoints.mjs +8 -0
- package/dist/style/displayModes.d.ts +5 -0
- package/dist/style/displayModes.mjs +8 -0
- package/dist/style/fontValidation.mjs +52 -51
- package/dist/style/fonts.d.ts +0 -12
- package/dist/style/fonts.mjs +11 -11
- package/dist/style/index.d.ts +4 -0
- package/dist/style/index.mjs +11 -7
- package/dist/style/layoutGrid.d.ts +30 -0
- package/dist/style/layoutGrid.mjs +33 -0
- package/dist/style/notifications.d.ts +52 -0
- package/dist/style/notifications.mjs +55 -0
- package/dist/style/snippetStyle.d.ts +23 -0
- package/dist/style/snippetStyle.mjs +32 -0
- package/dist/style/styleConstants.d.ts +7 -2
- package/dist/style/styleConstants.mjs +10 -0
- package/dist/style/styleStates.d.ts +11 -2
- package/dist/style/styleStates.mjs +12 -9
- package/dist/theme/ThemeProvider.mjs +20 -20
- package/dist/theme/ThemeScope.mjs +4 -3
- package/dist/types/ActionTypes.d.ts +5 -0
- package/dist/types/CommonTypes.d.ts +3 -0
- package/dist/types/DevToolsTypes.d.ts +29 -4
- package/dist/types/ElementTypes.d.ts +6 -5
- package/dist/types/EventBridgeTypes.d.ts +2 -2
- package/dist/types/FunctionTypes.d.ts +13 -0
- package/dist/types/InteractionTypes.d.ts +5 -0
- package/dist/types/PluginTypes.d.ts +1 -1
- package/dist/types/ResourceTypes.d.ts +2 -2
- package/dist/types/SchemaTypes.d.ts +100 -3
- package/dist/types/SdkTypes.d.ts +0 -2
- package/dist/types/ServerTypes.d.ts +47 -0
- package/dist/types/SnippetTypes.d.ts +28 -0
- package/dist/types/SpaceTypes.d.ts +36 -0
- package/dist/types/StoreTypes.d.ts +39 -3
- package/dist/types/StyleTypes.d.ts +1 -1
- package/dist/types/index.d.ts +1 -2
- package/package.json +143 -138
- package/tailwind.config.js +1 -6
- package/vite.config.ts +16 -4
- package/dist/network/graphql/builder/Mutations/Segment/SegmentAddMutation.d.ts +0 -4
- package/dist/network/graphql/builder/Mutations/Segment/SegmentAddMutation.mjs +0 -4
- package/dist/network/graphql/builder/Mutations/Segment/SegmentAddTemplateMutation.d.ts +0 -2
- package/dist/network/graphql/builder/Mutations/Segment/SegmentAddTemplateMutation.mjs +0 -4
- package/dist/network/graphql/builder/Mutations/Segment/SegmentPublishMutation.d.ts +0 -8
- package/dist/network/graphql/builder/Mutations/Segment/SegmentPublishMutation.mjs +0 -4
- package/dist/network/graphql/builder/Mutations/Segment/SegmentRemoveMutation.d.ts +0 -2
- package/dist/network/graphql/builder/Mutations/Segment/SegmentRemoveMutation.mjs +0 -4
- package/dist/network/graphql/builder/Mutations/Segment/SegmentUpdateMutation.d.ts +0 -4
- package/dist/network/graphql/builder/Mutations/Segment/SegmentUpdateMutation.mjs +0 -4
- package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentAddElementMutation.d.ts +0 -2
- package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentAddElementMutation.mjs +0 -4
- package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentCloneElementMutation.d.ts +0 -2
- package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentCloneElementMutation.mjs +0 -4
- package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentMoveElementMutation.d.ts +0 -2
- package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentMoveElementMutation.mjs +0 -4
- package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentRemoveElementMutation.d.ts +0 -2
- package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentRemoveElementMutation.mjs +0 -4
- package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentRenameElementMutation.d.ts +0 -3
- package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentRenameElementMutation.mjs +0 -4
- package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentUpdateElementMutation.d.ts +0 -2
- package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentUpdateElementMutation.mjs +0 -4
- package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentUpdateElementsMutation.d.ts +0 -2
- package/dist/network/graphql/builder/Mutations/Segment/space/elements/SegmentUpdateElementsMutation.mjs +0 -4
- package/dist/network/graphql/builder/Mutations/Segment/space/variables/SegmentSpaceAddVariableMutation.d.ts +0 -2
- package/dist/network/graphql/builder/Mutations/Segment/space/variables/SegmentSpaceAddVariableMutation.mjs +0 -4
- package/dist/network/graphql/builder/Mutations/Segment/space/variables/SegmentSpaceRemoveVariableMutation.d.ts +0 -2
- package/dist/network/graphql/builder/Mutations/Segment/space/variables/SegmentSpaceRemoveVariableMutation.mjs +0 -4
- package/dist/network/graphql/builder/Mutations/Segment/space/variables/SegmentSpaceUpdateVariableMutation.d.ts +0 -2
- package/dist/network/graphql/builder/Mutations/Segment/space/variables/SegmentSpaceUpdateVariableMutation.mjs +0 -4
- package/dist/network/graphql/builder/Mutations/Segment/style/selectorVariables/SegmentStyleAddSelectorVariableMutation.d.ts +0 -2
- package/dist/network/graphql/builder/Mutations/Segment/style/selectorVariables/SegmentStyleAddSelectorVariableMutation.mjs +0 -4
- package/dist/network/graphql/builder/Mutations/Segment/style/selectorVariables/SegmentStyleRemoveSelectorVariableMutation.d.ts +0 -2
- package/dist/network/graphql/builder/Mutations/Segment/style/selectorVariables/SegmentStyleRemoveSelectorVariableMutation.mjs +0 -4
- package/dist/network/graphql/builder/Mutations/Segment/style/selectorVariables/SegmentStyleUpdateSelectorVariableMutation.d.ts +0 -2
- package/dist/network/graphql/builder/Mutations/Segment/style/selectorVariables/SegmentStyleUpdateSelectorVariableMutation.mjs +0 -4
- package/dist/network/graphql/builder/Mutations/Segment/style/selectors/SegmentStyleAddSelectorMutation.d.ts +0 -2
- package/dist/network/graphql/builder/Mutations/Segment/style/selectors/SegmentStyleAddSelectorMutation.mjs +0 -4
- package/dist/network/graphql/builder/Mutations/Segment/style/selectors/SegmentStyleRemoveSelectorMutation.d.ts +0 -2
- package/dist/network/graphql/builder/Mutations/Segment/style/selectors/SegmentStyleRemoveSelectorMutation.mjs +0 -4
- package/dist/network/graphql/builder/Mutations/Segment/style/selectors/SegmentStyleRemoveSelectorsMutation.d.ts +0 -2
- package/dist/network/graphql/builder/Mutations/Segment/style/selectors/SegmentStyleRemoveSelectorsMutation.mjs +0 -4
- package/dist/network/graphql/builder/Mutations/Segment/style/selectors/SegmentStyleUpdateSelectorMutation.d.ts +0 -2
- package/dist/network/graphql/builder/Mutations/Segment/style/selectors/SegmentStyleUpdateSelectorMutation.mjs +0 -4
- package/dist/network/graphql/builder/Mutations/Segment/style/variables/SegmentStyleAddVariableMutation.d.ts +0 -2
- package/dist/network/graphql/builder/Mutations/Segment/style/variables/SegmentStyleAddVariableMutation.mjs +0 -4
- package/dist/network/graphql/builder/Mutations/Segment/style/variables/SegmentStyleRemoveVariableMutation.d.ts +0 -2
- package/dist/network/graphql/builder/Mutations/Segment/style/variables/SegmentStyleRemoveVariableMutation.mjs +0 -4
- package/dist/network/graphql/builder/Mutations/Segment/style/variables/SegmentStyleUpdateVariableMutation.d.ts +0 -2
- package/dist/network/graphql/builder/Mutations/Segment/style/variables/SegmentStyleUpdateVariableMutation.mjs +0 -4
- package/dist/network/graphql/builder/Mutations/Space/SpaceAddTemplateMutation.d.ts +0 -2
- package/dist/network/graphql/builder/Mutations/Space/SpaceAddTemplateMutation.mjs +0 -4
- package/dist/network/graphql/builder/Queries/Segment/SegmentQuery.d.ts +0 -6
- package/dist/network/graphql/builder/Queries/Segment/SegmentQuery.mjs +0 -4
- package/dist/network/graphql/builder/Queries/Segment/SegmentsQuery.d.ts +0 -9
- package/dist/network/graphql/builder/Queries/Segment/SegmentsQuery.mjs +0 -4
- package/dist/network/graphql/sdk/Queries/Segment/SegmentQuery.d.ts +0 -6
- package/dist/network/graphql/sdk/Queries/Segment/SegmentQuery.mjs +0 -4
- package/dist/network/graphql/sdk/Queries/Segment/SegmentsQuery.d.ts +0 -9
- package/dist/network/graphql/sdk/Queries/Segment/SegmentsQuery.mjs +0 -4
- package/dist/segments/SegmentsContext.d.ts +0 -2
- package/dist/segments/SegmentsContext.mjs +0 -6
- package/dist/segments/index.d.ts +0 -3
- package/dist/segments/index.mjs +0 -2
- package/dist/types/SegmentTypes.d.ts +0 -41
- package/dist/types/TemplateTypes.d.ts +0 -20
- package/dist/types/TemplateTypes.mjs +0 -0
- /package/dist/types/{SegmentTypes.mjs → SnippetTypes.mjs} +0 -0
|
@@ -1,249 +1,164 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { isRecord as e } from "../helpers/isRecord.mjs";
|
|
2
|
+
import { isSchemaFlag as t } from "../flags/schemaFlag.mjs";
|
|
3
|
+
import { StyleVariableCategory as n } from "../types/StyleTypes.mjs";
|
|
4
|
+
import { DISPLAY_MODES as r } from "../style/displayModes.mjs";
|
|
5
|
+
import { STYLE_STATES as i } from "../style/styleStates.mjs";
|
|
6
|
+
import { elementFromWire as a, schemaFromWire as o, schemaToWire as s } from "../schema/wire.mjs";
|
|
7
|
+
import { z as c } from "zod";
|
|
4
8
|
//#region src/network/spaceEvents.ts
|
|
5
|
-
var
|
|
6
|
-
...e,
|
|
7
|
-
flat: Object.values(e.flat)
|
|
8
|
-
}), s = (e) => ({
|
|
9
|
-
...e,
|
|
10
|
-
flat: Object.fromEntries(e.flat.map((e) => [e.id, e]))
|
|
11
|
-
}), c = n.custom((e) => r(e) && Array.isArray(e.flat), { message: "expected a schema whose `flat` is a list of elements" }), l = n.custom((e) => r(e) && typeof e.id == "string", { message: "expected a page folder with an id" }), u = n.custom((e) => r(e) && typeof e.name == "string", { message: "expected a variable with a name" }), d = n.custom(r, { message: "expected a style attributes object" }), f = n.custom((e) => r(e) && typeof e.family == "string" && typeof e.source == "string", { message: "expected a font with a family and a source" }), p = n.custom((e) => typeof e == "string" || typeof e == "number" || r(e), { message: "expected a style variable value" }), m = n.enum([
|
|
12
|
-
"desktop",
|
|
13
|
-
"tablet",
|
|
14
|
-
"mobile"
|
|
15
|
-
]), h = n.custom((e) => typeof e == "string", { message: "expected a drop position" }), g = n.custom((e) => typeof e == "string", { message: "expected a style category" }), _ = n.enum([
|
|
9
|
+
var l = c.custom((t) => e(t) && typeof t.id == "string", { message: "expected an element with an id" }), u = c.array(l), d = c.custom((t) => e(t) && typeof t.id == "string" && e(t.flat), { message: "expected a component with an id and a flat" }), f = c.custom((t) => e(t) && Array.isArray(t.flat), { message: "expected a schema whose `flat` is a list of elements" }), p = c.custom((t) => e(t) && typeof t.id == "string", { message: "expected a page folder with an id" }), m = c.custom((t) => e(t) && typeof t.name == "string", { message: "expected a variable with a name" }), h = c.custom(t, { message: "expected a flag with a value and its rules" }), g = c.custom(e, { message: "expected a style attributes object" }), _ = c.custom((t) => e(t) && typeof t.family == "string" && typeof t.source == "string", { message: "expected a font with a family and a source" }), v = c.custom((t) => typeof t == "string" || typeof t == "number" || e(t), { message: "expected a style variable value" }), y = c.enum(r), b = c.custom((e) => typeof e == "string", { message: "expected a drop position" }), x = c.custom((e) => typeof e == "string", { message: "expected a style category" }), S = c.enum([
|
|
16
10
|
"class",
|
|
17
11
|
"element",
|
|
18
12
|
"id"
|
|
19
|
-
]),
|
|
20
|
-
componentType:
|
|
21
|
-
styleSelector:
|
|
22
|
-
styleState:
|
|
23
|
-
styleVariant:
|
|
24
|
-
styleAncestor:
|
|
25
|
-
}),
|
|
26
|
-
displayMode:
|
|
27
|
-
selector:
|
|
28
|
-
category:
|
|
29
|
-
name:
|
|
30
|
-
value:
|
|
31
|
-
}),
|
|
32
|
-
displayMode:
|
|
33
|
-
selector:
|
|
34
|
-
category:
|
|
35
|
-
name:
|
|
36
|
-
}),
|
|
37
|
-
category:
|
|
38
|
-
name:
|
|
39
|
-
value:
|
|
40
|
-
}),
|
|
41
|
-
type:
|
|
42
|
-
resource:
|
|
43
|
-
settings:
|
|
44
|
-
}),
|
|
45
|
-
SPACE_UPDATED:
|
|
46
|
-
STYLE_UPDATED:
|
|
47
|
-
platform:
|
|
48
|
-
variables:
|
|
49
|
-
cache:
|
|
50
|
-
}),
|
|
51
|
-
SPACE_ADD_PAGE:
|
|
52
|
-
SPACE_UPDATE_PAGE:
|
|
53
|
-
SPACE_SET_HOME_PAGE:
|
|
54
|
-
SPACE_REMOVE_PAGE:
|
|
55
|
-
SPACE_ADD_PAGE_FOLDER:
|
|
56
|
-
SPACE_UPDATE_PAGE_FOLDER:
|
|
57
|
-
SPACE_REMOVE_PAGE_FOLDER:
|
|
58
|
-
SPACE_ADD_VARIABLE:
|
|
59
|
-
SPACE_UPDATE_VARIABLE:
|
|
60
|
-
SPACE_REMOVE_VARIABLE:
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}),
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
to:
|
|
83
|
-
|
|
84
|
-
dropPosition:
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
element:
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
13
|
+
]), C = c.enum(i), w = c.enum(n), T = c.object({
|
|
14
|
+
componentType: c.string().optional(),
|
|
15
|
+
styleSelector: c.string().optional(),
|
|
16
|
+
styleState: C.optional(),
|
|
17
|
+
styleVariant: c.string().optional(),
|
|
18
|
+
styleAncestor: c.string().optional()
|
|
19
|
+
}), E = T.extend({ styleSelector: c.string() }), D = c.object({ variable: m }), O = c.object({
|
|
20
|
+
displayMode: y,
|
|
21
|
+
selector: c.string(),
|
|
22
|
+
category: w,
|
|
23
|
+
name: c.string(),
|
|
24
|
+
value: v
|
|
25
|
+
}), k = c.object({
|
|
26
|
+
displayMode: y,
|
|
27
|
+
selector: c.string(),
|
|
28
|
+
category: w,
|
|
29
|
+
name: c.string()
|
|
30
|
+
}), A = c.object({
|
|
31
|
+
category: w,
|
|
32
|
+
name: c.string(),
|
|
33
|
+
value: v
|
|
34
|
+
}), j = c.object({
|
|
35
|
+
type: c.string(),
|
|
36
|
+
resource: c.string(),
|
|
37
|
+
settings: c.custom(e, { message: "expected a plugin settings object" })
|
|
38
|
+
}), M = {
|
|
39
|
+
SPACE_UPDATED: c.object({ schema: f }),
|
|
40
|
+
STYLE_UPDATED: c.object({
|
|
41
|
+
platform: c.custom(e),
|
|
42
|
+
variables: c.custom(e),
|
|
43
|
+
cache: c.string()
|
|
44
|
+
}),
|
|
45
|
+
SPACE_ADD_PAGE: c.object({ page: l }),
|
|
46
|
+
SPACE_UPDATE_PAGE: c.object({ page: l }),
|
|
47
|
+
SPACE_SET_HOME_PAGE: c.object({ page: l }),
|
|
48
|
+
SPACE_REMOVE_PAGE: c.object({ pageId: c.string() }),
|
|
49
|
+
SPACE_ADD_PAGE_FOLDER: c.object({ pageFolder: p }),
|
|
50
|
+
SPACE_UPDATE_PAGE_FOLDER: c.object({ pageFolder: p }),
|
|
51
|
+
SPACE_REMOVE_PAGE_FOLDER: c.object({ pageFolderId: c.string() }),
|
|
52
|
+
SPACE_ADD_VARIABLE: D,
|
|
53
|
+
SPACE_UPDATE_VARIABLE: D,
|
|
54
|
+
SPACE_REMOVE_VARIABLE: c.object({ name: c.string() }),
|
|
55
|
+
SPACE_SET_FLAG: c.object({
|
|
56
|
+
name: c.string(),
|
|
57
|
+
flag: h
|
|
58
|
+
}),
|
|
59
|
+
SPACE_REMOVE_FLAG: c.object({ name: c.string() }),
|
|
60
|
+
SPACE_ADD_ELEMENT: c.object({
|
|
61
|
+
element: l,
|
|
62
|
+
dropPosition: b,
|
|
63
|
+
to: c.string(),
|
|
64
|
+
initialItems: u.optional(),
|
|
65
|
+
variables: c.array(m).optional()
|
|
66
|
+
}),
|
|
67
|
+
SPACE_UPDATE_ELEMENT: c.object({ element: l }),
|
|
68
|
+
SPACE_RENAME_ELEMENT: c.object({
|
|
69
|
+
elementId: c.string(),
|
|
70
|
+
id: c.string()
|
|
71
|
+
}),
|
|
72
|
+
SPACE_UPDATE_ELEMENTS: c.object({ elements: u }),
|
|
73
|
+
SPACE_REMOVE_ELEMENT: c.object({ elementId: c.string() }),
|
|
74
|
+
SPACE_MOVE_ELEMENT: c.object({
|
|
75
|
+
from: c.string(),
|
|
76
|
+
to: c.string(),
|
|
77
|
+
elementId: c.string(),
|
|
78
|
+
dropPosition: b
|
|
79
|
+
}),
|
|
80
|
+
SPACE_CLONE_ELEMENT: c.object({
|
|
81
|
+
to: c.string(),
|
|
82
|
+
element: l,
|
|
83
|
+
dropPosition: b,
|
|
84
|
+
initialItems: u
|
|
85
|
+
}),
|
|
86
|
+
SPACE_ADD_SNIPPET: c.object({
|
|
87
|
+
element: l,
|
|
88
|
+
style: c.custom(e),
|
|
89
|
+
to: c.string(),
|
|
90
|
+
dropPosition: b,
|
|
91
|
+
initialItems: u.optional(),
|
|
92
|
+
variables: c.array(m).optional()
|
|
93
|
+
}),
|
|
94
|
+
SPACE_ADD_PLUGIN: c.object({ plugin: j }),
|
|
95
|
+
SPACE_UPDATE_PLUGIN: c.object({ plugin: j }),
|
|
96
|
+
SPACE_REMOVE_PLUGIN: c.object({ pluginType: c.string() }),
|
|
97
|
+
SPACE_UPDATE_SETTINGS: c.object({
|
|
98
|
+
path: c.string(),
|
|
99
|
+
value: c.union([
|
|
100
|
+
c.string(),
|
|
101
|
+
c.number(),
|
|
102
|
+
c.boolean()
|
|
104
103
|
])
|
|
105
104
|
}),
|
|
106
|
-
STYLE_ADD_SELECTOR:
|
|
107
|
-
displayMode:
|
|
108
|
-
selector:
|
|
109
|
-
path:
|
|
110
|
-
type:
|
|
111
|
-
style:
|
|
112
|
-
params:
|
|
113
|
-
}),
|
|
114
|
-
STYLE_UPDATE_SELECTOR:
|
|
115
|
-
displayMode:
|
|
116
|
-
selector:
|
|
117
|
-
path:
|
|
118
|
-
style:
|
|
119
|
-
params:
|
|
120
|
-
}),
|
|
121
|
-
STYLE_REMOVE_SELECTOR:
|
|
122
|
-
displayMode:
|
|
123
|
-
selector:
|
|
124
|
-
}),
|
|
125
|
-
STYLE_REMOVE_SELECTORS:
|
|
126
|
-
displayMode:
|
|
127
|
-
selectors:
|
|
128
|
-
}),
|
|
129
|
-
STYLE_ADD_SELECTOR_VARIABLE:
|
|
130
|
-
STYLE_UPDATE_SELECTOR_VARIABLE:
|
|
131
|
-
STYLE_REMOVE_SELECTOR_VARIABLE:
|
|
132
|
-
STYLE_ADD_VARIABLE:
|
|
133
|
-
STYLE_UPDATE_VARIABLE:
|
|
134
|
-
STYLE_REMOVE_VARIABLE:
|
|
135
|
-
category:
|
|
136
|
-
name:
|
|
137
|
-
}),
|
|
138
|
-
STYLE_UPDATE_SETTINGS:
|
|
139
|
-
path:
|
|
140
|
-
value:
|
|
141
|
-
}),
|
|
142
|
-
STYLE_ADD_FONT:
|
|
143
|
-
STYLE_UPDATE_FONT:
|
|
144
|
-
family:
|
|
145
|
-
font:
|
|
146
|
-
}),
|
|
147
|
-
STYLE_REMOVE_FONT:
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
}),
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
id: n.string()
|
|
164
|
-
}),
|
|
165
|
-
SEGMENT_UPDATE_ELEMENTS: n.object({
|
|
166
|
-
...S,
|
|
167
|
-
elements: a
|
|
168
|
-
}),
|
|
169
|
-
SEGMENT_REMOVE_ELEMENT: n.object({
|
|
170
|
-
...S,
|
|
171
|
-
elementId: n.string()
|
|
172
|
-
}),
|
|
173
|
-
SEGMENT_MOVE_ELEMENT: n.object({
|
|
174
|
-
...S,
|
|
175
|
-
elementId: n.string(),
|
|
176
|
-
from: n.string(),
|
|
177
|
-
to: n.string(),
|
|
178
|
-
dropPosition: h
|
|
179
|
-
}),
|
|
180
|
-
SEGMENT_CLONE_ELEMENT: n.object({
|
|
181
|
-
...S,
|
|
182
|
-
element: i,
|
|
183
|
-
dropPosition: h,
|
|
184
|
-
to: n.string(),
|
|
185
|
-
initialItems: a.optional()
|
|
186
|
-
}),
|
|
187
|
-
SEGMENT_ADD_TEMPLATE: n.object({
|
|
188
|
-
...S,
|
|
189
|
-
element: i,
|
|
190
|
-
style: n.custom(r),
|
|
191
|
-
to: n.string(),
|
|
192
|
-
dropPosition: h,
|
|
193
|
-
initialItems: a.optional(),
|
|
194
|
-
variables: n.array(u).optional()
|
|
195
|
-
}),
|
|
196
|
-
SEGMENT_SPACE_ADD_VARIABLE: n.object({
|
|
197
|
-
...S,
|
|
198
|
-
variable: u
|
|
199
|
-
}),
|
|
200
|
-
SEGMENT_SPACE_UPDATE_VARIABLE: n.object({
|
|
201
|
-
...S,
|
|
202
|
-
variable: u
|
|
203
|
-
}),
|
|
204
|
-
SEGMENT_SPACE_REMOVE_VARIABLE: n.object({
|
|
205
|
-
...S,
|
|
206
|
-
variable: n.object({ name: n.string() })
|
|
207
|
-
}),
|
|
208
|
-
SEGMENT_STYLE_ADD_SELECTOR: n.object({
|
|
209
|
-
...S,
|
|
210
|
-
displayMode: m,
|
|
211
|
-
selector: n.string(),
|
|
212
|
-
type: _,
|
|
213
|
-
path: g.optional(),
|
|
214
|
-
style: d.optional(),
|
|
215
|
-
params: b
|
|
216
|
-
}),
|
|
217
|
-
SEGMENT_STYLE_UPDATE_SELECTOR: n.object({
|
|
218
|
-
...S,
|
|
219
|
-
displayMode: m,
|
|
220
|
-
selector: n.string(),
|
|
221
|
-
path: g.optional(),
|
|
222
|
-
style: d.optional(),
|
|
223
|
-
params: x
|
|
224
|
-
}),
|
|
225
|
-
SEGMENT_STYLE_REMOVE_SELECTOR: n.object({
|
|
226
|
-
...S,
|
|
227
|
-
displayMode: m,
|
|
228
|
-
selector: n.string()
|
|
229
|
-
}),
|
|
230
|
-
SEGMENT_STYLE_REMOVE_SELECTORS: n.object({
|
|
231
|
-
...S,
|
|
232
|
-
displayMode: m,
|
|
233
|
-
selectors: n.array(n.string())
|
|
234
|
-
}),
|
|
235
|
-
SEGMENT_STYLE_ADD_SELECTOR_VARIABLE: w.extend(S),
|
|
236
|
-
SEGMENT_STYLE_UPDATE_SELECTOR_VARIABLE: w.extend(S),
|
|
237
|
-
SEGMENT_STYLE_REMOVE_SELECTOR_VARIABLE: T.extend(S),
|
|
238
|
-
SEGMENT_STYLE_ADD_VARIABLE: E.extend(S),
|
|
239
|
-
SEGMENT_STYLE_UPDATE_VARIABLE: E.extend(S),
|
|
240
|
-
SEGMENT_STYLE_REMOVE_VARIABLE: n.object({
|
|
241
|
-
...S,
|
|
242
|
-
category: y,
|
|
243
|
-
name: n.string()
|
|
244
|
-
})
|
|
245
|
-
}, k = Object.fromEntries(Object.keys(O).map((e) => [e, e])), A = (e, t) => {
|
|
246
|
-
let n = O[e];
|
|
105
|
+
STYLE_ADD_SELECTOR: c.object({
|
|
106
|
+
displayMode: y,
|
|
107
|
+
selector: c.string(),
|
|
108
|
+
path: x.optional(),
|
|
109
|
+
type: S,
|
|
110
|
+
style: g.optional(),
|
|
111
|
+
params: T
|
|
112
|
+
}),
|
|
113
|
+
STYLE_UPDATE_SELECTOR: c.object({
|
|
114
|
+
displayMode: y,
|
|
115
|
+
selector: c.string(),
|
|
116
|
+
path: x.optional(),
|
|
117
|
+
style: g.optional(),
|
|
118
|
+
params: E
|
|
119
|
+
}),
|
|
120
|
+
STYLE_REMOVE_SELECTOR: c.object({
|
|
121
|
+
displayMode: y,
|
|
122
|
+
selector: c.string()
|
|
123
|
+
}),
|
|
124
|
+
STYLE_REMOVE_SELECTORS: c.object({
|
|
125
|
+
displayMode: y,
|
|
126
|
+
selectors: c.array(c.string())
|
|
127
|
+
}),
|
|
128
|
+
STYLE_ADD_SELECTOR_VARIABLE: O,
|
|
129
|
+
STYLE_UPDATE_SELECTOR_VARIABLE: O,
|
|
130
|
+
STYLE_REMOVE_SELECTOR_VARIABLE: k,
|
|
131
|
+
STYLE_ADD_VARIABLE: A,
|
|
132
|
+
STYLE_UPDATE_VARIABLE: A,
|
|
133
|
+
STYLE_REMOVE_VARIABLE: c.object({
|
|
134
|
+
category: w,
|
|
135
|
+
name: c.string()
|
|
136
|
+
}),
|
|
137
|
+
STYLE_UPDATE_SETTINGS: c.object({
|
|
138
|
+
path: c.string(),
|
|
139
|
+
value: c.string()
|
|
140
|
+
}),
|
|
141
|
+
STYLE_ADD_FONT: c.object({ font: _ }),
|
|
142
|
+
STYLE_UPDATE_FONT: c.object({
|
|
143
|
+
family: c.string(),
|
|
144
|
+
font: _
|
|
145
|
+
}),
|
|
146
|
+
STYLE_REMOVE_FONT: c.object({ family: c.string() }),
|
|
147
|
+
SPACE_ADD_COMPONENT: c.object({
|
|
148
|
+
component: d,
|
|
149
|
+
from: c.object({
|
|
150
|
+
elementId: c.string(),
|
|
151
|
+
instanceId: c.string()
|
|
152
|
+
}).optional()
|
|
153
|
+
}),
|
|
154
|
+
SPACE_UPDATE_COMPONENT: c.object({
|
|
155
|
+
componentId: c.string(),
|
|
156
|
+
declaration: c.custom(e)
|
|
157
|
+
}),
|
|
158
|
+
SPACE_REMOVE_COMPONENT: c.object({ componentId: c.string() }),
|
|
159
|
+
SPACE_DETACH_INSTANCE: c.object({ instanceId: c.string() })
|
|
160
|
+
}, N = Object.fromEntries(Object.keys(M).map((e) => [e, e])), P = (e, t) => {
|
|
161
|
+
let n = M[e];
|
|
247
162
|
if (!n) return {
|
|
248
163
|
ok: !1,
|
|
249
164
|
issues: [{
|
|
@@ -264,4 +179,4 @@ var r = (e) => typeof e == "object" && !!e && !Array.isArray(e), i = n.custom((e
|
|
|
264
179
|
};
|
|
265
180
|
};
|
|
266
181
|
//#endregion
|
|
267
|
-
export {
|
|
182
|
+
export { N as SpaceEvents, N as default, a as elementFromWire, o as schemaFromWire, s as schemaToWire, M as spaceEventSchemas, P as validateSpaceEvent };
|