onchain-lexical-instance 0.0.10 → 0.0.11

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.
@@ -20,6 +20,7 @@ var list = require('@lexical/list');
20
20
  var selection = require('@lexical/selection');
21
21
  var table = require('@lexical/table');
22
22
  var useLexicalNodeSelection = require('@lexical/react/useLexicalNodeSelection');
23
+ var hooks = require('onchain-utility/hooks');
23
24
  var richText = require('@lexical/rich-text');
24
25
  var useLexicalEditable = require('@lexical/react/useLexicalEditable');
25
26
  var EquationEditor = require('onchain-lexical-ui/EquationEditor');
@@ -89,9 +90,9 @@ function styleInject(css, ref) {
89
90
  }
90
91
  }
91
92
 
92
- var css_248z$7 = ".base-module_instance__4TS7Q>p:first-of-type{word-wrap:normal;border-bottom:1px solid #d8d8d8;height:38px;line-height:38px;margin-bottom:4px}";
93
- var Styles$7 = {"instance":"base-module_instance__4TS7Q"};
94
- styleInject(css_248z$7);
93
+ var css_248z$8 = ".base-module_instance__4TS7Q>p:first-of-type{word-wrap:normal;border-bottom:1px solid #d8d8d8;height:38px;line-height:38px;margin-bottom:4px}";
94
+ var Styles$8 = {"instance":"base-module_instance__4TS7Q"};
95
+ styleInject(css_248z$8);
95
96
 
96
97
  /**
97
98
  * Copyright (c) Meta Platforms, Inc. and affiliates.
@@ -154,6 +155,9 @@ const COMPONENT_UPDATE = lexical.createCommand('COMPONENT_UPDATE');
154
155
  /** 标题更新事件 */
155
156
  const INSTANCE_TITLE_UPDATE = lexical.createCommand('INSTANCE_TITLE_UPDATE');
156
157
 
158
+ /** 参数更新 */
159
+ const PARAMETERS_UPDATE = lexical.createCommand('PARAMETERS_UPDATE');
160
+
157
161
  /** 获取禁止编辑dom节点选择器 */
158
162
  const DisableSelector = `[contenteditable='false']:not([ignorecontenteditable])`;
159
163
 
@@ -473,12 +477,16 @@ function $isPlaceholderDecoratorNode(node) {
473
477
  return node instanceof PlaceholderDecoratorNode;
474
478
  }
475
479
 
476
- /**
477
- * Copyright (c) Meta Platforms, Inc. and affiliates.
478
- *
479
- * This source code is licensed under the MIT license found in the
480
- * LICENSE file in the root directory of this source tree.
481
- *
480
+ var css_248z$7 = ".styles-module_instance-title__Xh6UG{height:100%;overflow:hidden;padding-right:68px;text-overflow:ellipsis;white-space:nowrap}.styles-module_instance-title__Xh6UG.styles-module_title-hover__9nE-K{overflow:initial;white-space:normal}.styles-module_instance-title__Xh6UG.styles-module_title-hover__9nE-K>span:nth-of-type(2){background-color:#f9f9f9;border:1px solid #d8d8d8;border-top-color:transparent;display:inline-block;left:-5px;line-height:36px;min-height:100%;padding:0 4px;position:relative;z-index:1}.styles-module_instance-title__Xh6UG.styles-module_title-hover__9nE-K>span:nth-of-type(2):after,.styles-module_instance-title__Xh6UG.styles-module_title-hover__9nE-K>span:nth-of-type(2):before{background-color:#f9f9f9;content:\"\";display:inline-block;height:37px;pointer-events:none;position:absolute;top:-1px;width:5px;z-index:2}.styles-module_instance-title__Xh6UG.styles-module_title-hover__9nE-K>span:nth-of-type(2):before{left:-4px}.styles-module_instance-title__Xh6UG.styles-module_title-hover__9nE-K>span:nth-of-type(2):after{right:-4px}";
481
+ var Styles$7 = {"instance-title":"styles-module_instance-title__Xh6UG","title-hover":"styles-module_title-hover__9nE-K"};
482
+ styleInject(css_248z$7);
483
+
484
+ /**
485
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
486
+ *
487
+ * This source code is licensed under the MIT license found in the
488
+ * LICENSE file in the root directory of this source tree.
489
+ *
482
490
  */
