@uniformdev/canvas-next-rsc 19.173.1-alpha.17 → 19.173.2-alpha.210

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.
Files changed (161) hide show
  1. package/dist/UniformComposition-0pvEHduc.d.mts +64 -0
  2. package/dist/UniformComposition-0pvEHduc.d.ts +77 -0
  3. package/dist/UniformComposition-38e22896.d.ts +74 -0
  4. package/dist/UniformComposition-B-Z17dUt.d.ts +56 -43
  5. package/dist/UniformComposition-D4tBQ2U4.d.mts +64 -0
  6. package/dist/UniformComposition-D4tBQ2U4.d.ts +77 -0
  7. package/dist/UniformComposition-Dw55RFP6.d.mts +67 -0
  8. package/dist/UniformComposition-Dw55RFP6.d.ts +67 -0
  9. package/dist/UniformComposition-d178d865.d.ts +77 -0
  10. package/dist/actions/updateContext.d.ts +2 -0
  11. package/dist/actions/updateContext.js +17 -0
  12. package/dist/client/canvasClient.d.ts +5 -0
  13. package/dist/client/canvasClient.js +53 -0
  14. package/dist/client/manifestClient.d.ts +209 -0
  15. package/dist/client/manifestClient.js +33 -0
  16. package/dist/client/projectMapClient.d.ts +5 -0
  17. package/dist/client/projectMapClient.js +17 -0
  18. package/dist/client/routeClient.d.ts +5 -0
  19. package/dist/client/routeClient.js +68 -0
  20. package/dist/component.d.mts +23 -5
  21. package/dist/component.d.ts +23 -5
  22. package/dist/component.js +67 -25
  23. package/dist/component.mjs +66 -23
  24. package/dist/components/DefaultNotImplementedComponent.d.ts +4 -0
  25. package/dist/components/DefaultNotImplementedComponent.js +45 -0
  26. package/dist/components/GoogleTagManagerAnalytics.d.ts +3 -0
  27. package/dist/components/GoogleTagManagerAnalytics.js +44 -0
  28. package/dist/components/UniformComponent.d.ts +35 -0
  29. package/dist/components/UniformComponent.js +14 -0
  30. package/dist/components/UniformComposition.d.ts +47 -0
  31. package/dist/components/UniformComposition.js +35 -0
  32. package/dist/components/UniformContext.d.ts +13 -0
  33. package/dist/components/UniformContext.js +19 -0
  34. package/dist/components/UniformRichText.d.ts +42 -0
  35. package/dist/components/UniformRichText.js +15 -0
  36. package/dist/components/UniformRichTextNode.d.ts +14 -0
  37. package/dist/components/UniformRichTextNode.js +49 -0
  38. package/dist/components/UniformScript.d.ts +5 -0
  39. package/dist/components/UniformScript.js +49 -0
  40. package/dist/components/UniformSlot.d.ts +48 -0
  41. package/dist/components/UniformSlot.js +38 -0
  42. package/dist/components/UniformText.d.ts +10 -0
  43. package/dist/components/UniformText.js +5 -0
  44. package/dist/components/__tests__/evaluateComposition.spec.d.ts +1 -0
  45. package/dist/components/__tests__/evaluateComposition.spec.js +80 -0
  46. package/dist/components/convertComponentToProps.d.ts +18 -0
  47. package/dist/components/convertComponentToProps.js +22 -0
  48. package/dist/components/evaluateComposition.d.ts +32 -0
  49. package/dist/components/evaluateComposition.js +183 -0
  50. package/dist/components/getEnrichmentTags.d.ts +5 -0
  51. package/dist/components/getEnrichmentTags.js +13 -0
  52. package/dist/components/getUniformContext.d.ts +10 -0
  53. package/dist/components/getUniformContext.js +17 -0
  54. package/dist/components/nodes/HeadingRichTextNode.d.ts +2 -0
  55. package/dist/components/nodes/HeadingRichTextNode.js +6 -0
  56. package/dist/components/nodes/LinebreakRichTextNode.d.ts +2 -0
  57. package/dist/components/nodes/LinebreakRichTextNode.js +4 -0
  58. package/dist/components/nodes/LinkRichTextNode.d.ts +2 -0
  59. package/dist/components/nodes/LinkRichTextNode.js +6 -0
  60. package/dist/components/nodes/ListItemRichTextNode.d.ts +2 -0
  61. package/dist/components/nodes/ListItemRichTextNode.js +5 -0
  62. package/dist/components/nodes/ListRichTextNode.d.ts +2 -0
  63. package/dist/components/nodes/ListRichTextNode.js +6 -0
  64. package/dist/components/nodes/ParagraphRichTextNode.d.ts +2 -0
  65. package/dist/components/nodes/ParagraphRichTextNode.js +6 -0
  66. package/dist/components/nodes/TabRichTextNode.d.ts +2 -0
  67. package/dist/components/nodes/TabRichTextNode.js +4 -0
  68. package/dist/components/nodes/TextRichTextNode.d.ts +2 -0
  69. package/dist/components/nodes/TextRichTextNode.js +9 -0
  70. package/dist/components/renderComponent.d.ts +26 -0
  71. package/dist/components/renderComponent.js +52 -0
  72. package/dist/components/resolvePath.d.ts +5 -0
  73. package/dist/components/resolvePath.js +34 -0
  74. package/dist/components/retrieveRoute.d.ts +198 -0
  75. package/dist/components/retrieveRoute.js +146 -0
  76. package/dist/components/types.d.ts +15 -0
  77. package/dist/components/types.js +1 -0
  78. package/dist/config/helpers.d.ts +23 -0
  79. package/dist/config/helpers.js +34 -0
  80. package/dist/config/models.d.ts +51 -0
  81. package/dist/config/models.js +1 -0
  82. package/dist/config/uniform.server.config.d.ts +3 -0
  83. package/dist/config/uniform.server.config.js +4 -0
  84. package/dist/cookie/index.d.ts +12 -0
  85. package/dist/cookie/index.js +21 -0
  86. package/dist/handler/createPreviewGETRouteHandler.d.ts +1 -0
  87. package/dist/handler/createPreviewGETRouteHandler.js +43 -0
  88. package/dist/handler/createPreviewPOSTRouteHandler.d.ts +1 -0
  89. package/dist/handler/createPreviewPOSTRouteHandler.js +88 -0
  90. package/dist/handler/createUniformRouteHandler.d.ts +4 -0
  91. package/dist/handler/createUniformRouteHandler.js +10 -0
  92. package/dist/handler/helpers.d.ts +17 -0
  93. package/dist/handler/helpers.js +148 -0
  94. package/dist/handler/messages/handleCompositionChanged.d.ts +2 -0
  95. package/dist/handler/messages/handleCompositionChanged.js +9 -0
  96. package/dist/handler/messages/handleCompositionDeleted.d.ts +2 -0
  97. package/dist/handler/messages/handleCompositionDeleted.js +9 -0
  98. package/dist/handler/messages/handleCompositionPublished.d.ts +2 -0
  99. package/dist/handler/messages/handleCompositionPublished.js +9 -0
  100. package/dist/handler/messages/handleManifestPublished.d.ts +2 -0
  101. package/dist/handler/messages/handleManifestPublished.js +10 -0
  102. package/dist/handler/messages/handleProjectMapNodeDelete.d.ts +2 -0
  103. package/dist/handler/messages/handleProjectMapNodeDelete.js +21 -0
  104. package/dist/handler/messages/handleProjectMapNodeInsert.d.ts +2 -0
  105. package/dist/handler/messages/handleProjectMapNodeInsert.js +21 -0
  106. package/dist/handler/messages/handleProjectMapNodeUpdate.d.ts +2 -0
  107. package/dist/handler/messages/handleProjectMapNodeUpdate.js +22 -0
  108. package/dist/handler/messages/handleRedirectDelete.d.ts +2 -0
  109. package/dist/handler/messages/handleRedirectDelete.js +15 -0
  110. package/dist/handler/messages/handleRedirectInsert.d.ts +2 -0
  111. package/dist/handler/messages/handleRedirectInsert.js +15 -0
  112. package/dist/handler/messages/handleRedirectUpdate.d.ts +2 -0
  113. package/dist/handler/messages/handleRedirectUpdate.js +15 -0
  114. package/dist/handler.js +2 -1
  115. package/dist/handler.mjs +2 -1
  116. package/dist/hooks/useForgetMe.d.ts +4 -0
  117. package/dist/hooks/useForgetMe.js +10 -0
  118. package/dist/hooks/useToggleConsent.d.ts +7 -0
  119. package/dist/hooks/useToggleConsent.js +22 -0
  120. package/dist/hooks/useUniformContext.d.ts +1 -0
  121. package/dist/hooks/useUniformContext.js +3 -0
  122. package/dist/index.d.mts +38 -38
  123. package/dist/index.d.ts +38 -38
  124. package/dist/index.esm.js +51 -19
  125. package/dist/index.js +78 -50
  126. package/dist/index.mjs +51 -19
  127. package/dist/models/index.d.ts +30 -0
  128. package/dist/models/index.js +1 -0
  129. package/dist/register/componentStore.d.ts +1 -0
  130. package/dist/register/componentStore.js +2 -0
  131. package/dist/register/componentStoreResolver.d.ts +4 -0
  132. package/dist/register/componentStoreResolver.js +5 -0
  133. package/dist/register/createComponentStore.d.ts +12 -0
  134. package/dist/register/createComponentStore.js +13 -0
  135. package/dist/register/createComponentStoreResolver.d.ts +12 -0
  136. package/dist/register/createComponentStoreResolver.js +9 -0
  137. package/dist/register/getTypeWithVariant.d.ts +1 -0
  138. package/dist/register/getTypeWithVariant.js +1 -0
  139. package/dist/register/registerUniformComponent.d.ts +10 -0
  140. package/dist/register/registerUniformComponent.js +8 -0
  141. package/dist/resolve/resolveChildren.d.ts +17 -0
  142. package/dist/resolve/resolveChildren.js +20 -0
  143. package/dist/score/index.d.ts +3 -0
  144. package/dist/score/index.js +114 -0
  145. package/dist/utils/__tests__/apply.spec.d.ts +1 -0
  146. package/dist/utils/__tests__/apply.spec.js +358 -0
  147. package/dist/utils/__tests__/diff.spec.d.ts +1 -0
  148. package/dist/utils/__tests__/diff.spec.js +394 -0
  149. package/dist/utils/apply.d.ts +10 -0
  150. package/dist/utils/apply.js +124 -0
  151. package/dist/utils/comp.d.ts +25 -0
  152. package/dist/utils/comp.js +65 -0
  153. package/dist/utils/diff.d.ts +58 -0
  154. package/dist/utils/diff.js +144 -0
  155. package/dist/utils/draft.d.ts +20 -0
  156. package/dist/utils/draft.js +22 -0
  157. package/dist/utils/tag.d.ts +2 -0
  158. package/dist/utils/tag.js +7 -0
  159. package/dist/utils/url.d.ts +1 -0
  160. package/dist/utils/url.js +10 -0
  161. package/package.json +20 -20
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-B-Z17dUt.mjs';
9
- export { a as UniformComposition, r as resolveComposition } from './UniformComposition-B-Z17dUt.mjs';
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['searchParams'];
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['searchParams'];
25
+ searchParams?: PageParameters["searchParams"];
26
26
  }) => ManifestClient;
