@makeswift/runtime 0.9.6 → 0.9.7

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.
@@ -34,7 +34,7 @@ import { Range, createEditor } from "slate";
34
34
  import { ReactEditor, withReact, Slate, Editable } from "slate-react";
35
35
  import { cx } from "@emotion/css";
36
36
  import { g as getBox } from "./box-models.es.js";
37
- import { U as useStyle, bf as BlockType, bd as InlineType, b5 as richTextDTOtoDAO, b4 as richTextDTOtoSelection, bo as BuilderEditMode } from "./react-page.es.js";
37
+ import { U as useStyle, bg as BlockType, be as InlineType, b6 as richTextDTOtoDAO, b5 as richTextDTOtoSelection, bp as BuilderEditMode } from "./react-page.es.js";
38
38
  import { V as useEnhancedTypography, W as useTypographyClassName, n as useResponsiveStyle, u as useIsInBuilder, K as deepEqual, T as useBuilderEditMode, U as pollBoxModel } from "./index.es.js";
39
39
  import { jsx } from "react/jsx-runtime";
40
40
  import "./state/breakpoints.es.js";
package/dist/index.es2.js CHANGED
@@ -30,7 +30,7 @@ var __objRest = (source, exclude) => {
30
30
  return target;
31
31
  };
32
32
  import { useMemo, useState, useEffect, useCallback, useRef, forwardRef, createElement, Children } from "react";
33
- import { Y as isNonNullable, av as getBackgroundsFileIds, aw as getBackgroundsSwatchIds, U as useStyle } from "./react-page.es.js";
33
+ import { Y as isNonNullable, aw as getBackgroundsFileIds, ax as getBackgroundsSwatchIds, U as useStyle } from "./react-page.es.js";
34
34
  import "use-sync-external-store/shim";
35
35
  import { G as useFiles, H as useSwatches, v as useResponsiveGridItem, c as DEFAULT_BOX_ANIMATE_TYPE, f as DEFAULT_ITEM_ANIMATE_TYPE, e as DEFAULT_BOX_ANIMATE_DURATION, d as DEFAULT_BOX_ANIMATE_DELAY, i as DEFAULT_ITEM_STAGGER_DURATION, n as useResponsiveStyle, q as colorToString } from "./index.es.js";
36
36
  import "./actions.es.js";
package/dist/index.es5.js CHANGED
@@ -19,7 +19,7 @@ var __spreadValues = (a, b) => {
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  import { Editor, Transforms, Text, Range } from "slate";
21
21
  import { findBreakpointOverride } from "./state/breakpoints.es.js";
22
- import { b9 as createRichTextV2Plugin } from "./react-page.es.js";
22
+ import { ba as createRichTextV2Plugin } from "./react-page.es.js";
23
23
  import "./actions.es.js";
24
24
  import { i as unstable_Typography } from "./typography.es.js";
25
25
  import { g as getSelection } from "./types.es2.js";
package/dist/index.es6.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Path, Transforms } from "slate";
2
2
  import isHotkey from "is-hotkey";
3
- import { bf as BlockType, b9 as createRichTextV2Plugin } from "./react-page.es.js";
3
+ import { bg as BlockType, ba as createRichTextV2Plugin } from "./react-page.es.js";
4
4
  import { E as ElementUtils } from "./types.es2.js";
5
5
  const BLOCK_ONE_PATH = [0];
6
6
  const BLOCK_TWO_PATH = [1];
package/dist/index.es9.js CHANGED
@@ -34,7 +34,7 @@ import { Range, createEditor } from "slate";
34
34
  import isHotkey from "is-hotkey";
35
35
  import { withHistory, HistoryEditor } from "slate-history";
36
36
  import { ReactEditor, withReact, Slate, Editable } from "slate-react";
37
- import { U as useStyle, b8 as RichTextV2Mode, bf as BlockType, bo as BuilderEditMode } from "./react-page.es.js";
37
+ import { U as useStyle, b9 as RichTextV2Mode, bg as BlockType, bp as BuilderEditMode } from "./react-page.es.js";
38
38
  import { Q as ControlValue, T as useBuilderEditMode, U as pollBoxModel } from "./index.es.js";
39
39
  import "./state/breakpoints.es.js";
40
40
  import "./types.es2.js";
@@ -2368,6 +2368,9 @@ class RichTextV2Control extends PropController {
2368
2368
  this.send({ type: RichTextV2ControlMessageType.CHANGE_BOX_MODEL, payload: { boxModel } });
2369
2369
  }
2370
2370
  }
2371
+ function isRichTextV1Data(value) {
2372
+ return value !== void 0 && typeof value === "object" && !Array.isArray(value);
2373
+ }
2371
2374
  function isNonNullable(value) {
2372
2375
  return value != null;
2373
2376
  }
@@ -2535,6 +2538,8 @@ function getSwatchIds(descriptor, prop) {
2535
2538
  };
2536
2539
  const descendants = prop;
2537
2540
  const plugins = descriptor.config.plugins;
2541
+ if (isRichTextV1Data(descendants))
2542
+ return [];
2538
2543
  return descendants.flatMap((d) => getDescendantSwatchIds(d));
2539
2544
  }
2540
2545
  case ShapeControlType: {
@@ -3089,6 +3094,7 @@ exports.introspection = introspection;
3089
3094
  exports.isElementReference = isElementReference;
3090
3095
  exports.isNonNullable = isNonNullable;
3091
3096
  exports.isPropControllersHandle = isPropControllersHandle;
3097
+ exports.isRichTextV1Data = isRichTextV1Data;
3092
3098
  exports.merge = merge;
3093
3099
  exports.mergeSlotData = mergeSlotData;
3094
3100
  exports.parseLocalesInput = parseLocalesInput;