483
491
  class InstanceTitleNode extends InstanceHeadingNode {
484
492
  __indent = 3;
@@ -548,7 +556,7 @@ class InstanceTitleNode extends InstanceHeadingNode {
548
556
  }
549
557
  createDOM(config) {
550
558
  const element = super.createDOM(config);
551
- element.classList.add('instance-title');
559
+ element.classList.add(Styles$7['instance-title']);
552
560
  setDisable(this, element);
553
561
  element.onmousemove = function (event) {
554
562
  const span = event.target;
@@ -564,9 +572,9 @@ class InstanceTitleNode extends InstanceHeadingNode {
564
572
  };
565
573
  const display = headingWidth - paddingRight.value - paddingLeft.value;
566
574
  if (display <= titleWidth) {
567
- element.classList.add('title-hover');
575
+ element.classList.add(Styles$7['title-hover']);
568
576
  span.onmouseout = function (event) {
569
- element.classList.remove('title-hover');
577
+ element.classList.remove(Styles$7['title-hover']);
570
578
  };
571
579
  }
572
580
  }
@@ -1009,14 +1017,7 @@ function $updateRichInstanceContent(instance, {
1009
1017
  if ($isInstanceNode(insNode)) {
1010
1018
  const fragment = $createFragmentNode();
1011
1019
  onchainLexicalMarkdown.$textToRichNodes(fragment, content);
1012
- const nodes = fragment.getChildren();
1013
- const count = InstanceNode.DEFAULT_PARAGRAPHS - 1;
1014
- for (let index = 0; index < count; index++) {
1015
- const node = nodes[0];
1016
- if (!node /** || !$isInstanceParagraphNode(node) */) {
1017
- nodes.splice(index, 0, $createInstanceParagraphNode());
1018
- }
1019
- }
1020
+ const nodes = correctedInstanceParagraph(fragment.getChildren(), () => $createInstanceParagraphNode());
1020
1021
  const oldChildren = insNode.getPracticalChildren().filter(node => !$isInstanceNode(node)).slice(1, Infinity);
1021
1022
  const previous = oldChildren.at(0);
1022
1023
  for (let index = nodes.length - 1; index > -1; index--) {
@@ -1086,6 +1087,18 @@ function useContentEditable() {
1086
1087
  };
1087
1088
  }
1088
1089
 
1090
+ /** 修正实例内行条目,避免过少段落导致左边操作栏位子不够 */
1091
+ function correctedInstanceParagraph(nodes, createParagraph) {
1092
+ const count = InstanceNode.DEFAULT_PARAGRAPHS - 1;
1093
+ for (let index = 0; index < count; index++) {
1094
+ const node = nodes[index];
1095
+ if (!node /** || !$isInstanceParagraphNode(node) */) {
1096
+ nodes.splice(index, 0, createParagraph());
1097
+ }
1098
+ }
1099
+ return nodes;
1100
+ }
1101
+
1089
1102
  /**
1090
1103
  * Copyright (c) Meta Platforms, Inc. and affiliates.
1091
1104
  *
@@ -1563,7 +1576,7 @@ class InstanceNode extends lexical.ElementNode {
1563
1576
 
1564
1577
  createDOM(config) {
1565
1578
  const dom = document.createElement('div');
1566
- const classNames = [Styles$7.instance, 'rich-text-instance', getCachedClassNameArray(config.theme, 'instance') ?? []];
1579
+ const classNames = [Styles$8.instance, 'rich-text-instance', getCachedClassNameArray(config.theme, 'instance') ?? []];
1567
1580
  if (classNames !== undefined) {
1568
1581
  const domClassList = dom.classList;
1569
1582
  domClassList.add(...classNames.flat(1));
@@ -1797,8 +1810,8 @@ function isFixedAddress(instance) {
1797
1810
  return !!instance && Object.keys(instance).length === 1 && typeof instance.value === 'object';
1798
1811
  }
1799
1812
 
1800
- var css_248z$5 = ".styles-module_left__CN0nC{align-items:center;display:flex;flex-direction:column;left:0;position:absolute;transform:translate(-26px);user-select:none;width:26px}.styles-module_left__CN0nC .styles-module_link__M-1Wq{margin-bottom:6px}.styles-module_left__CN0nC .styles-module_link__M-1Wq>button>span>div{position:relative}.styles-module_left__CN0nC .styles-module_link__M-1Wq>button>span>div>i{align-items:center;background-color:#0563b0;border-radius:50%;bottom:-2px;color:#fff;display:flex;font-size:10px;font-style:normal;height:12px;justify-content:center;position:absolute;right:-2px;width:12px}.styles-module_left__CN0nC .styles-module_hiddenLinkCount__ThNp5>button>span>div>i,.styles-module_left__CN0nC .styles-module_link__M-1Wq>button>span>div>i:empty{display:none}.styles-module_left__CN0nC>*{align-items:center;display:inline-flex;justify-content:center}.styles-module_left__CN0nC>span:first-of-type{height:38px}.styles-module_right__sxVYl{align-items:center;display:inline-flex;height:38px;justify-content:flex-end;position:absolute;right:0;top:0;user-select:none;z-index:2}.styles-module_right__sxVYl>span{cursor:pointer;margin-left:10px}.styles-module_hasChildren__FqxrJ,.styles-module_hover__IeKlt:hover,.styles-module_selected__dpCTX{color:#0563b0}";
1801
- var Styles$5 = {"left":"styles-module_left__CN0nC","link":"styles-module_link__M-1Wq","hiddenLinkCount":"styles-module_hiddenLinkCount__ThNp5","right":"styles-module_right__sxVYl","selected":"styles-module_selected__dpCTX","hasChildren":"styles-module_hasChildren__FqxrJ","hover":"styles-module_hover__IeKlt"};
1813
+ var css_248z$5 = ".styles-module_left__CN0nC{align-items:center;display:flex;flex-direction:column;left:0;position:absolute;transform:translate(-26px);user-select:none;width:26px}.styles-module_left__CN0nC .styles-module_link__M-1Wq{margin-bottom:6px}.styles-module_left__CN0nC .styles-module_link__M-1Wq>button>span>div{position:relative}.styles-module_left__CN0nC .styles-module_link__M-1Wq>button>span>div>i{align-items:center;background-color:#0563b0;border-radius:50%;bottom:-2px;color:#fff;display:flex;font-size:10px;font-style:normal;height:12px;justify-content:center;position:absolute;right:-2px;width:12px}.styles-module_left__CN0nC .styles-module_hiddenLinkCount__ThNp5>button>span>div>i,.styles-module_left__CN0nC .styles-module_link__M-1Wq>button>span>div>i:empty{display:none}.styles-module_left__CN0nC>*{align-items:center;display:inline-flex;justify-content:center}.styles-module_left__CN0nC>span:first-of-type{height:38px}.styles-module_right__sxVYl{align-items:center;display:inline-flex;height:38px;justify-content:flex-end;position:absolute;right:0;top:0;user-select:none;z-index:2}.styles-module_right__sxVYl>span{cursor:pointer;margin-left:10px}.styles-module_hasChildren__FqxrJ,.styles-module_hover__IeKlt:hover,.styles-module_selected__dpCTX{color:#0563b0}.styles-module_empty__g2IcU{cursor:default!important}";
1814
+ var Styles$5 = {"left":"styles-module_left__CN0nC","link":"styles-module_link__M-1Wq","hiddenLinkCount":"styles-module_hiddenLinkCount__ThNp5","right":"styles-module_right__sxVYl","selected":"styles-module_selected__dpCTX","hasChildren":"styles-module_hasChildren__FqxrJ","hover":"styles-module_hover__IeKlt","empty":"styles-module_empty__g2IcU"};
1802
1815
  styleInject(css_248z$5);
1803
1816
 
1804
1817
  /**
@@ -1905,6 +1918,8 @@ const Bar = props => {
1905
1918
  return true;
1906
1919
  }, lexical.COMMAND_PRIORITY_EDITOR));
1907
1920
  }, []);
1921
+ const trackLinkCount = instance?.trackLinkCount || 0;
1922
+ const isTemporarilyCreated = instance?.isCustom && instance?.dataType === 'add';
1908
1923
  return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
1909
1924
  children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
1910
1925
  "data-bar": "left",
@@ -1918,20 +1933,22 @@ const Bar = props => {
1918
1933
  children: /*#__PURE__*/jsxRuntime.jsx(DropDown, {
1919
1934
  arrow: true,
1920
1935
  showIcon: false,
1921
- disabled: !instance?.trackLinkCount,
1936
+ disabled: !trackLinkCount,
1922
1937
  stopCloseOnClickSelf: true,
1923
- buttonLabel:
1924
- /*#__PURE__*/
1925
- // [TODO] 显示 trackLinkCount
1926
- jsxRuntime.jsxs("div", {
1938
+ buttonLabel: /*#__PURE__*/jsxRuntime.jsxs("div", {
1927
1939
  children: [/*#__PURE__*/jsxRuntime.jsx("i", {
1928
- children: instance?.trackLinkCount || ''
1940
+ children: trackLinkCount || ''
1929
1941
  }), /*#__PURE__*/jsxRuntime.jsx(Icon.StaticIcon, {
1930
- className: `${Styles$5.hover}`,
1942
+ className: `${trackLinkCount ? Styles$5.hover : Styles$5.empty}`,
1931
1943
  type: "icon-front-link1"
1932
1944
  })]
1933
1945
  }),
1934
1946
  onOpen: setOpen,
1947
+ isItClosed: ({
1948
+ listQuantity
1949
+ }) => {
1950
+ return listQuantity === '1';
1951
+ },
1935
1952
  children: Components.TrackLinkList && instance ? /*#__PURE__*/jsxRuntime.jsx(Components.TrackLinkList, {
1936
1953
  number: instance.number
1937
1954
  }) : null
@@ -1962,7 +1979,7 @@ const Bar = props => {
1962
1979
  }), /*#__PURE__*/jsxRuntime.jsxs("div", {
1963
1980
  "data-bar": "right",
1964
1981
  className: Styles$5.right,
1965
- children: [!preview && extra.showRightToolbar !== false ? /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
1982
+ children: [!preview && extra.showRightToolbar !== false && !isTemporarilyCreated ? /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
1966
1983
  children: instance?.checkOut ? /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
1967
1984
  children: [/*#__PURE__*/jsxRuntime.jsx("span", {
1968
1985
  title: onchainUtility.translateI18n('[TODO] 国际化', {
@@ -23781,7 +23798,8 @@ const InstancePlugin = props => {
23781
23798
  const node = $createTitleOnlyInstanceNode(instance);
23782
23799
  const fragment = $createFragmentNode();
23783
23800
  onchainLexicalMarkdown.$textToRichNodes(fragment, contentText);
23784
- node.append(...fragment.getChildren());
23801
+ const nodes = correctedInstanceParagraph(fragment.getChildren(), () => $createInstanceParagraphNode());
23802
+ node.append(...nodes);
23785
23803
  return node;
23786
23804
  } else {
23787
23805
  return $createInstanceNode(instance);
@@ -24049,6 +24067,109 @@ function $isPageBreakNode(node) {
24049
24067
  return node instanceof PageBreakNode;
24050
24068
  }
24051
24069
 
24070
+ /**
24071
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
24072
+ *
24073
+ * This source code is licensed under the MIT license found in the
24074
+ * LICENSE file in the root directory of this source tree.
24075
+ *
24076
+ */
24077
+
24078
+ const ParametersComponent = ({
24079
+ nodeKey
24080
+ }) => {
24081
+ const [editor] = LexicalComposerContext.useLexicalComposerContext();
24082
+ const [parameters, setParameters,, latestParameters] = hooks.useStore({
24083
+ number: '',
24084
+ value: ''
24085
+ });
24086
+ React.useEffect(() => {
24087
+ editor.read(() => {
24088
+ const node = lexical.$getNodeByKey(nodeKey);
24089
+ if ($isParametersNode(node)) {
24090
+ setParameters(node.__parameters);
24091
+ }
24092
+ });
24093
+ return utils$1.mergeRegister(editor.registerCommand(PARAMETERS_UPDATE, ({
24094
+ number,
24095
+ value
24096
+ }) => {
24097
+ const latest = latestParameters.current;
24098
+ if (number !== latest.number) {
24099
+ return false;
24100
+ }
24101
+ const node = lexical.$getNodeByKey(nodeKey);
24102
+ if ($isParametersNode(node)) {
24103
+ setParameters({
24104
+ value
24105
+ });
24106
+ Object.assign(node.__parameters, {
24107
+ value
24108
+ });
24109
+ }
24110
+ return true;
24111
+ }, lexical.COMMAND_PRIORITY_EDITOR));
24112
+ }, []);
24113
+ return /*#__PURE__*/jsxRuntime.jsx("span", {
24114
+ children: parameters.value
24115
+ });
24116
+ };
24117
+
24118
+ /**
24119
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
24120
+ *
24121
+ * This source code is licensed under the MIT license found in the
24122
+ * LICENSE file in the root directory of this source tree.
24123
+ *
24124
+ */
24125
+
24126
+ class ParametersNode extends lexical.TextDecoratorNode {
24127
+ static getType() {
24128
+ return 'Parameters';
24129
+ }
24130
+ static clone(node) {
24131
+ return new ParametersNode(node.__parameters, node.__key);
24132
+ }
24133
+ static importJSON(serializedNode) {
24134
+ return $createParametersNode(serializedNode.parameters).updateFromJSON(serializedNode);
24135
+ }
24136
+ constructor(number, key) {
24137
+ super(key);
24138
+ this.__parameters = number;
24139
+ }
24140
+ exportJSON() {
24141
+ return {
24142
+ ...super.exportJSON(),
24143
+ parameters: this.__parameters
24144
+ };
24145
+ }
24146
+ createDOM(config, editor) {
24147
+ const span = super.createDOM(config, editor);
24148
+ span.setAttribute('ignorecontenteditable', '');
24149
+ return span;
24150
+ }
24151
+ updateDOM(prevNode, dom, config) {
24152
+ return super.updateDOM(prevNode, dom, config);
24153
+ }
24154
+ collapseAtStart() {
24155
+ return true;
24156
+ }
24157
+ isInline() {
24158
+ return true;
24159
+ }
24160
+ decorate(editor, config) {
24161
+ return /*#__PURE__*/jsxRuntime.jsx(ParametersComponent, {
24162
+ nodeKey: this.getKey()
24163
+ });
24164
+ }
24165
+ }
24166
+ function $createParametersNode(parameters) {
24167
+ return lexical.$applyNodeReplacement(new ParametersNode(parameters));
24168
+ }
24169
+ function $isParametersNode(node) {
24170
+ return node instanceof ParametersNode;
24171
+ }
24172
+
24052
24173
  /**
24053
24174
  * Copyright (c) Meta Platforms, Inc. and affiliates.
24054
24175
  *
@@ -25095,6 +25216,7 @@ exports.$createInternalLinkNode = $createInternalLinkNode;
25095
25216
  exports.$createKeywordNode = $createKeywordNode;
25096
25217
  exports.$createNumberDecoratorNode = $createNumberDecoratorNode;
25097
25218
  exports.$createPageBreakNode = $createPageBreakNode;
25219
+ exports.$createParametersNode = $createParametersNode;
25098
25220
  exports.$createPlaceholderDecoratorNode = $createPlaceholderDecoratorNode;
25099
25221
  exports.$createTitleOnlyInstanceNode = $createTitleOnlyInstanceNode;
25100
25222
  exports.$findNearestListItemNode = $findNearestListItemNode;
@@ -25137,6 +25259,7 @@ exports.$isKeywordNode = $isKeywordNode;
25137
25259
  exports.$isLastItemInList = $isLastItemInList;
25138
25260
  exports.$isNumberDecoratorNode = $isNumberDecoratorNode;
25139
25261
  exports.$isPageBreakNode = $isPageBreakNode;
25262
+ exports.$isParametersNode = $isParametersNode;
25140
25263
  exports.$isPlaceholderDecoratorNode = $isPlaceholderDecoratorNode;
25141
25264
  exports.$isRemoved = $isRemoved;
25142
25265
  exports.$isSelectedTitleNode = $isSelectedTitleNode;
@@ -25183,9 +25306,12 @@ exports.InternalLinkNode = InternalLinkNode;
25183
25306
  exports.KeywordNode = KeywordNode;
25184
25307
  exports.NumberDecoratorNode = NumberDecoratorNode;
25185
25308
  exports.OPEN_CREATE_WINDOW = OPEN_CREATE_WINDOW;
25309
+ exports.PARAMETERS_UPDATE = PARAMETERS_UPDATE;
25186
25310
  exports.PageBreakNode = PageBreakNode;
25311
+ exports.ParametersNode = ParametersNode;
25187
25312
  exports.PlaceholderDecoratorNode = PlaceholderDecoratorNode;
25188
25313
  exports.clearCache = clearCache;
25314
+ exports.correctedInstanceParagraph = correctedInstanceParagraph;
25189
25315
  exports.fixedAddress = fixedAddress;
25190
25316
  exports.getCachedClassNameArray = getCachedClassNameArray;
25191
25317
  exports.getCodeLanguages = getCodeLanguages;
@@ -19,6 +19,7 @@ import { $isListNode, $isListItemNode, $createListItemNode, ListItemNode, ListNo
19
19
  import { $setBlocksType } from '@lexical/selection';
20
20
  import { TableNode, INSERT_TABLE_COMMAND, $findTableNode, PIXEL_VALUE_REG_EXP, $isTableRowNode, $createTableRowNode, $createTableCellNode, TableCellHeaderStates } from '@lexical/table';
21
21
  import { useLexicalNodeSelection } from '@lexical/react/useLexicalNodeSelection';
22
+ import { useStore } from 'onchain-utility/hooks';
22
23
  import { HeadingNode, $isHeadingNode, $isQuoteNode, QuoteNode } from '@lexical/rich-text';
23
24
  import { useLexicalEditable } from '@lexical/react/useLexicalEditable';
24
25
  import EquationEditor from 'onchain-lexical-ui/EquationEditor';
@@ -75,9 +76,9 @@ function styleInject(css, ref) {
75
76
  }
76
77
  }
77
78
 
78
- var css_248z$7 = ".base-module_instance__4TS7Q>p:first-of-type{word-wrap:normal;border-bottom:1px solid #d8d8d8;height:38px;line-height:38px;margin-bottom:4px}";
79
- var Styles$7 = {"instance":"base-module_instance__4TS7Q"};
80
- styleInject(css_248z$7);
79
+ var css_248z$8 = ".base-module_instance__4TS7Q>p:first-of-type{word-wrap:normal;border-bottom:1px solid #d8d8d8;height:38px;line-height:38px;margin-bottom:4px}";
80
+ var Styles$8 = {"instance":"base-module_instance__4TS7Q"};
81
+ styleInject(css_248z$8);
81
82
 
82
83
  /**
83
84
  * Copyright (c) Meta Platforms, Inc. and affiliates.
@@ -140,6 +141,9 @@ const COMPONENT_UPDATE = createCommand('COMPONENT_UPDATE');
140
141
  /** 标题更新事件 */
141
142
  const INSTANCE_TITLE_UPDATE = createCommand('INSTANCE_TITLE_UPDATE');
142
143
 
144
+ /** 参数更新 */
145
+ const PARAMETERS_UPDATE = createCommand('PARAMETERS_UPDATE');
146
+
143
147
  /** 获取禁止编辑dom节点选择器 */
144
148
  const DisableSelector = `[contenteditable='false']:not([ignorecontenteditable])`;
145
149
 
@@ -459,12 +463,16 @@ function $isPlaceholderDecoratorNode(node) {
459
463
  return node instanceof PlaceholderDecoratorNode;
460
464
  }
461
465
 
462
- /**
463
- * Copyright (c) Meta Platforms, Inc. and affiliates.
464
- *
465
- * This source code is licensed under the MIT license found in the
466
- * LICENSE file in the root directory of this source tree.
467
- *
466
+ var css_248z$7 = ".styles-module_instance-title__Xh6UG{height:100%;overflow:hidden;padding-right:68px;text-overflow:ellipsis;white-space:nowrap}.styles-module_instance-title__Xh6UG.styles-module_title-hover__9nE-K{overflow:initial;white-space:normal}.styles-module_instance-title__Xh6UG.styles-module_title-hover__9nE-K>span:nth-of-type(2){background-color:#f9f9f9;border:1px solid #d8d8d8;border-top-color:transparent;display:inline-block;left:-5px;line-height:36px;min-height:100%;padding:0 4px;position:relative;z-index:1}.styles-module_instance-title__Xh6UG.styles-module_title-hover__9nE-K>span:nth-of-type(2):after,.styles-module_instance-title__Xh6UG.styles-module_title-hover__9nE-K>span:nth-of-type(2):before{background-color:#f9f9f9;content:\"\";display:inline-block;height:37px;pointer-events:none;position:absolute;top:-1px;width:5px;z-index:2}.styles-module_instance-title__Xh6UG.styles-module_title-hover__9nE-K>span:nth-of-type(2):before{left:-4px}.styles-module_instance-title__Xh6UG.styles-module_title-hover__9nE-K>span:nth-of-type(2):after{right:-4px}";
467
+ var Styles$7 = {"instance-title":"styles-module_instance-title__Xh6UG","title-hover":"styles-module_title-hover__9nE-K"};
468
+ styleInject(css_248z$7);
469
+
470
+ /**
471
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
472
+ *
473
+ * This source code is licensed under the MIT license found in the
474
+ * LICENSE file in the root directory of this source tree.
475
+ *
468
476
  */
469
477
  class InstanceTitleNode extends InstanceHeadingNode {
470
478
  __indent = 3;
@@ -534,7 +542,7 @@ class InstanceTitleNode extends InstanceHeadingNode {
534
542
  }
535
543
  createDOM(config) {
536
544
  const element = super.createDOM(config);
537
- element.classList.add('instance-title');
545
+ element.classList.add(Styles$7['instance-title']);
538
546
  setDisable(this, element);
539
547
  element.onmousemove = function (event) {
540
548
  const span = event.target;
@@ -550,9 +558,9 @@ class InstanceTitleNode extends InstanceHeadingNode {
550
558
  };
551
559
  const display = headingWidth - paddingRight.value - paddingLeft.value;
552
560
  if (display <= titleWidth) {
553
- element.classList.add('title-hover');
561
+ element.classList.add(Styles$7['title-hover']);
554
562
  span.onmouseout = function (event) {
555
- element.classList.remove('title-hover');
563
+ element.classList.remove(Styles$7['title-hover']);
556
564
  };
557
565
  }
558
566
  }
@@ -995,14 +1003,7 @@ function $updateRichInstanceContent(instance, {
995
1003
  if ($isInstanceNode(insNode)) {
996
1004
  const fragment = $createFragmentNode();
997
1005
  $textToRichNodes(fragment, content);
998
- const nodes = fragment.getChildren();
999
- const count = InstanceNode.DEFAULT_PARAGRAPHS - 1;
1000
- for (let index = 0; index < count; index++) {
1001
- const node = nodes[0];
1002
- if (!node /** || !$isInstanceParagraphNode(node) */) {
1003
- nodes.splice(index, 0, $createInstanceParagraphNode());
1004
- }
1005
- }
1006
+ const nodes = correctedInstanceParagraph(fragment.getChildren(), () => $createInstanceParagraphNode());
1006
1007
  const oldChildren = insNode.getPracticalChildren().filter(node => !$isInstanceNode(node)).slice(1, Infinity);
1007
1008
  const previous = oldChildren.at(0);
1008
1009
  for (let index = nodes.length - 1; index > -1; index--) {
@@ -1072,6 +1073,18 @@ function useContentEditable() {
1072
1073
  };
1073
1074
  }
1074
1075
 
1076
+ /** 修正实例内行条目,避免过少段落导致左边操作栏位子不够 */
1077
+ function correctedInstanceParagraph(nodes, createParagraph) {
1078
+ const count = InstanceNode.DEFAULT_PARAGRAPHS - 1;
1079
+ for (let index = 0; index < count; index++) {
1080
+ const node = nodes[index];
1081
+ if (!node /** || !$isInstanceParagraphNode(node) */) {
1082
+ nodes.splice(index, 0, createParagraph());
1083
+ }
1084
+ }
1085
+ return nodes;
1086
+ }
1087
+
1075
1088
  /**
1076
1089
  * Copyright (c) Meta Platforms, Inc. and affiliates.
1077
1090
  *
@@ -1549,7 +1562,7 @@ class InstanceNode extends ElementNode {
1549
1562
 
1550
1563
  createDOM(config) {
1551
1564
  const dom = document.createElement('div');
1552
- const classNames = [Styles$7.instance, 'rich-text-instance', getCachedClassNameArray(config.theme, 'instance') ?? []];
1565
+ const classNames = [Styles$8.instance, 'rich-text-instance', getCachedClassNameArray(config.theme, 'instance') ?? []];
1553
1566
  if (classNames !== undefined) {
1554
1567
  const domClassList = dom.classList;
1555
1568
  domClassList.add(...classNames.flat(1));
@@ -1783,8 +1796,8 @@ function isFixedAddress(instance) {
1783
1796
  return !!instance && Object.keys(instance).length === 1 && typeof instance.value === 'object';
1784
1797
  }
1785
1798
 
1786
- var css_248z$5 = ".styles-module_left__CN0nC{align-items:center;display:flex;flex-direction:column;left:0;position:absolute;transform:translate(-26px);user-select:none;width:26px}.styles-module_left__CN0nC .styles-module_link__M-1Wq{margin-bottom:6px}.styles-module_left__CN0nC .styles-module_link__M-1Wq>button>span>div{position:relative}.styles-module_left__CN0nC .styles-module_link__M-1Wq>button>span>div>i{align-items:center;background-color:#0563b0;border-radius:50%;bottom:-2px;color:#fff;display:flex;font-size:10px;font-style:normal;height:12px;justify-content:center;position:absolute;right:-2px;width:12px}.styles-module_left__CN0nC .styles-module_hiddenLinkCount__ThNp5>button>span>div>i,.styles-module_left__CN0nC .styles-module_link__M-1Wq>button>span>div>i:empty{display:none}.styles-module_left__CN0nC>*{align-items:center;display:inline-flex;justify-content:center}.styles-module_left__CN0nC>span:first-of-type{height:38px}.styles-module_right__sxVYl{align-items:center;display:inline-flex;height:38px;justify-content:flex-end;position:absolute;right:0;top:0;user-select:none;z-index:2}.styles-module_right__sxVYl>span{cursor:pointer;margin-left:10px}.styles-module_hasChildren__FqxrJ,.styles-module_hover__IeKlt:hover,.styles-module_selected__dpCTX{color:#0563b0}";
1787
- var Styles$5 = {"left":"styles-module_left__CN0nC","link":"styles-module_link__M-1Wq","hiddenLinkCount":"styles-module_hiddenLinkCount__ThNp5","right":"styles-module_right__sxVYl","selected":"styles-module_selected__dpCTX","hasChildren":"styles-module_hasChildren__FqxrJ","hover":"styles-module_hover__IeKlt"};
1799
+ var css_248z$5 = ".styles-module_left__CN0nC{align-items:center;display:flex;flex-direction:column;left:0;position:absolute;transform:translate(-26px);user-select:none;width:26px}.styles-module_left__CN0nC .styles-module_link__M-1Wq{margin-bottom:6px}.styles-module_left__CN0nC .styles-module_link__M-1Wq>button>span>div{position:relative}.styles-module_left__CN0nC .styles-module_link__M-1Wq>button>span>div>i{align-items:center;background-color:#0563b0;border-radius:50%;bottom:-2px;color:#fff;display:flex;font-size:10px;font-style:normal;height:12px;justify-content:center;position:absolute;right:-2px;width:12px}.styles-module_left__CN0nC .styles-module_hiddenLinkCount__ThNp5>button>span>div>i,.styles-module_left__CN0nC .styles-module_link__M-1Wq>button>span>div>i:empty{display:none}.styles-module_left__CN0nC>*{align-items:center;display:inline-flex;justify-content:center}.styles-module_left__CN0nC>span:first-of-type{height:38px}.styles-module_right__sxVYl{align-items:center;display:inline-flex;height:38px;justify-content:flex-end;position:absolute;right:0;top:0;user-select:none;z-index:2}.styles-module_right__sxVYl>span{cursor:pointer;margin-left:10px}.styles-module_hasChildren__FqxrJ,.styles-module_hover__IeKlt:hover,.styles-module_selected__dpCTX{color:#0563b0}.styles-module_empty__g2IcU{cursor:default!important}";
1800
+ var Styles$5 = {"left":"styles-module_left__CN0nC","link":"styles-module_link__M-1Wq","hiddenLinkCount":"styles-module_hiddenLinkCount__ThNp5","right":"styles-module_right__sxVYl","selected":"styles-module_selected__dpCTX","hasChildren":"styles-module_hasChildren__FqxrJ","hover":"styles-module_hover__IeKlt","empty":"styles-module_empty__g2IcU"};
1788
1801
  styleInject(css_248z$5);
1789
1802
 
1790
1803
  /**
@@ -1891,6 +1904,8 @@ const Bar = props => {
1891
1904
  return true;
1892
1905
  }, COMMAND_PRIORITY_EDITOR));
1893
1906
  }, []);
1907
+ const trackLinkCount = instance?.trackLinkCount || 0;
1908
+ const isTemporarilyCreated = instance?.isCustom && instance?.dataType === 'add';
1894
1909
  return /*#__PURE__*/jsxs(Fragment$1, {
1895
1910
  children: [/*#__PURE__*/jsxs("div", {
1896
1911
  "data-bar": "left",
@@ -1904,20 +1919,22 @@ const Bar = props => {
1904
1919
  children: /*#__PURE__*/jsx(DropDown, {
1905
1920
  arrow: true,
1906
1921
  showIcon: false,
1907
- disabled: !instance?.trackLinkCount,
1922
+ disabled: !trackLinkCount,
1908
1923
  stopCloseOnClickSelf: true,
1909
- buttonLabel:
1910
- /*#__PURE__*/
1911
- // [TODO] 显示 trackLinkCount
1912
- jsxs("div", {
1924
+ buttonLabel: /*#__PURE__*/jsxs("div", {
1913
1925
  children: [/*#__PURE__*/jsx("i", {
1914
- children: instance?.trackLinkCount || ''
1926
+ children: trackLinkCount || ''
1915
1927
  }), /*#__PURE__*/jsx(StaticIcon, {
1916
- className: `${Styles$5.hover}`,
1928
+ className: `${trackLinkCount ? Styles$5.hover : Styles$5.empty}`,
1917
1929
  type: "icon-front-link1"
1918
1930
  })]
1919
1931
  }),
1920
1932
  onOpen: setOpen,
1933
+ isItClosed: ({
1934
+ listQuantity
1935
+ }) => {
1936
+ return listQuantity === '1';
1937
+ },
1921
1938
  children: Components.TrackLinkList && instance ? /*#__PURE__*/jsx(Components.TrackLinkList, {
1922
1939
  number: instance.number
1923
1940
  }) : null
@@ -1948,7 +1965,7 @@ const Bar = props => {
1948
1965
  }), /*#__PURE__*/jsxs("div", {
1949
1966
  "data-bar": "right",
1950
1967
  className: Styles$5.right,
1951
- children: [!preview && extra.showRightToolbar !== false ? /*#__PURE__*/jsx(Fragment$1, {
1968
+ children: [!preview && extra.showRightToolbar !== false && !isTemporarilyCreated ? /*#__PURE__*/jsx(Fragment$1, {
1952
1969
  children: instance?.checkOut ? /*#__PURE__*/jsxs(Fragment$1, {
1953
1970
  children: [/*#__PURE__*/jsx("span", {
1954
1971
  title: translateI18n('[TODO] 国际化', {
@@ -23767,7 +23784,8 @@ const InstancePlugin = props => {
23767
23784
  const node = $createTitleOnlyInstanceNode(instance);
23768
23785
  const fragment = $createFragmentNode();
23769
23786
  $textToRichNodes(fragment, contentText);
23770
- node.append(...fragment.getChildren());
23787
+ const nodes = correctedInstanceParagraph(fragment.getChildren(), () => $createInstanceParagraphNode());
23788
+ node.append(...nodes);
23771
23789
  return node;
23772
23790
  } else {
23773
23791
  return $createInstanceNode(instance);
@@ -24035,6 +24053,109 @@ function $isPageBreakNode(node) {
24035
24053
  return node instanceof PageBreakNode;
24036
24054
  }
24037
24055
 
24056
+ /**
24057
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
24058
+ *
24059
+ * This source code is licensed under the MIT license found in the
24060
+ * LICENSE file in the root directory of this source tree.
24061
+ *
24062
+ */
24063
+
24064
+ const ParametersComponent = ({
24065
+ nodeKey
24066
+ }) => {
24067
+ const [editor] = useLexicalComposerContext();
24068
+ const [parameters, setParameters,, latestParameters] = useStore({
24069
+ number: '',
24070
+ value: ''
24071
+ });
24072
+ useEffect(() => {
24073
+ editor.read(() => {
24074
+ const node = $getNodeByKey(nodeKey);
24075
+ if ($isParametersNode(node)) {
24076
+ setParameters(node.__parameters);
24077
+ }
24078
+ });
24079
+ return mergeRegister(editor.registerCommand(PARAMETERS_UPDATE, ({
24080
+ number,
24081
+ value
24082
+ }) => {
24083
+ const latest = latestParameters.current;
24084
+ if (number !== latest.number) {
24085
+ return false;
24086
+ }
24087
+ const node = $getNodeByKey(nodeKey);
24088
+ if ($isParametersNode(node)) {
24089
+ setParameters({
24090
+ value
24091
+ });
24092
+ Object.assign(node.__parameters, {
24093
+ value
24094
+ });
24095
+ }
24096
+ return true;
24097
+ }, COMMAND_PRIORITY_EDITOR));
24098
+ }, []);
24099
+ return /*#__PURE__*/jsx("span", {
24100
+ children: parameters.value
24101
+ });
24102
+ };
24103
+
24104
+ /**
24105
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
24106
+ *
24107
+ * This source code is licensed under the MIT license found in the
24108
+ * LICENSE file in the root directory of this source tree.
24109
+ *
24110
+ */
24111
+
24112
+ class ParametersNode extends TextDecoratorNode {
24113
+ static getType() {
24114
+ return 'Parameters';
24115
+ }
24116
+ static clone(node) {
24117
+ return new ParametersNode(node.__parameters, node.__key);
24118
+ }
24119
+ static importJSON(serializedNode) {
24120
+ return $createParametersNode(serializedNode.parameters).updateFromJSON(serializedNode);
24121
+ }
24122
+ constructor(number, key) {
24123
+ super(key);
24124
+ this.__parameters = number;
24125
+ }
24126
+ exportJSON() {
24127
+ return {
24128
+ ...super.exportJSON(),
24129
+ parameters: this.__parameters
24130
+ };
24131
+ }
24132
+ createDOM(config, editor) {
24133
+ const span = super.createDOM(config, editor);
24134
+ span.setAttribute('ignorecontenteditable', '');
24135
+ return span;
24136
+ }
24137
+ updateDOM(prevNode, dom, config) {
24138
+ return super.updateDOM(prevNode, dom, config);
24139
+ }
24140
+ collapseAtStart() {
24141
+ return true;
24142
+ }
24143
+ isInline() {
24144
+ return true;
24145
+ }
24146
+ decorate(editor, config) {
24147
+ return /*#__PURE__*/jsx(ParametersComponent, {
24148
+ nodeKey: this.getKey()
24149
+ });
24150
+ }
24151
+ }
24152
+ function $createParametersNode(parameters) {
24153
+ return $applyNodeReplacement(new ParametersNode(parameters));
24154
+ }
24155
+ function $isParametersNode(node) {
24156
+ return node instanceof ParametersNode;
24157
+ }
24158
+
24038
24159
  /**
24039
24160
  * Copyright (c) Meta Platforms, Inc. and affiliates.
24040
24161
  *
@@ -25058,4 +25179,4 @@ var InlineImageComponent$1 = {
25058
25179
  default: InlineImageComponent
25059
25180
  };
25060
25181
 
25061
- export { $createBarDecoratorNode, $createCollapsibleContainerNode, $createCollapsibleContentNode, $createCollapsibleTitleNode, $createFragmentNode, $createImageNode, $createInlineImageNode, $createInstanceCodeHighlightNode, $createInstanceCodeNode, $createInstanceEquationNode, $createInstanceHeadingNode, $createInstanceHorizontalRuleNode, $createInstanceListItemNode, $createInstanceListNode, $createInstanceNode, $createInstanceParagraphNode, $createInstanceQuoteNode, $createInstanceTableNode, $createInstanceTitleNode, $createInternalLinkNode, $createKeywordNode, $createNumberDecoratorNode, $createPageBreakNode, $createPlaceholderDecoratorNode, $createTitleOnlyInstanceNode, $findNearestListItemNode, $getAllListItems, $getAnchorRootNode, $getInstanceNodeByChild, $getInstanceNodeByNumber, $getInstanceNodeKeyByNumber, $getListDepth, $getTitleNodeByChild, $getTopListNode, $handleIndent, $handleListInsertParagraph, $handleOutdent, $insertInstanceList, $isBarDecoratorNode, $isCollapsibleContainerNode, $isCollapsibleContentNode, $isCollapsibleTitleNode, $isEmptyInstanceParagraphNode, $isEmptyParagraphNode, $isImageNode, $isInInstanceTitleNode, $isInlineImageNode, $isInstanceCodeHighlightNode, $isInstanceCodeNode, $isInstanceEquationNode, $isInstanceHeadingNode, $isInstanceHorizontalRuleNode, $isInstanceListItemNode, $isInstanceListNode, $isInstanceNode, $isInstanceParagraphFormalNode, $isInstanceParagraphNode, $isInstanceQuoteNode, $isInstanceTableNode, $isInstanceTitleNode, $isInternalLinkNode, $isKeywordNode, $isLastItemInList, $isNumberDecoratorNode, $isPageBreakNode, $isPlaceholderDecoratorNode, $isRemoved, $isSelectedTitleNode, $isTextTypeNode, $nodeDowngrade, $nodeUpgrade, $removeHighestEmptyListParent, $removeList, $scrollTo, $updateRichHistoryStateMap, $updateRichInstanceContent, $updateRichInstanceTitle, $wrapInListItem, ADD_NEW_INSTANCE_NODE, BarDecoratorNode, COMPONENT_UPDATE, CollapsibleContainerNode, CollapsibleContentNode, CollapsibleTitleNode, DELETE_INSTANCE_NODE, DisableSelector, Fragment, INSERT_COLLAPSIBLE_COMMAND, INSERT_INS_HORIZONTAL_RULE_COMMAND, INSERT_PARAMETERS, INSTANCE_TITLE_UPDATE, ImageNode, InlineImageNode, InstanceCodeHighlightNode, InstanceCodeNode, InstanceEquationNode, InstanceHeadingNode, InstanceHorizontalRuleNode, InstanceListItemNode, InstanceListNode, InstanceNode, InstanceParagraphNode, InstanceParagraphType, InstancePlugin, InstanceQuoteNode, InstanceTableNode, InstanceTitleNode, InternalLinkNode, KeywordNode, NumberDecoratorNode, OPEN_CREATE_WINDOW, PageBreakNode, PlaceholderDecoratorNode, clearCache, fixedAddress, getCachedClassNameArray, getCodeLanguages, getDefaultCodeLanguage, getInstanceAttrValue, getInstanceBaseInfo, getLanguageFriendlyName, getLatestValue, getTemporaryContentText, ignoreHistory, instanceNodeMap, internalLinkNameUpdateMap, isCompleteInstance, isNestedListNode, mergeLists, mergeNextSiblingListIfSameType, nodeMoveDown, nodeMoveUp, normalizeCodeLang, numberNodeKey, paragraphSymbol, registerCodeHighlighting, setDisable, setInstanceAttrValue, setTemporaryContentText, updateChildrenListItemValue, updateRelatedInternalLink, useContentEditable };
25182
+ export { $createBarDecoratorNode, $createCollapsibleContainerNode, $createCollapsibleContentNode, $createCollapsibleTitleNode, $createFragmentNode, $createImageNode, $createInlineImageNode, $createInstanceCodeHighlightNode, $createInstanceCodeNode, $createInstanceEquationNode, $createInstanceHeadingNode, $createInstanceHorizontalRuleNode, $createInstanceListItemNode, $createInstanceListNode, $createInstanceNode, $createInstanceParagraphNode, $createInstanceQuoteNode, $createInstanceTableNode, $createInstanceTitleNode, $createInternalLinkNode, $createKeywordNode, $createNumberDecoratorNode, $createPageBreakNode, $createParametersNode, $createPlaceholderDecoratorNode, $createTitleOnlyInstanceNode, $findNearestListItemNode, $getAllListItems, $getAnchorRootNode, $getInstanceNodeByChild, $getInstanceNodeByNumber, $getInstanceNodeKeyByNumber, $getListDepth, $getTitleNodeByChild, $getTopListNode, $handleIndent, $handleListInsertParagraph, $handleOutdent, $insertInstanceList, $isBarDecoratorNode, $isCollapsibleContainerNode, $isCollapsibleContentNode, $isCollapsibleTitleNode, $isEmptyInstanceParagraphNode, $isEmptyParagraphNode, $isImageNode, $isInInstanceTitleNode, $isInlineImageNode, $isInstanceCodeHighlightNode, $isInstanceCodeNode, $isInstanceEquationNode, $isInstanceHeadingNode, $isInstanceHorizontalRuleNode, $isInstanceListItemNode, $isInstanceListNode, $isInstanceNode, $isInstanceParagraphFormalNode, $isInstanceParagraphNode, $isInstanceQuoteNode, $isInstanceTableNode, $isInstanceTitleNode, $isInternalLinkNode, $isKeywordNode, $isLastItemInList, $isNumberDecoratorNode, $isPageBreakNode, $isParametersNode, $isPlaceholderDecoratorNode, $isRemoved, $isSelectedTitleNode, $isTextTypeNode, $nodeDowngrade, $nodeUpgrade, $removeHighestEmptyListParent, $removeList, $scrollTo, $updateRichHistoryStateMap, $updateRichInstanceContent, $updateRichInstanceTitle, $wrapInListItem, ADD_NEW_INSTANCE_NODE, BarDecoratorNode, COMPONENT_UPDATE, CollapsibleContainerNode, CollapsibleContentNode, CollapsibleTitleNode, DELETE_INSTANCE_NODE, DisableSelector, Fragment, INSERT_COLLAPSIBLE_COMMAND, INSERT_INS_HORIZONTAL_RULE_COMMAND, INSERT_PARAMETERS, INSTANCE_TITLE_UPDATE, ImageNode, InlineImageNode, InstanceCodeHighlightNode, InstanceCodeNode, InstanceEquationNode, InstanceHeadingNode, InstanceHorizontalRuleNode, InstanceListItemNode, InstanceListNode, InstanceNode, InstanceParagraphNode, InstanceParagraphType, InstancePlugin, InstanceQuoteNode, InstanceTableNode, InstanceTitleNode, InternalLinkNode, KeywordNode, NumberDecoratorNode, OPEN_CREATE_WINDOW, PARAMETERS_UPDATE, PageBreakNode, ParametersNode, PlaceholderDecoratorNode, clearCache, correctedInstanceParagraph, fixedAddress, getCachedClassNameArray, getCodeLanguages, getDefaultCodeLanguage, getInstanceAttrValue, getInstanceBaseInfo, getLanguageFriendlyName, getLatestValue, getTemporaryContentText, ignoreHistory, instanceNodeMap, internalLinkNameUpdateMap, isCompleteInstance, isNestedListNode, mergeLists, mergeNextSiblingListIfSameType, nodeMoveDown, nodeMoveUp, normalizeCodeLang, numberNodeKey, paragraphSymbol, registerCodeHighlighting, setDisable, setInstanceAttrValue, setTemporaryContentText, updateChildrenListItemValue, updateRelatedInternalLink, useContentEditable };
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "instance"
8
8
  ],
9
9
  "license": "MIT",
10
- "version": "0.0.10",
10
+ "version": "0.0.11",
11
11
  "types": "index.d.ts",
12
12
  "files": [
13
13
  "dist",
@@ -23,9 +23,9 @@
23
23
  "@lexical/table": "^0.30.0",
24
24
  "@lexical/utils": "^0.30.0",
25
25
  "lexical": "0.30.0",
26
- "onchain-lexical-context": "^0.0.9",
27
- "onchain-lexical-markdown": "^0.0.9",
28
- "onchain-lexical-ui": "^0.0.9",
26
+ "onchain-lexical-context": "^0.0.10",
27
+ "onchain-lexical-markdown": "^0.0.10",
28
+ "onchain-lexical-ui": "^0.0.10",
29
29
  "onchain-utility": "^0.0.10"
30
30
  },
31
31
  "sideEffects": false,