27
27
  declare const getManifest: ({ searchParams }: {
28
- searchParams: PageParameters['searchParams'];
28
+ searchParams: PageParameters["searchParams"];
29
29
  }) => Promise<{
30
30
  project: {
31
- id?: string | undefined;
32
- name?: string | undefined;
33
- ui_version?: number | undefined;
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: "p" | "s" | "t";
39
+ dur: "s" | "p" | "t";
40
40
  crit: {
41
41
  type: "G";
42
- op?: "&" | "|" | undefined;
42
+ op?: "&" | "|";
43
43
  clauses: ({
44
44
  type: "G";
45
- op?: "&" | "|" | undefined;
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 | undefined;
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 | undefined;
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 | undefined;
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 | undefined;
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 | undefined;
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 | undefined;
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 | undefined;
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 | undefined;
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 | undefined;
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 | undefined;
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 | undefined;
159
+ } | null;
160
160
  };
161
- } | undefined;
161
+ };
162
162
  enr?: {
163
163
  [key: string]: {
164
164
  cap: number;
165
165
  };
166
- } | undefined;
166
+ };
167
167
  agg?: {
168
168
  [key: string]: {
169
169
  inputs: {
170
170
  dim: string;
171
- sign?: "c" | "+" | "-" | undefined;
171
+ sign?: "+" | "-" | "c";
172
172
  }[];
173
173
  };
174
- } | undefined;
175
- control?: number | undefined;
176
- } | undefined;
174
+ };
175
+ control?: number;
176
+ };
177
177
  test?: {
178
178
  [key: string]: {
179
- wv?: string | undefined;
179
+ wv?: string;
180
180
  };
181
- } | undefined;
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['searchParams'];
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['searchParams'];
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-B-Z17dUt.js';
9
- export { a as UniformComposition, r as resolveComposition } from './UniformComposition-B-Z17dUt.js';
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['searchParams'];
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['searchParams'];
25
+ searchParams?: PageParameters["searchParams"];
26
26
  }) => ManifestClient;
