@uniformdev/canvas-next-rsc 19.173.1-alpha.17 → 19.173.2-alpha.258
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/dist/UniformComposition-0pvEHduc.d.mts +64 -0
- package/dist/UniformComposition-0pvEHduc.d.ts +77 -0
- package/dist/UniformComposition-38e22896.d.ts +74 -0
- package/dist/UniformComposition-B-Z17dUt.d.ts +56 -43
- package/dist/UniformComposition-D4tBQ2U4.d.mts +64 -0
- package/dist/UniformComposition-D4tBQ2U4.d.ts +77 -0
- package/dist/UniformComposition-Dw55RFP6.d.mts +67 -0
- package/dist/UniformComposition-Dw55RFP6.d.ts +67 -0
- package/dist/UniformComposition-d178d865.d.ts +77 -0
- package/dist/actions/updateContext.d.ts +2 -0
- package/dist/actions/updateContext.js +17 -0
- package/dist/client/canvasClient.d.ts +5 -0
- package/dist/client/canvasClient.js +53 -0
- package/dist/client/manifestClient.d.ts +209 -0
- package/dist/client/manifestClient.js +33 -0
- package/dist/client/projectMapClient.d.ts +5 -0
- package/dist/client/projectMapClient.js +17 -0
- package/dist/client/routeClient.d.ts +5 -0
- package/dist/client/routeClient.js +68 -0
- package/dist/component.d.mts +23 -5
- package/dist/component.d.ts +23 -5
- package/dist/component.js +94 -37
- package/dist/component.mjs +93 -35
- package/dist/components/DefaultNotImplementedComponent.d.ts +4 -0
- package/dist/components/DefaultNotImplementedComponent.js +45 -0
- package/dist/components/GoogleTagManagerAnalytics.d.ts +3 -0
- package/dist/components/GoogleTagManagerAnalytics.js +44 -0
- package/dist/components/UniformComponent.d.ts +35 -0
- package/dist/components/UniformComponent.js +14 -0
- package/dist/components/UniformComposition.d.ts +47 -0
- package/dist/components/UniformComposition.js +35 -0
- package/dist/components/UniformContext.d.ts +13 -0
- package/dist/components/UniformContext.js +19 -0
- package/dist/components/UniformRichText.d.ts +42 -0
- package/dist/components/UniformRichText.js +15 -0
- package/dist/components/UniformRichTextNode.d.ts +14 -0
- package/dist/components/UniformRichTextNode.js +49 -0
- package/dist/components/UniformScript.d.ts +5 -0
- package/dist/components/UniformScript.js +49 -0
- package/dist/components/UniformSlot.d.ts +48 -0
- package/dist/components/UniformSlot.js +38 -0
- package/dist/components/UniformText.d.ts +10 -0
- package/dist/components/UniformText.js +5 -0
- package/dist/components/__tests__/evaluateComposition.spec.d.ts +1 -0
- package/dist/components/__tests__/evaluateComposition.spec.js +80 -0
- package/dist/components/convertComponentToProps.d.ts +18 -0
- package/dist/components/convertComponentToProps.js +22 -0
- package/dist/components/evaluateComposition.d.ts +32 -0
- package/dist/components/evaluateComposition.js +183 -0
- package/dist/components/getEnrichmentTags.d.ts +5 -0
- package/dist/components/getEnrichmentTags.js +13 -0
- package/dist/components/getUniformContext.d.ts +10 -0
- package/dist/components/getUniformContext.js +17 -0
- package/dist/components/nodes/HeadingRichTextNode.d.ts +2 -0
- package/dist/components/nodes/HeadingRichTextNode.js +6 -0
- package/dist/components/nodes/LinebreakRichTextNode.d.ts +2 -0
- package/dist/components/nodes/LinebreakRichTextNode.js +4 -0
- package/dist/components/nodes/LinkRichTextNode.d.ts +2 -0
- package/dist/components/nodes/LinkRichTextNode.js +6 -0
- package/dist/components/nodes/ListItemRichTextNode.d.ts +2 -0
- package/dist/components/nodes/ListItemRichTextNode.js +5 -0
- package/dist/components/nodes/ListRichTextNode.d.ts +2 -0
- package/dist/components/nodes/ListRichTextNode.js +6 -0
- package/dist/components/nodes/ParagraphRichTextNode.d.ts +2 -0
- package/dist/components/nodes/ParagraphRichTextNode.js +6 -0
- package/dist/components/nodes/TabRichTextNode.d.ts +2 -0
- package/dist/components/nodes/TabRichTextNode.js +4 -0
- package/dist/components/nodes/TextRichTextNode.d.ts +2 -0
- package/dist/components/nodes/TextRichTextNode.js +9 -0
- package/dist/components/renderComponent.d.ts +26 -0
- package/dist/components/renderComponent.js +52 -0
- package/dist/components/resolvePath.d.ts +5 -0
- package/dist/components/resolvePath.js +34 -0
- package/dist/components/retrieveRoute.d.ts +198 -0
- package/dist/components/retrieveRoute.js +146 -0
- package/dist/components/types.d.ts +15 -0
- package/dist/components/types.js +1 -0
- package/dist/config/helpers.d.ts +23 -0
- package/dist/config/helpers.js +34 -0
- package/dist/config/models.d.ts +51 -0
- package/dist/config/models.js +1 -0
- package/dist/config/uniform.server.config.d.ts +3 -0
- package/dist/config/uniform.server.config.js +4 -0
- package/dist/config.js +11 -17
- package/dist/config.mjs +11 -14
- package/dist/cookie/index.d.ts +12 -0
- package/dist/cookie/index.js +21 -0
- package/dist/handler/createPreviewGETRouteHandler.d.ts +1 -0
- package/dist/handler/createPreviewGETRouteHandler.js +43 -0
- package/dist/handler/createPreviewPOSTRouteHandler.d.ts +1 -0
- package/dist/handler/createPreviewPOSTRouteHandler.js +88 -0
- package/dist/handler/createUniformRouteHandler.d.ts +4 -0
- package/dist/handler/createUniformRouteHandler.js +10 -0
- package/dist/handler/helpers.d.ts +17 -0
- package/dist/handler/helpers.js +148 -0
- package/dist/handler/messages/handleCompositionChanged.d.ts +2 -0
- package/dist/handler/messages/handleCompositionChanged.js +9 -0
- package/dist/handler/messages/handleCompositionDeleted.d.ts +2 -0
- package/dist/handler/messages/handleCompositionDeleted.js +9 -0
- package/dist/handler/messages/handleCompositionPublished.d.ts +2 -0
- package/dist/handler/messages/handleCompositionPublished.js +9 -0
- package/dist/handler/messages/handleManifestPublished.d.ts +2 -0
- package/dist/handler/messages/handleManifestPublished.js +10 -0
- package/dist/handler/messages/handleProjectMapNodeDelete.d.ts +2 -0
- package/dist/handler/messages/handleProjectMapNodeDelete.js +21 -0
- package/dist/handler/messages/handleProjectMapNodeInsert.d.ts +2 -0
- package/dist/handler/messages/handleProjectMapNodeInsert.js +21 -0
- package/dist/handler/messages/handleProjectMapNodeUpdate.d.ts +2 -0
- package/dist/handler/messages/handleProjectMapNodeUpdate.js +22 -0
- package/dist/handler/messages/handleRedirectDelete.d.ts +2 -0
- package/dist/handler/messages/handleRedirectDelete.js +15 -0
- package/dist/handler/messages/handleRedirectInsert.d.ts +2 -0
- package/dist/handler/messages/handleRedirectInsert.js +15 -0
- package/dist/handler/messages/handleRedirectUpdate.d.ts +2 -0
- package/dist/handler/messages/handleRedirectUpdate.js +15 -0
- package/dist/handler.js +14 -10
- package/dist/handler.mjs +3 -16
- package/dist/hooks/useForgetMe.d.ts +4 -0
- package/dist/hooks/useForgetMe.js +10 -0
- package/dist/hooks/useToggleConsent.d.ts +7 -0
- package/dist/hooks/useToggleConsent.js +22 -0
- package/dist/hooks/useUniformContext.d.ts +1 -0
- package/dist/hooks/useUniformContext.js +3 -0
- package/dist/index.d.mts +38 -38
- package/dist/index.d.ts +38 -38
- package/dist/index.esm.js +57 -37
- package/dist/index.js +85 -62
- package/dist/index.mjs +57 -37
- package/dist/models/index.d.ts +30 -0
- package/dist/models/index.js +1 -0
- package/dist/register/componentStore.d.ts +1 -0
- package/dist/register/componentStore.js +2 -0
- package/dist/register/componentStoreResolver.d.ts +4 -0
- package/dist/register/componentStoreResolver.js +5 -0
- package/dist/register/createComponentStore.d.ts +12 -0
- package/dist/register/createComponentStore.js +13 -0
- package/dist/register/createComponentStoreResolver.d.ts +12 -0
- package/dist/register/createComponentStoreResolver.js +9 -0
- package/dist/register/getTypeWithVariant.d.ts +1 -0
- package/dist/register/getTypeWithVariant.js +1 -0
- package/dist/register/registerUniformComponent.d.ts +10 -0
- package/dist/register/registerUniformComponent.js +8 -0
- package/dist/resolve/resolveChildren.d.ts +17 -0
- package/dist/resolve/resolveChildren.js +20 -0
- package/dist/score/index.d.ts +3 -0
- package/dist/score/index.js +114 -0
- package/dist/utils/__tests__/apply.spec.d.ts +1 -0
- package/dist/utils/__tests__/apply.spec.js +358 -0
- package/dist/utils/__tests__/diff.spec.d.ts +1 -0
- package/dist/utils/__tests__/diff.spec.js +394 -0
- package/dist/utils/apply.d.ts +10 -0
- package/dist/utils/apply.js +124 -0
- package/dist/utils/comp.d.ts +25 -0
- package/dist/utils/comp.js +65 -0
- package/dist/utils/diff.d.ts +58 -0
- package/dist/utils/diff.js +144 -0
- package/dist/utils/draft.d.ts +20 -0
- package/dist/utils/draft.js +22 -0
- package/dist/utils/tag.d.ts +2 -0
- package/dist/utils/tag.js +7 -0
- package/dist/utils/url.d.ts +1 -0
- package/dist/utils/url.js +10 -0
- package/package.json +21 -21
package/dist/index.d.mts
CHANGED
|
@@ -5,8 +5,8 @@ import { ManifestClient } from '@uniformdev/context/api';
|
|
|
5
5
|
import { ProjectMapClient, ProjectMapNode } from '@uniformdev/project-map';
|
|
6
6
|
import { ContextState, ContextOptions } from '@uniformdev/context';
|
|
7
7
|
import React__default, { PropsWithChildren } from 'react';
|
|
8
|
-
import { U as UniformCompositionProps } from './UniformComposition-
|
|
9
|
-
export { a as UniformComposition, r as resolveComposition } from './UniformComposition-
|
|
8
|
+
import { U as UniformCompositionProps } from './UniformComposition-Dw55RFP6.mjs';
|
|
9
|
+
export { a as UniformComposition, r as resolveComposition } from './UniformComposition-Dw55RFP6.mjs';
|
|
10
10
|
import { ClientContextComponent } from '@uniformdev/canvas-next-rsc-client';
|
|
11
11
|
|
|
12
12
|
type GetCanvasClientOptions = {
|
|
@@ -14,7 +14,7 @@ type GetCanvasClientOptions = {
|
|
|
14
14
|
};
|
|
15
15
|
declare const getCanvasClient: (options: GetCanvasClientOptions) => CanvasClient;
|
|
16
16
|
declare const getDefaultCanvasClient: ({ searchParams, }: {
|
|
17
|
-
searchParams: PageParameters[
|
|
17
|
+
searchParams: PageParameters["searchParams"];
|
|
18
18
|
}) => CanvasClient;
|
|
19
19
|
|
|
20
20
|
type GetManifestClientOptions = {
|
|
@@ -22,34 +22,34 @@ type GetManifestClientOptions = {
|
|
|
22
22
|
};
|
|
23
23
|
declare const getManifestClient: (options: GetManifestClientOptions) => ManifestClient;
|
|
24
24
|
declare const getDefaultManifestClient: ({ searchParams, }: {
|
|
25
|
-
searchParams?: PageParameters[
|
|
25
|
+
searchParams?: PageParameters["searchParams"];
|
|
26
26
|
}) => ManifestClient;
|
|
27
27
|
declare const getManifest: ({ searchParams }: {
|
|
28
|
-
searchParams: PageParameters[
|
|
28
|
+
searchParams: PageParameters["searchParams"];
|
|
29
29
|
}) => Promise<{
|
|
30
30
|
project: {
|
|
31
|
-
id?: string
|
|
32
|
-
name?: string
|
|
33
|
-
ui_version?: number
|
|
31
|
+
id?: string;
|
|
32
|
+
name?: string;
|
|
33
|
+
ui_version?: number;
|
|
34
34
|
pz?: {
|
|
35
35
|
sig?: {
|
|
36
36
|
[key: string]: {
|
|
37
37
|
str: number;
|
|
38
38
|
cap: number;
|
|
39
|
-
dur: "
|
|
39
|
+
dur: "s" | "p" | "t";
|
|
40
40
|
crit: {
|
|
41
41
|
type: "G";
|
|
42
|
-
op?: "&" | "|"
|
|
42
|
+
op?: "&" | "|";
|
|
43
43
|
clauses: ({
|
|
44
44
|
type: "G";
|
|
45
|
-
op?: "&" | "|"
|
|
46
|
-
clauses: (any | {
|
|
45
|
+
op?: "&" | "|";
|
|
46
|
+
clauses: (any | ({
|
|
47
47
|
type: "CK";
|
|
48
48
|
cookieName: string;
|
|
49
49
|
match: {
|
|
50
50
|
rhs: string;
|
|
51
51
|
op: "=" | "~" | "//" | "!=" | "!~" | "!//";
|
|
52
|
-
cs?: boolean
|
|
52
|
+
cs?: boolean;
|
|
53
53
|
} | {
|
|
54
54
|
op: "*" | "!*";
|
|
55
55
|
};
|
|
@@ -59,7 +59,7 @@ declare const getManifest: ({ searchParams }: {
|
|
|
59
59
|
match: {
|
|
60
60
|
rhs: string;
|
|
61
61
|
op: "=" | "~" | "//" | "!=" | "!~" | "!//";
|
|
62
|
-
cs?: boolean
|
|
62
|
+
cs?: boolean;
|
|
63
63
|
} | {
|
|
64
64
|
op: "*" | "!*";
|
|
65
65
|
};
|
|
@@ -69,7 +69,7 @@ declare const getManifest: ({ searchParams }: {
|
|
|
69
69
|
match: {
|
|
70
70
|
rhs: string;
|
|
71
71
|
op: "=" | "~" | "//" | "!=" | "!~" | "!//";
|
|
72
|
-
cs?: boolean
|
|
72
|
+
cs?: boolean;
|
|
73
73
|
} | {
|
|
74
74
|
op: "*" | "!*";
|
|
75
75
|
};
|
|
@@ -78,7 +78,7 @@ declare const getManifest: ({ searchParams }: {
|
|
|
78
78
|
event: {
|
|
79
79
|
rhs: string;
|
|
80
80
|
op: "=" | "~" | "//" | "!=" | "!~" | "!//";
|
|
81
|
-
cs?: boolean
|
|
81
|
+
cs?: boolean;
|
|
82
82
|
} | {
|
|
83
83
|
op: "*" | "!*";
|
|
84
84
|
};
|
|
@@ -87,7 +87,7 @@ declare const getManifest: ({ searchParams }: {
|
|
|
87
87
|
path: {
|
|
88
88
|
rhs: string;
|
|
89
89
|
op: "=" | "~" | "//" | "!=" | "!~" | "!//";
|
|
90
|
-
cs?: boolean
|
|
90
|
+
cs?: boolean;
|
|
91
91
|
} | {
|
|
92
92
|
op: "*" | "!*";
|
|
93
93
|
};
|
|
@@ -95,16 +95,16 @@ declare const getManifest: ({ searchParams }: {
|
|
|
95
95
|
type: "PVC";
|
|
96
96
|
match: {
|
|
97
97
|
rhs: number;
|
|
98
|
-
op: "=" | "
|
|
98
|
+
op: "=" | "<" | ">" | "!=";
|
|
99
99
|
};
|
|
100
|
-
})[];
|
|
101
|
-
} | {
|
|
100
|
+
}))[];
|
|
101
|
+
} | ({
|
|
102
102
|
type: "CK";
|
|
103
103
|
cookieName: string;
|
|
104
104
|
match: {
|
|
105
105
|
rhs: string;
|
|
106
106
|
op: "=" | "~" | "//" | "!=" | "!~" | "!//";
|
|
107
|
-
cs?: boolean
|
|
107
|
+
cs?: boolean;
|
|
108
108
|
} | {
|
|
109
109
|
op: "*" | "!*";
|
|
110
110
|
};
|
|
@@ -114,7 +114,7 @@ declare const getManifest: ({ searchParams }: {
|
|
|
114
114
|
match: {
|
|
115
115
|
rhs: string;
|
|
116
116
|
op: "=" | "~" | "//" | "!=" | "!~" | "!//";
|
|
117
|
-
cs?: boolean
|
|
117
|
+
cs?: boolean;
|
|
118
118
|
} | {
|
|
119
119
|
op: "*" | "!*";
|
|
120
120
|
};
|
|
@@ -124,7 +124,7 @@ declare const getManifest: ({ searchParams }: {
|
|
|
124
124
|
match: {
|
|
125
125
|
rhs: string;
|
|
126
126
|
op: "=" | "~" | "//" | "!=" | "!~" | "!//";
|
|
127
|
-
cs?: boolean
|
|
127
|
+
cs?: boolean;
|
|
128
128
|
} | {
|
|
129
129
|
op: "*" | "!*";
|
|
130
130
|
};
|
|
@@ -133,7 +133,7 @@ declare const getManifest: ({ searchParams }: {
|
|
|
133
133
|
event: {
|
|
134
134
|
rhs: string;
|
|
135
135
|
op: "=" | "~" | "//" | "!=" | "!~" | "!//";
|
|
136
|
-
cs?: boolean
|
|
136
|
+
cs?: boolean;
|
|
137
137
|
} | {
|
|
138
138
|
op: "*" | "!*";
|
|
139
139
|
};
|
|
@@ -142,7 +142,7 @@ declare const getManifest: ({ searchParams }: {
|
|
|
142
142
|
path: {
|
|
143
143
|
rhs: string;
|
|
144
144
|
op: "=" | "~" | "//" | "!=" | "!~" | "!//";
|
|
145
|
-
cs?: boolean
|
|
145
|
+
cs?: boolean;
|
|
146
146
|
} | {
|
|
147
147
|
op: "*" | "!*";
|
|
148
148
|
};
|
|
@@ -150,35 +150,35 @@ declare const getManifest: ({ searchParams }: {
|
|
|
150
150
|
type: "PVC";
|
|
151
151
|
match: {
|
|
152
152
|
rhs: number;
|
|
153
|
-
op: "=" | "
|
|
153
|
+
op: "=" | "<" | ">" | "!=";
|
|
154
154
|
};
|
|
155
|
-
})[];
|
|
155
|
+
}))[];
|
|
156
156
|
};
|
|
157
157
|
conversion?: {
|
|
158
158
|
freq: "O";
|
|
159
|
-
} | null
|
|
159
|
+
} | null;
|
|
160
160
|
};
|
|
161
|
-
}
|
|
161
|
+
};
|
|
162
162
|
enr?: {
|
|
163
163
|
[key: string]: {
|
|
164
164
|
cap: number;
|
|
165
165
|
};
|
|
166
|
-
}
|
|
166
|
+
};
|
|
167
167
|
agg?: {
|
|
168
168
|
[key: string]: {
|
|
169
169
|
inputs: {
|
|
170
170
|
dim: string;
|
|
171
|
-
sign?: "
|
|
171
|
+
sign?: "+" | "-" | "c";
|
|
172
172
|
}[];
|
|
173
173
|
};
|
|
174
|
-
}
|
|
175
|
-
control?: number
|
|
176
|
-
}
|
|
174
|
+
};
|
|
175
|
+
control?: number;
|
|
176
|
+
};
|
|
177
177
|
test?: {
|
|
178
178
|
[key: string]: {
|
|
179
|
-
wv?: string
|
|
179
|
+
wv?: string;
|
|
180
180
|
};
|
|
181
|
-
}
|
|
181
|
+
};
|
|
182
182
|
};
|
|
183
183
|
}>;
|
|
184
184
|
|
|
@@ -187,7 +187,7 @@ type GetProjectMapClientOptions = {
|
|
|
187
187
|
};
|
|
188
188
|
declare const getProjectMapClient: (options: GetProjectMapClientOptions) => ProjectMapClient;
|
|
189
189
|
declare const getDefaultProjectMapClient: ({ searchParams, }: {
|
|
190
|
-
searchParams: PageParameters[
|
|
190
|
+
searchParams: PageParameters["searchParams"];
|
|
191
191
|
}) => ProjectMapClient;
|
|
192
192
|
|
|
193
193
|
type GetRouteClientOptions = {
|
|
@@ -195,7 +195,7 @@ type GetRouteClientOptions = {
|
|
|
195
195
|
};
|
|
196
196
|
declare const getRouteClient: (options: GetRouteClientOptions) => RouteClient;
|
|
197
197
|
declare const getDefaultRouteClient: ({ searchParams }: {
|
|
198
|
-
searchParams: PageParameters[
|
|
198
|
+
searchParams: PageParameters["searchParams"];
|
|
199
199
|
}) => RouteClient;
|
|
200
200
|
|
|
201
201
|
type ContextUpdateTransferProps = {
|
package/dist/index.d.ts
CHANGED
|
@@ -5,8 +5,8 @@ import { ManifestClient } from '@uniformdev/context/api';
|
|
|
5
5
|
import { ProjectMapClient, ProjectMapNode } from '@uniformdev/project-map';
|
|
6
6
|
import { ContextState, ContextOptions } from '@uniformdev/context';
|
|
7
7
|
import React__default, { PropsWithChildren } from 'react';
|
|
8
|
-
import { U as UniformCompositionProps } from './UniformComposition-
|
|
9
|
-
export { a as UniformComposition, r as resolveComposition } from './UniformComposition-
|
|
8
|
+
import { U as UniformCompositionProps } from './UniformComposition-Dw55RFP6.js';
|
|
9
|
+
export { a as UniformComposition, r as resolveComposition } from './UniformComposition-Dw55RFP6.js';
|
|
10
10
|
import { ClientContextComponent } from '@uniformdev/canvas-next-rsc-client';
|
|
11
11
|
|
|
12
12
|
type GetCanvasClientOptions = {
|
|
@@ -14,7 +14,7 @@ type GetCanvasClientOptions = {
|
|
|
14
14
|
};
|
|
15
15
|
declare const getCanvasClient: (options: GetCanvasClientOptions) => CanvasClient;
|
|
16
16
|
declare const getDefaultCanvasClient: ({ searchParams, }: {
|
|
17
|
-
searchParams: PageParameters[
|
|
17
|
+
searchParams: PageParameters["searchParams"];
|
|
18
18
|
}) => CanvasClient;
|
|
19
19
|
|
|
20
20
|
type GetManifestClientOptions = {
|
|
@@ -22,34 +22,34 @@ type GetManifestClientOptions = {
|
|
|
22
22
|
};
|
|
23
23
|
declare const getManifestClient: (options: GetManifestClientOptions) => ManifestClient;
|
|
24
24
|
declare const getDefaultManifestClient: ({ searchParams, }: {
|
|
25
|
-
searchParams?: PageParameters[
|
|
25
|
+
searchParams?: PageParameters["searchParams"];
|
|
26
26
|
}) => ManifestClient;
|
|
27
27
|
declare const getManifest: ({ searchParams }: {
|
|
28
|
-
searchParams: PageParameters[
|
|
28
|
+
searchParams: PageParameters["searchParams"];
|
|
29
29
|
}) => Promise<{
|
|
30
30
|
project: {
|
|
31
|
-
id?: string
|
|
32
|
-
name?: string
|
|
33
|
-
ui_version?: number
|
|
31
|
+
id?: string;
|
|
32
|
+
name?: string;
|
|
33
|
+
ui_version?: number;
|
|
34
34
|
pz?: {
|
|
35
35
|
sig?: {
|
|
36
36
|
[key: string]: {
|
|
37
37
|
str: number;
|
|
38
38
|
cap: number;
|
|
39
|
-
dur: "
|
|
39
|
+
dur: "s" | "p" | "t";
|
|
40
40
|
crit: {
|
|
41
41
|
type: "G";
|
|
42
|
-
op?: "&" | "|"
|
|
42
|
+
op?: "&" | "|";
|
|
43
43
|
clauses: ({
|
|
44
44
|
type: "G";
|
|
45
|
-
op?: "&" | "|"
|
|
46
|
-
clauses: (any | {
|
|
45
|
+
op?: "&" | "|";
|
|
46
|
+
clauses: (any | ({
|
|
47
47
|
type: "CK";
|
|
48
48
|
cookieName: string;
|
|
49
49
|
match: {
|
|
50
50
|
rhs: string;
|
|
51
51
|
op: "=" | "~" | "//" | "!=" | "!~" | "!//";
|
|
52
|
-
cs?: boolean
|
|
52
|
+
cs?: boolean;
|
|
53
53
|
} | {
|
|
54
54
|
op: "*" | "!*";
|
|
55
55
|
};
|
|
@@ -59,7 +59,7 @@ declare const getManifest: ({ searchParams }: {
|
|
|
59
59
|
match: {
|
|
60
60
|
rhs: string;
|
|
61
61
|
op: "=" | "~" | "//" | "!=" | "!~" | "!//";
|
|
62
|
-
cs?: boolean
|
|
62
|
+
cs?: boolean;
|
|
63
63
|
} | {
|
|
64
64
|
op: "*" | "!*";
|
|
65
65
|
};
|
|
@@ -69,7 +69,7 @@ declare const getManifest: ({ searchParams }: {
|
|
|
69
69
|
match: {
|
|
70
70
|
rhs: string;
|
|
71
71
|
op: "=" | "~" | "//" | "!=" | "!~" | "!//";
|
|
72
|
-
cs?: boolean
|
|
72
|
+
cs?: boolean;
|
|
73
73
|
} | {
|
|
74
74
|
op: "*" | "!*";
|
|
75
75
|
};
|
|
@@ -78,7 +78,7 @@ declare const getManifest: ({ searchParams }: {
|
|
|
78
78
|
event: {
|
|
79
79
|
rhs: string;
|
|
80
80
|
op: "=" | "~" | "//" | "!=" | "!~" | "!//";
|
|
81
|
-
cs?: boolean
|
|
81
|
+
cs?: boolean;
|
|
82
82
|
} | {
|
|
83
83
|
op: "*" | "!*";
|
|
84
84
|
};
|
|
@@ -87,7 +87,7 @@ declare const getManifest: ({ searchParams }: {
|
|
|
87
87
|
path: {
|
|
88
88
|
rhs: string;
|
|
89
89
|
op: "=" | "~" | "//" | "!=" | "!~" | "!//";
|
|
90
|
-
cs?: boolean
|
|
90
|
+
cs?: boolean;
|
|
91
91
|
} | {
|
|
92
92
|
op: "*" | "!*";
|
|
93
93
|
};
|
|
@@ -95,16 +95,16 @@ declare const getManifest: ({ searchParams }: {
|
|
|
95
95
|
type: "PVC";
|
|
96
96
|
match: {
|
|
97
97
|
rhs: number;
|
|
98
|
-
op: "=" | "
|
|
98
|
+
op: "=" | "<" | ">" | "!=";
|
|
99
99
|
};
|
|
100
|
-
})[];
|
|
101
|
-
} | {
|
|
100
|
+
}))[];
|
|
101
|
+
} | ({
|
|
102
102
|
type: "CK";
|
|
103
103
|
cookieName: string;
|
|
104
104
|
match: {
|
|
105
105
|
rhs: string;
|
|
106
106
|
op: "=" | "~" | "//" | "!=" | "!~" | "!//";
|
|
107
|
-
cs?: boolean
|
|
107
|
+
cs?: boolean;
|
|
108
108
|
} | {
|
|
109
109
|
op: "*" | "!*";
|
|
110
110
|
};
|
|
@@ -114,7 +114,7 @@ declare const getManifest: ({ searchParams }: {
|
|
|
114
114
|
match: {
|
|
115
115
|
rhs: string;
|
|
116
116
|
op: "=" | "~" | "//" | "!=" | "!~" | "!//";
|
|
117
|
-
cs?: boolean
|
|
117
|
+
cs?: boolean;
|
|
118
118
|
} | {
|
|
119
119
|
op: "*" | "!*";
|
|
120
120
|
};
|
|
@@ -124,7 +124,7 @@ declare const getManifest: ({ searchParams }: {
|
|
|
124
124
|
match: {
|
|
125
125
|
rhs: string;
|
|
126
126
|
op: "=" | "~" | "//" | "!=" | "!~" | "!//";
|
|
127
|
-
cs?: boolean
|
|
127
|
+
cs?: boolean;
|
|
128
128
|
} | {
|
|
129
129
|
op: "*" | "!*";
|
|
130
130
|
};
|
|
@@ -133,7 +133,7 @@ declare const getManifest: ({ searchParams }: {
|
|
|
133
133
|
event: {
|
|
134
134
|
rhs: string;
|
|
135
135
|
op: "=" | "~" | "//" | "!=" | "!~" | "!//";
|
|
136
|
-
cs?: boolean
|
|
136
|
+
cs?: boolean;
|
|
137
137
|
} | {
|
|
138
138
|
op: "*" | "!*";
|
|
139
139
|
};
|
|
@@ -142,7 +142,7 @@ declare const getManifest: ({ searchParams }: {
|
|
|
142
142
|
path: {
|
|
143
143
|
rhs: string;
|
|
144
144
|
op: "=" | "~" | "//" | "!=" | "!~" | "!//";
|
|
145
|
-
cs?: boolean
|
|
145
|
+
cs?: boolean;
|
|
146
146
|
} | {
|
|
147
147
|
op: "*" | "!*";
|
|
148
148
|
};
|
|
@@ -150,35 +150,35 @@ declare const getManifest: ({ searchParams }: {
|
|
|
150
150
|
type: "PVC";
|
|
151
151
|
match: {
|
|
152
152
|
rhs: number;
|
|
153
|
-
op: "=" | "
|
|
153
|
+
op: "=" | "<" | ">" | "!=";
|
|
154
154
|
};
|
|
155
|
-
})[];
|
|
155
|
+
}))[];
|
|
156
156
|
};
|
|
157
157
|
conversion?: {
|
|
158
158
|
freq: "O";
|
|
159
|
-
} | null
|
|
159
|
+
} | null;
|
|
160
160
|
};
|
|
161
|
-
}
|
|
161
|
+
};
|
|
162
162
|
enr?: {
|
|
163
163
|
[key: string]: {
|
|
164
164
|
cap: number;
|
|
165
165
|
};
|
|
166
|
-
}
|
|
166
|
+
};
|
|
167
167
|
agg?: {
|
|
168
168
|
[key: string]: {
|
|
169
169
|
inputs: {
|
|
170
170
|
dim: string;
|
|
171
|
-
sign?: "
|
|
171
|
+
sign?: "+" | "-" | "c";
|
|
172
172
|
}[];
|
|
173
173
|
};
|
|
174
|
-
}
|
|
175
|
-
control?: number
|
|
176
|
-
}
|
|
174
|
+
};
|
|
175
|
+
control?: number;
|
|
176
|
+
};
|
|
177
177
|
test?: {
|
|
178
178
|
[key: string]: {
|
|
179
|
-
wv?: string
|
|
179
|
+
wv?: string;
|
|
180
180
|
};
|
|
181
|
-
}
|
|
181
|
+
};
|
|
182
182
|
};
|
|
183
183
|
}>;
|
|
184
184
|
|
|
@@ -187,7 +187,7 @@ type GetProjectMapClientOptions = {
|
|
|
187
187
|
};
|
|
188
188
|
declare const getProjectMapClient: (options: GetProjectMapClientOptions) => ProjectMapClient;
|
|
189
189
|
declare const getDefaultProjectMapClient: ({ searchParams, }: {
|
|
190
|
-
searchParams: PageParameters[
|
|
190
|
+
searchParams: PageParameters["searchParams"];
|
|
191
191
|
}) => ProjectMapClient;
|
|
192
192
|
|
|
193
193
|
type GetRouteClientOptions = {
|
|
@@ -195,7 +195,7 @@ type GetRouteClientOptions = {
|
|
|
195
195
|
};
|
|
196
196
|
declare const getRouteClient: (options: GetRouteClientOptions) => RouteClient;
|
|
197
197
|
declare const getDefaultRouteClient: ({ searchParams }: {
|
|
198
|
-
searchParams: PageParameters[
|
|
198
|
+
searchParams: PageParameters["searchParams"];
|
|
199
199
|
}) => RouteClient;
|
|
200
200
|
|
|
201
201
|
type ContextUpdateTransferProps = {
|
package/dist/index.esm.js
CHANGED
|
@@ -1,16 +1,12 @@
|
|
|
1
|
-
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
2
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
3
|
-
}) : x)(function(x) {
|
|
4
|
-
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
5
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
6
|
-
});
|
|
7
|
-
|
|
8
1
|
// src/index.ts
|
|
9
2
|
import "server-only";
|
|
10
3
|
|
|
11
4
|
// src/clients/canvasClient.ts
|
|
12
5
|
import { CanvasClient } from "@uniformdev/canvas";
|
|
13
6
|
|
|
7
|
+
// src/config/helpers.ts
|
|
8
|
+
import serverConfig from "uniform.server.config";
|
|
9
|
+
|
|
14
10
|
// src/utils/draft.ts
|
|
15
11
|
import { IN_CONTEXT_EDITOR_QUERY_STRING_PARAM } from "@uniformdev/canvas";
|
|
16
12
|
import { draftMode } from "next/headers";
|
|
@@ -42,14 +38,6 @@ var isDevelopmentEnvironment = () => {
|
|
|
42
38
|
|
|
43
39
|
// src/config/helpers.ts
|
|
44
40
|
var getServerConfig = () => {
|
|
45
|
-
let serverConfig;
|
|
46
|
-
try {
|
|
47
|
-
serverConfig = __require("uniform.server.config.js");
|
|
48
|
-
} catch (e) {
|
|
49
|
-
serverConfig = {
|
|
50
|
-
defaultConsent: false
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
41
|
return serverConfig;
|
|
54
42
|
};
|
|
55
43
|
var shouldCacheBeDisabled = (options) => {
|
|
@@ -209,7 +197,8 @@ var getCanvasClient = (options) => {
|
|
|
209
197
|
"x-bypass-cache": typeof options.cache.bypassCache !== "undefined" ? options.cache.bypassCache.toString() : "false"
|
|
210
198
|
},
|
|
211
199
|
next: {
|
|
212
|
-
revalidate
|
|
200
|
+
revalidate,
|
|
201
|
+
tags: tags.length ? tags : void 0
|
|
213
202
|
}
|
|
214
203
|
});
|
|
215
204
|
}
|
|
@@ -367,7 +356,7 @@ var ContextUpdateTransfer = async ({
|
|
|
367
356
|
return null;
|
|
368
357
|
}
|
|
369
358
|
if (serverContext) {
|
|
370
|
-
await serverContext.
|
|
359
|
+
await serverContext.internal_update(result);
|
|
371
360
|
}
|
|
372
361
|
return /* @__PURE__ */ React.createElement(ContextUpdateTransferClient, { ts: (/* @__PURE__ */ new Date()).valueOf(), update: result });
|
|
373
362
|
};
|
|
@@ -412,6 +401,7 @@ import {
|
|
|
412
401
|
CANVAS_ENRICHMENT_TAG_PARAM,
|
|
413
402
|
CANVAS_PERSONALIZE_TYPE,
|
|
414
403
|
CANVAS_TEST_TYPE,
|
|
404
|
+
CANVAS_VIZ_CONTROL_PARAM,
|
|
415
405
|
isComponentPlaceholderId,
|
|
416
406
|
walkNodeTree
|
|
417
407
|
} from "@uniformdev/canvas";
|
|
@@ -444,12 +434,7 @@ var createServerUniformContextFromManifest = async (options) => {
|
|
|
444
434
|
...options || {},
|
|
445
435
|
serverCookieValue: (_a = cookies().get(UNIFORM_DEFAULT_COOKIE_NAME)) == null ? void 0 : _a.value
|
|
446
436
|
});
|
|
447
|
-
return
|
|
448
|
-
...context,
|
|
449
|
-
__INTERNAL__: {
|
|
450
|
-
update: (...props) => context.update(...props)
|
|
451
|
-
}
|
|
452
|
-
};
|
|
437
|
+
return context;
|
|
453
438
|
};
|
|
454
439
|
|
|
455
440
|
// src/utils/route.ts
|
|
@@ -684,6 +669,26 @@ var TestServer = async (props) => {
|
|
|
684
669
|
return createElement2(Fragment2, void 0, [component, eventElement]);
|
|
685
670
|
};
|
|
686
671
|
|
|
672
|
+
// src/components/VisibilityRulesWrapper.tsx
|
|
673
|
+
import {
|
|
674
|
+
createQuirksVisibilityRule,
|
|
675
|
+
evaluateNodeVisibilityParameter
|
|
676
|
+
} from "@uniformdev/canvas";
|
|
677
|
+
import { VisibilityRulesWrapperClient } from "@uniformdev/canvas-next-rsc-client";
|
|
678
|
+
import React6 from "react";
|
|
679
|
+
var VisibilityRulesWrapper = (props) => {
|
|
680
|
+
const { context, ...rest } = props;
|
|
681
|
+
let isVisible = null;
|
|
682
|
+
if (context) {
|
|
683
|
+
const rules = createQuirksVisibilityRule(context.quirks);
|
|
684
|
+
isVisible = evaluateNodeVisibilityParameter({
|
|
685
|
+
rules,
|
|
686
|
+
parameter: props.parameter
|
|
687
|
+
});
|
|
688
|
+
}
|
|
689
|
+
return /* @__PURE__ */ React6.createElement(VisibilityRulesWrapperClient, { ...rest, initialIsVisible: isVisible });
|
|
690
|
+
};
|
|
691
|
+
|
|
687
692
|
// src/components/UniformComposition.ts
|
|
688
693
|
var UniformComposition = async ({
|
|
689
694
|
resolveComponent,
|
|
@@ -751,10 +756,13 @@ var UniformComposition = async ({
|
|
|
751
756
|
update: {
|
|
752
757
|
params: props.params,
|
|
753
758
|
searchParams,
|
|
754
|
-
cookies: cookies2().getAll().reduce(
|
|
755
|
-
acc
|
|
756
|
-
|
|
757
|
-
|
|
759
|
+
cookies: cookies2().getAll().reduce(
|
|
760
|
+
(acc, cookie) => {
|
|
761
|
+
acc[cookie.name] = cookie.value;
|
|
762
|
+
return acc;
|
|
763
|
+
},
|
|
764
|
+
{}
|
|
765
|
+
),
|
|
758
766
|
quirks: {
|
|
759
767
|
"vc-country": headersValue.get("x-vercel-ip-country") || missingQuirkValue,
|
|
760
768
|
"vc-region": headersValue.get("x-vercel-ip-country-region") || missingQuirkValue,
|
|
@@ -872,7 +880,7 @@ var resolveComponents = ({
|
|
|
872
880
|
parent = target.parent;
|
|
873
881
|
}
|
|
874
882
|
const resolved = components.map((component, componentIndex) => {
|
|
875
|
-
var _a, _b;
|
|
883
|
+
var _a, _b, _c;
|
|
876
884
|
const isServer = isServerComponent({
|
|
877
885
|
component,
|
|
878
886
|
serverContext
|
|
@@ -903,6 +911,7 @@ var resolveComponents = ({
|
|
|
903
911
|
const wrapInSuspense = systemSuspense || componentSuspense;
|
|
904
912
|
const parameters = (_a = component.parameters) != null ? _a : {};
|
|
905
913
|
const enrichmentTags = (_b = parameters[CANVAS_ENRICHMENT_TAG_PARAM]) == null ? void 0 : _b.value;
|
|
914
|
+
const visibilityRules = (_c = parameters[CANVAS_VIZ_CONTROL_PARAM]) == null ? void 0 : _c.value;
|
|
906
915
|
const key = `${slotName}-${componentIndex}-component`;
|
|
907
916
|
const componentProps = {
|
|
908
917
|
...Object.keys(parameters).reduce((acc, cur) => {
|
|
@@ -986,6 +995,17 @@ var resolveComponents = ({
|
|
|
986
995
|
}
|
|
987
996
|
childNode = elements;
|
|
988
997
|
}
|
|
998
|
+
if (visibilityRules) {
|
|
999
|
+
childNode = createElement3(
|
|
1000
|
+
VisibilityRulesWrapper,
|
|
1001
|
+
{
|
|
1002
|
+
key: `${slotName}-${componentIndex}-visibility`,
|
|
1003
|
+
parameter: visibilityRules,
|
|
1004
|
+
context: serverContext
|
|
1005
|
+
},
|
|
1006
|
+
childNode
|
|
1007
|
+
);
|
|
1008
|
+
}
|
|
989
1009
|
return createElement3(
|
|
990
1010
|
Fragment3,
|
|
991
1011
|
{
|
|
@@ -1003,7 +1023,7 @@ import {
|
|
|
1003
1023
|
UniformScript
|
|
1004
1024
|
} from "@uniformdev/canvas-next-rsc-client";
|
|
1005
1025
|
import { Suspense as Suspense2 } from "react";
|
|
1006
|
-
import
|
|
1026
|
+
import React7 from "react";
|
|
1007
1027
|
var UniformContext = async ({
|
|
1008
1028
|
clientContextComponent,
|
|
1009
1029
|
children
|
|
@@ -1013,26 +1033,26 @@ var UniformContext = async ({
|
|
|
1013
1033
|
searchParams: {}
|
|
1014
1034
|
});
|
|
1015
1035
|
const ContextComponent = clientContextComponent || DefaultUniformClientContext;
|
|
1016
|
-
const
|
|
1017
|
-
const disableDevTools = ((_a =
|
|
1018
|
-
const defaultConsent =
|
|
1019
|
-
return /* @__PURE__ */
|
|
1036
|
+
const serverConfig2 = getServerConfig();
|
|
1037
|
+
const disableDevTools = ((_a = serverConfig2.context) == null ? void 0 : _a.disableDevTools) || false;
|
|
1038
|
+
const defaultConsent = serverConfig2.defaultConsent || false;
|
|
1039
|
+
return /* @__PURE__ */ React7.createElement(React7.Fragment, null, children, /* @__PURE__ */ React7.createElement(
|
|
1020
1040
|
ContextComponent,
|
|
1021
1041
|
{
|
|
1022
1042
|
manifest,
|
|
1023
1043
|
disableDevTools,
|
|
1024
1044
|
defaultConsent
|
|
1025
1045
|
}
|
|
1026
|
-
), /* @__PURE__ */
|
|
1046
|
+
), /* @__PURE__ */ React7.createElement(Suspense2, { fallback: /* @__PURE__ */ React7.createElement(React7.Fragment, null) }, /* @__PURE__ */ React7.createElement(UniformScript, null)));
|
|
1027
1047
|
};
|
|
1028
1048
|
|
|
1029
1049
|
// src/components/UniformPlayground.tsx
|
|
1030
1050
|
import { CANVAS_DRAFT_STATE as CANVAS_DRAFT_STATE3, CANVAS_EDITOR_STATE as CANVAS_EDITOR_STATE3 } from "@uniformdev/canvas";
|
|
1031
1051
|
import { notFound as notFound2 } from "next/navigation";
|
|
1032
|
-
import
|
|
1052
|
+
import React8 from "react";
|
|
1033
1053
|
var UniformPlayground = async ({ searchParams, ...rest }) => {
|
|
1034
1054
|
if (!isDraftModeEnabled({ searchParams })) {
|
|
1035
|
-
return /* @__PURE__ */
|
|
1055
|
+
return /* @__PURE__ */ React8.createElement("div", null, /* @__PURE__ */ React8.createElement("h1", null, "Playground is only available in draft mode"));
|
|
1036
1056
|
}
|
|
1037
1057
|
const id = searchParams["id"];
|
|
1038
1058
|
if (!id) {
|
|
@@ -1063,7 +1083,7 @@ var UniformPlayground = async ({ searchParams, ...rest }) => {
|
|
|
1063
1083
|
if (!composition) {
|
|
1064
1084
|
notFound2();
|
|
1065
1085
|
}
|
|
1066
|
-
return /* @__PURE__ */
|
|
1086
|
+
return /* @__PURE__ */ React8.createElement(
|
|
1067
1087
|
UniformComposition,
|
|
1068
1088
|
{
|
|
1069
1089
|
mode: "server",
|