@reacteditor/core 0.0.13 → 0.0.15
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/{Editor-3COFH5WN.mjs → Editor-7UIJWCPN.mjs} +7 -7
- package/dist/{actions-DDpLL_TR.d.mts → actions-BxLinRKD.d.mts} +5 -0
- package/dist/{actions-DDpLL_TR.d.ts → actions-BxLinRKD.d.ts} +5 -0
- package/dist/{chunk-PUDWMFBH.mjs → chunk-3CGBQNX4.mjs} +1 -1
- package/dist/{chunk-BZ4BQZJR.mjs → chunk-647NZJYM.mjs} +3 -3
- package/dist/{chunk-FT6UFK7G.mjs → chunk-C2KWANIN.mjs} +1 -1
- package/dist/{chunk-AD7BMXAA.mjs → chunk-GIGXMGTZ.mjs} +1 -1
- package/dist/{chunk-OIFPBVSF.mjs → chunk-NKHR722W.mjs} +1 -1
- package/dist/{chunk-IIRJMJFU.mjs → chunk-NPC7A3V3.mjs} +4 -13
- package/dist/{chunk-KX5XDJF6.mjs → chunk-RAMNEU3M.mjs} +1044 -1323
- package/dist/{chunk-LRFRIIKG.mjs → chunk-T43H325W.mjs} +21 -122
- package/dist/{chunk-BUR5T7IX.mjs → chunk-TFAZFGYZ.mjs} +7 -7
- package/dist/{full-QT5KXRDP.mjs → full-PM3VSLYA.mjs} +6 -6
- package/dist/{index-BTatdZaE.d.mts → index-BZRpxcwy.d.mts} +1 -1
- package/dist/{index-zhUFD8aP.d.ts → index-B_21fGrq.d.ts} +1 -1
- package/dist/index.css +411 -517
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +846 -1247
- package/dist/index.mjs +9 -9
- package/dist/internal.d.mts +2 -2
- package/dist/internal.d.ts +2 -2
- package/dist/{loaded-O4QHGE26.mjs → loaded-5MUU76TF.mjs} +3 -3
- package/dist/{loaded-R34BR6I5.mjs → loaded-IIHO4UZS.mjs} +3 -3
- package/dist/{loaded-GLBLMTBL.mjs → loaded-ULJY3YN5.mjs} +3 -3
- package/dist/no-external.css +411 -517
- package/dist/no-external.d.mts +3 -3
- package/dist/no-external.d.ts +3 -3
- package/dist/no-external.js +846 -1247
- package/dist/no-external.mjs +9 -9
- package/dist/rsc.d.mts +2 -2
- package/dist/rsc.d.ts +2 -2
- package/dist/rsc.js +4 -14
- package/dist/rsc.mjs +2 -2
- package/dist/{walk-tree-Cxbt1UVr.d.mts → walk-tree-BvYigWFL.d.mts} +1 -1
- package/dist/{walk-tree-Cnyva5MB.d.ts → walk-tree-Clklc1Ql.d.ts} +1 -1
- package/package.json +2 -1
|
@@ -5,10 +5,9 @@ import {
|
|
|
5
5
|
} from "./chunk-M4JDRFYB.mjs";
|
|
6
6
|
import {
|
|
7
7
|
defaultAppState,
|
|
8
|
-
defaultViewports,
|
|
9
8
|
getChanged,
|
|
10
9
|
resolveComponentData
|
|
11
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-NPC7A3V3.mjs";
|
|
12
11
|
import {
|
|
13
12
|
get_class_name_factory_default
|
|
14
13
|
} from "./chunk-Y2EFNT5P.mjs";
|
|
@@ -518,6 +517,13 @@ var Sun = createLucideIcon("Sun", [
|
|
|
518
517
|
["path", { d: "m19.07 4.93-1.41 1.41", key: "1shlcs" }]
|
|
519
518
|
]);
|
|
520
519
|
|
|
520
|
+
// ../../node_modules/lucide-react/dist/esm/icons/tablet.js
|
|
521
|
+
init_react_import();
|
|
522
|
+
var Tablet = createLucideIcon("Tablet", [
|
|
523
|
+
["rect", { width: "16", height: "20", x: "4", y: "2", rx: "2", ry: "2", key: "76otgf" }],
|
|
524
|
+
["line", { x1: "12", x2: "12.01", y1: "18", y2: "18", key: "1dp563" }]
|
|
525
|
+
]);
|
|
526
|
+
|
|
521
527
|
// ../../node_modules/lucide-react/dist/esm/icons/toy-brick.js
|
|
522
528
|
init_react_import();
|
|
523
529
|
var ToyBrick = createLucideIcon("ToyBrick", [
|
|
@@ -563,6 +569,16 @@ var X = createLucideIcon("X", [
|
|
|
563
569
|
|
|
564
570
|
// store/index.ts
|
|
565
571
|
init_react_import();
|
|
572
|
+
|
|
573
|
+
// components/ViewportControls/default-viewports.ts
|
|
574
|
+
init_react_import();
|
|
575
|
+
var defaultViewports = [
|
|
576
|
+
{ width: 360, height: "auto", icon: "Smartphone", label: "Small" },
|
|
577
|
+
{ width: 768, height: "auto", icon: "Tablet", label: "Medium" },
|
|
578
|
+
{ width: "100%", height: "auto", icon: "Monitor", label: "Desktop" }
|
|
579
|
+
];
|
|
580
|
+
|
|
581
|
+
// store/index.ts
|
|
566
582
|
import { create as create2, useStore } from "zustand";
|
|
567
583
|
import { subscribeWithSelector as subscribeWithSelector2 } from "zustand/middleware";
|
|
568
584
|
import { createContext, useContext } from "react";
|
|
@@ -1377,125 +1393,6 @@ init_react_import();
|
|
|
1377
1393
|
// lib/get-zoom-config.ts
|
|
1378
1394
|
init_react_import();
|
|
1379
1395
|
|
|
1380
|
-
// ../../node_modules/css-box-model/dist/css-box-model.esm.js
|
|
1381
|
-
init_react_import();
|
|
1382
|
-
|
|
1383
|
-
// ../../node_modules/tiny-invariant/dist/esm/tiny-invariant.js
|
|
1384
|
-
init_react_import();
|
|
1385
|
-
var isProduction = process.env.NODE_ENV === "production";
|
|
1386
|
-
var prefix = "Invariant failed";
|
|
1387
|
-
function invariant(condition, message) {
|
|
1388
|
-
if (condition) {
|
|
1389
|
-
return;
|
|
1390
|
-
}
|
|
1391
|
-
if (isProduction) {
|
|
1392
|
-
throw new Error(prefix);
|
|
1393
|
-
}
|
|
1394
|
-
var provided = typeof message === "function" ? message() : message;
|
|
1395
|
-
var value = provided ? "".concat(prefix, ": ").concat(provided) : prefix;
|
|
1396
|
-
throw new Error(value);
|
|
1397
|
-
}
|
|
1398
|
-
|
|
1399
|
-
// ../../node_modules/css-box-model/dist/css-box-model.esm.js
|
|
1400
|
-
var getRect = function getRect2(_ref) {
|
|
1401
|
-
var top = _ref.top, right = _ref.right, bottom = _ref.bottom, left = _ref.left;
|
|
1402
|
-
var width = right - left;
|
|
1403
|
-
var height = bottom - top;
|
|
1404
|
-
var rect = {
|
|
1405
|
-
top,
|
|
1406
|
-
right,
|
|
1407
|
-
bottom,
|
|
1408
|
-
left,
|
|
1409
|
-
width,
|
|
1410
|
-
height,
|
|
1411
|
-
x: left,
|
|
1412
|
-
y: top,
|
|
1413
|
-
center: {
|
|
1414
|
-
x: (right + left) / 2,
|
|
1415
|
-
y: (bottom + top) / 2
|
|
1416
|
-
}
|
|
1417
|
-
};
|
|
1418
|
-
return rect;
|
|
1419
|
-
};
|
|
1420
|
-
var expand = function expand2(target, expandBy) {
|
|
1421
|
-
return {
|
|
1422
|
-
top: target.top - expandBy.top,
|
|
1423
|
-
left: target.left - expandBy.left,
|
|
1424
|
-
bottom: target.bottom + expandBy.bottom,
|
|
1425
|
-
right: target.right + expandBy.right
|
|
1426
|
-
};
|
|
1427
|
-
};
|
|
1428
|
-
var shrink = function shrink2(target, shrinkBy) {
|
|
1429
|
-
return {
|
|
1430
|
-
top: target.top + shrinkBy.top,
|
|
1431
|
-
left: target.left + shrinkBy.left,
|
|
1432
|
-
bottom: target.bottom - shrinkBy.bottom,
|
|
1433
|
-
right: target.right - shrinkBy.right
|
|
1434
|
-
};
|
|
1435
|
-
};
|
|
1436
|
-
var noSpacing = {
|
|
1437
|
-
top: 0,
|
|
1438
|
-
right: 0,
|
|
1439
|
-
bottom: 0,
|
|
1440
|
-
left: 0
|
|
1441
|
-
};
|
|
1442
|
-
var createBox = function createBox2(_ref2) {
|
|
1443
|
-
var borderBox = _ref2.borderBox, _ref2$margin = _ref2.margin, margin = _ref2$margin === void 0 ? noSpacing : _ref2$margin, _ref2$border = _ref2.border, border = _ref2$border === void 0 ? noSpacing : _ref2$border, _ref2$padding = _ref2.padding, padding = _ref2$padding === void 0 ? noSpacing : _ref2$padding;
|
|
1444
|
-
var marginBox = getRect(expand(borderBox, margin));
|
|
1445
|
-
var paddingBox = getRect(shrink(borderBox, border));
|
|
1446
|
-
var contentBox = getRect(shrink(paddingBox, padding));
|
|
1447
|
-
return {
|
|
1448
|
-
marginBox,
|
|
1449
|
-
borderBox: getRect(borderBox),
|
|
1450
|
-
paddingBox,
|
|
1451
|
-
contentBox,
|
|
1452
|
-
margin,
|
|
1453
|
-
border,
|
|
1454
|
-
padding
|
|
1455
|
-
};
|
|
1456
|
-
};
|
|
1457
|
-
var parse = function parse2(raw) {
|
|
1458
|
-
var value = raw.slice(0, -2);
|
|
1459
|
-
var suffix = raw.slice(-2);
|
|
1460
|
-
if (suffix !== "px") {
|
|
1461
|
-
return 0;
|
|
1462
|
-
}
|
|
1463
|
-
var result = Number(value);
|
|
1464
|
-
!!isNaN(result) ? process.env.NODE_ENV !== "production" ? invariant(false, "Could not parse value [raw: " + raw + ", without suffix: " + value + "]") : invariant(false) : void 0;
|
|
1465
|
-
return result;
|
|
1466
|
-
};
|
|
1467
|
-
var calculateBox = function calculateBox2(borderBox, styles) {
|
|
1468
|
-
var margin = {
|
|
1469
|
-
top: parse(styles.marginTop),
|
|
1470
|
-
right: parse(styles.marginRight),
|
|
1471
|
-
bottom: parse(styles.marginBottom),
|
|
1472
|
-
left: parse(styles.marginLeft)
|
|
1473
|
-
};
|
|
1474
|
-
var padding = {
|
|
1475
|
-
top: parse(styles.paddingTop),
|
|
1476
|
-
right: parse(styles.paddingRight),
|
|
1477
|
-
bottom: parse(styles.paddingBottom),
|
|
1478
|
-
left: parse(styles.paddingLeft)
|
|
1479
|
-
};
|
|
1480
|
-
var border = {
|
|
1481
|
-
top: parse(styles.borderTopWidth),
|
|
1482
|
-
right: parse(styles.borderRightWidth),
|
|
1483
|
-
bottom: parse(styles.borderBottomWidth),
|
|
1484
|
-
left: parse(styles.borderLeftWidth)
|
|
1485
|
-
};
|
|
1486
|
-
return createBox({
|
|
1487
|
-
borderBox,
|
|
1488
|
-
margin,
|
|
1489
|
-
padding,
|
|
1490
|
-
border
|
|
1491
|
-
});
|
|
1492
|
-
};
|
|
1493
|
-
var getBox = function getBox2(el) {
|
|
1494
|
-
var borderBox = el.getBoundingClientRect();
|
|
1495
|
-
var styles = window.getComputedStyle(el);
|
|
1496
|
-
return calculateBox(borderBox, styles);
|
|
1497
|
-
};
|
|
1498
|
-
|
|
1499
1396
|
// components/Select/index.tsx
|
|
1500
1397
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
1501
1398
|
var getClassName = get_class_name_factory_default("Select", styles_module_default);
|
|
@@ -1636,6 +1533,7 @@ export {
|
|
|
1636
1533
|
SquareCode,
|
|
1637
1534
|
Strikethrough,
|
|
1638
1535
|
Sun,
|
|
1536
|
+
Tablet,
|
|
1639
1537
|
ToyBrick,
|
|
1640
1538
|
Trash,
|
|
1641
1539
|
Underline,
|
|
@@ -1644,6 +1542,7 @@ export {
|
|
|
1644
1542
|
X,
|
|
1645
1543
|
reorder,
|
|
1646
1544
|
replace,
|
|
1545
|
+
defaultViewports,
|
|
1647
1546
|
monitorHotkeys,
|
|
1648
1547
|
useMonitorHotkeys,
|
|
1649
1548
|
useHotkey,
|
|
@@ -1654,7 +1553,6 @@ export {
|
|
|
1654
1553
|
appStoreContext,
|
|
1655
1554
|
useAppStore,
|
|
1656
1555
|
useAppStoreApi,
|
|
1657
|
-
getBox,
|
|
1658
1556
|
ControlContext,
|
|
1659
1557
|
useControlContext,
|
|
1660
1558
|
SelectControl
|
|
@@ -1708,6 +1606,7 @@ lucide-react/dist/esm/icons/smartphone.js:
|
|
|
1708
1606
|
lucide-react/dist/esm/icons/square-code.js:
|
|
1709
1607
|
lucide-react/dist/esm/icons/strikethrough.js:
|
|
1710
1608
|
lucide-react/dist/esm/icons/sun.js:
|
|
1609
|
+
lucide-react/dist/esm/icons/tablet.js:
|
|
1711
1610
|
lucide-react/dist/esm/icons/toy-brick.js:
|
|
1712
1611
|
lucide-react/dist/esm/icons/trash.js:
|
|
1713
1612
|
lucide-react/dist/esm/icons/underline.js:
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useListOptions
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-C2KWANIN.mjs";
|
|
4
4
|
import {
|
|
5
5
|
useAlignOptions
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-NKHR722W.mjs";
|
|
7
7
|
import {
|
|
8
8
|
useHeadingOptions
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-GIGXMGTZ.mjs";
|
|
10
10
|
import {
|
|
11
11
|
AlignCenter,
|
|
12
12
|
AlignJustify,
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
Strikethrough,
|
|
27
27
|
Underline,
|
|
28
28
|
useControlContext
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-T43H325W.mjs";
|
|
30
30
|
import {
|
|
31
31
|
get_class_name_factory_default
|
|
32
32
|
} from "./chunk-Y2EFNT5P.mjs";
|
|
@@ -349,7 +349,7 @@ function AlignSelectFallback() {
|
|
|
349
349
|
// components/RichTextMenu/controls/AlignSelect/index.tsx
|
|
350
350
|
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
351
351
|
var AlignSelectLoaded = lazy(
|
|
352
|
-
() => import("./loaded-
|
|
352
|
+
() => import("./loaded-ULJY3YN5.mjs").then((m) => ({
|
|
353
353
|
default: m.AlignSelectLoaded
|
|
354
354
|
}))
|
|
355
355
|
);
|
|
@@ -580,7 +580,7 @@ function HeadingSelectFallback() {
|
|
|
580
580
|
// components/RichTextMenu/controls/HeadingSelect/index.tsx
|
|
581
581
|
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
582
582
|
var HeadingSelectLoaded = lazy2(
|
|
583
|
-
() => import("./loaded-
|
|
583
|
+
() => import("./loaded-IIHO4UZS.mjs").then((m) => ({
|
|
584
584
|
default: m.HeadingSelectLoaded
|
|
585
585
|
}))
|
|
586
586
|
);
|
|
@@ -612,7 +612,7 @@ function ListSelectFallback() {
|
|
|
612
612
|
// components/RichTextMenu/controls/ListSelect/index.tsx
|
|
613
613
|
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
614
614
|
var ListSelectLoaded = lazy3(
|
|
615
|
-
() => import("./loaded-
|
|
615
|
+
() => import("./loaded-5MUU76TF.mjs").then((m) => ({
|
|
616
616
|
default: m.ListSelectLoaded
|
|
617
617
|
}))
|
|
618
618
|
);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
LoadedRichTextMenuInner
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-TFAZFGYZ.mjs";
|
|
4
|
+
import "./chunk-C2KWANIN.mjs";
|
|
5
|
+
import "./chunk-NKHR722W.mjs";
|
|
6
|
+
import "./chunk-GIGXMGTZ.mjs";
|
|
7
|
+
import "./chunk-T43H325W.mjs";
|
|
8
8
|
import "./chunk-M4JDRFYB.mjs";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-NPC7A3V3.mjs";
|
|
10
10
|
import "./chunk-Y2EFNT5P.mjs";
|
|
11
11
|
import "./chunk-JIXMPJZA.mjs";
|
|
12
12
|
import {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { H as History, a as Permissions, b as ComponentData, C as Config, U as UserGenerics, F as Fields, E as EditorAction, R as RootDataWithProps, c as ResolveDataTrigger, d as Plugin, e as Overrides, V as Viewports, I as IframeConfig, f as UiState, g as ComponentConfig, A as AppState, M as Metadata, h as FieldTransforms, i as RichtextField } from './actions-
|
|
1
|
+
import { H as History, a as Permissions, b as ComponentData, C as Config, U as UserGenerics, F as Fields, E as EditorAction, R as RootDataWithProps, c as ResolveDataTrigger, d as Plugin, e as Overrides, V as Viewports, I as IframeConfig, f as UiState, g as ComponentConfig, A as AppState, M as Metadata, h as FieldTransforms, i as RichtextField } from './actions-BxLinRKD.mjs';
|
|
2
2
|
import { Editor } from '@tiptap/react';
|
|
3
3
|
|
|
4
4
|
type HistorySlice<D = any> = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { H as History, a as Permissions, b as ComponentData, C as Config, U as UserGenerics, F as Fields, E as EditorAction, R as RootDataWithProps, c as ResolveDataTrigger, d as Plugin, e as Overrides, V as Viewports, I as IframeConfig, f as UiState, g as ComponentConfig, A as AppState, M as Metadata, h as FieldTransforms, i as RichtextField } from './actions-
|
|
1
|
+
import { H as History, a as Permissions, b as ComponentData, C as Config, U as UserGenerics, F as Fields, E as EditorAction, R as RootDataWithProps, c as ResolveDataTrigger, d as Plugin, e as Overrides, V as Viewports, I as IframeConfig, f as UiState, g as ComponentConfig, A as AppState, M as Metadata, h as FieldTransforms, i as RichtextField } from './actions-BxLinRKD.js';
|
|
2
2
|
import { Editor } from '@tiptap/react';
|
|
3
3
|
|
|
4
4
|
type HistorySlice<D = any> = {
|