27
27
  declare const getManifest: ({ searchParams }: {
28
- searchParams: PageParameters['searchParams'];
28
+ searchParams: PageParameters["searchParams"];
29
29
  }) => Promise<{
30
30
  project: {
31
- id?: string | undefined;
32
- name?: string | undefined;
33
- ui_version?: number | undefined;
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: "p" | "s" | "t";
39
+ dur: "s" | "p" | "t";
40
40
  crit: {
41
41
  type: "G";
42
- op?: "&" | "|" | undefined;
42
+ op?: "&" | "|";
43
43
  clauses: ({
44
44
  type: "G";
45
- op?: "&" | "|" | undefined;
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 | undefined;
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 | undefined;
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 | undefined;
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 | undefined;
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 | undefined;
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 | undefined;
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 | undefined;
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 | undefined;
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 | undefined;
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 | undefined;
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 | undefined;
159
+ } | null;
160
160
  };
161
- } | undefined;
161
+ };
162
162
  enr?: {
163
163
  [key: string]: {
164
164
  cap: number;
165
165
  };
166
- } | undefined;
166
+ };
167
167
  agg?: {
168
168
  [key: string]: {
169
169
  inputs: {
170
170
  dim: string;
171
- sign?: "c" | "+" | "-" | undefined;
171
+ sign?: "+" | "-" | "c";
172
172
  }[];
173
173
  };
174
- } | undefined;
175
- control?: number | undefined;
176
- } | undefined;
174
+ };
175
+ control?: number;
176
+ };
177
177
  test?: {
178
178
  [key: string]: {
179
- wv?: string | undefined;
179
+ wv?: string;
180
180
  };
181
- } | undefined;
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['searchParams'];
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['searchParams'];
198
+ searchParams: PageParameters["searchParams"];
199
199
  }) => RouteClient;
