@uniformdev/canvas-react 18.2.0 → 18.2.1

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.d.ts CHANGED
@@ -226,6 +226,79 @@ declare const useUniformContextualEditing: ({ initialCompositionValue, enhance,
226
226
  } | undefined;
227
227
  };
228
228
  };
229
+ /** @deprecated use useUniformContextualEditing instead */
230
+ declare const useContextualEditing: ({ initialCompositionValue, enhance, }: UseUniformContextualEditingProps) => {
231
+ composition: {
232
+ type: string;
233
+ parameters?: {
234
+ [key: string]: {
235
+ value: unknown;
236
+ type: string;
237
+ connectedData?: {
238
+ pointer: string;
239
+ syntax: "jptr";
240
+ required?: boolean | undefined;
241
+ } | undefined;
242
+ };
243
+ } | undefined;
244
+ variant?: string | undefined;
245
+ slots?: {
246
+ [key: string]: {
247
+ type: string;
248
+ parameters?: {
249
+ [key: string]: {
250
+ value: unknown;
251
+ type: string;
252
+ connectedData?: {
253
+ pointer: string;
254
+ syntax: "jptr";
255
+ required?: boolean | undefined;
256
+ } | undefined;
257
+ };
258
+ } | undefined;
259
+ variant?: string | undefined;
260
+ slots?: {
261
+ [key: string]: any[];
262
+ } | undefined;
263
+ _id?: string | undefined;
264
+ _pattern?: string | undefined;
265
+ _dataResources?: {
266
+ [key: string]: {
267
+ type: string;
268
+ isPatternParameter?: boolean | undefined;
269
+ variables?: {
270
+ [key: string]: string;
271
+ } | undefined;
272
+ };
273
+ } | undefined;
274
+ _patternDataResources?: {
275
+ [key: string]: {
276
+ type: string;
277
+ isPatternParameter?: boolean | undefined;
278
+ variables?: {
279
+ [key: string]: string;
280
+ } | undefined;
281
+ };
282
+ } | undefined;
283
+ _patternError?: "NOTFOUND" | "CYCLIC" | undefined;
284
+ }[];
285
+ } | undefined;
286
+ _id: string;
287
+ _slug?: string | null | undefined;
288
+ _name: string;
289
+ _dataResources?: {
290
+ [key: string]: {
291
+ type: string;
292
+ isPatternParameter?: boolean | undefined;
293
+ variables?: {
294
+ [key: string]: string;
295
+ } | undefined;
296
+ };
297
+ } | undefined;
298
+ };
299
+ };
300
+ /** @deprecated use UseUniformContextualEditingProps instead */
301
+ type UseContextualEditingProps = UseUniformContextualEditingProps;
229
302
 
230
303
  type UniformCompositionProps<TRenderProps = unknown> = UniformComponentProps<TRenderProps> & {
231
304
  /** The composition data */
@@ -303,4 +376,4 @@ declare const createComponentStoreResolver: (options: {
303
376
  defaultComponent?: React.ComponentType<ComponentProps<any>>;
304
377
  }) => RenderComponentResolver;
305
378
 
306
- export { ComponentProps, ComponentStore, Composition, CompositionProps, DefaultNotImplementedComponent, RenderComponentResolver, Slot, SlotProps, SystemRenderConfig, SystemRenderFunction, UniformComponent, UniformComponentContextValue, UniformComponentProps, UniformComposition, UniformCompositionProps, UniformSlot, UniformSlotProps, UseCompositionEventEffectOptions, UseUniformContextualEditingProps, componentStore, componentStoreResolver, createApiEnhancer, createComponentStore, createComponentStoreResolver, registerUniformComponent, useComposition, useCompositionEventEffect, useUniformContextualEditing, useUniformCurrentComponent, useUniformCurrentComposition };
379
+ export { ComponentProps, ComponentStore, Composition, CompositionProps, DefaultNotImplementedComponent, RenderComponentResolver, Slot, SlotProps, SystemRenderConfig, SystemRenderFunction, UniformComponent, UniformComponentContextValue, UniformComponentProps, UniformComposition, UniformCompositionProps, UniformSlot, UniformSlotProps, UseCompositionEventEffectOptions, UseContextualEditingProps, UseUniformContextualEditingProps, componentStore, componentStoreResolver, createApiEnhancer, createComponentStore, createComponentStoreResolver, registerUniformComponent, useComposition, useCompositionEventEffect, useContextualEditing, useUniformContextualEditing, useUniformCurrentComponent, useUniformCurrentComposition };
package/dist/index.esm.js CHANGED
@@ -386,6 +386,7 @@ function isInContextEditingMode() {
386
386
  );
387
387
  return isOpenedByInContextEditor && isAllowlistedReferrer;
388
388
  }
