@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
|
@@ -10,14 +10,14 @@ var l = {
|
|
|
10
10
|
iterable: (e) => Array.isArray(e) || typeof e == "object" && !!e,
|
|
11
11
|
even: (e) => typeof e == "number" && e % 2 == 0,
|
|
12
12
|
odd: (e) => typeof e == "number" && Math.abs(e % 2) === 1
|
|
13
|
-
}, u = (e) => e.type === "path" || e.type === "filter" && u(e.subject), d = (e, t) => t == null || t === "" && u(e), f = (e) => e.type === "path" && e.segments.length === 1 ? e.segments[0] : e.type === "literal" && e.value === null ? "null" : void 0,
|
|
14
|
-
let i = new
|
|
13
|
+
}, u = (e) => e.type === "path" || e.type === "filter" && u(e.subject), d = (e, t) => t == null || t === "" && u(e), f = (e) => e.type === "path" ? e.segments[0] : e.type === "filter" ? f(e.subject) : void 0, p = (e) => e.type === "path" && e.segments.length === 1 ? e.segments[0] : e.type === "literal" && e.value === null ? "null" : void 0, m = [], h = (e, t, n = !1, r = !1) => {
|
|
14
|
+
let i = new _(t, n, r);
|
|
15
15
|
return {
|
|
16
16
|
output: i.evalNodes(e),
|
|
17
17
|
variables: i.variables,
|
|
18
18
|
hasSet: i.hasSet
|
|
19
19
|
};
|
|
20
|
-
},
|
|
20
|
+
}, g = (e, t) => new _(t).evalExpression(e), _ = class u {
|
|
21
21
|
variables;
|
|
22
22
|
keepEmptyTokens;
|
|
23
23
|
jsonStrings;
|
|
@@ -29,6 +29,11 @@ var l = {
|
|
|
29
29
|
constructor(e, t = !1, n = !1) {
|
|
30
30
|
this.variables = { ...e }, this.keepEmptyTokens = t, this.jsonStrings = n;
|
|
31
31
|
}
|
|
32
|
+
keeps(e) {
|
|
33
|
+
if (typeof this.keepEmptyTokens == "boolean") return this.keepEmptyTokens;
|
|
34
|
+
let t = f(e);
|
|
35
|
+
return t === void 0 || !this.keepEmptyTokens.settled.has(t);
|
|
36
|
+
}
|
|
32
37
|
evalNodes(e) {
|
|
33
38
|
let t = e.length;
|
|
34
39
|
if (t === 0) return "";
|
|
@@ -51,7 +56,7 @@ var l = {
|
|
|
51
56
|
}
|
|
52
57
|
evalVariable(e) {
|
|
53
58
|
let t = this.evalExpression(e.expression);
|
|
54
|
-
return this.
|
|
59
|
+
return this.keeps(e.expression) && d(e.expression, t) ? e.source : o(t) ? String(s(t)) : typeof t == "function" ? "" : t != null && typeof t != "object" ? String(t) : e.raw ? t == null ? "" : String(t) : typeof t == "object" && t ? JSON.stringify(t) : "";
|
|
55
60
|
}
|
|
56
61
|
followQuotes(e) {
|
|
57
62
|
for (let t = 0; t < e.length; t++) {
|
|
@@ -66,7 +71,7 @@ var l = {
|
|
|
66
71
|
}
|
|
67
72
|
evalFor(e) {
|
|
68
73
|
let r = this.evalExpression(e.collection);
|
|
69
|
-
if (e.source !== void 0 && r === void 0) return e.source;
|
|
74
|
+
if (e.source !== void 0 && r === void 0 && this.keeps(e.collection)) return e.source;
|
|
70
75
|
let i, a = null;
|
|
71
76
|
if (e.keyVar !== null) {
|
|
72
77
|
let t = n(r);
|
|
@@ -112,7 +117,7 @@ var l = {
|
|
|
112
117
|
let n = e;
|
|
113
118
|
for (let e of t) {
|
|
114
119
|
let t = a[e.name];
|
|
115
|
-
t !== void 0 && (n = t(n, e.args.length === 0 ?
|
|
120
|
+
t !== void 0 && (n = t(n, e.args.length === 0 ? m : this.evalArgs(e.args)));
|
|
116
121
|
}
|
|
117
122
|
return n;
|
|
118
123
|
}
|
|
@@ -221,7 +226,7 @@ var l = {
|
|
|
221
226
|
return a;
|
|
222
227
|
}
|
|
223
228
|
evalBinary(t, n, i) {
|
|
224
|
-
let a =
|
|
229
|
+
let a = p(i);
|
|
225
230
|
if ((t === "is" || t === "is not") && a !== void 0) {
|
|
226
231
|
let e = l[a];
|
|
227
232
|
if (e) {
|
|
@@ -262,4 +267,4 @@ var l = {
|
|
|
262
267
|
}
|
|
263
268
|
};
|
|
264
269
|
//#endregion
|
|
265
|
-
export {
|
|
270
|
+
export { h as evaluate, g as evaluateExpression };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { evaluate, evaluateExpression } from './Evaluator';
|
|
2
|
-
export type { EvalResult } from './Evaluator';
|
|
2
|
+
export type { EvalResult, KeepEmptyTokens } from './Evaluator';
|
|
@@ -2,7 +2,7 @@ import { isDottedPath as e } from "../charClass.mjs";
|
|
|
2
2
|
import { lex as t } from "../Lexer/Lexer.mjs";
|
|
3
3
|
import { parse as n } from "../Parser/Parser.mjs";
|
|
4
4
|
//#region src/helpers/twigWrapper/TemplateCache/TemplateCache.ts
|
|
5
|
-
var r = /* @__PURE__ */ new Map(), i =
|
|
5
|
+
var r = /* @__PURE__ */ new Map(), i = 1024, a = {
|
|
6
6
|
hits: 0,
|
|
7
7
|
misses: 0
|
|
8
8
|
}, o = () => ({
|
|
@@ -151,7 +151,20 @@ var e = Symbol("twigArrowParams"), t = (e) => e == null || e === "", n = (e, t)
|
|
|
151
151
|
seconds: Number(i("second")),
|
|
152
152
|
weekday: f.indexOf(i("weekday"))
|
|
153
153
|
};
|
|
154
|
-
}, _ = {
|
|
154
|
+
}, _ = (e) => {
|
|
155
|
+
if (typeof e == "number") return Number.isFinite(e) ? e : void 0;
|
|
156
|
+
if (typeof e == "string" && e.trim() !== "") {
|
|
157
|
+
let t = Number(e);
|
|
158
|
+
return Number.isFinite(t) ? t : void 0;
|
|
159
|
+
}
|
|
160
|
+
}, v = (e, t, n) => {
|
|
161
|
+
for (let r of [t == null ? "en" : i(t), "en"]) try {
|
|
162
|
+
return new Intl.NumberFormat(r, n).format(e);
|
|
163
|
+
} catch {
|
|
164
|
+
continue;
|
|
165
|
+
}
|
|
166
|
+
return String(e);
|
|
167
|
+
}, y = {
|
|
155
168
|
raw: (e) => u(e),
|
|
156
169
|
to_json: (e) => r(e),
|
|
157
170
|
json_encode: (e) => r(e),
|
|
@@ -220,6 +233,29 @@ var e = Symbol("twigArrowParams"), t = (e) => e == null || e === "", n = (e, t)
|
|
|
220
233
|
let s = o.split(".");
|
|
221
234
|
return s[0] = s[0].replace(/\B(?=(\d{3})+(?!\d))/g, a), s.join(r);
|
|
222
235
|
},
|
|
236
|
+
currency: (e, t) => {
|
|
237
|
+
let n = _(e);
|
|
238
|
+
if (n === void 0 || t.length === 0) return e;
|
|
239
|
+
let r = t[2], a = typeof r == "object" && !!r && "trimZeros" in r && r.trimZeros === !0 && Number.isInteger(n);
|
|
240
|
+
return v(n, t[1], {
|
|
241
|
+
style: "currency",
|
|
242
|
+
currency: i(t[0]),
|
|
243
|
+
...a ? {
|
|
244
|
+
minimumFractionDigits: 0,
|
|
245
|
+
maximumFractionDigits: 0
|
|
246
|
+
} : {}
|
|
247
|
+
});
|
|
248
|
+
},
|
|
249
|
+
percent: (e, t) => {
|
|
250
|
+
let n = _(e);
|
|
251
|
+
if (n === void 0) return e;
|
|
252
|
+
let r = Number(t[0]) || 0;
|
|
253
|
+
return v(n, t[1], {
|
|
254
|
+
style: "percent",
|
|
255
|
+
minimumFractionDigits: 0,
|
|
256
|
+
maximumFractionDigits: r
|
|
257
|
+
});
|
|
258
|
+
},
|
|
223
259
|
sort: (t, r) => {
|
|
224
260
|
if (!Array.isArray(t)) return t;
|
|
225
261
|
let i = [...t], a = r[0];
|
|
@@ -447,4 +483,4 @@ var e = Symbol("twigArrowParams"), t = (e) => e == null || e === "", n = (e, t)
|
|
|
447
483
|
}
|
|
448
484
|
};
|
|
449
485
|
//#endregion
|
|
450
|
-
export { e as ARROW_PARAMS, c as RAW_MARKER,
|
|
486
|
+
export { e as ARROW_PARAMS, c as RAW_MARKER, y as filters, l as isRawMarker, d as unwrapRaw, u as wrapRaw };
|
|
@@ -6,5 +6,6 @@ export { inspectTemplate } from './inspectTemplate';
|
|
|
6
6
|
export { templatePaths, templateRootNames } from './templateRoots';
|
|
7
7
|
export { filters } from './filters/filters';
|
|
8
8
|
export type { ASTNode, Expression } from './AST';
|
|
9
|
+
export type { KeepEmptyTokens } from './Evaluator';
|
|
9
10
|
export type { TemplateInspection } from './inspectTemplate';
|
|
10
11
|
export type { TwigFilter } from './filters/filters';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { KeepEmptyTokens } from '../Evaluator';
|
|
2
|
+
export declare const processTwig: (template: string, variables?: Record<string, unknown>, keepEmptyTokens?: KeepEmptyTokens, asRaw?: boolean) => unknown;
|
|
2
3
|
/**
|
|
3
4
|
* A template's VALUE, where it has one: `{{ rows|filter(r => r.open) }}` is the filtered array, `{{ count > 0 }}` a
|
|
4
5
|
* boolean, `{{ total }}` the number it holds.
|
|
@@ -8,14 +8,14 @@ var s = (i, s = {}, c = !1, l = !1) => {
|
|
|
8
8
|
if (i.indexOf("{%") === -1 && i.indexOf("{{") === -1) return i;
|
|
9
9
|
let u = "variables" in s ? t(s) : s, d = o(i);
|
|
10
10
|
if (!d) return i;
|
|
11
|
-
if (
|
|
11
|
+
if (c === !1 && !d.hasTags && d.allSimpleOrDotted) {
|
|
12
12
|
let t = n(d, u);
|
|
13
13
|
return l ? e(t) : t;
|
|
14
14
|
}
|
|
15
|
-
let f = a(d, c);
|
|
15
|
+
let f = a(d, c !== !1);
|
|
16
16
|
if (!f) return i;
|
|
17
17
|
let { output: p, variables: m, hasSet: h } = r(f, u, c);
|
|
18
|
-
return h && Object.assign(s, m), c && p === i ? i : l ? e(p) : p;
|
|
18
|
+
return h && Object.assign(s, m), c !== !1 && p === i ? i : l ? e(p) : p;
|
|
19
19
|
} catch {
|
|
20
20
|
return i;
|
|
21
21
|
}
|
package/dist/helpers/utils.mjs
CHANGED
|
@@ -8,7 +8,7 @@ Object.freeze(n);
|
|
|
8
8
|
var r = (e, t = "", n = ".", i = !1) => !e || typeof e != "object" ? [] : Object.keys(e).reduce((a, o) => {
|
|
9
9
|
o = o.replaceAll(n, "").replaceAll(".", "");
|
|
10
10
|
let s = `${t}${t ? n : ""}${o}`;
|
|
11
|
-
return typeof e[o] != "object" || Array.isArray(e[o]) && i ? [...a, s] : [
|
|
11
|
+
return typeof e[o] != "object" || Array.isArray(e[o]) && (i || e[o].length > 5) ? [...a, s] : [
|
|
12
12
|
...a,
|
|
13
13
|
s,
|
|
14
14
|
...r(e[o], s, n, i)
|
|
@@ -29,7 +29,9 @@ function a(t, n) {
|
|
|
29
29
|
} catch {
|
|
30
30
|
return 0;
|
|
31
31
|
}
|
|
32
|
-
|
|
32
|
+
if (!n) return r;
|
|
33
|
+
let i = Number(e(r, "sub", 0));
|
|
34
|
+
return Number.isInteger(i) && i > 0 ? i : 0;
|
|
33
35
|
}
|
|
34
36
|
function o(e) {
|
|
35
37
|
!e && typeof window < "u" && (e = window.location.search);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { isRecord as e } from "../helpers/isRecord.mjs";
|
|
1
2
|
//#region src/history/describe.ts
|
|
2
|
-
var
|
|
3
|
+
var t = (n, r, i = "") => e(n) && e(r) ? [.../* @__PURE__ */ new Set([...Object.keys(n), ...Object.keys(r)])].flatMap((e) => t(n[e], r[e], i ? `${i}.${e}` : e)) : JSON.stringify(n) === JSON.stringify(r) ? [] : [{
|
|
3
4
|
path: i,
|
|
4
5
|
...n === void 0 ? {} : { before: n },
|
|
5
6
|
...r === void 0 ? {} : { after: r }
|
|
@@ -25,8 +26,10 @@ var e = (e) => typeof e == "object" && !!e && !Array.isArray(e), t = (n, r, i =
|
|
|
25
26
|
};
|
|
26
27
|
return Object.hasOwn(i, r) ? i[r] : r;
|
|
27
28
|
}, s = (e, t = 3) => e.length > t ? `${e.slice(0, t).join(", ")} and ${e.length - t} more` : e.join(", "), c = {
|
|
29
|
+
component: "component",
|
|
28
30
|
folder: "folder",
|
|
29
31
|
variable: "variable",
|
|
32
|
+
flag: "feature flag",
|
|
30
33
|
setting: "setting",
|
|
31
34
|
selector: "class",
|
|
32
35
|
globalStyle: "global style for",
|
package/dist/history/diff.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export declare const sameValue: (a: unknown, b: unknown) => boolean;
|
|
|
16
16
|
*/
|
|
17
17
|
export declare const jsonCopy: <T>(value: T) => T;
|
|
18
18
|
/** The part of a schema a history reads: what is stored, never what the runtime derives from it. */
|
|
19
|
-
export type HistorySchema = Pick<Schema, 'flat' | 'pages' | 'pageFolders' | 'variables' | 'settings' | 'definition'>;
|
|
19
|
+
export type HistorySchema = Pick<Schema, 'flat' | 'pages' | 'pageFolders' | 'variables' | 'flags' | 'settings' | 'definition' | 'components'>;
|
|
20
20
|
/**
|
|
21
21
|
* What changed between two versions of a schema, entity by entity.
|
|
22
22
|
*
|
package/dist/history/diff.mjs
CHANGED
|
@@ -26,10 +26,12 @@ var e = (t, n) => {
|
|
|
26
26
|
before: a
|
|
27
27
|
});
|
|
28
28
|
return i;
|
|
29
|
-
}, r = (e, t) => Object.fromEntries((e ?? []).map((e) => [t(e), e])), i = (e, t) => Object.fromEntries(Object.entries(t ?? {}).map(([t, n]) => [`${e}.${t}`, n])), a = (e, t) => [
|
|
30
|
-
...n("element", e
|
|
29
|
+
}, r = (e, t) => Object.fromEntries((e ?? []).map((e) => [t(e), e])), i = (e, t) => Object.fromEntries(Object.entries(t ?? {}).map(([t, n]) => [`${e}.${t}`, n])), a = (e) => Object.fromEntries([e.flat ?? {}, ...Object.values(e.components ?? {}).map((e) => e.flat)].flatMap((e) => Object.entries(e))), o = (e) => Object.fromEntries(Object.entries(e.components ?? {}).map(([e, { flat: t, ...n }]) => [e, n])), s = (e, t) => [
|
|
30
|
+
...n("element", a(e), a(t)),
|
|
31
|
+
...n("component", o(e), o(t)),
|
|
31
32
|
...n("folder", r(e.pageFolders, (e) => e.id), r(t.pageFolders, (e) => e.id)),
|
|
32
33
|
...n("variable", r(e.variables, (e) => e.name), r(t.variables, (e) => e.name)),
|
|
34
|
+
...n("flag", e.flags ?? {}, t.flags ?? {}),
|
|
33
35
|
...n("setting", {
|
|
34
36
|
...i("settings", e.settings),
|
|
35
37
|
...i("definition", e.definition),
|
|
@@ -39,26 +41,26 @@ var e = (t, n) => {
|
|
|
39
41
|
...i("definition", t.definition),
|
|
40
42
|
pages: t.pages
|
|
41
43
|
})
|
|
42
|
-
],
|
|
44
|
+
], c = {
|
|
43
45
|
class: "selector",
|
|
44
46
|
element: "globalStyle",
|
|
45
47
|
id: "idStyle"
|
|
46
|
-
},
|
|
48
|
+
}, l = (e) => {
|
|
47
49
|
let t = {};
|
|
48
50
|
for (let [n, r] of Object.entries(e ?? {})) for (let [e, i] of Object.entries(r)) {
|
|
49
|
-
let r =
|
|
51
|
+
let r = c[i.type], a = t[r] ??= {};
|
|
50
52
|
(a[e] ??= {})[n] = i;
|
|
51
53
|
}
|
|
52
54
|
return t;
|
|
53
|
-
},
|
|
54
|
-
let i =
|
|
55
|
+
}, u = (e) => Object.fromEntries(Object.entries(e ?? {}).flatMap(([e, t]) => Object.entries(t).map(([t, n]) => [`${e}/${t}`, n]))), d = (e, t) => {
|
|
56
|
+
let i = l(e.platform), a = l(t.platform);
|
|
55
57
|
return [
|
|
56
58
|
...[
|
|
57
59
|
"selector",
|
|
58
60
|
"globalStyle",
|
|
59
61
|
"idStyle"
|
|
60
62
|
].flatMap((e) => n(e, i[e] ?? {}, a[e] ?? {})),
|
|
61
|
-
...n("token",
|
|
63
|
+
...n("token", u(e.variables), u(t.variables)),
|
|
62
64
|
...n("font", r(e.fonts, (e) => e.family), r(t.fonts, (e) => e.family)),
|
|
63
65
|
...n("setting", {
|
|
64
66
|
theme: e.theme,
|
|
@@ -70,4 +72,4 @@ var e = (t, n) => {
|
|
|
70
72
|
];
|
|
71
73
|
};
|
|
72
74
|
//#endregion
|
|
73
|
-
export {
|
|
75
|
+
export { s as diffSchema, d as diffStyle, t as jsonCopy, e as sameValue };
|
package/dist/history/types.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export type ChangeOrigin = 'builder' | 'mcp' | 'coworker' | 'autofix' | 'api' |
|
|
|
11
11
|
* (a bare element selector), an id style, a design token (`<category>/<name>`), a font family, a style setting
|
|
12
12
|
* (`theme`, `mode`). Functions: a file of their source, by its path (`index.ts`, `lib/feed.ts`).
|
|
13
13
|
*/
|
|
14
|
-
export type ChangeKind = 'element' | 'folder' | 'variable' | 'setting' | 'selector' | 'globalStyle' | 'idStyle' | 'token' | 'font' | 'file';
|
|
14
|
+
export type ChangeKind = 'element' | 'component' | 'folder' | 'variable' | 'flag' | 'setting' | 'selector' | 'globalStyle' | 'idStyle' | 'token' | 'font' | 'file';
|
|
15
15
|
/** One entity that changed, whole, before and after: the field-level difference is derived from the two. */
|
|
16
16
|
export type ChangeEntry = {
|
|
17
17
|
kind: ChangeKind;
|
package/dist/hooks/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import e from "./
|
|
2
|
-
import t from "./
|
|
3
|
-
import n
|
|
4
|
-
import a from "./
|
|
5
|
-
export {
|
|
1
|
+
import e from "./useStableValue.mjs";
|
|
2
|
+
import t from "./useFontHead.mjs";
|
|
3
|
+
import n from "./useNetwork.mjs";
|
|
4
|
+
import r, { PlitziServiceContext as i, PlitziServiceProvider as a } from "./usePlitziServiceContext.mjs";
|
|
5
|
+
export { i as PlitziServiceContext, a as PlitziServiceProvider, t as useFontHead, n as useNetwork, r as usePlitziServiceContext, e as useStableValue };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BuilderContextValue } from '../builder';
|
|
2
2
|
import { NetworkContextValue } from '../network';
|
|
3
|
-
import { ComponentContextValue, EventBridgeContextValue, InteractionsContextValue, PluginsContextValue, ColorScheme
|
|
3
|
+
import { ComponentContextValue, EventBridgeContextValue, InteractionsContextValue, PluginsContextValue, ColorScheme } from '../types';
|
|
4
4
|
import { Context, ReactNode, RefObject } from 'react';
|
|
5
5
|
export type PlitziServiceContextValue<TEventBridge = any, TInteractions = any> = {
|
|
6
6
|
settings: {
|
|
@@ -20,7 +20,6 @@ export type PlitziServiceContextValue<TEventBridge = any, TInteractions = any> =
|
|
|
20
20
|
};
|
|
21
21
|
customContexts: Record<string, Context<any>>;
|
|
22
22
|
contexts: {
|
|
23
|
-
SegmentsContext: Context<SegmentsContextValue>;
|
|
24
23
|
ComponentContext: Context<ComponentContextValue>;
|
|
25
24
|
EventBridgeContext: Context<EventBridgeContextValue<TEventBridge>>;
|
|
26
25
|
PluginsContext: Context<PluginsContextValue>;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { sharedContext as e } from "../helpers/sharedContext.mjs";
|
|
2
|
+
import { use as t } from "react";
|
|
2
3
|
import { jsx as n } from "react/jsx-runtime";
|
|
3
|
-
var r = e({})
|
|
4
|
-
r.displayName = "PlitziServiceContext";
|
|
5
|
-
var i = () => {
|
|
4
|
+
var r = e("PlitziServiceContext", {}), i = () => {
|
|
6
5
|
let e = t(r);
|
|
7
6
|
if (e === void 0) throw Error("ServiceContext value is undefined. Make sure you use the PlitziServiceProvider before using the hook.");
|
|
8
7
|
return e;
|
package/dist/index.d.ts
CHANGED
|
@@ -10,10 +10,10 @@ export * from './dataSource';
|
|
|
10
10
|
export * from './connectors';
|
|
11
11
|
export * from './network';
|
|
12
12
|
export * from './network/graphql';
|
|
13
|
-
export * from './segments';
|
|
14
13
|
export * from './websockets';
|
|
15
14
|
export * from './devTools';
|
|
16
15
|
export * from './theme';
|
|
17
16
|
export * from './server';
|
|
18
17
|
export * from './state';
|
|
19
18
|
export * from './history';
|
|
19
|
+
export * from './flags';
|
package/dist/index.mjs
CHANGED
|
@@ -1,77 +1,90 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import v from "./
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import N from "./
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import ce from "./
|
|
30
|
-
import
|
|
31
|
-
import
|
|
32
|
-
import
|
|
33
|
-
import
|
|
34
|
-
import
|
|
35
|
-
import
|
|
36
|
-
import
|
|
37
|
-
import {
|
|
38
|
-
import
|
|
39
|
-
import Te from "./
|
|
40
|
-
import
|
|
41
|
-
import
|
|
42
|
-
import
|
|
43
|
-
import {
|
|
44
|
-
import
|
|
45
|
-
import
|
|
46
|
-
import {
|
|
47
|
-
import
|
|
48
|
-
import
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import ut from "./
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import
|
|
57
|
-
import
|
|
58
|
-
import {
|
|
59
|
-
import
|
|
60
|
-
import
|
|
61
|
-
import
|
|
62
|
-
import
|
|
63
|
-
import
|
|
64
|
-
import
|
|
65
|
-
import
|
|
66
|
-
import {
|
|
67
|
-
import
|
|
68
|
-
import {
|
|
69
|
-
import
|
|
70
|
-
import
|
|
71
|
-
import
|
|
72
|
-
import
|
|
73
|
-
import
|
|
74
|
-
import
|
|
75
|
-
import
|
|
76
|
-
import
|
|
77
|
-
|
|
1
|
+
import { isRecord as e } from "./helpers/isRecord.mjs";
|
|
2
|
+
import { authFailureFromResponse as t, onAuthFailure as n, reportAuthFailure as r, sameRegistrableDomain as i } from "./auth/failureChannel.mjs";
|
|
3
|
+
import { VISITOR_NAME as a, checkVisitorRoles as o, visitorAccess as s } from "./auth/visitorRoles.mjs";
|
|
4
|
+
import { filters as c } from "./helpers/twigWrapper/filters/filters.mjs";
|
|
5
|
+
import { processTwig as l, processTwigParam as u, processTwigValue as d } from "./helpers/twigWrapper/processTwig/processTwig.mjs";
|
|
6
|
+
import { hasTemplateSyntax as f } from "./helpers/twigWrapper/tokens/hasTemplateSyntax.mjs";
|
|
7
|
+
import { hasValidToken as p } from "./helpers/twigWrapper/tokens/hasValidToken.mjs";
|
|
8
|
+
import { MAX_PARAM_PASSES as m, resolveStepParam as h } from "./helpers/twigWrapper/processTwig/resolveStepParam.mjs";
|
|
9
|
+
import { inspectTemplate as g } from "./helpers/twigWrapper/inspectTemplate.mjs";
|
|
10
|
+
import { templatePaths as _, templateRootNames as v } from "./helpers/twigWrapper/templateRoots.mjs";
|
|
11
|
+
import y from "./builder/contexts/BuilderContext.mjs";
|
|
12
|
+
import { contexts_exports as b } from "./builder/contexts/index.mjs";
|
|
13
|
+
import { BODYLESS_METHODS as x, CONNECTOR_HTTP_METHODS as S, DEFAULT_READ_ENDPOINT as C, EMPTY_RESPONSE_METHODS as w, READ_ENDPOINT_NAMES as T, WRITE_ENDPOINT_NAMES as E } from "./connectors/constants.mjs";
|
|
14
|
+
import { connectorTokens as D, getConnectorTokens as O } from "./connectors/manifestTokens.mjs";
|
|
15
|
+
import { connectorPresets as k, emptyManifest as A } from "./connectors/presets.mjs";
|
|
16
|
+
import { isConnectorManifestDraft as j, validateConnectorManifest as M } from "./connectors/validateManifest.mjs";
|
|
17
|
+
import { COMPUTED_GLOBALS as N, GLOBAL_SOURCES as P } from "./dataSource/globalSources.mjs";
|
|
18
|
+
import { evaluateComputed as F, liveSources as I } from "./dataSource/computed.mjs";
|
|
19
|
+
import L from "./helpers/fetchManifest.mjs";
|
|
20
|
+
import R from "./helpers/generateFacade.mjs";
|
|
21
|
+
import z from "./helpers/syntaxHighlight.mjs";
|
|
22
|
+
import { cookieFromHeader as B, documentCookies as V } from "./helpers/cookies.mjs";
|
|
23
|
+
import { elementOf as H, isElementTarget as U, isNodeTarget as W, nodeOf as G } from "./helpers/eventTarget.mjs";
|
|
24
|
+
import { formatDate as K, formatDateUTC as q, formatFromNow as J, formatUTCToLocal as Y, getDurationMs as X, isValidFormat as Z, parseDate as Q, toUnixSeconds as $ } from "./helpers/formatDate.mjs";
|
|
25
|
+
import { INTERVAL_TRIGGER as ee, MIN_INTERVAL_MS as te, intervalOf as ne } from "./helpers/interval.mjs";
|
|
26
|
+
import { isDate as re } from "./helpers/isDate.mjs";
|
|
27
|
+
import { isUserEdit as ie } from "./helpers/reducerOrigin.mjs";
|
|
28
|
+
import { evaluateRuleGroup as ae } from "./helpers/ruleEvaluator.mjs";
|
|
29
|
+
import { ParamsFromURL as oe, delay as se, emptyObject as ce, getDisplayName as le, getKeyDecoded as ue, getPathsFromObeject as de, hexToRGB as fe, isInViewport as pe, makeId as me } from "./helpers/utils.mjs";
|
|
30
|
+
import { disableReactDevTools as he } from "./helpers/security.mjs";
|
|
31
|
+
import ge, { utilityOptions as _e } from "./dataSource/utility/index.mjs";
|
|
32
|
+
import ve from "./dataSource/getBindingsDetails.mjs";
|
|
33
|
+
import ye from "./dataSource/helpers/getSourceName.mjs";
|
|
34
|
+
import be from "./dataSource/hooks/useRegisterSource.mjs";
|
|
35
|
+
import xe from "./dataSource/resolveVariables.mjs";
|
|
36
|
+
import Se from "./devTools/DevToolsContext.mjs";
|
|
37
|
+
import { debugCookieName as Ce } from "./devTools/debugCookie.mjs";
|
|
38
|
+
import we from "./devTools/interactionLog.mjs";
|
|
39
|
+
import Te, { createStoreDevToolsLogger as Ee, pConsole as De } from "./devTools/utils/PlitziConsole.mjs";
|
|
40
|
+
import Oe from "./elements/ComponentContext.mjs";
|
|
41
|
+
import { FLAG_GATE_PATTERN as ke, FLAG_NAME_PATTERN as Ae, isFlagName as je, isSchemaFlag as Me } from "./flags/schemaFlag.mjs";
|
|
42
|
+
import { flagsCookieName as Ne, forcedFlagsFromCookies as Pe, parseFlagList as Fe, serializeFlagList as Ie, withForcedFlag as Le, writeForcedFlags as Re } from "./flags/flagsCookie.mjs";
|
|
43
|
+
import { FLAG_LAYERS as ze, flagUserFromSSR as Be, flagValues as Ve, hasConditions as He, passesFlagGate as Ue, resolveFlags as We, undeclaredFlagOverrides as Ge } from "./flags/resolveFlags.mjs";
|
|
44
|
+
import Ke from "./hooks/useStableValue.mjs";
|
|
45
|
+
import { describeChange as qe, fieldChanges as Je, uniqueLines as Ye } from "./history/describe.mjs";
|
|
46
|
+
import { diffSchema as Xe, diffStyle as Ze, jsonCopy as Qe, sameValue as $e } from "./history/diff.mjs";
|
|
47
|
+
import et from "./hooks/useFontHead.mjs";
|
|
48
|
+
import tt from "./hooks/useNetwork.mjs";
|
|
49
|
+
import nt, { PlitziServiceContext as rt, PlitziServiceProvider as it } from "./hooks/usePlitziServiceContext.mjs";
|
|
50
|
+
import { WHILE_RUNNING_MODES as at } from "./types/SchemaTypes.mjs";
|
|
51
|
+
import { StyleVariableCategory as ot } from "./types/StyleTypes.mjs";
|
|
52
|
+
import st, { EMPTY_STYLE_SCHEMA as ct, StyleBindingsAllowed as lt, baseDefaultValue as ut, inheritableAttributesBase as dt } from "./style/styleConstants.mjs";
|
|
53
|
+
import { DISPLAY_MODE_MIN_WIDTH as ft, displayModeAt as pt, displayModeWidthRem as mt } from "./style/breakpoints.mjs";
|
|
54
|
+
import { DISPLAY_MODES as ht, isDisplayMode as gt } from "./style/displayModes.mjs";
|
|
55
|
+
import { fontLinkAssets as _t } from "./style/fontAssets.mjs";
|
|
56
|
+
import { SYSTEM_FONTS as vt, availableFonts as yt, familiesInCss as bt, fontFamilyStack as xt, fontUrlResolver as St, fontsToHead as Ct, googleCss2Url as wt, googleTextSubsetUrl as Tt, isSafeFontUrl as Et, primaryFamily as Dt } from "./style/fonts.mjs";
|
|
57
|
+
import { FontValidationError as Ot, parseSpaceFont as kt } from "./style/fontValidation.mjs";
|
|
58
|
+
import { fallbackForFamily as At, fontsFromCss as jt } from "./style/fontsFromCss.mjs";
|
|
59
|
+
import { LAYOUT_GRIDS as Mt, layoutGridCss as Nt, layoutGridLook as Pt } from "./style/layoutGrid.mjs";
|
|
60
|
+
import { RUNTIME_STYLE_ID as Ft, markStyleCache as It, styleCacheFromDocument as Lt, styleCacheTravelsInDocument as Rt } from "./style/runtimeStyle.mjs";
|
|
61
|
+
import { mergeSnippetStyle as zt, sameSelector as Bt, selectorsOf as Vt } from "./style/snippetStyle.mjs";
|
|
62
|
+
import { CURRENT_PAGE_SELECTOR as Ht, HIDDEN_CLASS as Ut, STYLE_STATES as Wt, STYLE_STATE_LABELS as Gt, inCascadeOrder as Kt, isKnownState as qt, isStartingState as Jt, stateSuffix as Yt } from "./style/styleStates.mjs";
|
|
63
|
+
import Xt from "./schema/SchemaContext.mjs";
|
|
64
|
+
import { ANCHOR_PATTERN as Zt, isAnchor as Qt } from "./schema/anchor.mjs";
|
|
65
|
+
import { COMPONENT_PROPS_SOURCE as $t, EMPTY_SCHEMA as en, VARIABLE_REGEX as tn } from "./schema/schemaConstants.mjs";
|
|
66
|
+
import { findLayoutCycle as nn, resolveLayoutChain as rn } from "./schema/layoutChain.mjs";
|
|
67
|
+
import { collectServerElements as an, hasServerElements as on } from "./schema/serverElements.mjs";
|
|
68
|
+
import { isSnippet as sn } from "./schema/snippet.mjs";
|
|
69
|
+
import cn from "./network/NetworkContext.mjs";
|
|
70
|
+
import ln from "./network/NetworkInternalContext.mjs";
|
|
71
|
+
import { elementFromWire as un, schemaFromWire as dn, schemaToWire as fn } from "./schema/wire.mjs";
|
|
72
|
+
import { SpaceEvents as pn, spaceEventSchemas as mn, validateSpaceEvent as hn } from "./network/spaceEvents.mjs";
|
|
73
|
+
import gn from "./network/graphql/builder/Mutations/index.mjs";
|
|
74
|
+
import _n from "./network/graphql/builder/Queries/index.mjs";
|
|
75
|
+
import vn from "./network/graphql/builder/Subscriptions/index.mjs";
|
|
76
|
+
import yn from "./network/graphql/sdk/Mutations/index.mjs";
|
|
77
|
+
import bn from "./network/graphql/sdk/Queries/index.mjs";
|
|
78
|
+
import xn, { RTEvent as Sn, RTEventCloseCode as Cn, getInstance as wn, isRTEvent as Tn, setInstance as En } from "./websockets/RTCodec.mjs";
|
|
79
|
+
import { THEME_CLASSES as Dn, THEME_COOKIE_NAME as On, applyThemeClass as kn, isTheme as An, readThemeCookie as jn, themeFromCookies as Mn, writeThemeCookie as Nn } from "./theme/themeCookie.mjs";
|
|
80
|
+
import Pn, { createThemeState as Fn, createThemeStore as In, resolveScheme as Ln, setAreaTheme as Rn, setMachineScheme as zn, setThemeMode as Bn, themeFor as Vn } from "./theme/themeStore.mjs";
|
|
81
|
+
import { useThemeStore as Hn } from "./theme/ThemeScope.mjs";
|
|
82
|
+
import Un from "./theme/ThemeProvider.mjs";
|
|
83
|
+
import Wn, { SPACE_THEME_AREA as Gn } from "./theme/useTheme.mjs";
|
|
84
|
+
import Kn from "./server/actions/useActionsSync.mjs";
|
|
85
|
+
import qn, { currentRscLocation as Jn, rscDataPath as Yn } from "./server/rsc/refreshRsc.mjs";
|
|
86
|
+
import Xn from "./server/rsc/useRscRefresh.mjs";
|
|
87
|
+
import Zn from "./server/rsc/useRscSync.mjs";
|
|
88
|
+
import { PAINTED_STATE_BUDGET as Qn, clearPaintedEntry as $n, paintedEntryFromCookies as er, paintedKeys as tr, paintedStateCookieName as nr, paintedStateFor as rr, pickPainted as ir, readPaintedEntry as ar, writePaintedEntry as or } from "./state/paintedState.mjs";
|
|
89
|
+
import { runtimeStatePersist as sr, stateOwner as cr } from "./state/runtimeStatePersist.mjs";
|
|
90
|
+
export { Zt as ANCHOR_PATTERN, x as BODYLESS_METHODS, y as BuilderContext, gn as BuilderMutations, _n as BuilderQueries, $t as COMPONENT_PROPS_SOURCE, N as COMPUTED_GLOBALS, S as CONNECTOR_HTTP_METHODS, Ht as CURRENT_PAGE_SELECTOR, Oe as ComponentContext, C as DEFAULT_READ_ENDPOINT, ht as DISPLAY_MODES, ft as DISPLAY_MODE_MIN_WIDTH, Se as DevToolsContext, w as EMPTY_RESPONSE_METHODS, en as EMPTY_SCHEMA, ct as EMPTY_STYLE_SCHEMA, ke as FLAG_GATE_PATTERN, ze as FLAG_LAYERS, Ae as FLAG_NAME_PATTERN, Ot as FontValidationError, P as GLOBAL_SOURCES, Ut as HIDDEN_CLASS, ee as INTERVAL_TRIGGER, Mt as LAYOUT_GRIDS, m as MAX_PARAM_PASSES, te as MIN_INTERVAL_MS, cn as NetworkContext, ln as NetworkInternalContext, Qn as PAINTED_STATE_BUDGET, oe as ParamsFromURL, Te as PlitziConsole, rt as PlitziServiceContext, it as PlitziServiceProvider, T as READ_ENDPOINT_NAMES, xn as RTCodec, Sn as RTEvent, Cn as RTEventCloseCode, Ft as RUNTIME_STYLE_ID, Gn as SPACE_THEME_AREA, Wt as STYLE_STATES, Gt as STYLE_STATE_LABELS, vt as SYSTEM_FONTS, Xt as SchemaContext, yn as SdkMutations, bn as SdkQueries, vn as SpaceEventSubscription, pn as SpaceEvents, lt as StyleBindingsAllowed, ot as StyleVariableCategory, Dn as THEME_CLASSES, On as THEME_COOKIE_NAME, Un as ThemeProvider, tn as VARIABLE_REGEX, a as VISITOR_NAME, at as WHILE_RUNNING_MODES, E as WRITE_ENDPOINT_NAMES, kn as applyThemeClass, t as authFailureFromResponse, yt as availableFonts, ut as baseDefaultValue, o as checkVisitorRoles, $n as clearPaintedEntry, an as collectServerElements, k as connectorPresets, D as connectorTokens, b as contexts, B as cookieFromHeader, Ee as createStoreDevToolsLogger, Fn as createThemeState, In as createThemeStore, Jn as currentRscLocation, Ce as debugCookieName, se as delay, qe as describeChange, Xe as diffSchema, Ze as diffStyle, he as disableReactDevTools, pt as displayModeAt, mt as displayModeWidthRem, V as documentCookies, un as elementFromWire, H as elementOf, A as emptyManifest, ce as emptyObject, F as evaluateComputed, ae as evaluateRuleGroup, At as fallbackForFamily, bt as familiesInCss, L as fetchManifest, Je as fieldChanges, c as filters, nn as findLayoutCycle, Be as flagUserFromSSR, Ve as flagValues, Ne as flagsCookieName, xt as fontFamilyStack, _t as fontLinkAssets, St as fontUrlResolver, jt as fontsFromCss, Ct as fontsToHead, Pe as forcedFlagsFromCookies, K as formatDate, q as formatDateUTC, J as formatFromNow, Y as formatUTCToLocal, R as generateFacade, ve as getBindingsDetails, O as getConnectorTokens, le as getDisplayName, X as getDurationMs, wn as getInstance, ue as getKeyDecoded, de as getPathsFromObeject, ye as getSourceName, wt as googleCss2Url, Tt as googleTextSubsetUrl, He as hasConditions, on as hasServerElements, f as hasTemplateSyntax, p as hasValidToken, fe as hexToRGB, Kt as inCascadeOrder, dt as inheritableAttributesBase, g as inspectTemplate, ne as intervalOf, Qt as isAnchor, j as isConnectorManifestDraft, re as isDate, gt as isDisplayMode, U as isElementTarget, je as isFlagName, pe as isInViewport, we as isInteractionFlow, qt as isKnownState, W as isNodeTarget, Tn as isRTEvent, e as isRecord, Et as isSafeFontUrl, Me as isSchemaFlag, sn as isSnippet, Jt as isStartingState, An as isTheme, ie as isUserEdit, Z as isValidFormat, Qe as jsonCopy, Nt as layoutGridCss, Pt as layoutGridLook, I as liveSources, me as makeId, It as markStyleCache, zt as mergeSnippetStyle, G as nodeOf, n as onAuthFailure, De as pConsole, er as paintedEntryFromCookies, tr as paintedKeys, nr as paintedStateCookieName, rr as paintedStateFor, Q as parseDate, Fe as parseFlagList, kt as parseSpaceFont, Ue as passesFlagGate, ir as pickPainted, Dt as primaryFamily, l as processTwig, u as processTwigParam, d as processTwigValue, ar as readPaintedEntry, jn as readThemeCookie, qn as refreshRsc, r as reportAuthFailure, We as resolveFlags, rn as resolveLayoutChain, Ln as resolveScheme, h as resolveStepParam, xe as resolveVariables, Yn as rscDataPath, sr as runtimeStatePersist, i as sameRegistrableDomain, Bt as sameSelector, $e as sameValue, dn as schemaFromWire, fn as schemaToWire, Vt as selectorsOf, Ie as serializeFlagList, Rn as setAreaTheme, En as setInstance, zn as setMachineScheme, Bn as setThemeMode, mn as spaceEventSchemas, cr as stateOwner, Yt as stateSuffix, Lt as styleCacheFromDocument, Rt as styleCacheTravelsInDocument, st as styleConstants, z as syntaxHighlight, _ as templatePaths, v as templateRootNames, Vn as themeFor, Mn as themeFromCookies, Pn as themeStore, $ as toUnixSeconds, Ge as undeclaredFlagOverrides, Ye as uniqueLines, Kn as useActionsSync, et as useFontHead, tt as useNetwork, nt as usePlitziServiceContext, be as useRegisterSource, Xn as useRscRefresh, Zn as useRscSync, Ke as useStableValue, Wn as useTheme, Hn as useThemeStore, ge as utility, _e as utilityOptions, M as validateConnectorManifest, hn as validateSpaceEvent, s as visitorAccess, Le as withForcedFlag, Re as writeForcedFlags, or as writePaintedEntry, Nn as writeThemeCookie };
|
|
@@ -35,10 +35,12 @@ function o(e, t, n, o = !1) {
|
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
37
|
var s = (e, t, n) => {
|
|
38
|
-
let r =
|
|
39
|
-
if (
|
|
40
|
-
let
|
|
41
|
-
|
|
38
|
+
let r = n.indexOf("#");
|
|
39
|
+
if (r > 0) return `${s(e, t, n.slice(0, r))}${n.slice(r)}`;
|
|
40
|
+
let i = e[n];
|
|
41
|
+
if (!i) return n;
|
|
42
|
+
let { slug: a, default: c } = i.attributes;
|
|
43
|
+
return typeof a == "string" ? o(e, t, n, !0) : c ? "/" : `/${n}`;
|
|
42
44
|
}, c = (e, t, n = !0) => !e || !n || t === void 0 || t && e === "authenticated" || !t && e === "public" ? !0 : t && e === "public" ? !1 : !e, l = (e = {}, t = [], r, i = "", a = !0, s = !0) => {
|
|
43
45
|
let l = Object.keys(e).reduce((s, l) => {
|
|
44
46
|
let { attributes: { accessLevel: u, enabled: d = !0, unauthorizedBehaviour: f } } = e[l], p = e[l].attributes.unauthorizedPageRedirect;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
var t = e({
|
|
1
|
+
import { sharedContext as e } from "../helpers/sharedContext.mjs";
|
|
2
|
+
var t = e("NetworkContext", {
|
|
3
3
|
mutate: async () => {},
|
|
4
4
|
query: async () => {},
|
|
5
5
|
subscribe: () => {},
|
|
@@ -15,6 +15,5 @@ var t = e({
|
|
|
15
15
|
webId: "",
|
|
16
16
|
environment: "development"
|
|
17
17
|
});
|
|
18
|
-
t.displayName = "NetworkContext";
|
|
19
18
|
//#endregion
|
|
20
19
|
export { t as default };
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { OfflineData } from '../types';
|
|
2
|
-
export type NetworkInternalContextValue =
|
|
3
|
-
|
|
4
|
-
};
|
|
5
|
-
declare const NetworkInternalContext: import('react').Context<NetworkInternalContextValue>;
|
|
2
|
+
export type NetworkInternalContextValue = OfflineData;
|
|
3
|
+
declare const NetworkInternalContext: import('react').Context<OfflineData>;
|
|
6
4
|
export default NetworkInternalContext;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { sharedContext as e } from "../helpers/sharedContext.mjs";
|
|
2
2
|
//#region src/network/NetworkInternalContext.ts
|
|
3
|
-
var t = e({});
|
|
4
|
-
t.displayName = "NetworkInternalContext";
|
|
3
|
+
var t = e("NetworkInternalContext", {});
|
|
5
4
|
//#endregion
|
|
6
5
|
export { t as default };
|