200
200
 
201
201
  type ContextUpdateTransferProps = {
package/dist/index.esm.js CHANGED
@@ -209,7 +209,8 @@ var getCanvasClient = (options) => {
209
209
  "x-bypass-cache": typeof options.cache.bypassCache !== "undefined" ? options.cache.bypassCache.toString() : "false"
210
210
  },
211
211
  next: {
212
- revalidate
212
+ revalidate,
213
+ tags: tags.length ? tags : void 0
213
214
  }
214
215
  });
215
216
  }
@@ -367,7 +368,7 @@ var ContextUpdateTransfer = async ({
367
368
  return null;
368
369
  }
369
370
  if (serverContext) {
370
- await serverContext.__INTERNAL__.update(result);
371
+ await serverContext.internal_update(result);
371
372
  }
372
373
  return /* @__PURE__ */ React.createElement(ContextUpdateTransferClient, { ts: (/* @__PURE__ */ new Date()).valueOf(), update: result });
373
374
  };
@@ -412,6 +413,7 @@ import {
412
413
  CANVAS_ENRICHMENT_TAG_PARAM,
413
414
  CANVAS_PERSONALIZE_TYPE,
414
415
  CANVAS_TEST_TYPE,
416
+ CANVAS_VIZ_CONTROL_PARAM,
415
417
  isComponentPlaceholderId,
416
418
  walkNodeTree
417
419
  } from "@uniformdev/canvas";