389
+ var useContextualEditing = useUniformContextualEditing;
389
390
 
390
391
  // src/components/UniformComposition.tsx
391
392
  var UniformCompositionContext = createContext2({});
@@ -471,6 +472,7 @@ export {
471
472
  registerUniformComponent,
472
473
  useComposition,
473
474
  useCompositionEventEffect,
475
+ useContextualEditing,
474
476
  useUniformContextualEditing,
475
477
  useUniformCurrentComponent,
476
478
  useUniformCurrentComposition
package/dist/index.js CHANGED
@@ -41,6 +41,7 @@ __export(src_exports, {
41
41
  registerUniformComponent: () => registerUniformComponent,
42
42
  useComposition: () => useComposition,
43
43
  useCompositionEventEffect: () => useCompositionEventEffect,
44
+ useContextualEditing: () => useContextualEditing,
44
45
  useUniformContextualEditing: () => useUniformContextualEditing,
45
46
  useUniformCurrentComponent: () => useUniformCurrentComponent,
46
47
  useUniformCurrentComposition: () => useUniformCurrentComposition
@@ -418,6 +419,7 @@ function isInContextEditingMode() {
418
419
  );
419
420
  return isOpenedByInContextEditor && isAllowlistedReferrer;
420
421
  }
422
+ var useContextualEditing = useUniformContextualEditing;
421
423
 
422
424
  // src/components/UniformComposition.tsx
423
425
  var UniformCompositionContext = (0, import_react5.createContext)({});
@@ -500,6 +502,7 @@ function useCompositionEventEffect({
500
502
  registerUniformComponent,
501
503
  useComposition,
502
504
  useCompositionEventEffect,
505
+ useContextualEditing,
503
506
  useUniformContextualEditing,
504
507
  useUniformCurrentComponent,
505
508
  useUniformCurrentComposition
package/dist/index.mjs CHANGED
@@ -386,6 +386,7 @@ function isInContextEditingMode() {
386
386
  );
387
387
  return isOpenedByInContextEditor && isAllowlistedReferrer;
388
388
  }
389
+ var useContextualEditing = useUniformContextualEditing;
389
390
 
390
391
  // src/components/UniformComposition.tsx
391
392
  var UniformCompositionContext = createContext2({});
@@ -471,6 +472,7 @@ export {
471
472
  registerUniformComponent,
472
473
  useComposition,
473
474
  useCompositionEventEffect,
475
+ useContextualEditing,
474
476
  useUniformContextualEditing,
475
477
  useUniformCurrentComponent,
476
478
  useUniformCurrentComposition
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/canvas-react",
3
- "version": "18.2.0",
3
+ "version": "18.2.1",
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.2.0",
27
- "@uniformdev/context": "18.2.0",
28
- "@uniformdev/context-react": "18.2.0"
26
+ "@uniformdev/canvas": "18.2.1",
27
+ "@uniformdev/context": "18.2.1",
28
+ "@uniformdev/context-react": "18.2.1"
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": "946d96f5a3ebd69cfc1b4fcc003dea75af4480af"
45
+ "gitHead": "c519c1d6b73c928ba0b795702d56fbb63fdd3c90"
46
46
  }