@uniformdev/canvas-react 18.16.0 → 18.17.1-alpha.13

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/index.esm.js CHANGED
@@ -95,7 +95,9 @@ var componentStoreResolver = createComponentStoreResolver({
95
95
  // src/components/UniformSlot.tsx
96
96
  import {
97
97
  CANVAS_LOCALE_TAG_PARAM,
98
+ CANVAS_PERSONALIZE_SLOT,
98
99
  CANVAS_PERSONALIZE_TYPE,
100
+ CANVAS_TEST_SLOT,
99
101
  CANVAS_TEST_TYPE,
100
102
  IN_CONTEXT_EDITOR_COMPONENT_START_ROLE,
101
103
  PLACEHOLDER_ID
@@ -201,13 +203,41 @@ function renderComponent({
201
203
  return resolveSystem.test(
202
204
  component,
203
205
  key,
204
- (component2, key2) => renderComponent({ component: component2, resolveRenderer, resolveSystem, key: key2 })
206
+ (variantComponent, key2) => {
207
+ var _a2, _b2;
208
+ return renderComponent({
209
+ component: variantComponent,
210
+ resolveRenderer,
211
+ resolveSystem,
212
+ key: key2,
213
+ parentComponent: component,
214
+ slotName: CANVAS_TEST_SLOT,
215
+ slotChildrenCount: (_a2 = component == null ? void 0 : component.slots) == null ? void 0 : _a2[CANVAS_TEST_SLOT].length,
216
+ indexInSlot: (_b2 = component == null ? void 0 : component.slots) == null ? void 0 : _b2[CANVAS_TEST_SLOT].findIndex(
217
+ ({ _id }) => variantComponent._id === _id
218
+ )
219
+ });
220
+ }
205
221
  );
206
222
  } else if (component.type === CANVAS_PERSONALIZE_TYPE) {
207
223
  return resolveSystem.personalization(
208
224
  component,
209
225
  key,
210
- (component2, key2) => renderComponent({ component: component2, resolveRenderer, resolveSystem, key: key2 })
226
+ (variantComponent, key2) => {
227
+ var _a2, _b2;
228
+ return renderComponent({
229
+ component: variantComponent,
230
+ resolveRenderer,
231
+ resolveSystem,
232
+ key: key2,
233
+ parentComponent: component,
234
+ slotName: CANVAS_PERSONALIZE_SLOT,
235
+ slotChildrenCount: (_a2 = component == null ? void 0 : component.slots) == null ? void 0 : _a2[CANVAS_PERSONALIZE_SLOT].length,
236
+ indexInSlot: (_b2 = component == null ? void 0 : component.slots) == null ? void 0 : _b2[CANVAS_PERSONALIZE_SLOT].findIndex(
237
+ ({ _id }) => variantComponent._id === _id
238
+ )
239
+ });
240
+ }
211
241
  );
212
242
  } else if (RenderComponent) {
213
243
  const props = convertComponentToProps(component);
package/dist/index.js CHANGED
@@ -241,13 +241,41 @@ function renderComponent({
241
241
  return resolveSystem.test(
242
242
  component,
243
243
  key,
244
- (component2, key2) => renderComponent({ component: component2, resolveRenderer, resolveSystem, key: key2 })
244
+ (variantComponent, key2) => {
245
+ var _a2, _b2;
246
+ return renderComponent({
247
+ component: variantComponent,
248
+ resolveRenderer,
249
+ resolveSystem,
250
+ key: key2,
251
+ parentComponent: component,
252
+ slotName: import_canvas3.CANVAS_TEST_SLOT,
253
+ slotChildrenCount: (_a2 = component == null ? void 0 : component.slots) == null ? void 0 : _a2[import_canvas3.CANVAS_TEST_SLOT].length,
254
+ indexInSlot: (_b2 = component == null ? void 0 : component.slots) == null ? void 0 : _b2[import_canvas3.CANVAS_TEST_SLOT].findIndex(
255
+ ({ _id }) => variantComponent._id === _id
256
+ )
257
+ });
258
+ }
245
259
  );
246
260
  } else if (component.type === import_canvas3.CANVAS_PERSONALIZE_TYPE) {
247
261
  return resolveSystem.personalization(
248
262
  component,
249
263
  key,
250
- (component2, key2) => renderComponent({ component: component2, resolveRenderer, resolveSystem, key: key2 })
264
+ (variantComponent, key2) => {
265
+ var _a2, _b2;
266
+ return renderComponent({
267
+ component: variantComponent,
268
+ resolveRenderer,
269
+ resolveSystem,
270
+ key: key2,
271
+ parentComponent: component,
272
+ slotName: import_canvas3.CANVAS_PERSONALIZE_SLOT,
273
+ slotChildrenCount: (_a2 = component == null ? void 0 : component.slots) == null ? void 0 : _a2[import_canvas3.CANVAS_PERSONALIZE_SLOT].length,
274
+ indexInSlot: (_b2 = component == null ? void 0 : component.slots) == null ? void 0 : _b2[import_canvas3.CANVAS_PERSONALIZE_SLOT].findIndex(
275
+ ({ _id }) => variantComponent._id === _id
276
+ )
277
+ });
278
+ }
251
279
  );
252
280
  } else if (RenderComponent) {
253
281
  const props = convertComponentToProps(component);
package/dist/index.mjs CHANGED
@@ -95,7 +95,9 @@ var componentStoreResolver = createComponentStoreResolver({
95
95
  // src/components/UniformSlot.tsx
96
96
  import {
97
97
  CANVAS_LOCALE_TAG_PARAM,
98
+ CANVAS_PERSONALIZE_SLOT,
98
99
  CANVAS_PERSONALIZE_TYPE,
100
+ CANVAS_TEST_SLOT,
99
101
  CANVAS_TEST_TYPE,
100
102
  IN_CONTEXT_EDITOR_COMPONENT_START_ROLE,
101
103
  PLACEHOLDER_ID
@@ -201,13 +203,41 @@ function renderComponent({
201
203
  return resolveSystem.test(
202
204
  component,
203
205
  key,
204
- (component2, key2) => renderComponent({ component: component2, resolveRenderer, resolveSystem, key: key2 })
206
+ (variantComponent, key2) => {
207
+ var _a2, _b2;
208
+ return renderComponent({
209
+ component: variantComponent,
210
+ resolveRenderer,
211
+ resolveSystem,
212
+ key: key2,
213
+ parentComponent: component,
214
+ slotName: CANVAS_TEST_SLOT,
215
+ slotChildrenCount: (_a2 = component == null ? void 0 : component.slots) == null ? void 0 : _a2[CANVAS_TEST_SLOT].length,
216
+ indexInSlot: (_b2 = component == null ? void 0 : component.slots) == null ? void 0 : _b2[CANVAS_TEST_SLOT].findIndex(
217
+ ({ _id }) => variantComponent._id === _id
218
+ )
219
+ });
220
+ }
205
221
  );
206
222
  } else if (component.type === CANVAS_PERSONALIZE_TYPE) {
207
223
  return resolveSystem.personalization(
208
224
  component,
209
225
  key,
210
- (component2, key2) => renderComponent({ component: component2, resolveRenderer, resolveSystem, key: key2 })
226
+ (variantComponent, key2) => {
227
+ var _a2, _b2;
228
+ return renderComponent({
229
+ component: variantComponent,
230
+ resolveRenderer,
231
+ resolveSystem,
232
+ key: key2,
233
+ parentComponent: component,
234
+ slotName: CANVAS_PERSONALIZE_SLOT,
235
+ slotChildrenCount: (_a2 = component == null ? void 0 : component.slots) == null ? void 0 : _a2[CANVAS_PERSONALIZE_SLOT].length,
236
+ indexInSlot: (_b2 = component == null ? void 0 : component.slots) == null ? void 0 : _b2[CANVAS_PERSONALIZE_SLOT].findIndex(
237
+ ({ _id }) => variantComponent._id === _id
238
+ )
239
+ });
240
+ }
211
241
  );
212
242
  } else if (RenderComponent) {
213
243
  const props = convertComponentToProps(component);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/canvas-react",
3
- "version": "18.16.0",
3
+ "version": "18.17.1-alpha.13+77f2eaabc",
4
4
  "description": "React SDK for Uniform Canvas",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -23,9 +23,9 @@
23
23
  "format": "prettier --write \"src/**/*.{js,ts,tsx}\""
24
24
  },
25
25
  "dependencies": {
26
- "@uniformdev/canvas": "18.16.0",
27
- "@uniformdev/context": "18.16.0",
28
- "@uniformdev/context-react": "18.16.0"
26
+ "@uniformdev/canvas": "18.17.1-alpha.13+77f2eaabc",
27
+ "@uniformdev/context": "18.17.1-alpha.13+77f2eaabc",
28
+ "@uniformdev/context-react": "18.17.1-alpha.13+77f2eaabc"
29
29
  },
30
30
  "peerDependencies": {
31
31
  "react": ">= 16 || 17 || 18",
@@ -42,5 +42,5 @@
42
42
  "publishConfig": {
43
43
  "access": "public"
44
44
  },
45
- "gitHead": "debae7a8698824593e47c8886dcd6a5d4c4727a7"
45
+ "gitHead": "77f2eaabc380a8251c040f8bdd21d5451351022f"
46
46
  }