@@ -444,12 +446,7 @@ var createServerUniformContextFromManifest = async (options) => {
444
446
  ...options || {},
445
447
  serverCookieValue: (_a = cookies().get(UNIFORM_DEFAULT_COOKIE_NAME)) == null ? void 0 : _a.value
446
448
  });
447
- return {
448
- ...context,
449
- __INTERNAL__: {
450
- update: (...props) => context.update(...props)
451
- }
452
- };
449
+ return context;
453
450
  };
454
451
 
455
452
  // src/utils/route.ts
@@ -684,6 +681,26 @@ var TestServer = async (props) => {
684
681
  return createElement2(Fragment2, void 0, [component, eventElement]);
685
682
  };
686
683
 
684
+ // src/components/VisibilityRulesWrapper.tsx
685
+ import {
686
+ createQuirksVisibilityRule,
687
+ evaluateNodeVisibilityParameter
688
+ } from "@uniformdev/canvas";
689
+ import { VisibilityRulesWrapperClient } from "@uniformdev/canvas-next-rsc-client";
690
+ import React6 from "react";
691
+ var VisibilityRulesWrapper = (props) => {
692
+ const { context, ...rest } = props;
693
+ let isVisible = null;
694
+ if (context) {
695
+ const rules = createQuirksVisibilityRule(context.quirks);
696
+ isVisible = evaluateNodeVisibilityParameter({
697
+ rules,
698
+ parameter: props.parameter
699
+ });
700
+ }
701
+ return /* @__PURE__ */ React6.createElement(VisibilityRulesWrapperClient, { ...rest, initialIsVisible: isVisible });
702
+ };
703
+
687
704
  // src/components/UniformComposition.ts
