@measured/puck 0.21.0-canary.7dca3a5a → 0.21.0-canary.8416d520

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.
@@ -21,14 +21,14 @@ import {
21
21
  setDeep,
22
22
  useGetPuck,
23
23
  usePuck
24
- } from "./chunk-FKDVYRQW.mjs";
24
+ } from "./chunk-N52WGXS5.mjs";
25
25
  import {
26
26
  init_react_import,
27
27
  migrate,
28
28
  resolveAllData,
29
29
  transformProps,
30
30
  walkTree
31
- } from "./chunk-6SIKCDJJ.mjs";
31
+ } from "./chunk-FY5AZKYD.mjs";
32
32
 
33
33
  // bundle/no-external.ts
34
34
  init_react_import();
package/dist/rsc.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { C as Config, U as UserGenerics, M as Metadata } from './walk-tree-DS1xB387.mjs';
3
- export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-DS1xB387.mjs';
2
+ import { C as Config, U as UserGenerics, M as Metadata } from './walk-tree-Butv5UdJ.mjs';
3
+ export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-Butv5UdJ.mjs';
4
4
  import 'react';
5
5
 
6
6
  declare function Render<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>>({ config, data, metadata, }: {
package/dist/rsc.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { C as Config, U as UserGenerics, M as Metadata } from './walk-tree-DS1xB387.js';
3
- export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-DS1xB387.js';
2
+ import { C as Config, U as UserGenerics, M as Metadata } from './walk-tree-Butv5UdJ.js';
3
+ export { m as migrate, r as resolveAllData, t as transformProps, w as walkTree } from './walk-tree-Butv5UdJ.js';
4
4
  import 'react';
5
5
 
6
6
  declare function Render<UserConfig extends Config = Config, G extends UserGenerics<UserConfig> = UserGenerics<UserConfig>>({ config, data, metadata, }: {
package/dist/rsc.js CHANGED
@@ -474,7 +474,7 @@ var getChanged = (newItem, oldItem) => {
474
474
  // lib/resolve-component-data.ts
475
475
  var import_fast_equals2 = require("fast-equals");
476
476
  var cache = { lastChange: {} };
477
- var resolveComponentData = (_0, _1, ..._2) => __async(void 0, [_0, _1, ..._2], function* (item, config, metadata = {}, onResolveStart, onResolveEnd, trigger = "replace") {
477
+ var resolveComponentData = (_0, _1, ..._2) => __async(null, [_0, _1, ..._2], function* (item, config, metadata = {}, onResolveStart, onResolveEnd, trigger = "replace") {
478
478
  const configForItem = "type" in item && item.type !== "root" ? config.components[item.type] : config.root;
479
479
  const resolvedItem = __spreadValues({}, item);
480
480
  const shouldRunResolver = (configForItem == null ? void 0 : configForItem.resolveData) && item.props;
@@ -502,11 +502,11 @@ var resolveComponentData = (_0, _1, ..._2) => __async(void 0, [_0, _1, ..._2], f
502
502
  let itemWithResolvedChildren = yield mapFields(
503
503
  resolvedItem,
504
504
  {
505
- slot: (_02) => __async(void 0, [_02], function* ({ value }) {
505
+ slot: (_02) => __async(null, [_02], function* ({ value }) {
506
506
  const content = value;
507
507
  return yield Promise.all(
508
508
  content.map(
509
- (childItem) => __async(void 0, null, function* () {
509
+ (childItem) => __async(null, null, function* () {
510
510
  return (yield resolveComponentData(
511
511
  childItem,
512
512
  config,
@@ -554,7 +554,7 @@ function resolveAllData(_0, _1) {
554
554
  return __async(this, arguments, function* (data, config, metadata = {}, onResolveStart, onResolveEnd) {
555
555
  var _a;
556
556
  const defaultedData = defaultData(data);
557
- const resolveNode = (_node) => __async(this, null, function* () {
557
+ const resolveNode = (_node) => __async(null, null, function* () {
558
558
  const node = toComponent(_node);
559
559
  onResolveStart == null ? void 0 : onResolveStart(node);
560
560
  const resolved = (yield resolveComponentData(
@@ -575,13 +575,13 @@ function resolveAllData(_0, _1) {
575
575
  onResolveEnd == null ? void 0 : onResolveEnd(toComponent(resolvedDeep));
576
576
  return resolvedDeep;
577
577
  });
578
- const processContent = (content) => __async(this, null, function* () {
578
+ const processContent = (content) => __async(null, null, function* () {
579
579
  return Promise.all(content.map(resolveNode));
580
580
  });
581
- const processZones = () => __async(this, null, function* () {
581
+ const processZones = () => __async(null, null, function* () {
582
582
  var _a2;
583
583
  const zones = (_a2 = data.zones) != null ? _a2 : {};
584
- Object.entries(zones).forEach((_02) => __async(this, [_02], function* ([zoneKey, content]) {
584
+ Object.entries(zones).forEach((_02) => __async(null, [_02], function* ([zoneKey, content]) {
585
585
  zones[zoneKey] = yield Promise.all(content.map(resolveNode));
586
586
  }));
587
587
  return zones;
@@ -591,7 +591,7 @@ function resolveAllData(_0, _1) {
591
591
  content: yield processContent(defaultedData.content),
592
592
  zones: yield processZones()
593
593
  };
594
- Object.keys((_a = defaultedData.zones) != null ? _a : {}).forEach((zoneKey) => __async(this, null, function* () {
594
+ Object.keys((_a = defaultedData.zones) != null ? _a : {}).forEach((zoneKey) => __async(null, null, function* () {
595
595
  const content = defaultedData.zones[zoneKey];
596
596
  dynamic.zones[zoneKey] = yield processContent(content);
597
597
  }), {});
package/dist/rsc.mjs CHANGED
@@ -12,7 +12,7 @@ import {
12
12
  transformProps,
13
13
  useSlots,
14
14
  walkTree
15
- } from "./chunk-6SIKCDJJ.mjs";
15
+ } from "./chunk-FY5AZKYD.mjs";
16
16
 
17
17
  // bundle/rsc.tsx
18
18
  init_react_import();
@@ -118,6 +118,7 @@ interface CustomField<Value extends any> extends BaseField {
118
118
  type: "custom";
119
119
  render: CustomFieldRender<Value>;
120
120
  contentEditable?: boolean;
121
+ key?: string;
121
122
  }
122
123
  interface SlotField extends BaseField {
123
124
  type: "slot";
@@ -331,6 +332,7 @@ interface FieldMetadata extends Metadata {
331
332
  type ItemWithId = {
332
333
  _arrayId: string;
333
334
  _originalIndex: number;
335
+ _currentIndex: number;
334
336
  };
335
337
  type ArrayState = {
336
338
  items: ItemWithId[];
@@ -118,6 +118,7 @@ interface CustomField<Value extends any> extends BaseField {
118
118
  type: "custom";
119
119
  render: CustomFieldRender<Value>;
120
120
  contentEditable?: boolean;
121
+ key?: string;
121
122
  }
122
123
  interface SlotField extends BaseField {
123
124
  type: "slot";
@@ -331,6 +332,7 @@ interface FieldMetadata extends Metadata {
331
332
  type ItemWithId = {
332
333
  _arrayId: string;
333
334
  _originalIndex: number;
335
+ _currentIndex: number;
334
336
  };
335
337
  type ArrayState = {
336
338
  items: ItemWithId[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@measured/puck",
3
- "version": "0.21.0-canary.7dca3a5a",
3
+ "version": "0.21.0-canary.8416d520",
4
4
  "description": "The open-source visual editor for React",
5
5
  "author": "Chris Villa <chris@puckeditor.com>",
6
6
  "repository": "measuredco/puck",