@vectojs/markdown 0.10.0 → 0.11.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/Markdown.d.ts +3 -0
- package/dist/index.js +7 -0
- package/dist/index.mjs +7 -0
- package/package.json +1 -1
package/dist/Markdown.d.ts
CHANGED
|
@@ -45,6 +45,8 @@ export declare class CodeBlock extends UIComponent {
|
|
|
45
45
|
private rawLines;
|
|
46
46
|
private cellWidth;
|
|
47
47
|
private source;
|
|
48
|
+
/** Bumped by {@link buildLines} and {@link setSelectable}; read by `Scene`. */
|
|
49
|
+
private contentEpoch;
|
|
48
50
|
private lang;
|
|
49
51
|
private theme;
|
|
50
52
|
private lineH;
|
|
@@ -56,6 +58,7 @@ export declare class CodeBlock extends UIComponent {
|
|
|
56
58
|
setCode(code: string, lang?: string): this;
|
|
57
59
|
/** Enable or disable browser-native selection for this code block. */
|
|
58
60
|
setSelectable(selectable: boolean): this;
|
|
61
|
+
getContentEpoch(): number;
|
|
59
62
|
/**
|
|
60
63
|
* Change the block's box width.
|
|
61
64
|
*
|
package/dist/index.js
CHANGED
|
@@ -1127,6 +1127,8 @@ var CodeBlock = class extends import_ui.UIComponent {
|
|
|
1127
1127
|
rawLines = null;
|
|
1128
1128
|
cellWidth = 0;
|
|
1129
1129
|
source;
|
|
1130
|
+
/** Bumped by {@link buildLines} and {@link setSelectable}; read by `Scene`. */
|
|
1131
|
+
contentEpoch = 0;
|
|
1130
1132
|
lang;
|
|
1131
1133
|
theme;
|
|
1132
1134
|
lineH = 24;
|
|
@@ -1155,9 +1157,13 @@ var CodeBlock = class extends import_ui.UIComponent {
|
|
|
1155
1157
|
/** Enable or disable browser-native selection for this code block. */
|
|
1156
1158
|
setSelectable(selectable) {
|
|
1157
1159
|
this.selectable = selectable;
|
|
1160
|
+
this.contentEpoch++;
|
|
1158
1161
|
this.scene?.markDirty();
|
|
1159
1162
|
return this;
|
|
1160
1163
|
}
|
|
1164
|
+
getContentEpoch() {
|
|
1165
|
+
return this.contentEpoch;
|
|
1166
|
+
}
|
|
1161
1167
|
/**
|
|
1162
1168
|
* Change the block's box width.
|
|
1163
1169
|
*
|
|
@@ -1225,6 +1231,7 @@ var CodeBlock = class extends import_ui.UIComponent {
|
|
|
1225
1231
|
* lands mid-line, so that line's text (and therefore its tokenization) changes.
|
|
1226
1232
|
*/
|
|
1227
1233
|
buildLines(code) {
|
|
1234
|
+
this.contentEpoch++;
|
|
1228
1235
|
const rawLines = code.split(/\r\n|\r|\n/);
|
|
1229
1236
|
const previous = this.rawLines;
|
|
1230
1237
|
let reusable = 0;
|
package/dist/index.mjs
CHANGED
|
@@ -1095,6 +1095,8 @@ var CodeBlock = class extends UIComponent {
|
|
|
1095
1095
|
rawLines = null;
|
|
1096
1096
|
cellWidth = 0;
|
|
1097
1097
|
source;
|
|
1098
|
+
/** Bumped by {@link buildLines} and {@link setSelectable}; read by `Scene`. */
|
|
1099
|
+
contentEpoch = 0;
|
|
1098
1100
|
lang;
|
|
1099
1101
|
theme;
|
|
1100
1102
|
lineH = 24;
|
|
@@ -1123,9 +1125,13 @@ var CodeBlock = class extends UIComponent {
|
|
|
1123
1125
|
/** Enable or disable browser-native selection for this code block. */
|
|
1124
1126
|
setSelectable(selectable) {
|
|
1125
1127
|
this.selectable = selectable;
|
|
1128
|
+
this.contentEpoch++;
|
|
1126
1129
|
this.scene?.markDirty();
|
|
1127
1130
|
return this;
|
|
1128
1131
|
}
|
|
1132
|
+
getContentEpoch() {
|
|
1133
|
+
return this.contentEpoch;
|
|
1134
|
+
}
|
|
1129
1135
|
/**
|
|
1130
1136
|
* Change the block's box width.
|
|
1131
1137
|
*
|
|
@@ -1193,6 +1199,7 @@ var CodeBlock = class extends UIComponent {
|
|
|
1193
1199
|
* lands mid-line, so that line's text (and therefore its tokenization) changes.
|
|
1194
1200
|
*/
|
|
1195
1201
|
buildLines(code) {
|
|
1202
|
+
this.contentEpoch++;
|
|
1196
1203
|
const rawLines = code.split(/\r\n|\r|\n/);
|
|
1197
1204
|
const previous = this.rawLines;
|
|
1198
1205
|
let reusable = 0;
|