688
705
  var UniformComposition = async ({
689
706
  resolveComponent,
@@ -751,10 +768,13 @@ var UniformComposition = async ({
751
768
  update: {
752
769
  params: props.params,
753
770
  searchParams,
754
- cookies: cookies2().getAll().reduce((acc, cookie) => {
755
- acc[cookie.name] = cookie.value;
756
- return acc;
757
- }, {}),
771
+ cookies: cookies2().getAll().reduce(
772
+ (acc, cookie) => {
773
+ acc[cookie.name] = cookie.value;
774
+ return acc;
775
+ },
776
+ {}
777
+ ),
758
778
  quirks: {
759
779
  "vc-country": headersValue.get("x-vercel-ip-country") || missingQuirkValue,
760
780
  "vc-region": headersValue.get("x-vercel-ip-country-region") || missingQuirkValue,
@@ -872,7 +892,7 @@ var resolveComponents = ({
872
892
  parent = target.parent;
873
893
  }
874
894
  const resolved = components.map((component, componentIndex) => {
875
- var _a, _b;
895
+ var _a, _b, _c;
876
896
  const isServer = isServerComponent({
877
897
  component,
878
898
  serverContext
@@ -903,6 +923,7 @@ var resolveComponents = ({
903
923
  const wrapInSuspense = systemSuspense || componentSuspense;
904
924
  const parameters = (_a = component.parameters) != null ? _a : {};
905
925
  const enrichmentTags = (_b = parameters[CANVAS_ENRICHMENT_TAG_PARAM]) == null ? void 0 : _b.value;
926
+ const visibilityRules = (_c = parameters[CANVAS_VIZ_CONTROL_PARAM]) == null ? void 0 : _c.value;
906
927
  const key = `${slotName}-${componentIndex}-component`;
907
928
  const componentProps = {
908
929
  ...Object.keys(parameters).reduce((acc, cur) => {
@@ -986,6 +1007,17 @@ var resolveComponents = ({
986
1007
  }
987
1008
  childNode = elements;
988
1009
  }
1010
+ if (visibilityRules) {
1011
+ childNode = createElement3(
1012
+ VisibilityRulesWrapper,
1013
+ {
1014
+ key: `${slotName}-${componentIndex}-visibility`,
1015
+ parameter: visibilityRules,
1016
+ context: serverContext
1017
+ },
1018
+ childNode
1019
+ );
1020
+ }
989
1021
  return createElement3(
990
1022
  Fragment3,
991
1023
  {
@@ -1003,7 +1035,7 @@ import {
1003
1035
  UniformScript
1004
1036
  } from "@uniformdev/canvas-next-rsc-client";
1005
1037
  import { Suspense as Suspense2 } from "react";
1006
- import React6 from "react";
1038
+ import React7 from "react";
1007
1039
  var UniformContext = async ({
1008
1040
  clientContextComponent,
1009
1041
  children
@@ -1016,23 +1048,23 @@ var UniformContext = async ({
1016
1048
  const serverConfig = getServerConfig();
1017
1049
  const disableDevTools = ((_a = serverConfig.context) == null ? void 0 : _a.disableDevTools) || false;
1018
1050
  const defaultConsent = serverConfig.defaultConsent || false;
1019
- return /* @__PURE__ */ React6.createElement(React6.Fragment, null, children, /* @__PURE__ */ React6.createElement(
1051
+ return /* @__PURE__ */ React7.createElement(React7.Fragment, null, children, /* @__PURE__ */ React7.createElement(
1020
1052
  ContextComponent,
1021
1053
  {
1022
1054
  manifest,
1023
1055
  disableDevTools,
1024
1056
  defaultConsent
1025
1057
  }
1026
- ), /* @__PURE__ */ React6.createElement(Suspense2, { fallback: /* @__PURE__ */ React6.createElement(React6.Fragment, null) }, /* @__PURE__ */ React6.createElement(UniformScript, null)));
1058
+ ), /* @__PURE__ */ React7.createElement(Suspense2, { fallback: /* @__PURE__ */ React7.createElement(React7.Fragment, null) }, /* @__PURE__ */ React7.createElement(UniformScript, null)));
1027
1059
  };
1028
1060
 
1029
1061
  // src/components/UniformPlayground.tsx
1030
1062
  import { CANVAS_DRAFT_STATE as CANVAS_DRAFT_STATE3, CANVAS_EDITOR_STATE as CANVAS_EDITOR_STATE3 } from "@uniformdev/canvas";
1031
1063
  import { notFound as notFound2 } from "next/navigation";
1032
- import React7 from "react";
1064
+ import React8 from "react";
1033
1065
  var UniformPlayground = async ({ searchParams, ...rest }) => {
1034
1066
  if (!isDraftModeEnabled({ searchParams })) {
1035
- return /* @__PURE__ */ React7.createElement("div", null, /* @__PURE__ */ React7.createElement("h1", null, "Playground is only available in draft mode"));
1067
+ return /* @__PURE__ */ React8.createElement("div", null, /* @__PURE__ */ React8.createElement("h1", null, "Playground is only available in draft mode"));
1036
1068
  }
1037
1069
  const id = searchParams["id"];
1038
1070
  if (!id) {
@@ -1063,7 +1095,7 @@ var UniformPlayground = async ({ searchParams, ...rest }) => {
1063
1095
  if (!composition) {
1064
1096
  notFound2();
1065
1097
  }
1066
- return /* @__PURE__ */ React7.createElement(
1098
+ return /* @__PURE__ */ React8.createElement(
1067
1099
  UniformComposition,
1068
1100
  {
1069
1101
  mode: "server",