@plitzi/sdk-shared 0.38.3 → 0.38.5
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 +522 -0
- package/dist/actions/functions.d.ts +10 -0
- package/dist/actions/functions.mjs +10 -10
- package/dist/actions/index.d.ts +1 -1
- package/dist/actions/index.mjs +6 -6
- package/dist/authoring/elementCallbacks.d.ts +2 -2
- package/dist/dataSource/getBindingsDetails.mjs +1 -1
- package/dist/devTools/chrome.d.ts +8 -0
- package/dist/devTools/chrome.mjs +4 -0
- package/dist/devTools/index.d.ts +1 -0
- package/dist/devTools/index.mjs +5 -4
- package/dist/helpers/images.d.ts +5 -0
- package/dist/helpers/images.mjs +2 -2
- package/dist/helpers/twigWrapper/inspectTemplate.mjs +14 -7
- package/dist/helpers/twigWrapper/processTwig/processTwig.d.ts +4 -3
- package/dist/helpers/twigWrapper/processTwig/processTwig.mjs +32 -22
- package/dist/history/types.d.ts +4 -4
- package/dist/index.mjs +56 -54
- package/dist/network/graphql/builder/Mutations/Space/data/SpaceSaveDataMutation.d.ts +10 -0
- package/dist/network/graphql/builder/Mutations/Space/data/SpaceSaveDataMutation.mjs +4 -0
- package/dist/network/graphql/builder/Mutations/index.d.ts +2 -0
- package/dist/network/graphql/builder/Mutations/index.mjs +124 -122
- package/dist/network/graphql/builder/Queries/InitQuery.d.ts +1 -3
- package/dist/network/graphql/builder/Queries/InitQuery.mjs +1 -1
- package/dist/network/graphql/builder/Queries/Space/SpaceDataQuery.d.ts +6 -0
- package/dist/network/graphql/builder/Queries/Space/SpaceDataQuery.mjs +4 -0
- package/dist/network/graphql/builder/Queries/index.d.ts +2 -0
- package/dist/network/graphql/builder/Queries/index.mjs +22 -20
- package/dist/network/spaceEvents.d.ts +2 -2
- package/dist/plugins/bundle.d.ts +26 -0
- package/dist/plugins/bundle.mjs +62 -0
- package/dist/plugins/declaration.d.ts +12 -0
- package/dist/plugins/declaration.mjs +9 -0
- package/dist/queries/queryCache.d.ts +7 -0
- package/dist/queries/queryCache.mjs +14 -7
- package/dist/queries/useQuery.d.ts +2 -0
- package/dist/queries/useQuery.mjs +5 -2
- package/dist/schema/anchor.d.ts +11 -0
- package/dist/schema/anchor.mjs +6 -2
- package/dist/schema/index.mjs +6 -6
- package/dist/schema/markdownHeadings.d.ts +13 -0
- package/dist/schema/markdownHeadings.mjs +24 -0
- package/dist/schema/motion.d.ts +47 -15
- package/dist/schema/motion.mjs +208 -32
- package/dist/schema/motionReveal.d.ts +10 -0
- package/dist/schema/motionReveal.mjs +23 -0
- package/dist/schema/pageElements.d.ts +12 -0
- package/dist/schema/pageElements.mjs +41 -0
- package/dist/schema/wire.mjs +4 -3
- package/dist/server/index.mjs +4 -4
- package/dist/server/rsc/projectData.d.ts +6 -0
- package/dist/server/rsc/projectData.mjs +4 -0
- package/dist/server/rsc/refreshRsc.d.ts +18 -5
- package/dist/server/rsc/refreshRsc.mjs +80 -20
- package/dist/server/rsc/useRscSync.mjs +26 -15
- package/dist/server/usePluginRoute.d.ts +18 -0
- package/dist/server/usePluginRoute.mjs +14 -0
- package/dist/source/export.d.ts +18 -0
- package/dist/source/import.d.ts +55 -0
- package/dist/source/import.mjs +4 -0
- package/dist/source/index.d.ts +2 -0
- package/dist/source/index.mjs +3 -2
- package/dist/store/index.d.ts +45 -45
- package/dist/style/cssLayers.d.ts +18 -0
- package/dist/style/cssLayers.mjs +14 -0
- package/dist/style/index.d.ts +1 -0
- package/dist/style/index.mjs +11 -10
- package/dist/style/styleConstants.d.ts +10 -2
- package/dist/style/styleConstants.mjs +16 -0
- package/dist/style/useDisplayMode.d.ts +11 -0
- package/dist/style/useDisplayMode.mjs +18 -0
- package/dist/types/ActionTypes.d.ts +3 -3
- package/dist/types/ComponentTypes.d.ts +13 -0
- package/dist/types/DataTypes.d.ts +36 -0
- package/dist/types/InteractionTypes.d.ts +16 -2
- package/dist/types/SchemaTypes.d.ts +10 -2
- package/dist/types/SchemaTypes.mjs +2 -1
- package/dist/types/ServerTypes.d.ts +60 -8
- package/dist/types/StoreTypes.d.ts +19 -6
- package/dist/types/index.d.ts +1 -2
- package/package.json +58 -28
- package/setupTests.ts +16 -13
- package/dist/types/AITypes.d.ts +0 -80
- package/dist/types/McpTypes/index.d.ts +0 -56
- package/dist/types/McpTypes/index.mjs +0 -0
- /package/dist/types/{AITypes.mjs → DataTypes.mjs} +0 -0
|
@@ -19,100 +19,101 @@ import _ from "./Space/connectors/SpaceUpdateConnectorMutation.mjs";
|
|
|
19
19
|
import v from "./Space/credentials/SpaceAddCredentialMutation.mjs";
|
|
20
20
|
import y from "./Space/credentials/SpaceRemoveCredentialMutation.mjs";
|
|
21
21
|
import b from "./Space/credentials/SpaceUpdateCredentialMutation.mjs";
|
|
22
|
-
import x from "./Space/
|
|
23
|
-
import S from "./Space/flags/
|
|
24
|
-
import C from "./Space/flags/
|
|
25
|
-
import w from "./Space/
|
|
26
|
-
import T from "./Space/folders/
|
|
27
|
-
import E from "./Space/folders/
|
|
28
|
-
import D from "./Space/
|
|
29
|
-
import O from "./Space/functions/
|
|
30
|
-
import k from "./Space/functions/
|
|
31
|
-
import A from "./Space/functions/
|
|
32
|
-
import j from "./Space/
|
|
33
|
-
import M from "./Space/pages/
|
|
34
|
-
import N from "./Space/pages/
|
|
35
|
-
import P from "./Space/pages/
|
|
36
|
-
import F from "./Space/
|
|
37
|
-
import I from "./Space/resources/
|
|
38
|
-
import L from "./Space/resources/
|
|
39
|
-
import R from "./Space/
|
|
40
|
-
import z from "./Space/runtime/
|
|
41
|
-
import B from "./Space/runtime/
|
|
42
|
-
import V from "./Space/runtime/
|
|
43
|
-
import H from "./Space/runtime/
|
|
44
|
-
import U from "./Space/runtime/
|
|
45
|
-
import W from "./Space/
|
|
46
|
-
import G from "./Space/
|
|
47
|
-
import K from "./Space/
|
|
48
|
-
import q from "./Space/
|
|
49
|
-
import J from "./Space/
|
|
50
|
-
import Y from "./Space/
|
|
51
|
-
import X from "./Space/
|
|
52
|
-
import Z from "./Space/
|
|
53
|
-
import Q from "./Space/
|
|
54
|
-
import $ from "./Space/
|
|
55
|
-
import ee from "./Space/
|
|
56
|
-
import te from "./Space/
|
|
57
|
-
import ne from "./Space/
|
|
58
|
-
import re from "./Space/
|
|
59
|
-
import ie from "./Space/
|
|
60
|
-
import ae from "./Space/
|
|
61
|
-
import oe from "./Space/
|
|
62
|
-
import se from "./Space/
|
|
63
|
-
import ce from "./Space/variables/
|
|
64
|
-
import le from "./Space/variables/
|
|
65
|
-
import ue from "./Space/
|
|
66
|
-
import de from "./Space/visitors/
|
|
67
|
-
import fe from "./
|
|
68
|
-
import pe from "./Style/fonts/
|
|
69
|
-
import me from "./Style/fonts/
|
|
70
|
-
import he from "./Style/
|
|
71
|
-
import ge from "./Style/selectors/
|
|
72
|
-
import _e from "./Style/selectors/
|
|
73
|
-
import ve from "./Style/selectors/
|
|
74
|
-
import ye from "./Style/
|
|
75
|
-
import be from "./Style/selectorVariables/
|
|
76
|
-
import xe from "./Style/selectorVariables/
|
|
77
|
-
import Se from "./Style/
|
|
78
|
-
import Ce from "./Style/
|
|
79
|
-
import we from "./Style/
|
|
80
|
-
import Te from "./Style/variables/
|
|
81
|
-
import Ee from "./Style/variables/
|
|
22
|
+
import x from "./Space/data/SpaceSaveDataMutation.mjs";
|
|
23
|
+
import S from "./Space/flags/SpacePublishFlagsMutation.mjs";
|
|
24
|
+
import C from "./Space/flags/SpaceRemoveFlagMutation.mjs";
|
|
25
|
+
import w from "./Space/flags/SpaceSetFlagMutation.mjs";
|
|
26
|
+
import T from "./Space/folders/SpaceAddPageFolderMutation.mjs";
|
|
27
|
+
import E from "./Space/folders/SpaceRemovePageFolderMutation.mjs";
|
|
28
|
+
import D from "./Space/folders/SpaceUpdatePageFolderMutation.mjs";
|
|
29
|
+
import O from "./Space/functions/SpaceInstallTemplateFunctionsMutation.mjs";
|
|
30
|
+
import k from "./Space/functions/SpaceRemoveFunctionsMutation.mjs";
|
|
31
|
+
import A from "./Space/functions/SpaceSaveFunctionsMutation.mjs";
|
|
32
|
+
import j from "./Space/functions/SpaceTryFunctionMutation.mjs";
|
|
33
|
+
import M from "./Space/pages/SpaceAddPageMutation.mjs";
|
|
34
|
+
import N from "./Space/pages/SpaceHomePageMutation.mjs";
|
|
35
|
+
import P from "./Space/pages/SpaceRemovePageMutation.mjs";
|
|
36
|
+
import F from "./Space/pages/SpaceUpdatePageMutation.mjs";
|
|
37
|
+
import I from "./Space/resources/SpaceAddResourceMutation.mjs";
|
|
38
|
+
import L from "./Space/resources/SpaceMoveResourceMutation.mjs";
|
|
39
|
+
import R from "./Space/resources/SpaceRemoveResourceMutation.mjs";
|
|
40
|
+
import z from "./Space/runtime/SpaceRemoveRuntimeMutation.mjs";
|
|
41
|
+
import B from "./Space/runtime/SpaceRemoveRuntimeVariableMutation.mjs";
|
|
42
|
+
import V from "./Space/runtime/SpaceSetRuntimeSizeMutation.mjs";
|
|
43
|
+
import H from "./Space/runtime/SpaceSetRuntimeVariableMutation.mjs";
|
|
44
|
+
import U from "./Space/runtime/SpaceStartRuntimeMutation.mjs";
|
|
45
|
+
import W from "./Space/runtime/SpaceStopRuntimeMutation.mjs";
|
|
46
|
+
import G from "./Space/SpaceAddElementMutation.mjs";
|
|
47
|
+
import K from "./Space/SpaceAddPluginMutation.mjs";
|
|
48
|
+
import q from "./Space/SpaceAddSnippetMutation.mjs";
|
|
49
|
+
import J from "./Space/SpaceCloneElementMutation.mjs";
|
|
50
|
+
import Y from "./Space/SpaceDeployMutation.mjs";
|
|
51
|
+
import X from "./Space/SpaceFixIssuesMutation.mjs";
|
|
52
|
+
import Z from "./Space/SpaceMoveElementMutation.mjs";
|
|
53
|
+
import Q from "./Space/SpacePublishMutation.mjs";
|
|
54
|
+
import $ from "./Space/SpaceRemoveElementMutation.mjs";
|
|
55
|
+
import ee from "./Space/SpaceRemovePluginMutation.mjs";
|
|
56
|
+
import te from "./Space/SpaceRenameElementMutation.mjs";
|
|
57
|
+
import ne from "./Space/SpaceUpdateElementMutation.mjs";
|
|
58
|
+
import re from "./Space/SpaceUpdateElementsMutation.mjs";
|
|
59
|
+
import ie from "./Space/SpaceUpdateMutation.mjs";
|
|
60
|
+
import ae from "./Space/SpaceUpdatePluginMutation.mjs";
|
|
61
|
+
import oe from "./Space/SpaceUpdateSchemaMutation.mjs";
|
|
62
|
+
import se from "./Space/SpaceUpdateSettingsMutation.mjs";
|
|
63
|
+
import ce from "./Space/variables/SpaceAddVariableMutation.mjs";
|
|
64
|
+
import le from "./Space/variables/SpaceRemoveVariableMutation.mjs";
|
|
65
|
+
import ue from "./Space/variables/SpaceUpdateVariableMutation.mjs";
|
|
66
|
+
import de from "./Space/visitors/SpaceAddVisitorMutation.mjs";
|
|
67
|
+
import fe from "./Space/visitors/SpaceRemoveVisitorMutation.mjs";
|
|
68
|
+
import pe from "./Style/fonts/StyleAddFontMutation.mjs";
|
|
69
|
+
import me from "./Style/fonts/StyleRemoveFontMutation.mjs";
|
|
70
|
+
import he from "./Style/fonts/StyleUpdateFontMutation.mjs";
|
|
71
|
+
import ge from "./Style/selectors/StyleAddSelectorMutation.mjs";
|
|
72
|
+
import _e from "./Style/selectors/StyleRemoveSelectorMutation.mjs";
|
|
73
|
+
import ve from "./Style/selectors/StyleRemoveSelectorsMutation.mjs";
|
|
74
|
+
import ye from "./Style/selectors/StyleUpdateSelectorMutation.mjs";
|
|
75
|
+
import be from "./Style/selectorVariables/StyleAddSelectorVariableMutation.mjs";
|
|
76
|
+
import xe from "./Style/selectorVariables/StyleRemoveSelectorVariableMutation.mjs";
|
|
77
|
+
import Se from "./Style/selectorVariables/StyleUpdateSelectorVariableMutation.mjs";
|
|
78
|
+
import Ce from "./Style/StyleUpdateMutation.mjs";
|
|
79
|
+
import we from "./Style/StyleUpdateSettingsMutation.mjs";
|
|
80
|
+
import Te from "./Style/variables/StyleAddVariableMutation.mjs";
|
|
81
|
+
import Ee from "./Style/variables/StyleRemoveVariableMutation.mjs";
|
|
82
|
+
import De from "./Style/variables/StyleUpdateVariableMutation.mjs";
|
|
82
83
|
//#region src/network/graphql/builder/Mutations/index.ts
|
|
83
|
-
var
|
|
84
|
-
SpaceUpdate:
|
|
85
|
-
SpaceUpdateSchema:
|
|
86
|
-
SpaceAddPage:
|
|
87
|
-
SpaceHomePage:
|
|
88
|
-
SpaceUpdatePage:
|
|
89
|
-
SpaceRemovePage:
|
|
90
|
-
SpaceAddPageFolder:
|
|
91
|
-
SpaceUpdatePageFolder:
|
|
92
|
-
SpaceRemovePageFolder:
|
|
93
|
-
SpaceAddVariable:
|
|
94
|
-
SpaceUpdateVariable:
|
|
95
|
-
SpaceRemoveVariable:
|
|
96
|
-
SpaceSetFlag:
|
|
97
|
-
SpaceRemoveFlag:
|
|
98
|
-
SpaceAddElement:
|
|
99
|
-
SpaceUpdateElement:
|
|
100
|
-
SpaceRenameElement:
|
|
101
|
-
SpaceUpdateElements:
|
|
102
|
-
SpaceRemoveElement:
|
|
103
|
-
SpaceMoveElement:
|
|
104
|
-
SpaceCloneElement:
|
|
84
|
+
var Oe = {
|
|
85
|
+
SpaceUpdate: ie,
|
|
86
|
+
SpaceUpdateSchema: oe,
|
|
87
|
+
SpaceAddPage: M,
|
|
88
|
+
SpaceHomePage: N,
|
|
89
|
+
SpaceUpdatePage: F,
|
|
90
|
+
SpaceRemovePage: P,
|
|
91
|
+
SpaceAddPageFolder: T,
|
|
92
|
+
SpaceUpdatePageFolder: D,
|
|
93
|
+
SpaceRemovePageFolder: E,
|
|
94
|
+
SpaceAddVariable: ce,
|
|
95
|
+
SpaceUpdateVariable: ue,
|
|
96
|
+
SpaceRemoveVariable: le,
|
|
97
|
+
SpaceSetFlag: w,
|
|
98
|
+
SpaceRemoveFlag: C,
|
|
99
|
+
SpaceAddElement: G,
|
|
100
|
+
SpaceUpdateElement: ne,
|
|
101
|
+
SpaceRenameElement: te,
|
|
102
|
+
SpaceUpdateElements: re,
|
|
103
|
+
SpaceRemoveElement: $,
|
|
104
|
+
SpaceMoveElement: Z,
|
|
105
|
+
SpaceCloneElement: J,
|
|
105
106
|
SpaceAddComponent: d,
|
|
106
107
|
SpaceUpdateComponent: m,
|
|
107
108
|
SpaceRemoveComponent: p,
|
|
108
109
|
SpaceDetachInstance: f,
|
|
109
|
-
SpaceAddSnippet:
|
|
110
|
-
SpaceAddPlugin:
|
|
111
|
-
SpaceUpdatePlugin:
|
|
112
|
-
SpaceRemovePlugin:
|
|
113
|
-
SpaceAddResource:
|
|
114
|
-
SpaceMoveResource:
|
|
115
|
-
SpaceRemoveResource:
|
|
110
|
+
SpaceAddSnippet: q,
|
|
111
|
+
SpaceAddPlugin: K,
|
|
112
|
+
SpaceUpdatePlugin: ae,
|
|
113
|
+
SpaceRemovePlugin: ee,
|
|
114
|
+
SpaceAddResource: I,
|
|
115
|
+
SpaceMoveResource: L,
|
|
116
|
+
SpaceRemoveResource: R,
|
|
116
117
|
SpaceAddCdn: a,
|
|
117
118
|
SpaceUpdateCdn: u,
|
|
118
119
|
SpaceSetCdnCredential: c,
|
|
@@ -124,44 +125,45 @@ var De = {
|
|
|
124
125
|
SpaceUpdateAction: r,
|
|
125
126
|
SpaceRemoveAction: t,
|
|
126
127
|
SpaceRunAction: n,
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
128
|
+
SpaceSaveData: x,
|
|
129
|
+
SpaceSaveFunctions: A,
|
|
130
|
+
SpaceRemoveFunctions: k,
|
|
131
|
+
SpaceInstallTemplateFunctions: O,
|
|
132
|
+
SpaceTryFunction: j,
|
|
131
133
|
SpaceAddConnector: h,
|
|
132
134
|
SpaceUpdateConnector: _,
|
|
133
135
|
SpaceRemoveConnector: g,
|
|
134
136
|
SpaceAddCredential: v,
|
|
135
137
|
SpaceUpdateCredential: b,
|
|
136
138
|
SpaceRemoveCredential: y,
|
|
137
|
-
SpaceAddVisitor:
|
|
138
|
-
SpaceRemoveVisitor:
|
|
139
|
-
SpaceSetRuntimeVariable:
|
|
140
|
-
SpaceSetRuntimeSize:
|
|
141
|
-
SpaceStartRuntime:
|
|
142
|
-
SpaceStopRuntime:
|
|
143
|
-
SpaceRemoveRuntimeVariable:
|
|
144
|
-
SpaceRemoveRuntime:
|
|
145
|
-
SpacePublish:
|
|
146
|
-
SpacePublishFlags:
|
|
147
|
-
SpaceFixIssues:
|
|
148
|
-
SpaceDeploy:
|
|
149
|
-
SpaceUpdateSettings:
|
|
150
|
-
StyleAddSelector:
|
|
151
|
-
StyleUpdateSelector:
|
|
152
|
-
StyleRemoveSelector:
|
|
153
|
-
StyleRemoveSelectors:
|
|
154
|
-
StyleAddSelectorVariable:
|
|
155
|
-
StyleUpdateSelectorVariable:
|
|
156
|
-
StyleRemoveSelectorVariable:
|
|
157
|
-
StyleAddFont:
|
|
158
|
-
StyleUpdateFont:
|
|
159
|
-
StyleRemoveFont:
|
|
160
|
-
StyleAddVariable:
|
|
161
|
-
StyleUpdateVariable:
|
|
162
|
-
StyleRemoveVariable:
|
|
163
|
-
StyleUpdate:
|
|
164
|
-
StyleUpdateSettings:
|
|
139
|
+
SpaceAddVisitor: de,
|
|
140
|
+
SpaceRemoveVisitor: fe,
|
|
141
|
+
SpaceSetRuntimeVariable: H,
|
|
142
|
+
SpaceSetRuntimeSize: V,
|
|
143
|
+
SpaceStartRuntime: U,
|
|
144
|
+
SpaceStopRuntime: W,
|
|
145
|
+
SpaceRemoveRuntimeVariable: B,
|
|
146
|
+
SpaceRemoveRuntime: z,
|
|
147
|
+
SpacePublish: Q,
|
|
148
|
+
SpacePublishFlags: S,
|
|
149
|
+
SpaceFixIssues: X,
|
|
150
|
+
SpaceDeploy: Y,
|
|
151
|
+
SpaceUpdateSettings: se,
|
|
152
|
+
StyleAddSelector: ge,
|
|
153
|
+
StyleUpdateSelector: ye,
|
|
154
|
+
StyleRemoveSelector: _e,
|
|
155
|
+
StyleRemoveSelectors: ve,
|
|
156
|
+
StyleAddSelectorVariable: be,
|
|
157
|
+
StyleUpdateSelectorVariable: Se,
|
|
158
|
+
StyleRemoveSelectorVariable: xe,
|
|
159
|
+
StyleAddFont: pe,
|
|
160
|
+
StyleUpdateFont: he,
|
|
161
|
+
StyleRemoveFont: me,
|
|
162
|
+
StyleAddVariable: Te,
|
|
163
|
+
StyleUpdateVariable: De,
|
|
164
|
+
StyleRemoveVariable: Ee,
|
|
165
|
+
StyleUpdate: Ce,
|
|
166
|
+
StyleUpdateSettings: we
|
|
165
167
|
};
|
|
166
168
|
//#endregion
|
|
167
|
-
export {
|
|
169
|
+
export { Oe as default };
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { PluginRaw, SchemaRaw, Style } from '../../../../types';
|
|
2
2
|
export type TInitQuery = {
|
|
3
|
-
/** The editor's own feature flags, resolved by the platform for whoever opened it. */
|
|
4
|
-
PlatformFlags?: Record<string, boolean>;
|
|
5
3
|
Space?: {
|
|
6
4
|
definition: SchemaRaw['definition'];
|
|
7
5
|
plugins: PluginRaw[];
|
|
@@ -9,5 +7,5 @@ export type TInitQuery = {
|
|
|
9
7
|
style: Style;
|
|
10
8
|
};
|
|
11
9
|
};
|
|
12
|
-
declare const InitQuery = "\n query InitQuery($environment: String!, $revision: Int) {\n
|
|
10
|
+
declare const InitQuery = "\n query InitQuery($environment: String!, $revision: Int) {\n Space(environment: $environment, revision: $revision) {\n definition {\n name\n permanentUrl\n }\n schema {\n settings\n rsc\n flat {\n id\n definition {\n label\n type\n initialState\n styleSelectors\n bindings\n interactions\n parentId\n rootId\n items\n runtime\n loadStrategy\n flag {\n name\n is\n }\n anchor\n motion {\n enter\n on\n duration\n delay\n stagger\n loop\n }\n quiet\n }\n attributes\n }\n pages\n components\n flags\n pageFolders {\n id\n name\n slug\n parentId\n }\n variables {\n name\n category\n type\n value\n subValues {\n when\n value\n }\n }\n }\n plugins {\n type\n resource\n settings\n }\n style {\n id\n platform\n variables\n mode\n fonts\n cache\n }\n }\n }\n";
|
|
13
11
|
export default InitQuery;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
//#region src/network/graphql/builder/Queries/InitQuery.ts
|
|
2
|
-
var e = "\n query InitQuery($environment: String!, $revision: Int) {\n
|
|
2
|
+
var e = "\n query InitQuery($environment: String!, $revision: Int) {\n Space(environment: $environment, revision: $revision) {\n definition {\n name\n permanentUrl\n }\n schema {\n settings\n rsc\n flat {\n id\n definition {\n label\n type\n initialState\n styleSelectors\n bindings\n interactions\n parentId\n rootId\n items\n runtime\n loadStrategy\n flag {\n name\n is\n }\n anchor\n motion {\n enter\n on\n duration\n delay\n stagger\n loop\n }\n quiet\n }\n attributes\n }\n pages\n components\n flags\n pageFolders {\n id\n name\n slug\n parentId\n }\n variables {\n name\n category\n type\n value\n subValues {\n when\n value\n }\n }\n }\n plugins {\n type\n resource\n settings\n }\n style {\n id\n platform\n variables\n mode\n fonts\n cache\n }\n }\n }\n";
|
|
3
3
|
//#endregion
|
|
4
4
|
export { e as default };
|
|
@@ -7,6 +7,7 @@ import { TSpaceChangesQuery } from './Space/SpaceChangesQuery';
|
|
|
7
7
|
import { TSpaceCheckActionQuery } from './Space/SpaceCheckActionQuery';
|
|
8
8
|
import { TSpaceConnectorsQuery } from './Space/SpaceConnectorsQuery';
|
|
9
9
|
import { TSpaceCredentialsQuery } from './Space/SpaceCredentialsQuery';
|
|
10
|
+
import { TSpaceDataQuery } from './Space/SpaceDataQuery';
|
|
10
11
|
import { TSpaceDeploymentsQuery } from './Space/SpaceDeploymentsQuery';
|
|
11
12
|
import { TSpaceFunctionsQuery } from './Space/SpaceFunctionsQuery';
|
|
12
13
|
import { TSpaceIssuesQuery } from './Space/SpaceIssuesQuery';
|
|
@@ -32,6 +33,7 @@ export type BuilderQueriesMap = {
|
|
|
32
33
|
SpaceActionEvents: TSpaceActionEventsQuery;
|
|
33
34
|
SpaceCheckAction: TSpaceCheckActionQuery;
|
|
34
35
|
SpaceActionTasks: TSpaceActionTasksQuery;
|
|
36
|
+
SpaceData: TSpaceDataQuery;
|
|
35
37
|
SpaceFunctions: TSpaceFunctionsQuery;
|
|
36
38
|
SpaceConnectors: TSpaceConnectorsQuery;
|
|
37
39
|
SpaceCredentials: TSpaceCredentialsQuery;
|
|
@@ -7,35 +7,37 @@ import a from "./Space/SpaceChangesQuery.mjs";
|
|
|
7
7
|
import o from "./Space/SpaceCheckActionQuery.mjs";
|
|
8
8
|
import s from "./Space/SpaceConnectorsQuery.mjs";
|
|
9
9
|
import c from "./Space/SpaceCredentialsQuery.mjs";
|
|
10
|
-
import l from "./Space/
|
|
11
|
-
import u from "./Space/
|
|
12
|
-
import d from "./Space/
|
|
13
|
-
import f from "./Space/
|
|
14
|
-
import p from "./Space/
|
|
15
|
-
import m from "./Space/
|
|
16
|
-
import h from "./Space/
|
|
17
|
-
import g from "./Space/
|
|
18
|
-
import _ from "./Space/
|
|
10
|
+
import l from "./Space/SpaceDataQuery.mjs";
|
|
11
|
+
import u from "./Space/SpaceDeploymentsQuery.mjs";
|
|
12
|
+
import d from "./Space/SpaceFunctionsQuery.mjs";
|
|
13
|
+
import f from "./Space/SpaceIssuesQuery.mjs";
|
|
14
|
+
import p from "./Space/SpaceLatestRevisionQuery.mjs";
|
|
15
|
+
import m from "./Space/SpaceQuotaQuery.mjs";
|
|
16
|
+
import h from "./Space/SpaceResourcesQuery.mjs";
|
|
17
|
+
import g from "./Space/SpaceRuntimeQuery.mjs";
|
|
18
|
+
import _ from "./Space/SpaceVersionContentsQuery.mjs";
|
|
19
|
+
import v from "./Space/SpaceVisitorsQuery.mjs";
|
|
19
20
|
//#region src/network/graphql/builder/Queries/index.ts
|
|
20
|
-
var
|
|
21
|
+
var y = {
|
|
21
22
|
Init: e,
|
|
22
|
-
SpaceLatestRevision:
|
|
23
|
-
SpaceQuota:
|
|
24
|
-
SpaceIssues:
|
|
23
|
+
SpaceLatestRevision: p,
|
|
24
|
+
SpaceQuota: m,
|
|
25
|
+
SpaceIssues: f,
|
|
25
26
|
SpaceChanges: a,
|
|
26
|
-
SpaceResources:
|
|
27
|
-
SpaceDeployments:
|
|
27
|
+
SpaceResources: h,
|
|
28
|
+
SpaceDeployments: u,
|
|
28
29
|
SpaceCdns: i,
|
|
29
30
|
SpaceActions: n,
|
|
30
31
|
SpaceActionEvents: t,
|
|
31
32
|
SpaceCheckAction: o,
|
|
32
33
|
SpaceActionTasks: r,
|
|
33
|
-
|
|
34
|
+
SpaceData: l,
|
|
35
|
+
SpaceFunctions: d,
|
|
34
36
|
SpaceConnectors: s,
|
|
35
37
|
SpaceCredentials: c,
|
|
36
|
-
SpaceVersionContents:
|
|
37
|
-
SpaceVisitors:
|
|
38
|
-
SpaceRuntime:
|
|
38
|
+
SpaceVersionContents: _,
|
|
39
|
+
SpaceVisitors: v,
|
|
40
|
+
SpaceRuntime: g
|
|
39
41
|
};
|
|
40
42
|
//#endregion
|
|
41
|
-
export {
|
|
43
|
+
export { y as default };
|
|
@@ -132,12 +132,12 @@ export declare const spaceEventSchemas: {
|
|
|
132
132
|
componentType: z.ZodOptional<z.ZodString>;
|
|
133
133
|
styleSelector: z.ZodOptional<z.ZodString>;
|
|
134
134
|
styleState: z.ZodOptional<z.ZodEnum<{
|
|
135
|
+
disabled: "disabled";
|
|
135
136
|
hover: "hover";
|
|
136
137
|
focus: "focus";
|
|
137
138
|
"focus-visible": "focus-visible";
|
|
138
139
|
"focus-within": "focus-within";
|
|
139
140
|
active: "active";
|
|
140
|
-
disabled: "disabled";
|
|
141
141
|
checked: "checked";
|
|
142
142
|
visited: "visited";
|
|
143
143
|
current: "current";
|
|
@@ -159,12 +159,12 @@ export declare const spaceEventSchemas: {
|
|
|
159
159
|
params: z.ZodObject<{
|
|
160
160
|
componentType: z.ZodOptional<z.ZodString>;
|
|
161
161
|
styleState: z.ZodOptional<z.ZodEnum<{
|
|
162
|
+
disabled: "disabled";
|
|
162
163
|
hover: "hover";
|
|
163
164
|
focus: "focus";
|
|
164
165
|
"focus-visible": "focus-visible";
|
|
165
166
|
"focus-within": "focus-within";
|
|
166
167
|
active: "active";
|
|
167
|
-
disabled: "disabled";
|
|
168
168
|
checked: "checked";
|
|
169
169
|
visited: "visited";
|
|
170
170
|
current: "current";
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Plugin } from 'esbuild';
|
|
2
|
+
/**
|
|
3
|
+
* What a plugin's bundle carries INSIDE it, as data URIs: the images and fonts a library's stylesheet drags in (a map,
|
|
4
|
+
* a date picker, an editor). Inlined rather than emitted beside the bundle, because a plugin travels as its module and
|
|
5
|
+
* its stylesheet — through `plitzi pack`, an upload, a server's `copy` or `download` — and a third file nothing carries
|
|
6
|
+
* would leave a stylesheet with broken references in it.
|
|
7
|
+
*
|
|
8
|
+
* One list for every builder of a plugin (`plitzi pack`, a server compiling one), so a plugin that builds in one builds
|
|
9
|
+
* in the other.
|
|
10
|
+
*/
|
|
11
|
+
export declare const PLUGIN_INLINED_ASSETS: readonly [".png", ".jpg", ".jpeg", ".gif", ".svg", ".webp", ".avif", ".woff", ".woff2", ".ttf", ".otf"];
|
|
12
|
+
/** `PLUGIN_INLINED_ASSETS` as esbuild's `loader` option takes it. */
|
|
13
|
+
export declare const pluginAssetLoaders: () => Record<string, "dataurl">;
|
|
14
|
+
/**
|
|
15
|
+
* A file a plugin needs whole, imported the way Vite imports it — so the same line works in a client-mode project's
|
|
16
|
+
* dev server and in every bundle built for a plugin:
|
|
17
|
+
*
|
|
18
|
+
* - `import source from 'maplibre-gl/dist/maplibre-gl-csp-worker.js?raw'` — the file's text: a library's worker, made
|
|
19
|
+
* with `URL.createObjectURL(new Blob([source], { type: 'text/javascript' }))`.
|
|
20
|
+
* - `import url from './engine.wasm?inline'` — the file as a data URI: a WebAssembly module, `fetch(url)` and instantiate.
|
|
21
|
+
*
|
|
22
|
+
* Both are carried inside the bundle, for the reason `PLUGIN_INLINED_ASSETS` is: a plugin travels as its module and its
|
|
23
|
+
* stylesheet. The cost is the bundle's size — right for a worker or a small module, wrong for a 20 MB model, which
|
|
24
|
+
* belongs on a CDN the plugin reads from.
|
|
25
|
+
*/
|
|
26
|
+
export declare const pluginImportQueries: () => Plugin;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import e from "node:fs/promises";
|
|
2
|
+
import t from "node:path";
|
|
3
|
+
//#region src/plugins/bundle.ts
|
|
4
|
+
var n = [
|
|
5
|
+
".png",
|
|
6
|
+
".jpg",
|
|
7
|
+
".jpeg",
|
|
8
|
+
".gif",
|
|
9
|
+
".svg",
|
|
10
|
+
".webp",
|
|
11
|
+
".avif",
|
|
12
|
+
".woff",
|
|
13
|
+
".woff2",
|
|
14
|
+
".ttf",
|
|
15
|
+
".otf"
|
|
16
|
+
], r = () => Object.fromEntries(n.map((e) => [e, "dataurl"])), i = /\?(raw|inline)$/, a = {
|
|
17
|
+
".wasm": "application/wasm",
|
|
18
|
+
".js": "text/javascript",
|
|
19
|
+
".mjs": "text/javascript",
|
|
20
|
+
".json": "application/json",
|
|
21
|
+
".css": "text/css",
|
|
22
|
+
".svg": "image/svg+xml",
|
|
23
|
+
".png": "image/png",
|
|
24
|
+
".jpg": "image/jpeg",
|
|
25
|
+
".jpeg": "image/jpeg",
|
|
26
|
+
".webp": "image/webp",
|
|
27
|
+
".woff2": "font/woff2"
|
|
28
|
+
}, o = () => ({
|
|
29
|
+
name: "plitzi-import-queries",
|
|
30
|
+
setup: (n) => {
|
|
31
|
+
n.onResolve({ filter: i }, async (e) => {
|
|
32
|
+
let t = i.exec(e.path)?.[1] ?? "raw", r = await n.resolve(e.path.replace(i, ""), {
|
|
33
|
+
kind: e.kind,
|
|
34
|
+
importer: e.importer,
|
|
35
|
+
resolveDir: e.resolveDir
|
|
36
|
+
});
|
|
37
|
+
return r.errors.length > 0 ? { errors: r.errors } : {
|
|
38
|
+
path: r.path,
|
|
39
|
+
namespace: `plitzi-${t}`
|
|
40
|
+
};
|
|
41
|
+
}), n.onLoad({
|
|
42
|
+
filter: /.*/,
|
|
43
|
+
namespace: "plitzi-raw"
|
|
44
|
+
}, async (t) => ({
|
|
45
|
+
contents: await e.readFile(t.path),
|
|
46
|
+
loader: "text",
|
|
47
|
+
watchFiles: [t.path]
|
|
48
|
+
})), n.onLoad({
|
|
49
|
+
filter: /.*/,
|
|
50
|
+
namespace: "plitzi-inline"
|
|
51
|
+
}, async (n) => {
|
|
52
|
+
let r = a[t.extname(n.path).toLowerCase()] ?? "application/octet-stream", i = (await e.readFile(n.path)).toString("base64");
|
|
53
|
+
return {
|
|
54
|
+
contents: `export default ${JSON.stringify(`data:${r};base64,${i}`)};`,
|
|
55
|
+
loader: "js",
|
|
56
|
+
watchFiles: [n.path]
|
|
57
|
+
};
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
//#endregion
|
|
62
|
+
export { n as PLUGIN_INLINED_ASSETS, r as pluginAssetLoaders, o as pluginImportQueries };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ComponentDefinition, PluginDeclaration } from '../types';
|
|
2
|
+
import { FC } from 'react';
|
|
3
|
+
/** A plugin as its bundle exports it: the component, with the declaration its `index.ts` assigned onto it. */
|
|
4
|
+
export type DeclaredPlugin = FC<never> & {
|
|
5
|
+
content?: ComponentDefinition;
|
|
6
|
+
version?: string;
|
|
7
|
+
initialItems?: string[];
|
|
8
|
+
plugins?: Record<string, DeclaredPlugin>;
|
|
9
|
+
};
|
|
10
|
+
export declare const pluginDeclarationOf: (plugin: DeclaredPlugin) => PluginDeclaration;
|
|
11
|
+
/** The element types a plugin registered under `type` renders: its own and its sub-plugins', at any depth. */
|
|
12
|
+
export declare const pluginTypesOf: (type: string, declaration: PluginDeclaration) => string[];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
//#region src/plugins/declaration.ts
|
|
2
|
+
var e = (e) => typeof e == "object" && !!e && "$$typeof" in e, t = (t) => JSON.parse(JSON.stringify(t, (t, n) => typeof n == "function" || e(n) ? void 0 : n)), n = (e) => ({
|
|
3
|
+
...e.content ? { content: t(e.content) } : {},
|
|
4
|
+
...e.version ? { version: e.version } : {},
|
|
5
|
+
...e.initialItems ? { initialItems: [...e.initialItems] } : {},
|
|
6
|
+
...e.plugins ? { plugins: Object.fromEntries(Object.entries(e.plugins).map(([e, t]) => [e, n(t)])) } : {}
|
|
7
|
+
}), r = (e, t) => [e, ...Object.entries(t.plugins ?? {}).flatMap(([e, t]) => r(e, t))];
|
|
8
|
+
//#endregion
|
|
9
|
+
export { n as pluginDeclarationOf, r as pluginTypesOf };
|
|
@@ -100,6 +100,13 @@ export declare class QueryCache {
|
|
|
100
100
|
fetchQuery<T>(key: string, options: QueryObserverOptions<T> & {
|
|
101
101
|
gcTime?: number;
|
|
102
102
|
}): Promise<T | undefined>;
|
|
103
|
+
/**
|
|
104
|
+
* Stops the request out for `key`: the answer it would have brought lands nowhere, and what is held stays on screen.
|
|
105
|
+
*
|
|
106
|
+
* What a STOP is — the visitor is done waiting. The query is left as it was before it asked, so the next reader, or
|
|
107
|
+
* the next `refetch`, asks again.
|
|
108
|
+
*/
|
|
109
|
+
cancel(key: string): boolean;
|
|
103
110
|
/** Asks again for `key` now, whatever the age of what is held — the explicit "reload this". */
|
|
104
111
|
refetch(key: string): Promise<void>;
|
|
105
112
|
/**
|
|
@@ -67,6 +67,13 @@ var t = 3e5, n = (e) => {
|
|
|
67
67
|
let a = this.getEntry(e)?.data;
|
|
68
68
|
return this.scheduleGc(n), a;
|
|
69
69
|
}
|
|
70
|
+
cancel(e) {
|
|
71
|
+
let t = this.runtimes.get(n(e));
|
|
72
|
+
if (!t?.controller) return !1;
|
|
73
|
+
t.controller.abort(), t.controller = void 0, t.inFlight = void 0;
|
|
74
|
+
let i = r(e);
|
|
75
|
+
return this.getEntry(e) ? this.store.setState(`${i}.isFetching`, !1) : this.markUnasked(t), !0;
|
|
76
|
+
}
|
|
70
77
|
refetch(e) {
|
|
71
78
|
let t = this.runtimes.get(n(e));
|
|
72
79
|
return t ? this.invalidateOne(t) : Promise.resolve();
|
|
@@ -121,10 +128,10 @@ var t = 3e5, n = (e) => {
|
|
|
121
128
|
tags: o,
|
|
122
129
|
isFetching: !0
|
|
123
130
|
});
|
|
124
|
-
let c = this.epochValue, l = e.version, u = (r) => {
|
|
125
|
-
if (c !== this.epochValue || this.runtimes.get(n(i)) !== e) return Promise.resolve();
|
|
131
|
+
let c = this.epochValue, l = e.version, u = new AbortController(), d = (r) => {
|
|
132
|
+
if (c !== this.epochValue || this.runtimes.get(n(i)) !== e || e.controller !== u) return Promise.resolve();
|
|
126
133
|
e.inFlight = void 0, e.controller = void 0;
|
|
127
|
-
let
|
|
134
|
+
let d = l !== e.version;
|
|
128
135
|
if ("error" in r) {
|
|
129
136
|
let e = this.getEntry(i);
|
|
130
137
|
this.store.setState(s, {
|
|
@@ -136,7 +143,7 @@ var t = 3e5, n = (e) => {
|
|
|
136
143
|
isFetching: !1
|
|
137
144
|
}, { ttl: 0 });
|
|
138
145
|
} else {
|
|
139
|
-
let n = !
|
|
146
|
+
let n = !d && (t.isCacheable?.(r.data) ?? !0);
|
|
140
147
|
this.store.setState(s, {
|
|
141
148
|
key: i,
|
|
142
149
|
url: a,
|
|
@@ -145,9 +152,9 @@ var t = 3e5, n = (e) => {
|
|
|
145
152
|
isFetching: !1
|
|
146
153
|
}, { ttl: n ? this.ttlOf(e, t) : 0 });
|
|
147
154
|
}
|
|
148
|
-
return
|
|
149
|
-
}
|
|
150
|
-
return e.controller =
|
|
155
|
+
return d ? this.fetchActive(e) : Promise.resolve();
|
|
156
|
+
};
|
|
157
|
+
return e.controller = u, e.inFlight = t.fetcher(u.signal).then((e) => d({ data: e }), (e) => d({ error: e })), e.inFlight;
|
|
151
158
|
}
|
|
152
159
|
ttlOf(e, t) {
|
|
153
160
|
let n = e.observers.size > 0 ? Infinity : t.staleTime;
|
|
@@ -18,6 +18,8 @@ export type UseQueryResult<T> = {
|
|
|
18
18
|
/** Nothing to render with yet — as opposed to a refresh of something already on screen. */
|
|
19
19
|
isLoading: boolean;
|
|
20
20
|
refetch: () => void;
|
|
21
|
+
/** Stops the request out, if there is one: what is held stays, and nothing is asked until the next reader or refetch. */
|
|
22
|
+
cancel: () => void;
|
|
21
23
|
};
|
|
22
24
|
declare const useQuery: <T>({ key, meta, fetcher, enabled, staleTime, gcTime, isCacheable }: UseQueryOptions<T>) => UseQueryResult<T>;
|
|
23
25
|
export default useQuery;
|
|
@@ -35,12 +35,15 @@ var { useStore: s } = o(), c = ({ key: o, meta: c, fetcher: l, enabled: u = !0,
|
|
|
35
35
|
};
|
|
36
36
|
let w = S ?? C.current?.data, T = (g?.isFetching ?? !1) || u && m && !_, E = r(() => {
|
|
37
37
|
u && o !== void 0 && e.refetch(o);
|
|
38
|
-
}, [u, o])
|
|
38
|
+
}, [u, o]), D = r(() => {
|
|
39
|
+
o !== void 0 && e.cancel(o);
|
|
40
|
+
}, [o]);
|
|
39
41
|
return {
|
|
40
42
|
data: w,
|
|
41
43
|
isFetching: T,
|
|
42
44
|
isLoading: T && w === void 0,
|
|
43
|
-
refetch: E
|
|
45
|
+
refetch: E,
|
|
46
|
+
cancel: D
|
|
44
47
|
};
|
|
45
48
|
};
|
|
46
49
|
//#endregion
|