@valbuild/ui 0.13.3 → 0.15.0
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/valbuild-ui.cjs.js
CHANGED
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const jsxRuntime = require("react/jsx-runtime");
|
|
4
4
|
const React = require("react");
|
|
5
|
+
function getDefaultExportFromCjs(x) {
|
|
6
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
7
|
+
}
|
|
5
8
|
var Lexical_dev = {};
|
|
6
9
|
var hasRequiredLexical_dev;
|
|
7
10
|
function requireLexical_dev() {
|
|
@@ -16224,6 +16227,7 @@ function requireLexicalErrorBoundary_prod() {
|
|
|
16224
16227
|
}
|
|
16225
16228
|
const LexicalErrorBoundary = process.env.NODE_ENV === "development" ? requireLexicalErrorBoundary_dev() : requireLexicalErrorBoundary_prod();
|
|
16226
16229
|
var LexicalErrorBoundary_1 = LexicalErrorBoundary;
|
|
16230
|
+
const LexicalErrorBoundary$1 = /* @__PURE__ */ getDefaultExportFromCjs(LexicalErrorBoundary_1);
|
|
16227
16231
|
var LexicalHistoryPlugin_dev = {};
|
|
16228
16232
|
var LexicalHistory_dev = {};
|
|
16229
16233
|
var hasRequiredLexicalHistory_dev;
|
|
@@ -17164,25 +17168,9 @@ function requireLexicalText() {
|
|
|
17164
17168
|
LexicalText_1 = LexicalText;
|
|
17165
17169
|
return LexicalText_1;
|
|
17166
17170
|
}
|
|
17167
|
-
var
|
|
17168
|
-
var reactDom = {
|
|
17169
|
-
get exports() {
|
|
17170
|
-
return reactDomExports;
|
|
17171
|
-
},
|
|
17172
|
-
set exports(v) {
|
|
17173
|
-
reactDomExports = v;
|
|
17174
|
-
}
|
|
17175
|
-
};
|
|
17171
|
+
var reactDom = { exports: {} };
|
|
17176
17172
|
var reactDom_production_min = {};
|
|
17177
|
-
var
|
|
17178
|
-
var scheduler = {
|
|
17179
|
-
get exports() {
|
|
17180
|
-
return schedulerExports;
|
|
17181
|
-
},
|
|
17182
|
-
set exports(v) {
|
|
17183
|
-
schedulerExports = v;
|
|
17184
|
-
}
|
|
17185
|
-
};
|
|
17173
|
+
var scheduler = { exports: {} };
|
|
17186
17174
|
var scheduler_production_min = {};
|
|
17187
17175
|
/**
|
|
17188
17176
|
* @license React
|
|
@@ -17903,16 +17891,14 @@ function requireScheduler_development() {
|
|
|
17903
17891
|
var hasRequiredScheduler;
|
|
17904
17892
|
function requireScheduler() {
|
|
17905
17893
|
if (hasRequiredScheduler)
|
|
17906
|
-
return
|
|
17894
|
+
return scheduler.exports;
|
|
17907
17895
|
hasRequiredScheduler = 1;
|
|
17908
|
-
(
|
|
17909
|
-
|
|
17910
|
-
|
|
17911
|
-
|
|
17912
|
-
|
|
17913
|
-
|
|
17914
|
-
})(scheduler);
|
|
17915
|
-
return schedulerExports;
|
|
17896
|
+
if (process.env.NODE_ENV === "production") {
|
|
17897
|
+
scheduler.exports = requireScheduler_production_min();
|
|
17898
|
+
} else {
|
|
17899
|
+
scheduler.exports = requireScheduler_development();
|
|
17900
|
+
}
|
|
17901
|
+
return scheduler.exports;
|
|
17916
17902
|
}
|
|
17917
17903
|
/**
|
|
17918
17904
|
* @license React
|
|
@@ -45960,30 +45946,28 @@ function requireReactDom_development() {
|
|
|
45960
45946
|
var hasRequiredReactDom;
|
|
45961
45947
|
function requireReactDom() {
|
|
45962
45948
|
if (hasRequiredReactDom)
|
|
45963
|
-
return
|
|
45949
|
+
return reactDom.exports;
|
|
45964
45950
|
hasRequiredReactDom = 1;
|
|
45965
|
-
|
|
45966
|
-
|
|
45967
|
-
|
|
45968
|
-
return;
|
|
45969
|
-
}
|
|
45970
|
-
if (process.env.NODE_ENV !== "production") {
|
|
45971
|
-
throw new Error("^_^");
|
|
45972
|
-
}
|
|
45973
|
-
try {
|
|
45974
|
-
__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);
|
|
45975
|
-
} catch (err) {
|
|
45976
|
-
console.error(err);
|
|
45977
|
-
}
|
|
45951
|
+
function checkDCE() {
|
|
45952
|
+
if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === "undefined" || typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== "function") {
|
|
45953
|
+
return;
|
|
45978
45954
|
}
|
|
45979
|
-
if (process.env.NODE_ENV
|
|
45980
|
-
|
|
45981
|
-
|
|
45982
|
-
|
|
45983
|
-
|
|
45955
|
+
if (process.env.NODE_ENV !== "production") {
|
|
45956
|
+
throw new Error("^_^");
|
|
45957
|
+
}
|
|
45958
|
+
try {
|
|
45959
|
+
__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);
|
|
45960
|
+
} catch (err) {
|
|
45961
|
+
console.error(err);
|
|
45984
45962
|
}
|
|
45985
|
-
}
|
|
45986
|
-
|
|
45963
|
+
}
|
|
45964
|
+
if (process.env.NODE_ENV === "production") {
|
|
45965
|
+
checkDCE();
|
|
45966
|
+
reactDom.exports = requireReactDom_production_min();
|
|
45967
|
+
} else {
|
|
45968
|
+
reactDom.exports = requireReactDom_development();
|
|
45969
|
+
}
|
|
45970
|
+
return reactDom.exports;
|
|
45987
45971
|
}
|
|
45988
45972
|
var LexicalDragon_dev = {};
|
|
45989
45973
|
var hasRequiredLexicalDragon_dev;
|
|
@@ -48597,15 +48581,7 @@ const Underline = ({ className }) => {
|
|
|
48597
48581
|
);
|
|
48598
48582
|
};
|
|
48599
48583
|
const Underline$1 = Underline;
|
|
48600
|
-
var
|
|
48601
|
-
var classnames = {
|
|
48602
|
-
get exports() {
|
|
48603
|
-
return classnamesExports;
|
|
48604
|
-
},
|
|
48605
|
-
set exports(v) {
|
|
48606
|
-
classnamesExports = v;
|
|
48607
|
-
}
|
|
48608
|
-
};
|
|
48584
|
+
var classnames = { exports: {} };
|
|
48609
48585
|
/*!
|
|
48610
48586
|
Copyright (c) 2018 Jed Watson.
|
|
48611
48587
|
Licensed under the MIT License (MIT), see
|
|
@@ -48652,7 +48628,8 @@ var classnames = {
|
|
|
48652
48628
|
}
|
|
48653
48629
|
})();
|
|
48654
48630
|
})(classnames);
|
|
48655
|
-
|
|
48631
|
+
var classnamesExports = classnames.exports;
|
|
48632
|
+
const classNames = /* @__PURE__ */ getDefaultExportFromCjs(classnamesExports);
|
|
48656
48633
|
const Button = ({
|
|
48657
48634
|
variant = "primary",
|
|
48658
48635
|
onClick,
|
|
@@ -49193,25 +49170,25 @@ function toLexicalNode(node) {
|
|
|
49193
49170
|
}
|
|
49194
49171
|
function toLexicalHeadingNode(heading) {
|
|
49195
49172
|
const node = LexicalRichText_1.$createHeadingNode(heading.tag);
|
|
49196
|
-
node.setFormat(heading.format);
|
|
49197
|
-
node.setIndent(heading.indent);
|
|
49198
|
-
node.setDirection(heading.direction);
|
|
49173
|
+
node.setFormat(heading.format || "");
|
|
49174
|
+
node.setIndent(heading.indent || 0);
|
|
49175
|
+
node.setDirection(heading.direction || "ltr");
|
|
49199
49176
|
node.append(...heading.children.map((child) => toLexicalNode(child)));
|
|
49200
49177
|
return node;
|
|
49201
49178
|
}
|
|
49202
49179
|
function toLexicalParagraphNode(paragraph) {
|
|
49203
49180
|
const node = Lexical_1.$createParagraphNode();
|
|
49204
|
-
node.setFormat(paragraph.format);
|
|
49205
|
-
node.setIndent(paragraph.indent);
|
|
49206
|
-
node.setDirection(paragraph.direction);
|
|
49181
|
+
node.setFormat(paragraph.format || "");
|
|
49182
|
+
node.setIndent(paragraph.indent || 0);
|
|
49183
|
+
node.setDirection(paragraph.direction || "ltr");
|
|
49207
49184
|
node.append(...paragraph.children.map((child) => toLexicalNode(child)));
|
|
49208
49185
|
return node;
|
|
49209
49186
|
}
|
|
49210
49187
|
function toLexicalListItemNode(listItem) {
|
|
49211
49188
|
const node = LexicalList_1.$createListItemNode();
|
|
49212
|
-
node.setFormat(listItem.format);
|
|
49213
|
-
node.setIndent(listItem.indent);
|
|
49214
|
-
node.setDirection(listItem.direction);
|
|
49189
|
+
node.setFormat(listItem.format || "");
|
|
49190
|
+
node.setIndent(listItem.indent || 0);
|
|
49191
|
+
node.setDirection(listItem.direction || "ltr");
|
|
49215
49192
|
node.setValue(listItem.value);
|
|
49216
49193
|
node.setChecked(listItem.checked);
|
|
49217
49194
|
node.append(...listItem.children.map((child) => toLexicalNode(child)));
|
|
@@ -49219,9 +49196,9 @@ function toLexicalListItemNode(listItem) {
|
|
|
49219
49196
|
}
|
|
49220
49197
|
function toLexicalListNode(list) {
|
|
49221
49198
|
const node = LexicalList_1.$createListNode(list.listType, list.start);
|
|
49222
|
-
node.setFormat(list.format);
|
|
49223
|
-
node.setIndent(list.indent);
|
|
49224
|
-
node.setDirection(list.direction);
|
|
49199
|
+
node.setFormat(list.format || "");
|
|
49200
|
+
node.setIndent(list.indent || 0);
|
|
49201
|
+
node.setDirection(list.direction || "ltr");
|
|
49225
49202
|
node.append(...list.children.map((child) => toLexicalNode(child)));
|
|
49226
49203
|
return node;
|
|
49227
49204
|
}
|
|
@@ -49230,8 +49207,8 @@ function toLexicalTextNode(text) {
|
|
|
49230
49207
|
node.setFormat(text.format);
|
|
49231
49208
|
text.indent && node.setIndent(text.indent);
|
|
49232
49209
|
text.direction && node.setDirection(text.direction);
|
|
49233
|
-
node.setStyle(text.style);
|
|
49234
|
-
node.setDetail(text.detail);
|
|
49210
|
+
node.setStyle(text.style || "");
|
|
49211
|
+
node.setDetail(text.detail || 0);
|
|
49235
49212
|
return node;
|
|
49236
49213
|
}
|
|
49237
49214
|
const RichTextEditor = ({
|
|
@@ -49282,7 +49259,7 @@ const RichTextEditor = ({
|
|
|
49282
49259
|
{
|
|
49283
49260
|
contentEditable: /* @__PURE__ */ jsxRuntime.jsx(LexicalContentEditable, { className: "relative bg-fill flex flex-col h-full w-full min-h-[200px] text-primary outline-none" }),
|
|
49284
49261
|
placeholder: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute top-[calc(58px+1rem)] left-4 text-base/25 text-primary", children: "Enter some text..." }),
|
|
49285
|
-
ErrorBoundary:
|
|
49262
|
+
ErrorBoundary: LexicalErrorBoundary$1
|
|
49286
49263
|
}
|
|
49287
49264
|
),
|
|
49288
49265
|
/* @__PURE__ */ jsxRuntime.jsx(LexicalListPlugin_1.ListPlugin, {}),
|
|
@@ -49319,24 +49296,8 @@ function FormContainer({
|
|
|
49319
49296
|
}
|
|
49320
49297
|
);
|
|
49321
49298
|
}
|
|
49322
|
-
var
|
|
49323
|
-
var
|
|
49324
|
-
get exports() {
|
|
49325
|
-
return propTypesExports;
|
|
49326
|
-
},
|
|
49327
|
-
set exports(v) {
|
|
49328
|
-
propTypesExports = v;
|
|
49329
|
-
}
|
|
49330
|
-
};
|
|
49331
|
-
var reactIsExports = {};
|
|
49332
|
-
var reactIs = {
|
|
49333
|
-
get exports() {
|
|
49334
|
-
return reactIsExports;
|
|
49335
|
-
},
|
|
49336
|
-
set exports(v) {
|
|
49337
|
-
reactIsExports = v;
|
|
49338
|
-
}
|
|
49339
|
-
};
|
|
49299
|
+
var propTypes = { exports: {} };
|
|
49300
|
+
var reactIs = { exports: {} };
|
|
49340
49301
|
var reactIs_production_min = {};
|
|
49341
49302
|
/** @license React v16.13.1
|
|
49342
49303
|
* react-is.production.min.js
|
|
@@ -49607,16 +49568,14 @@ function requireReactIs_development() {
|
|
|
49607
49568
|
var hasRequiredReactIs;
|
|
49608
49569
|
function requireReactIs() {
|
|
49609
49570
|
if (hasRequiredReactIs)
|
|
49610
|
-
return
|
|
49571
|
+
return reactIs.exports;
|
|
49611
49572
|
hasRequiredReactIs = 1;
|
|
49612
|
-
(
|
|
49613
|
-
|
|
49614
|
-
|
|
49615
|
-
|
|
49616
|
-
|
|
49617
|
-
|
|
49618
|
-
})(reactIs);
|
|
49619
|
-
return reactIsExports;
|
|
49573
|
+
if (process.env.NODE_ENV === "production") {
|
|
49574
|
+
reactIs.exports = requireReactIs_production_min();
|
|
49575
|
+
} else {
|
|
49576
|
+
reactIs.exports = requireReactIs_development();
|
|
49577
|
+
}
|
|
49578
|
+
return reactIs.exports;
|
|
49620
49579
|
}
|
|
49621
49580
|
/*
|
|
49622
49581
|
object-assign
|
|
@@ -50283,6 +50242,8 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
50283
50242
|
} else {
|
|
50284
50243
|
propTypes.exports = requireFactoryWithThrowingShims()();
|
|
50285
50244
|
}
|
|
50245
|
+
var propTypesExports = propTypes.exports;
|
|
50246
|
+
const PropTypes = /* @__PURE__ */ getDefaultExportFromCjs(propTypesExports);
|
|
50286
50247
|
function _extends$2() {
|
|
50287
50248
|
_extends$2 = Object.assign || function(target) {
|
|
50288
50249
|
for (var i = 1; i < arguments.length; i++) {
|
|
@@ -50365,8 +50326,8 @@ var AlignJustify = React.forwardRef(function(_ref, ref) {
|
|
|
50365
50326
|
}));
|
|
50366
50327
|
});
|
|
50367
50328
|
AlignJustify.propTypes = {
|
|
50368
|
-
color:
|
|
50369
|
-
size:
|
|
50329
|
+
color: PropTypes.string,
|
|
50330
|
+
size: PropTypes.oneOfType([PropTypes.string, PropTypes.number])
|
|
50370
50331
|
};
|
|
50371
50332
|
AlignJustify.displayName = "AlignJustify";
|
|
50372
50333
|
const AlignJustify$1 = AlignJustify;
|
|
@@ -50443,8 +50404,8 @@ var UploadCloud = React.forwardRef(function(_ref, ref) {
|
|
|
50443
50404
|
}));
|
|
50444
50405
|
});
|
|
50445
50406
|
UploadCloud.propTypes = {
|
|
50446
|
-
color:
|
|
50447
|
-
size:
|
|
50407
|
+
color: PropTypes.string,
|
|
50408
|
+
size: PropTypes.oneOfType([PropTypes.string, PropTypes.number])
|
|
50448
50409
|
};
|
|
50449
50410
|
UploadCloud.displayName = "UploadCloud";
|
|
50450
50411
|
const UploadCloud$1 = UploadCloud;
|
|
@@ -50520,8 +50481,8 @@ var X = React.forwardRef(function(_ref, ref) {
|
|
|
50520
50481
|
}));
|
|
50521
50482
|
});
|
|
50522
50483
|
X.propTypes = {
|
|
50523
|
-
color:
|
|
50524
|
-
size:
|
|
50484
|
+
color: PropTypes.string,
|
|
50485
|
+
size: PropTypes.oneOfType([PropTypes.string, PropTypes.number])
|
|
50525
50486
|
};
|
|
50526
50487
|
X.displayName = "X";
|
|
50527
50488
|
const X$1 = X;
|
package/dist/valbuild-ui.esm.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import React, { useEffect, useState, useRef, useCallback, forwardRef } from "react";
|
|
3
|
+
function getDefaultExportFromCjs(x) {
|
|
4
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
5
|
+
}
|
|
3
6
|
var Lexical_dev = {};
|
|
4
7
|
var hasRequiredLexical_dev;
|
|
5
8
|
function requireLexical_dev() {
|
|
@@ -16222,6 +16225,7 @@ function requireLexicalErrorBoundary_prod() {
|
|
|
16222
16225
|
}
|
|
16223
16226
|
const LexicalErrorBoundary = process.env.NODE_ENV === "development" ? requireLexicalErrorBoundary_dev() : requireLexicalErrorBoundary_prod();
|
|
16224
16227
|
var LexicalErrorBoundary_1 = LexicalErrorBoundary;
|
|
16228
|
+
const LexicalErrorBoundary$1 = /* @__PURE__ */ getDefaultExportFromCjs(LexicalErrorBoundary_1);
|
|
16225
16229
|
var LexicalHistoryPlugin_dev = {};
|
|
16226
16230
|
var LexicalHistory_dev = {};
|
|
16227
16231
|
var hasRequiredLexicalHistory_dev;
|
|
@@ -17162,25 +17166,9 @@ function requireLexicalText() {
|
|
|
17162
17166
|
LexicalText_1 = LexicalText;
|
|
17163
17167
|
return LexicalText_1;
|
|
17164
17168
|
}
|
|
17165
|
-
var
|
|
17166
|
-
var reactDom = {
|
|
17167
|
-
get exports() {
|
|
17168
|
-
return reactDomExports;
|
|
17169
|
-
},
|
|
17170
|
-
set exports(v) {
|
|
17171
|
-
reactDomExports = v;
|
|
17172
|
-
}
|
|
17173
|
-
};
|
|
17169
|
+
var reactDom = { exports: {} };
|
|
17174
17170
|
var reactDom_production_min = {};
|
|
17175
|
-
var
|
|
17176
|
-
var scheduler = {
|
|
17177
|
-
get exports() {
|
|
17178
|
-
return schedulerExports;
|
|
17179
|
-
},
|
|
17180
|
-
set exports(v) {
|
|
17181
|
-
schedulerExports = v;
|
|
17182
|
-
}
|
|
17183
|
-
};
|
|
17171
|
+
var scheduler = { exports: {} };
|
|
17184
17172
|
var scheduler_production_min = {};
|
|
17185
17173
|
/**
|
|
17186
17174
|
* @license React
|
|
@@ -17901,16 +17889,14 @@ function requireScheduler_development() {
|
|
|
17901
17889
|
var hasRequiredScheduler;
|
|
17902
17890
|
function requireScheduler() {
|
|
17903
17891
|
if (hasRequiredScheduler)
|
|
17904
|
-
return
|
|
17892
|
+
return scheduler.exports;
|
|
17905
17893
|
hasRequiredScheduler = 1;
|
|
17906
|
-
(
|
|
17907
|
-
|
|
17908
|
-
|
|
17909
|
-
|
|
17910
|
-
|
|
17911
|
-
|
|
17912
|
-
})(scheduler);
|
|
17913
|
-
return schedulerExports;
|
|
17894
|
+
if (process.env.NODE_ENV === "production") {
|
|
17895
|
+
scheduler.exports = requireScheduler_production_min();
|
|
17896
|
+
} else {
|
|
17897
|
+
scheduler.exports = requireScheduler_development();
|
|
17898
|
+
}
|
|
17899
|
+
return scheduler.exports;
|
|
17914
17900
|
}
|
|
17915
17901
|
/**
|
|
17916
17902
|
* @license React
|
|
@@ -45958,30 +45944,28 @@ function requireReactDom_development() {
|
|
|
45958
45944
|
var hasRequiredReactDom;
|
|
45959
45945
|
function requireReactDom() {
|
|
45960
45946
|
if (hasRequiredReactDom)
|
|
45961
|
-
return
|
|
45947
|
+
return reactDom.exports;
|
|
45962
45948
|
hasRequiredReactDom = 1;
|
|
45963
|
-
|
|
45964
|
-
|
|
45965
|
-
|
|
45966
|
-
return;
|
|
45967
|
-
}
|
|
45968
|
-
if (process.env.NODE_ENV !== "production") {
|
|
45969
|
-
throw new Error("^_^");
|
|
45970
|
-
}
|
|
45971
|
-
try {
|
|
45972
|
-
__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);
|
|
45973
|
-
} catch (err) {
|
|
45974
|
-
console.error(err);
|
|
45975
|
-
}
|
|
45949
|
+
function checkDCE() {
|
|
45950
|
+
if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === "undefined" || typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== "function") {
|
|
45951
|
+
return;
|
|
45976
45952
|
}
|
|
45977
|
-
if (process.env.NODE_ENV
|
|
45978
|
-
|
|
45979
|
-
|
|
45980
|
-
|
|
45981
|
-
|
|
45953
|
+
if (process.env.NODE_ENV !== "production") {
|
|
45954
|
+
throw new Error("^_^");
|
|
45955
|
+
}
|
|
45956
|
+
try {
|
|
45957
|
+
__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);
|
|
45958
|
+
} catch (err) {
|
|
45959
|
+
console.error(err);
|
|
45982
45960
|
}
|
|
45983
|
-
}
|
|
45984
|
-
|
|
45961
|
+
}
|
|
45962
|
+
if (process.env.NODE_ENV === "production") {
|
|
45963
|
+
checkDCE();
|
|
45964
|
+
reactDom.exports = requireReactDom_production_min();
|
|
45965
|
+
} else {
|
|
45966
|
+
reactDom.exports = requireReactDom_development();
|
|
45967
|
+
}
|
|
45968
|
+
return reactDom.exports;
|
|
45985
45969
|
}
|
|
45986
45970
|
var LexicalDragon_dev = {};
|
|
45987
45971
|
var hasRequiredLexicalDragon_dev;
|
|
@@ -48595,15 +48579,7 @@ const Underline = ({ className }) => {
|
|
|
48595
48579
|
);
|
|
48596
48580
|
};
|
|
48597
48581
|
const Underline$1 = Underline;
|
|
48598
|
-
var
|
|
48599
|
-
var classnames = {
|
|
48600
|
-
get exports() {
|
|
48601
|
-
return classnamesExports;
|
|
48602
|
-
},
|
|
48603
|
-
set exports(v) {
|
|
48604
|
-
classnamesExports = v;
|
|
48605
|
-
}
|
|
48606
|
-
};
|
|
48582
|
+
var classnames = { exports: {} };
|
|
48607
48583
|
/*!
|
|
48608
48584
|
Copyright (c) 2018 Jed Watson.
|
|
48609
48585
|
Licensed under the MIT License (MIT), see
|
|
@@ -48650,7 +48626,8 @@ var classnames = {
|
|
|
48650
48626
|
}
|
|
48651
48627
|
})();
|
|
48652
48628
|
})(classnames);
|
|
48653
|
-
|
|
48629
|
+
var classnamesExports = classnames.exports;
|
|
48630
|
+
const classNames = /* @__PURE__ */ getDefaultExportFromCjs(classnamesExports);
|
|
48654
48631
|
const Button = ({
|
|
48655
48632
|
variant = "primary",
|
|
48656
48633
|
onClick,
|
|
@@ -49191,25 +49168,25 @@ function toLexicalNode(node) {
|
|
|
49191
49168
|
}
|
|
49192
49169
|
function toLexicalHeadingNode(heading) {
|
|
49193
49170
|
const node = LexicalRichText_1.$createHeadingNode(heading.tag);
|
|
49194
|
-
node.setFormat(heading.format);
|
|
49195
|
-
node.setIndent(heading.indent);
|
|
49196
|
-
node.setDirection(heading.direction);
|
|
49171
|
+
node.setFormat(heading.format || "");
|
|
49172
|
+
node.setIndent(heading.indent || 0);
|
|
49173
|
+
node.setDirection(heading.direction || "ltr");
|
|
49197
49174
|
node.append(...heading.children.map((child) => toLexicalNode(child)));
|
|
49198
49175
|
return node;
|
|
49199
49176
|
}
|
|
49200
49177
|
function toLexicalParagraphNode(paragraph) {
|
|
49201
49178
|
const node = Lexical_1.$createParagraphNode();
|
|
49202
|
-
node.setFormat(paragraph.format);
|
|
49203
|
-
node.setIndent(paragraph.indent);
|
|
49204
|
-
node.setDirection(paragraph.direction);
|
|
49179
|
+
node.setFormat(paragraph.format || "");
|
|
49180
|
+
node.setIndent(paragraph.indent || 0);
|
|
49181
|
+
node.setDirection(paragraph.direction || "ltr");
|
|
49205
49182
|
node.append(...paragraph.children.map((child) => toLexicalNode(child)));
|
|
49206
49183
|
return node;
|
|
49207
49184
|
}
|
|
49208
49185
|
function toLexicalListItemNode(listItem) {
|
|
49209
49186
|
const node = LexicalList_1.$createListItemNode();
|
|
49210
|
-
node.setFormat(listItem.format);
|
|
49211
|
-
node.setIndent(listItem.indent);
|
|
49212
|
-
node.setDirection(listItem.direction);
|
|
49187
|
+
node.setFormat(listItem.format || "");
|
|
49188
|
+
node.setIndent(listItem.indent || 0);
|
|
49189
|
+
node.setDirection(listItem.direction || "ltr");
|
|
49213
49190
|
node.setValue(listItem.value);
|
|
49214
49191
|
node.setChecked(listItem.checked);
|
|
49215
49192
|
node.append(...listItem.children.map((child) => toLexicalNode(child)));
|
|
@@ -49217,9 +49194,9 @@ function toLexicalListItemNode(listItem) {
|
|
|
49217
49194
|
}
|
|
49218
49195
|
function toLexicalListNode(list) {
|
|
49219
49196
|
const node = LexicalList_1.$createListNode(list.listType, list.start);
|
|
49220
|
-
node.setFormat(list.format);
|
|
49221
|
-
node.setIndent(list.indent);
|
|
49222
|
-
node.setDirection(list.direction);
|
|
49197
|
+
node.setFormat(list.format || "");
|
|
49198
|
+
node.setIndent(list.indent || 0);
|
|
49199
|
+
node.setDirection(list.direction || "ltr");
|
|
49223
49200
|
node.append(...list.children.map((child) => toLexicalNode(child)));
|
|
49224
49201
|
return node;
|
|
49225
49202
|
}
|
|
@@ -49228,8 +49205,8 @@ function toLexicalTextNode(text) {
|
|
|
49228
49205
|
node.setFormat(text.format);
|
|
49229
49206
|
text.indent && node.setIndent(text.indent);
|
|
49230
49207
|
text.direction && node.setDirection(text.direction);
|
|
49231
|
-
node.setStyle(text.style);
|
|
49232
|
-
node.setDetail(text.detail);
|
|
49208
|
+
node.setStyle(text.style || "");
|
|
49209
|
+
node.setDetail(text.detail || 0);
|
|
49233
49210
|
return node;
|
|
49234
49211
|
}
|
|
49235
49212
|
const RichTextEditor = ({
|
|
@@ -49280,7 +49257,7 @@ const RichTextEditor = ({
|
|
|
49280
49257
|
{
|
|
49281
49258
|
contentEditable: /* @__PURE__ */ jsx(LexicalContentEditable, { className: "relative bg-fill flex flex-col h-full w-full min-h-[200px] text-primary outline-none" }),
|
|
49282
49259
|
placeholder: /* @__PURE__ */ jsx("div", { className: "absolute top-[calc(58px+1rem)] left-4 text-base/25 text-primary", children: "Enter some text..." }),
|
|
49283
|
-
ErrorBoundary:
|
|
49260
|
+
ErrorBoundary: LexicalErrorBoundary$1
|
|
49284
49261
|
}
|
|
49285
49262
|
),
|
|
49286
49263
|
/* @__PURE__ */ jsx(LexicalListPlugin_1.ListPlugin, {}),
|
|
@@ -49317,24 +49294,8 @@ function FormContainer({
|
|
|
49317
49294
|
}
|
|
49318
49295
|
);
|
|
49319
49296
|
}
|
|
49320
|
-
var
|
|
49321
|
-
var
|
|
49322
|
-
get exports() {
|
|
49323
|
-
return propTypesExports;
|
|
49324
|
-
},
|
|
49325
|
-
set exports(v) {
|
|
49326
|
-
propTypesExports = v;
|
|
49327
|
-
}
|
|
49328
|
-
};
|
|
49329
|
-
var reactIsExports = {};
|
|
49330
|
-
var reactIs = {
|
|
49331
|
-
get exports() {
|
|
49332
|
-
return reactIsExports;
|
|
49333
|
-
},
|
|
49334
|
-
set exports(v) {
|
|
49335
|
-
reactIsExports = v;
|
|
49336
|
-
}
|
|
49337
|
-
};
|
|
49297
|
+
var propTypes = { exports: {} };
|
|
49298
|
+
var reactIs = { exports: {} };
|
|
49338
49299
|
var reactIs_production_min = {};
|
|
49339
49300
|
/** @license React v16.13.1
|
|
49340
49301
|
* react-is.production.min.js
|
|
@@ -49605,16 +49566,14 @@ function requireReactIs_development() {
|
|
|
49605
49566
|
var hasRequiredReactIs;
|
|
49606
49567
|
function requireReactIs() {
|
|
49607
49568
|
if (hasRequiredReactIs)
|
|
49608
|
-
return
|
|
49569
|
+
return reactIs.exports;
|
|
49609
49570
|
hasRequiredReactIs = 1;
|
|
49610
|
-
(
|
|
49611
|
-
|
|
49612
|
-
|
|
49613
|
-
|
|
49614
|
-
|
|
49615
|
-
|
|
49616
|
-
})(reactIs);
|
|
49617
|
-
return reactIsExports;
|
|
49571
|
+
if (process.env.NODE_ENV === "production") {
|
|
49572
|
+
reactIs.exports = requireReactIs_production_min();
|
|
49573
|
+
} else {
|
|
49574
|
+
reactIs.exports = requireReactIs_development();
|
|
49575
|
+
}
|
|
49576
|
+
return reactIs.exports;
|
|
49618
49577
|
}
|
|
49619
49578
|
/*
|
|
49620
49579
|
object-assign
|
|
@@ -50281,6 +50240,8 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
50281
50240
|
} else {
|
|
50282
50241
|
propTypes.exports = requireFactoryWithThrowingShims()();
|
|
50283
50242
|
}
|
|
50243
|
+
var propTypesExports = propTypes.exports;
|
|
50244
|
+
const PropTypes = /* @__PURE__ */ getDefaultExportFromCjs(propTypesExports);
|
|
50284
50245
|
function _extends$2() {
|
|
50285
50246
|
_extends$2 = Object.assign || function(target) {
|
|
50286
50247
|
for (var i = 1; i < arguments.length; i++) {
|
|
@@ -50363,8 +50324,8 @@ var AlignJustify = forwardRef(function(_ref, ref) {
|
|
|
50363
50324
|
}));
|
|
50364
50325
|
});
|
|
50365
50326
|
AlignJustify.propTypes = {
|
|
50366
|
-
color:
|
|
50367
|
-
size:
|
|
50327
|
+
color: PropTypes.string,
|
|
50328
|
+
size: PropTypes.oneOfType([PropTypes.string, PropTypes.number])
|
|
50368
50329
|
};
|
|
50369
50330
|
AlignJustify.displayName = "AlignJustify";
|
|
50370
50331
|
const AlignJustify$1 = AlignJustify;
|
|
@@ -50441,8 +50402,8 @@ var UploadCloud = forwardRef(function(_ref, ref) {
|
|
|
50441
50402
|
}));
|
|
50442
50403
|
});
|
|
50443
50404
|
UploadCloud.propTypes = {
|
|
50444
|
-
color:
|
|
50445
|
-
size:
|
|
50405
|
+
color: PropTypes.string,
|
|
50406
|
+
size: PropTypes.oneOfType([PropTypes.string, PropTypes.number])
|
|
50446
50407
|
};
|
|
50447
50408
|
UploadCloud.displayName = "UploadCloud";
|
|
50448
50409
|
const UploadCloud$1 = UploadCloud;
|
|
@@ -50518,8 +50479,8 @@ var X = forwardRef(function(_ref, ref) {
|
|
|
50518
50479
|
}));
|
|
50519
50480
|
});
|
|
50520
50481
|
X.propTypes = {
|
|
50521
|
-
color:
|
|
50522
|
-
size:
|
|
50482
|
+
color: PropTypes.string,
|
|
50483
|
+
size: PropTypes.oneOfType([PropTypes.string, PropTypes.number])
|
|
50523
50484
|
};
|
|
50524
50485
|
X.displayName = "X";
|
|
50525
50486
|
const X$1 = X;
|
package/package.json
CHANGED
|
@@ -65,27 +65,27 @@ function toLexicalNode(node: ValNode): LexicalNode {
|
|
|
65
65
|
|
|
66
66
|
function toLexicalHeadingNode(heading: ValHeadingNode): LexicalNode {
|
|
67
67
|
const node = $createHeadingNode(heading.tag);
|
|
68
|
-
node.setFormat(heading.format);
|
|
69
|
-
node.setIndent(heading.indent);
|
|
70
|
-
node.setDirection(heading.direction);
|
|
68
|
+
node.setFormat(heading.format || "");
|
|
69
|
+
node.setIndent(heading.indent || 0);
|
|
70
|
+
node.setDirection(heading.direction || "ltr");
|
|
71
71
|
node.append(...heading.children.map((child) => toLexicalNode(child)));
|
|
72
72
|
return node;
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
function toLexicalParagraphNode(paragraph: ValParagraphNode): LexicalNode {
|
|
76
76
|
const node = $createParagraphNode();
|
|
77
|
-
node.setFormat(paragraph.format);
|
|
78
|
-
node.setIndent(paragraph.indent);
|
|
79
|
-
node.setDirection(paragraph.direction);
|
|
77
|
+
node.setFormat(paragraph.format || "");
|
|
78
|
+
node.setIndent(paragraph.indent || 0);
|
|
79
|
+
node.setDirection(paragraph.direction || "ltr");
|
|
80
80
|
node.append(...paragraph.children.map((child) => toLexicalNode(child)));
|
|
81
81
|
return node;
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
function toLexicalListItemNode(listItem: ValListItemNode): LexicalNode {
|
|
85
85
|
const node = $createListItemNode();
|
|
86
|
-
node.setFormat(listItem.format);
|
|
87
|
-
node.setIndent(listItem.indent);
|
|
88
|
-
node.setDirection(listItem.direction);
|
|
86
|
+
node.setFormat(listItem.format || "");
|
|
87
|
+
node.setIndent(listItem.indent || 0);
|
|
88
|
+
node.setDirection(listItem.direction || "ltr");
|
|
89
89
|
node.setValue(listItem.value);
|
|
90
90
|
node.setChecked(listItem.checked);
|
|
91
91
|
node.append(...listItem.children.map((child) => toLexicalNode(child)));
|
|
@@ -94,9 +94,9 @@ function toLexicalListItemNode(listItem: ValListItemNode): LexicalNode {
|
|
|
94
94
|
|
|
95
95
|
function toLexicalListNode(list: ValListNode): LexicalNode {
|
|
96
96
|
const node = $createListNode(list.listType, list.start);
|
|
97
|
-
node.setFormat(list.format);
|
|
98
|
-
node.setIndent(list.indent);
|
|
99
|
-
node.setDirection(list.direction);
|
|
97
|
+
node.setFormat(list.format || "");
|
|
98
|
+
node.setIndent(list.indent || 0);
|
|
99
|
+
node.setDirection(list.direction || "ltr");
|
|
100
100
|
node.append(...list.children.map((child) => toLexicalNode(child)));
|
|
101
101
|
return node;
|
|
102
102
|
}
|
|
@@ -106,8 +106,8 @@ function toLexicalTextNode(text: ValTextNode): LexicalNode {
|
|
|
106
106
|
node.setFormat(text.format as any); // TODO: why is text.format numbers when we are trying it out?
|
|
107
107
|
text.indent && node.setIndent(text.indent);
|
|
108
108
|
text.direction && node.setDirection(text.direction);
|
|
109
|
-
node.setStyle(text.style);
|
|
110
|
-
node.setDetail(text.detail);
|
|
109
|
+
node.setStyle(text.style || "");
|
|
110
|
+
node.setDetail(text.detail || 0);
|
|
111
111
|
return node;
|
|
112
112
|
}
|
|
113
113
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { RichText as RichTextType, SourcePath } from "@valbuild/core";
|
|
2
3
|
import { RichTextEditor } from "../exports";
|
|
3
4
|
import { FormContainer } from "./forms/FormContainer";
|
|
4
5
|
import { ImageForm } from "./forms/ImageForm";
|
|
@@ -72,34 +73,37 @@ export const RichText: Story = {
|
|
|
72
73
|
}}
|
|
73
74
|
>
|
|
74
75
|
<RichTextEditor
|
|
75
|
-
richtext={
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
76
|
+
richtext={
|
|
77
|
+
{
|
|
78
|
+
valPath: "/foo" as SourcePath,
|
|
79
|
+
children: [
|
|
80
|
+
{
|
|
81
|
+
children: [
|
|
82
|
+
{
|
|
83
|
+
detail: 0,
|
|
84
|
+
format: 0,
|
|
85
|
+
mode: "normal",
|
|
86
|
+
style: "",
|
|
87
|
+
text: "Heading 1",
|
|
88
|
+
type: "text",
|
|
89
|
+
version: 1,
|
|
90
|
+
},
|
|
91
|
+
],
|
|
92
|
+
direction: "ltr",
|
|
93
|
+
format: "",
|
|
94
|
+
indent: 0,
|
|
95
|
+
type: "heading",
|
|
96
|
+
version: 1,
|
|
97
|
+
tag: "h1",
|
|
98
|
+
},
|
|
99
|
+
],
|
|
100
|
+
direction: "ltr",
|
|
101
|
+
format: "",
|
|
102
|
+
indent: 0,
|
|
103
|
+
type: "root",
|
|
104
|
+
version: 1,
|
|
105
|
+
} as RichTextType
|
|
106
|
+
}
|
|
103
107
|
/>
|
|
104
108
|
</FormContainer>
|
|
105
109
|
),
|
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
RichTextEditorProps,
|
|
4
4
|
} from "../components/RichTextEditor/RichTextEditor";
|
|
5
5
|
import { Meta, Story } from "@storybook/react";
|
|
6
|
+
import { RichText, SourcePath } from "@valbuild/core";
|
|
6
7
|
|
|
7
8
|
export default {
|
|
8
9
|
title: "RichTextEditor",
|
|
@@ -17,6 +18,7 @@ export const DropdownStory = Template.bind({});
|
|
|
17
18
|
|
|
18
19
|
DropdownStory.args = {
|
|
19
20
|
richtext: {
|
|
21
|
+
valPath: "/test" as SourcePath,
|
|
20
22
|
children: [
|
|
21
23
|
{
|
|
22
24
|
children: [
|
|
@@ -310,5 +312,5 @@ DropdownStory.args = {
|
|
|
310
312
|
indent: 0,
|
|
311
313
|
type: "root",
|
|
312
314
|
version: 1,
|
|
313
|
-
},
|
|
315
|
+
} as RichText,
|
|
314
316
|
};
|