@examind/block-editor 0.1.16 → 0.1.18
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/index.js +22 -14
- package/dist/index.mjs +22 -14
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -5400,14 +5400,18 @@ var VariableNode = class _VariableNode extends import_lexical23.DecoratorNode {
|
|
|
5400
5400
|
this.__variable
|
|
5401
5401
|
);
|
|
5402
5402
|
if (this.__isPreviewMode) {
|
|
5403
|
-
|
|
5404
|
-
|
|
5405
|
-
|
|
5406
|
-
|
|
5407
|
-
|
|
5408
|
-
|
|
5403
|
+
if (this.__variableFormat) {
|
|
5404
|
+
const variableAsNumber = this.__variableValue ? getNumber(this.__variableValue) : void 0;
|
|
5405
|
+
if (variableAsNumber) {
|
|
5406
|
+
element.textContent = formatNumber(
|
|
5407
|
+
variableAsNumber,
|
|
5408
|
+
this.__variableFormat
|
|
5409
|
+
);
|
|
5410
|
+
} else {
|
|
5411
|
+
element.textContent = "[???]";
|
|
5412
|
+
}
|
|
5409
5413
|
} else {
|
|
5410
|
-
element.textContent = "[???]";
|
|
5414
|
+
element.textContent = this.__variableValue || "[???]";
|
|
5411
5415
|
}
|
|
5412
5416
|
} else {
|
|
5413
5417
|
element.textContent = this.__variable;
|
|
@@ -5425,14 +5429,18 @@ var VariableNode = class _VariableNode extends import_lexical23.DecoratorNode {
|
|
|
5425
5429
|
}
|
|
5426
5430
|
updateDOM(_prevNode, dom, _config) {
|
|
5427
5431
|
if (this.__isPreviewMode) {
|
|
5428
|
-
|
|
5429
|
-
|
|
5430
|
-
|
|
5431
|
-
|
|
5432
|
-
|
|
5433
|
-
|
|
5432
|
+
if (this.__variableFormat) {
|
|
5433
|
+
const variableAsNumber = this.__variableValue ? getNumber(this.__variableValue) : void 0;
|
|
5434
|
+
if (variableAsNumber) {
|
|
5435
|
+
dom.textContent = formatNumber(
|
|
5436
|
+
variableAsNumber,
|
|
5437
|
+
this.__variableFormat
|
|
5438
|
+
);
|
|
5439
|
+
} else {
|
|
5440
|
+
dom.textContent = "[???]";
|
|
5441
|
+
}
|
|
5434
5442
|
} else {
|
|
5435
|
-
dom.textContent = "[???]";
|
|
5443
|
+
dom.textContent = this.__variableValue || "[???]";
|
|
5436
5444
|
}
|
|
5437
5445
|
} else {
|
|
5438
5446
|
dom.textContent = this.__variable;
|
package/dist/index.mjs
CHANGED
|
@@ -5515,14 +5515,18 @@ var VariableNode = class _VariableNode extends DecoratorNode4 {
|
|
|
5515
5515
|
this.__variable
|
|
5516
5516
|
);
|
|
5517
5517
|
if (this.__isPreviewMode) {
|
|
5518
|
-
|
|
5519
|
-
|
|
5520
|
-
|
|
5521
|
-
|
|
5522
|
-
|
|
5523
|
-
|
|
5518
|
+
if (this.__variableFormat) {
|
|
5519
|
+
const variableAsNumber = this.__variableValue ? getNumber(this.__variableValue) : void 0;
|
|
5520
|
+
if (variableAsNumber) {
|
|
5521
|
+
element.textContent = formatNumber(
|
|
5522
|
+
variableAsNumber,
|
|
5523
|
+
this.__variableFormat
|
|
5524
|
+
);
|
|
5525
|
+
} else {
|
|
5526
|
+
element.textContent = "[???]";
|
|
5527
|
+
}
|
|
5524
5528
|
} else {
|
|
5525
|
-
element.textContent = "[???]";
|
|
5529
|
+
element.textContent = this.__variableValue || "[???]";
|
|
5526
5530
|
}
|
|
5527
5531
|
} else {
|
|
5528
5532
|
element.textContent = this.__variable;
|
|
@@ -5540,14 +5544,18 @@ var VariableNode = class _VariableNode extends DecoratorNode4 {
|
|
|
5540
5544
|
}
|
|
5541
5545
|
updateDOM(_prevNode, dom, _config) {
|
|
5542
5546
|
if (this.__isPreviewMode) {
|
|
5543
|
-
|
|
5544
|
-
|
|
5545
|
-
|
|
5546
|
-
|
|
5547
|
-
|
|
5548
|
-
|
|
5547
|
+
if (this.__variableFormat) {
|
|
5548
|
+
const variableAsNumber = this.__variableValue ? getNumber(this.__variableValue) : void 0;
|
|
5549
|
+
if (variableAsNumber) {
|
|
5550
|
+
dom.textContent = formatNumber(
|
|
5551
|
+
variableAsNumber,
|
|
5552
|
+
this.__variableFormat
|
|
5553
|
+
);
|
|
5554
|
+
} else {
|
|
5555
|
+
dom.textContent = "[???]";
|
|
5556
|
+
}
|
|
5549
5557
|
} else {
|
|
5550
|
-
dom.textContent = "[???]";
|
|
5558
|
+
dom.textContent = this.__variableValue || "[???]";
|
|
5551
5559
|
}
|
|
5552
5560
|
} else {
|
|
5553
5561
|
dom.textContent = this.__variable;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@examind/block-editor",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.18",
|
|
4
4
|
"@comment version": [
|
|
5
5
|
"Don't specify package version here. It will be injected by publish workflow."
|
|
6
6
|
],
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"tsup": "^8.3.5",
|
|
63
63
|
"typescript": "^5.7.2",
|
|
64
64
|
"typescript-eslint": "^8.18.2",
|
|
65
|
-
"@examind/block-types": "1.
|
|
65
|
+
"@examind/block-types": "0.1.18"
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
68
|
"@dnd-kit/core": "6.3.1",
|