@pixerate/editor 0.163.0 → 0.165.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/agent/index.cjs +54 -39
- package/dist/agent/index.js +24 -9
- package/dist/animation/index.cjs +6 -5
- package/dist/animation/index.js +5 -4
- package/dist/animation-editor/index.cjs +65 -64
- package/dist/animation-editor/index.js +8 -7
- package/dist/bridge/cli.cjs +3 -3
- package/dist/bridge/cli.js +2 -2
- package/dist/bridge/index.cjs +3 -3
- package/dist/bridge/index.js +2 -2
- package/dist/canvas/displacement.d.cts +34 -2
- package/dist/canvas/displacement.d.ts +34 -2
- package/dist/canvas/explosion-tools.d.cts +43 -0
- package/dist/canvas/explosion-tools.d.ts +43 -0
- package/dist/canvas/explosionLayout.d.cts +50 -0
- package/dist/canvas/explosionLayout.d.ts +50 -0
- package/dist/canvas/explosionState.d.cts +52 -0
- package/dist/canvas/explosionState.d.ts +52 -0
- package/dist/canvas/index.cjs +512 -168
- package/dist/canvas/index.d.cts +3 -0
- package/dist/canvas/index.d.ts +3 -0
- package/dist/canvas/index.js +434 -90
- package/dist/canvas/types.d.cts +27 -2
- package/dist/canvas/types.d.ts +27 -2
- package/dist/chart/controller.d.cts +31 -2
- package/dist/chart/controller.d.ts +31 -2
- package/dist/chart/index.cjs +504 -132
- package/dist/chart/index.d.cts +2 -0
- package/dist/chart/index.d.ts +2 -0
- package/dist/chart/index.js +386 -14
- package/dist/chart/layout-families.d.cts +7 -0
- package/dist/chart/layout-families.d.ts +7 -0
- package/dist/chart/links.d.cts +34 -0
- package/dist/chart/links.d.ts +34 -0
- package/dist/chart/mermaid.d.cts +9 -6
- package/dist/chart/mermaid.d.ts +9 -6
- package/dist/chart/schemas.d.cts +3 -0
- package/dist/chart/schemas.d.ts +3 -0
- package/dist/chart/spec.d.cts +3 -2
- package/dist/chart/spec.d.ts +3 -2
- package/dist/chart/style.d.cts +33 -0
- package/dist/chart/style.d.ts +33 -0
- package/dist/chart/types.d.cts +24 -2
- package/dist/chart/types.d.ts +24 -2
- package/dist/{chunk-TALQONZ5.js → chunk-2J5VLJHC.js} +3 -3
- package/dist/{chunk-3NEZJCBY.js → chunk-2ZRN43IN.js} +340 -201
- package/dist/{chunk-ZVNAMTFO.cjs → chunk-3FSUJIXN.cjs} +18 -174
- package/dist/{chunk-RQCMSEM5.cjs → chunk-4QUUHTGJ.cjs} +2 -2
- package/dist/{chunk-CIPIESX4.cjs → chunk-4ZC5QJE2.cjs} +3 -3
- package/dist/{chunk-S6X2QRVU.cjs → chunk-5UEFBM2M.cjs} +1 -138
- package/dist/{chunk-YSAGBIRW.cjs → chunk-64VWWR5U.cjs} +16 -16
- package/dist/{chunk-QYZGBVNC.js → chunk-7272D3K2.js} +10 -8
- package/dist/{chunk-462WGGXX.cjs → chunk-AMX23CSN.cjs} +27 -16
- package/dist/{chunk-3VLOOO3G.js → chunk-BDIM6NVW.js} +1 -1
- package/dist/{chunk-POR54B55.js → chunk-CRFSQWKQ.js} +4 -1
- package/dist/{chunk-GZ2FM3ZB.js → chunk-DKNEQX7T.js} +6 -162
- package/dist/{chunk-JCXMJUQO.cjs → chunk-EGZM52EO.cjs} +3 -3
- package/dist/{chunk-ES3UEVUT.cjs → chunk-EUIDTZNQ.cjs} +112 -110
- package/dist/{chunk-H3OEM3Q2.js → chunk-F6R67I3A.js} +1 -1
- package/dist/{chunk-5FNGLV2D.js → chunk-FEU2XVQH.js} +15 -3
- package/dist/{chunk-SZA42R4N.js → chunk-FRBRLKNQ.js} +154 -16
- package/dist/chunk-HIDFL5LQ.js +484 -0
- package/dist/{chunk-MKTDELCD.js → chunk-I5MRJW7B.js} +1 -1
- package/dist/{chunk-SDHZG5TF.js → chunk-ILP77UD6.js} +160 -2
- package/dist/{chunk-GKNEJ6EN.cjs → chunk-IMRXC7OA.cjs} +241 -103
- package/dist/chunk-KGRZMHZB.js +204 -0
- package/dist/{chunk-SET6KJOP.js → chunk-LPIKXPBM.js} +1 -1
- package/dist/{chunk-BQWGN5WH.js → chunk-M2TPMYJE.js} +1 -1
- package/dist/{chunk-GTELFJRE.cjs → chunk-M5GLQQWG.cjs} +2 -2
- package/dist/{chunk-4VU4CP7R.js → chunk-MHLU6GRJ.js} +1 -138
- package/dist/{chunk-D54JHQK2.cjs → chunk-MKXK6E4O.cjs} +51 -51
- package/dist/{chunk-DAPQGA55.js → chunk-N7NBGT2Y.js} +2 -2
- package/dist/chunk-O6OGNDND.js +164 -0
- package/dist/{chunk-22KLZZGH.cjs → chunk-ODFCS7HF.cjs} +8 -8
- package/dist/{chunk-PA3IMPPS.cjs → chunk-OVYQAYGH.cjs} +81 -81
- package/dist/{chunk-YXOW456B.js → chunk-PPEDZ5WR.js} +1 -1
- package/dist/{chunk-YGG7WDWT.cjs → chunk-Q25WAFTD.cjs} +21 -18
- package/dist/{chunk-SBQVEBSU.cjs → chunk-QO2T6KA5.cjs} +165 -67
- package/dist/{chunk-24M7VD6M.cjs → chunk-S4EIAIEW.cjs} +7 -7
- package/dist/{chunk-M4MIZPQI.cjs → chunk-SJ2CPTQC.cjs} +189 -15
- package/dist/chunk-TFF2GTGN.cjs +153 -0
- package/dist/chunk-TTCJPX4U.cjs +204 -0
- package/dist/{chunk-NZD2MZJC.cjs → chunk-TVQW26AV.cjs} +35 -23
- package/dist/{chunk-R3P2M7HU.cjs → chunk-UVXTOZ2B.cjs} +346 -207
- package/dist/{chunk-WI7QJA7A.cjs → chunk-UXETV2NC.cjs} +161 -3
- package/dist/{chunk-Z4P2RBMJ.js → chunk-V5GSY3NC.js} +101 -3
- package/dist/{chunk-QY4KUDMY.js → chunk-VRXXAXUT.js} +2 -2
- package/dist/chunk-VU6WQSMB.cjs +164 -0
- package/dist/{chunk-OXERWBKE.js → chunk-X5W645RI.js} +3 -3
- package/dist/{chunk-NHLYK3AX.js → chunk-XBQX76CT.js} +182 -8
- package/dist/{chunk-5AARIS3R.cjs → chunk-XCDGM7TD.cjs} +37 -37
- package/dist/{chunk-EVXQNQND.js → chunk-XZB3TJ6K.js} +16 -5
- package/dist/chunk-YBAPT7NL.js +153 -0
- package/dist/chunk-Z2UQYMPS.cjs +484 -0
- package/dist/color/index.cjs +5 -3
- package/dist/color/index.js +12 -10
- package/dist/diagram/index.cjs +55 -243
- package/dist/diagram/index.js +12 -200
- package/dist/export/index.cjs +7 -6
- package/dist/export/index.js +6 -5
- package/dist/extensions/index.cjs +12 -9
- package/dist/extensions/index.js +11 -8
- package/dist/gradient/index.cjs +29 -27
- package/dist/gradient/index.js +6 -4
- package/dist/image-editor/index.cjs +644 -643
- package/dist/image-editor/index.js +7 -6
- package/dist/index.cjs +21 -18
- package/dist/index.js +14 -11
- package/dist/paint-editor/index.cjs +19 -18
- package/dist/paint-editor/index.js +7 -6
- package/dist/parameters/index.cjs +2 -2
- package/dist/parameters/index.js +1 -1
- package/dist/persistence/assetWrites.d.cts +22 -0
- package/dist/persistence/assetWrites.d.ts +22 -0
- package/dist/persistence/assets.d.cts +71 -0
- package/dist/persistence/assets.d.ts +71 -0
- package/dist/persistence/documentStore.d.cts +17 -1
- package/dist/persistence/documentStore.d.ts +17 -1
- package/dist/persistence/documentTools.d.cts +5 -1
- package/dist/persistence/documentTools.d.ts +5 -1
- package/dist/persistence/editorAutosave.d.cts +7 -0
- package/dist/persistence/editorAutosave.d.ts +7 -0
- package/dist/persistence/index.cjs +141 -21
- package/dist/persistence/index.js +130 -10
- package/dist/persistence/storage.d.cts +13 -1
- package/dist/persistence/storage.d.ts +13 -1
- package/dist/spreadsheet/index.cjs +3 -3
- package/dist/spreadsheet/index.js +2 -2
- package/dist/tokens/index.cjs +11 -3
- package/dist/tokens/index.d.cts +1 -0
- package/dist/tokens/index.d.ts +1 -0
- package/dist/tokens/index.js +10 -2
- package/dist/tokens/style.d.cts +36 -0
- package/dist/tokens/style.d.ts +36 -0
- package/dist/tools/index.cjs +15 -3
- package/dist/tools/index.d.cts +2 -0
- package/dist/tools/index.d.ts +2 -0
- package/dist/tools/index.js +14 -2
- package/dist/tools/style-tools.d.cts +19 -0
- package/dist/tools/style-tools.d.ts +19 -0
- package/dist/tools/style.d.cts +212 -0
- package/dist/tools/style.d.ts +212 -0
- package/dist/tools/view.d.cts +6 -0
- package/dist/tools/view.d.ts +6 -0
- package/dist/typography/index.cjs +8 -6
- package/dist/typography/index.js +5 -3
- package/dist/vector/index.cjs +953 -952
- package/dist/vector/index.js +7 -6
- package/dist/video-editor/index.cjs +8 -7
- package/dist/video-editor/index.js +6 -5
- package/package.json +1 -1
- package/skills/README.md +12 -0
- package/skills/pixerate-agent-tools/SKILL.md +34 -1
- package/skills/pixerate-chart/SKILL.md +41 -9
- package/skills/pixerate-image-editor/SKILL.md +2 -0
- package/skills/pixerate-paint-editor/SKILL.md +2 -0
- package/skills/pixerate-tokens/SKILL.md +5 -0
- package/dist/chunk-ERAGQL2N.cjs +0 -68
- package/dist/chunk-KMU6QJB7.js +0 -68
package/dist/diagram/index.js
CHANGED
|
@@ -40,7 +40,6 @@ import {
|
|
|
40
40
|
createPassthroughAdapter,
|
|
41
41
|
createStatementAdapter,
|
|
42
42
|
detectFamily,
|
|
43
|
-
detectFamilyFromHeader,
|
|
44
43
|
dropMetaKeys,
|
|
45
44
|
emptyMeta,
|
|
46
45
|
erGrammar,
|
|
@@ -104,8 +103,6 @@ import {
|
|
|
104
103
|
slugId,
|
|
105
104
|
spaceInput,
|
|
106
105
|
splitOutsideQuotes,
|
|
107
|
-
splitSource,
|
|
108
|
-
splitStatements,
|
|
109
106
|
stateGrammar,
|
|
110
107
|
supportTierOf,
|
|
111
108
|
timelineAdapter,
|
|
@@ -115,7 +112,17 @@ import {
|
|
|
115
112
|
unquote,
|
|
116
113
|
xyChartAdapter,
|
|
117
114
|
xyChartGrammar
|
|
118
|
-
} from "../chunk-
|
|
115
|
+
} from "../chunk-DKNEQX7T.js";
|
|
116
|
+
import {
|
|
117
|
+
parseSankey,
|
|
118
|
+
parseTreemap,
|
|
119
|
+
treemapValue
|
|
120
|
+
} from "../chunk-KGRZMHZB.js";
|
|
121
|
+
import {
|
|
122
|
+
detectFamilyFromHeader,
|
|
123
|
+
splitSource,
|
|
124
|
+
splitStatements
|
|
125
|
+
} from "../chunk-O6OGNDND.js";
|
|
119
126
|
import {
|
|
120
127
|
PRESENCE_COLORS,
|
|
121
128
|
PerformanceQueue,
|
|
@@ -126,7 +133,7 @@ import {
|
|
|
126
133
|
} from "../chunk-O2ANJFUF.js";
|
|
127
134
|
import {
|
|
128
135
|
defineEditorDocument
|
|
129
|
-
} from "../chunk-
|
|
136
|
+
} from "../chunk-XBQX76CT.js";
|
|
130
137
|
import "../chunk-HF5QZS7Z.js";
|
|
131
138
|
import {
|
|
132
139
|
HistoryManager
|
|
@@ -1138,201 +1145,6 @@ var FAMILY_DESCRIPTIONS = {
|
|
|
1138
1145
|
radar: "Scores across several axes, one curve per item compared."
|
|
1139
1146
|
};
|
|
1140
1147
|
|
|
1141
|
-
// src/diagram/sankey/index.ts
|
|
1142
|
-
function parseSankey(source) {
|
|
1143
|
-
const split = splitSource(source);
|
|
1144
|
-
if (!/^\s*sankey(?:-beta)?\b/i.test(split.header)) {
|
|
1145
|
-
return { error: "Not a sankey diagram: the first line should be `sankey-beta`." };
|
|
1146
|
-
}
|
|
1147
|
-
const firstLine = split.headerIndex + 2;
|
|
1148
|
-
const kept = [];
|
|
1149
|
-
split.bodyLines.forEach((text, i) => {
|
|
1150
|
-
if (/^\s*%%/.test(text)) return;
|
|
1151
|
-
kept.push({ text: text.trim(), line: firstLine + i });
|
|
1152
|
-
});
|
|
1153
|
-
const records = readRecords(kept);
|
|
1154
|
-
if ("error" in records) return records;
|
|
1155
|
-
const nodes = [];
|
|
1156
|
-
const seen = /* @__PURE__ */ new Set();
|
|
1157
|
-
const add = (name) => {
|
|
1158
|
-
if (!seen.has(name)) {
|
|
1159
|
-
seen.add(name);
|
|
1160
|
-
nodes.push(name);
|
|
1161
|
-
}
|
|
1162
|
-
};
|
|
1163
|
-
const links = [];
|
|
1164
|
-
for (const { fields, line } of records) {
|
|
1165
|
-
if (fields.length !== 3) {
|
|
1166
|
-
return {
|
|
1167
|
-
error: `Expected three fields (source,target,value), found ${fields.length}.`,
|
|
1168
|
-
line
|
|
1169
|
-
};
|
|
1170
|
-
}
|
|
1171
|
-
const [source2, target, raw] = fields;
|
|
1172
|
-
const value = Number.parseFloat(raw);
|
|
1173
|
-
if (!Number.isFinite(value)) {
|
|
1174
|
-
return { error: `"${raw}" is not a number.`, line };
|
|
1175
|
-
}
|
|
1176
|
-
add(source2);
|
|
1177
|
-
add(target);
|
|
1178
|
-
links.push({ source: source2, target, value });
|
|
1179
|
-
}
|
|
1180
|
-
if (!links.length) return { error: "No links: add lines like `A,B,10`." };
|
|
1181
|
-
return { data: { nodes, links } };
|
|
1182
|
-
}
|
|
1183
|
-
function readRecords(lines) {
|
|
1184
|
-
const records = [];
|
|
1185
|
-
let i = 0;
|
|
1186
|
-
while (i < lines.length) {
|
|
1187
|
-
const start = lines[i];
|
|
1188
|
-
if (start.text === "") {
|
|
1189
|
-
i++;
|
|
1190
|
-
continue;
|
|
1191
|
-
}
|
|
1192
|
-
const fields = [];
|
|
1193
|
-
let text = start.text;
|
|
1194
|
-
let pos = 0;
|
|
1195
|
-
let field = "";
|
|
1196
|
-
let quoted = false;
|
|
1197
|
-
for (; ; ) {
|
|
1198
|
-
if (quoted) {
|
|
1199
|
-
const close = text.indexOf('"', pos);
|
|
1200
|
-
if (close < 0) {
|
|
1201
|
-
field += text.slice(pos);
|
|
1202
|
-
i++;
|
|
1203
|
-
if (i >= lines.length)
|
|
1204
|
-
return { error: "A quoted field is never closed.", line: start.line };
|
|
1205
|
-
field += "\n";
|
|
1206
|
-
text = lines[i].text;
|
|
1207
|
-
pos = 0;
|
|
1208
|
-
continue;
|
|
1209
|
-
}
|
|
1210
|
-
field += text.slice(pos, close);
|
|
1211
|
-
if (text[close + 1] === '"') {
|
|
1212
|
-
field += '"';
|
|
1213
|
-
pos = close + 2;
|
|
1214
|
-
continue;
|
|
1215
|
-
}
|
|
1216
|
-
quoted = false;
|
|
1217
|
-
pos = close + 1;
|
|
1218
|
-
const rest = /^[ \t]*/.exec(text.slice(pos))[0].length;
|
|
1219
|
-
pos += rest;
|
|
1220
|
-
if (pos < text.length && text[pos] !== ",") {
|
|
1221
|
-
return { error: "Unexpected text after a quoted field.", line: lines[i].line };
|
|
1222
|
-
}
|
|
1223
|
-
continue;
|
|
1224
|
-
}
|
|
1225
|
-
if (pos >= text.length) {
|
|
1226
|
-
fields.push(field.trim());
|
|
1227
|
-
break;
|
|
1228
|
-
}
|
|
1229
|
-
const ch = text[pos];
|
|
1230
|
-
if (ch === ",") {
|
|
1231
|
-
fields.push(field.trim());
|
|
1232
|
-
field = "";
|
|
1233
|
-
pos++;
|
|
1234
|
-
} else if (ch === '"' && field.trim() === "") {
|
|
1235
|
-
quoted = true;
|
|
1236
|
-
field = "";
|
|
1237
|
-
pos++;
|
|
1238
|
-
} else if (ch === '"') {
|
|
1239
|
-
return { error: "A quote inside an unquoted field.", line: lines[i].line };
|
|
1240
|
-
} else {
|
|
1241
|
-
field += ch;
|
|
1242
|
-
pos++;
|
|
1243
|
-
}
|
|
1244
|
-
}
|
|
1245
|
-
records.push({ fields, line: start.line });
|
|
1246
|
-
i++;
|
|
1247
|
-
}
|
|
1248
|
-
return records;
|
|
1249
|
-
}
|
|
1250
|
-
|
|
1251
|
-
// src/diagram/treemap/index.ts
|
|
1252
|
-
var NAME = String.raw`(?:"([^"]*)"|'([^']*)')`;
|
|
1253
|
-
var CLASS = String.raw`(?:\s*:::\s*([A-Za-z_]\w*))?`;
|
|
1254
|
-
var SECTION_RE = new RegExp(String.raw`^${NAME}${CLASS}$`);
|
|
1255
|
-
var LEAF_RE = new RegExp(String.raw`^${NAME}\s*[:,]\s*([0-9_.,]+)${CLASS}$`);
|
|
1256
|
-
function parseTreemap(source) {
|
|
1257
|
-
const split = splitSource(source);
|
|
1258
|
-
if (!/^\s*treemap(?:-beta)?\b/i.test(split.header)) {
|
|
1259
|
-
return { error: "Not a treemap: the first line should be `treemap-beta`." };
|
|
1260
|
-
}
|
|
1261
|
-
const data = { items: [] };
|
|
1262
|
-
const stack = [];
|
|
1263
|
-
const firstLine = split.headerIndex + 2;
|
|
1264
|
-
const lines = split.bodyLines;
|
|
1265
|
-
for (let i = 0; i < lines.length; i++) {
|
|
1266
|
-
const raw = lines[i];
|
|
1267
|
-
const line = firstLine + i;
|
|
1268
|
-
const indent = /^[ \t]*/.exec(raw)[0].length;
|
|
1269
|
-
const text = stripComment(raw).trim();
|
|
1270
|
-
if (!text) continue;
|
|
1271
|
-
const accBlock = /^accDescr\s*\{(.*)$/.exec(text);
|
|
1272
|
-
if (accBlock) {
|
|
1273
|
-
let body = accBlock[1];
|
|
1274
|
-
while (!body.includes("}") && i + 1 < lines.length) body += `
|
|
1275
|
-
${lines[++i]}`;
|
|
1276
|
-
if (!body.includes("}")) return { error: "`accDescr {` is never closed.", line };
|
|
1277
|
-
data.accDescr = body.slice(0, body.indexOf("}")).trim();
|
|
1278
|
-
continue;
|
|
1279
|
-
}
|
|
1280
|
-
const acc = /^(accTitle|accDescr)\s*:(.*)$/.exec(text);
|
|
1281
|
-
if (acc) {
|
|
1282
|
-
data[acc[1]] = acc[2].trim();
|
|
1283
|
-
continue;
|
|
1284
|
-
}
|
|
1285
|
-
const title = /^title(?:[ \t]+(.*))?$/.exec(text);
|
|
1286
|
-
if (title) {
|
|
1287
|
-
data.title = (title[1] ?? "").trim() || void 0;
|
|
1288
|
-
continue;
|
|
1289
|
-
}
|
|
1290
|
-
if (/^classDef\s/.test(text)) continue;
|
|
1291
|
-
let item;
|
|
1292
|
-
const leaf = LEAF_RE.exec(text);
|
|
1293
|
-
const section = leaf ? null : SECTION_RE.exec(text);
|
|
1294
|
-
if (leaf) {
|
|
1295
|
-
const value = Number.parseFloat(leaf[3].replace(/,/g, ""));
|
|
1296
|
-
if (!Number.isFinite(value)) return { error: `"${leaf[3]}" is not a number.`, line };
|
|
1297
|
-
item = { name: leaf[1] ?? leaf[2], value };
|
|
1298
|
-
if (leaf[4]) item.className = leaf[4];
|
|
1299
|
-
} else if (section) {
|
|
1300
|
-
item = { name: section[1] ?? section[2], children: [] };
|
|
1301
|
-
if (section[3]) item.className = section[3];
|
|
1302
|
-
} else {
|
|
1303
|
-
return {
|
|
1304
|
-
error: /^["']/.test(text) ? 'Expected `"Name"` for a section or `"Name": value` for a leaf.' : 'Names must be in quotes, e.g. `"Sales": 120`.',
|
|
1305
|
-
line
|
|
1306
|
-
};
|
|
1307
|
-
}
|
|
1308
|
-
while (stack.length && stack[stack.length - 1].indent >= indent) stack.pop();
|
|
1309
|
-
const parent = stack[stack.length - 1]?.item;
|
|
1310
|
-
if (parent) parent.children.push(item);
|
|
1311
|
-
else data.items.push(item);
|
|
1312
|
-
if (item.children) stack.push({ item, indent });
|
|
1313
|
-
}
|
|
1314
|
-
if (!data.items.length) return { error: 'No items: add lines like `"Sales": 120`.' };
|
|
1315
|
-
return { data };
|
|
1316
|
-
}
|
|
1317
|
-
function stripComment(line) {
|
|
1318
|
-
let quote3 = null;
|
|
1319
|
-
for (let i = 0; i < line.length; i++) {
|
|
1320
|
-
const ch = line[i];
|
|
1321
|
-
if (quote3) {
|
|
1322
|
-
if (ch === quote3) quote3 = null;
|
|
1323
|
-
} else if (ch === '"' || ch === "'") {
|
|
1324
|
-
quote3 = ch;
|
|
1325
|
-
} else if (ch === "%" && line[i + 1] === "%") {
|
|
1326
|
-
return line.slice(0, i);
|
|
1327
|
-
}
|
|
1328
|
-
}
|
|
1329
|
-
return line;
|
|
1330
|
-
}
|
|
1331
|
-
function treemapValue(item) {
|
|
1332
|
-
if (!item.children) return item.value ?? 0;
|
|
1333
|
-
return item.children.reduce((sum, child) => sum + treemapValue(child), 0);
|
|
1334
|
-
}
|
|
1335
|
-
|
|
1336
1148
|
// src/diagram/controller.ts
|
|
1337
1149
|
var EDITABLE_DIAGRAM_FAMILIES = [
|
|
1338
1150
|
"flowchart",
|
package/dist/export/index.cjs
CHANGED
|
@@ -12,18 +12,19 @@
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunkODFCS7HFcjs = require('../chunk-ODFCS7HF.cjs');
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
var _chunkJLWLX52Lcjs = require('../chunk-JLWLX52L.cjs');
|
|
20
20
|
require('../chunk-YN6JKAUE.cjs');
|
|
21
|
-
require('../chunk-
|
|
22
|
-
require('../chunk-
|
|
21
|
+
require('../chunk-Q25WAFTD.cjs');
|
|
22
|
+
require('../chunk-UVXTOZ2B.cjs');
|
|
23
23
|
require('../chunk-ALNIFK5G.cjs');
|
|
24
24
|
require('../chunk-2BSBFBOA.cjs');
|
|
25
|
-
require('../chunk-
|
|
26
|
-
require('../chunk-
|
|
25
|
+
require('../chunk-EUIDTZNQ.cjs');
|
|
26
|
+
require('../chunk-TFF2GTGN.cjs');
|
|
27
|
+
require('../chunk-5UEFBM2M.cjs');
|
|
27
28
|
require('../chunk-IPJ3TEYR.cjs');
|
|
28
29
|
|
|
29
30
|
|
|
@@ -41,4 +42,4 @@ require('../chunk-IPJ3TEYR.cjs');
|
|
|
41
42
|
|
|
42
43
|
|
|
43
44
|
|
|
44
|
-
exports.DOCX_ANONYMOUS_AUTHOR =
|
|
45
|
+
exports.DOCX_ANONYMOUS_AUTHOR = _chunkODFCS7HFcjs.DOCX_ANONYMOUS_AUTHOR; exports.DOCX_EXPORT_MIME_TYPE = _chunkODFCS7HFcjs.DOCX_EXPORT_MIME_TYPE; exports.DocxExportController = _chunkODFCS7HFcjs.DocxExportController; exports.XmlWriter = _chunkODFCS7HFcjs.XmlWriter; exports.createDocxExportController = _chunkODFCS7HFcjs.createDocxExportController; exports.createDocxParts = _chunkODFCS7HFcjs.createDocxParts; exports.deflateRaw = _chunkJLWLX52Lcjs.deflateRaw; exports.docxFileName = _chunkODFCS7HFcjs.docxFileName; exports.downloadBlob = _chunkODFCS7HFcjs.downloadBlob; exports.escapeXmlAttr = _chunkODFCS7HFcjs.escapeXmlAttr; exports.escapeXmlText = _chunkODFCS7HFcjs.escapeXmlText; exports.exportDocx = _chunkODFCS7HFcjs.exportDocx; exports.exportDocxBlob = _chunkODFCS7HFcjs.exportDocxBlob; exports.stripInvalidXmlChars = _chunkODFCS7HFcjs.stripInvalidXmlChars; exports.writeZip = _chunkJLWLX52Lcjs.writeZip;
|
package/dist/export/index.js
CHANGED
|
@@ -12,18 +12,19 @@ import {
|
|
|
12
12
|
exportDocx,
|
|
13
13
|
exportDocxBlob,
|
|
14
14
|
stripInvalidXmlChars
|
|
15
|
-
} from "../chunk-
|
|
15
|
+
} from "../chunk-N7NBGT2Y.js";
|
|
16
16
|
import {
|
|
17
17
|
deflateRaw,
|
|
18
18
|
writeZip
|
|
19
19
|
} from "../chunk-AZCODQO5.js";
|
|
20
20
|
import "../chunk-CXXKJBQZ.js";
|
|
21
|
-
import "../chunk-
|
|
22
|
-
import "../chunk-
|
|
21
|
+
import "../chunk-CRFSQWKQ.js";
|
|
22
|
+
import "../chunk-2ZRN43IN.js";
|
|
23
23
|
import "../chunk-CIQIM2IP.js";
|
|
24
24
|
import "../chunk-HF5QZS7Z.js";
|
|
25
|
-
import "../chunk-
|
|
26
|
-
import "../chunk-
|
|
25
|
+
import "../chunk-7272D3K2.js";
|
|
26
|
+
import "../chunk-YBAPT7NL.js";
|
|
27
|
+
import "../chunk-MHLU6GRJ.js";
|
|
27
28
|
import "../chunk-6ONMQ6WF.js";
|
|
28
29
|
export {
|
|
29
30
|
DOCX_ANONYMOUS_AUTHOR,
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
|
|
96
96
|
|
|
97
97
|
|
|
98
|
-
var
|
|
98
|
+
var _chunkMKXK6E4Ocjs = require('../chunk-MKXK6E4O.cjs');
|
|
99
99
|
|
|
100
100
|
|
|
101
101
|
|
|
@@ -104,7 +104,7 @@ var _chunkD54JHQK2cjs = require('../chunk-D54JHQK2.cjs');
|
|
|
104
104
|
|
|
105
105
|
|
|
106
106
|
var _chunkYN6JKAUEcjs = require('../chunk-YN6JKAUE.cjs');
|
|
107
|
-
require('../chunk-
|
|
107
|
+
require('../chunk-Q25WAFTD.cjs');
|
|
108
108
|
require('../chunk-HMGWFXEC.cjs');
|
|
109
109
|
|
|
110
110
|
|
|
@@ -171,10 +171,12 @@ require('../chunk-HMGWFXEC.cjs');
|
|
|
171
171
|
|
|
172
172
|
|
|
173
173
|
|
|
174
|
-
var
|
|
175
|
-
require('../chunk-
|
|
176
|
-
require('../chunk-
|
|
177
|
-
require('../chunk-
|
|
174
|
+
var _chunk64VWWR5Ucjs = require('../chunk-64VWWR5U.cjs');
|
|
175
|
+
require('../chunk-IMRXC7OA.cjs');
|
|
176
|
+
require('../chunk-TTCJPX4U.cjs');
|
|
177
|
+
require('../chunk-QO2T6KA5.cjs');
|
|
178
|
+
require('../chunk-UVXTOZ2B.cjs');
|
|
179
|
+
require('../chunk-VU6WQSMB.cjs');
|
|
178
180
|
require('../chunk-3AJMR7EG.cjs');
|
|
179
181
|
require('../chunk-G43MNQ4C.cjs');
|
|
180
182
|
require('../chunk-JG5VGCKP.cjs');
|
|
@@ -214,8 +216,9 @@ require('../chunk-ALNIFK5G.cjs');
|
|
|
214
216
|
require('../chunk-UWEQ55MY.cjs');
|
|
215
217
|
require('../chunk-2BSBFBOA.cjs');
|
|
216
218
|
require('../chunk-FJ2MSI43.cjs');
|
|
217
|
-
require('../chunk-
|
|
218
|
-
require('../chunk-
|
|
219
|
+
require('../chunk-EUIDTZNQ.cjs');
|
|
220
|
+
require('../chunk-TFF2GTGN.cjs');
|
|
221
|
+
require('../chunk-5UEFBM2M.cjs');
|
|
219
222
|
require('../chunk-IPJ3TEYR.cjs');
|
|
220
223
|
|
|
221
224
|
|
|
@@ -412,4 +415,4 @@ require('../chunk-IPJ3TEYR.cjs');
|
|
|
412
415
|
|
|
413
416
|
|
|
414
417
|
|
|
415
|
-
exports.ALLOW_NESTED_TABLES_META = _chunkYSAGBIRWcjs.ALLOW_NESTED_TABLES_META; exports.AgentCaret = _chunkYSAGBIRWcjs.AgentCaret; exports.Autocorrect = _chunkD54JHQK2cjs.Autocorrect; exports.BLOCK_CHANGE_ATTRIBUTE = _chunk34RQAGWIcjs.BLOCK_CHANGE_ATTRIBUTE; exports.Bookmark = _chunkD54JHQK2cjs.Bookmark; exports.CHARACTER_STYLE_MARK_NAME = _chunkD54JHQK2cjs.CHARACTER_STYLE_MARK_NAME; exports.COMMENT_MARK_NAME = _chunkD54JHQK2cjs.COMMENT_MARK_NAME; exports.CharacterStyle = _chunkD54JHQK2cjs.CharacterStyle; exports.Chart = _chunkYSAGBIRWcjs.Chart; exports.ChartNodeView = _chunkYSAGBIRWcjs.ChartNodeView; exports.ColorHighlighter = _chunkD54JHQK2cjs.ColorHighlighter; exports.CommentStore = _chunk34RQAGWIcjs.CommentStore; exports.Comments = _chunkD54JHQK2cjs.Comments; exports.CrossReference = _chunkD54JHQK2cjs.CrossReference; exports.DEFAULT_AGENT_CARET_COLOR = _chunkYSAGBIRWcjs.DEFAULT_AGENT_CARET_COLOR; exports.DEFAULT_AGENT_CARET_NAME = _chunkYSAGBIRWcjs.DEFAULT_AGENT_CARET_NAME; exports.DEFAULT_AUTOCORRECT_EXCEPTIONS = _chunkD54JHQK2cjs.DEFAULT_AUTOCORRECT_EXCEPTIONS; exports.DEFAULT_STYLES = _chunkYN6JKAUEcjs.DEFAULT_STYLES; exports.DEFAULT_TABLE_OPTIONS = _chunkYSAGBIRWcjs.DEFAULT_TABLE_OPTIONS; exports.DEFAULT_TABLE_TOOLBAR = _chunkYSAGBIRWcjs.DEFAULT_TABLE_TOOLBAR; exports.DELETION_MARK_NAME = _chunk34RQAGWIcjs.DELETION_MARK_NAME; exports.DocumentCompare = _chunkD54JHQK2cjs.DocumentCompare; exports.EMPTY_FIND_REPLACE_SNAPSHOT = _chunkD54JHQK2cjs.EMPTY_FIND_REPLACE_SNAPSHOT; exports.EMPTY_TABLE_STATE = _chunkYSAGBIRWcjs.EMPTY_TABLE_STATE; exports.FIND_OPTION_TOGGLES = _chunkD54JHQK2cjs.FIND_OPTION_TOGGLES; exports.FIND_PARAGRAPH_MARK = _chunkYSAGBIRWcjs.FIND_PARAGRAPH_MARK; exports.FORMAT_CHANGE_MARK_NAME = _chunk34RQAGWIcjs.FORMAT_CHANGE_MARK_NAME; exports.FileImport = _chunkD54JHQK2cjs.FileImport; exports.FindReplace = _chunkD54JHQK2cjs.FindReplace; exports.FindReplaceStore = _chunkD54JHQK2cjs.FindReplaceStore; exports.FontSize = _chunkD54JHQK2cjs.FontSize; exports.Footnote = _chunkD54JHQK2cjs.Footnote; exports.FootnoteReference = _chunkD54JHQK2cjs.FootnoteReference; exports.Footnotes = _chunkD54JHQK2cjs.Footnotes; exports.GradientText = _chunkD54JHQK2cjs.GradientText; exports.INSERTION_MARK_NAME = _chunk34RQAGWIcjs.INSERTION_MARK_NAME; exports.Image = _chunkD54JHQK2cjs.Image; exports.LoadingNode = _chunkD54JHQK2cjs.LoadingNode; exports.MAX_FIND_PATTERN_LENGTH = _chunkYSAGBIRWcjs.MAX_FIND_PATTERN_LENGTH; exports.MAX_SPARKLINE_VALUES = _chunkYSAGBIRWcjs.MAX_SPARKLINE_VALUES; exports.MAX_TABLE_COLUMNS = _chunkYSAGBIRWcjs.MAX_TABLE_COLUMNS; exports.MAX_TABLE_ROWS = _chunkYSAGBIRWcjs.MAX_TABLE_ROWS; exports.MOVE_FROM_CLASS = _chunk34RQAGWIcjs.MOVE_FROM_CLASS; exports.MOVE_ID_ATTRIBUTE = _chunk34RQAGWIcjs.MOVE_ID_ATTRIBUTE; exports.MOVE_TO_CLASS = _chunk34RQAGWIcjs.MOVE_TO_CLASS; exports.Markdown = _chunkD54JHQK2cjs.Markdown; exports.Mention = _chunkD54JHQK2cjs.Mention; exports.NORMAL_STYLE_ID = _chunkYN6JKAUEcjs.NORMAL_STYLE_ID; exports.Outline = _chunkD54JHQK2cjs.Outline; exports.ParagraphStyles = _chunkD54JHQK2cjs.ParagraphStyles; exports.RichClipboard = _chunkD54JHQK2cjs.RichClipboard; exports.SMILIE_REPLACEMENTS = _chunkD54JHQK2cjs.SMILIE_REPLACEMENTS; exports.SPARKLINE_KINDS = _chunkYSAGBIRWcjs.SPARKLINE_KINDS; exports.STYLE_ID_ATTRIBUTE = _chunkD54JHQK2cjs.STYLE_ID_ATTRIBUTE; exports.SlashCommands = _chunkD54JHQK2cjs.SlashCommands; exports.SmilieReplacer = _chunkD54JHQK2cjs.SmilieReplacer; exports.Sparkline = _chunkYSAGBIRWcjs.Sparkline; exports.StyleRegistry = _chunkYN6JKAUEcjs.StyleRegistry; exports.TABLE_ACTIONS = _chunkYSAGBIRWcjs.TABLE_ACTIONS; exports.TRACK_CHANGES_SKIP_META = _chunk34RQAGWIcjs.TRACK_CHANGES_SKIP_META; exports.Table = _chunkYSAGBIRWcjs.Table; exports.TableCell = _chunkYSAGBIRWcjs.TableCell; exports.TableHeader = _chunkYSAGBIRWcjs.TableHeader; exports.TableOfContents = _chunkD54JHQK2cjs.TableOfContents; exports.TableRow = _chunkYSAGBIRWcjs.TableRow; exports.TemplateSuggestions = _chunkD54JHQK2cjs.TemplateSuggestions; exports.TrackChanges = _chunk34RQAGWIcjs.TrackChanges; exports.TrackChangesStore = _chunk34RQAGWIcjs.TrackChangesStore; exports.TrackedDeletion = _chunk34RQAGWIcjs.TrackedDeletion; exports.TrackedFormatChange = _chunk34RQAGWIcjs.TrackedFormatChange; exports.TrackedInsertion = _chunk34RQAGWIcjs.TrackedInsertion; exports.agentCaretPluginKey = _chunkYSAGBIRWcjs.agentCaretPluginKey; exports.applyDocumentComparison = _chunkD54JHQK2cjs.applyDocumentComparison; exports.applyReplacements = _chunkYSAGBIRWcjs.applyReplacements; exports.autocorrectPluginKey = _chunkD54JHQK2cjs.autocorrectPluginKey; exports.buildOutlineTree = _chunkD54JHQK2cjs.buildOutlineTree; exports.capitalizeSentenceRules = _chunkD54JHQK2cjs.capitalizeSentenceRules; exports.captureSelectionFormat = _chunkD54JHQK2cjs.captureSelectionFormat; exports.chartPluginKey = _chunkYSAGBIRWcjs.chartPluginKey; exports.clearAgentCaret = _chunkYSAGBIRWcjs.clearAgentCaret; exports.commentsPluginKey = _chunkD54JHQK2cjs.commentsPluginKey; exports.compareInEditor = _chunkD54JHQK2cjs.compareInEditor; exports.compileFindPattern = _chunkYSAGBIRWcjs.compileFindPattern; exports.computeOutline = _chunkD54JHQK2cjs.computeOutline; exports.createAgentCaretPlugin = _chunkYSAGBIRWcjs.createAgentCaretPlugin; exports.createChartNodeView = _chunkYSAGBIRWcjs.createChartNodeView; exports.createCommentStore = _chunk34RQAGWIcjs.createCommentStore; exports.createFindReplaceCommands = _chunkD54JHQK2cjs.createFindReplaceCommands; exports.createMentionExtension = _chunkD54JHQK2cjs.createMentionExtension; exports.createOutlineStore = _chunkD54JHQK2cjs.createOutlineStore; exports.createParagraphStylesStore = _chunkD54JHQK2cjs.createParagraphStylesStore; exports.createReviewId = _chunk34RQAGWIcjs.createReviewId; exports.createRichTextPreset = _chunkD54JHQK2cjs.createRichTextPreset; exports.createSearchBudget = _chunkYSAGBIRWcjs.createSearchBudget; exports.createStyleRegistry = _chunkYN6JKAUEcjs.createStyleRegistry; exports.createTableCommands = _chunkD54JHQK2cjs.createTableCommands; exports.createTableExtensions = _chunkYSAGBIRWcjs.createTableExtensions; exports.createTableNestingPlugin = _chunkYSAGBIRWcjs.createTableNestingPlugin; exports.createTableStore = _chunkYSAGBIRWcjs.createTableStore; exports.crossReferencePluginKey = _chunkD54JHQK2cjs.crossReferencePluginKey; exports.defaultAutocorrectRules = _chunkD54JHQK2cjs.defaultAutocorrectRules; exports.describeBlockChange = _chunk34RQAGWIcjs.describeBlockChange; exports.describeFormatChange = _chunk34RQAGWIcjs.describeFormatChange; exports.documentStructureCommandItems = _chunkD54JHQK2cjs.documentStructureCommandItems; exports.ensureAgentCaret = _chunkYSAGBIRWcjs.ensureAgentCaret; exports.expandReplacement = _chunkYSAGBIRWcjs.expandReplacement; exports.fileImportPluginKey = _chunkD54JHQK2cjs.fileImportPluginKey; exports.findAllMatches = _chunkYSAGBIRWcjs.findAllMatches; exports.findAutocorrection = _chunkD54JHQK2cjs.findAutocorrection; exports.findCommentRanges = _chunkD54JHQK2cjs.findCommentRanges; exports.findHexColors = _chunkD54JHQK2cjs.findHexColors; exports.findReplacePluginKey = _chunkD54JHQK2cjs.findReplacePluginKey; exports.foldCodePoint = _chunkYSAGBIRWcjs.foldCodePoint; exports.footnotesMarkdownIt = _chunkD54JHQK2cjs.footnotesMarkdownIt; exports.footnotesPluginKey = _chunkD54JHQK2cjs.footnotesPluginKey; exports.formatFindStatus = _chunkD54JHQK2cjs.formatFindStatus; exports.formatReviewTime = _chunk34RQAGWIcjs.formatReviewTime; exports.fractionRules = _chunkD54JHQK2cjs.fractionRules; exports.getActiveHeading = _chunkD54JHQK2cjs.getActiveHeading; exports.getAgentCarets = _chunkYSAGBIRWcjs.getAgentCarets; exports.getBookmarks = _chunkD54JHQK2cjs.getBookmarks; exports.getCommentAnchors = _chunkD54JHQK2cjs.getCommentAnchors; exports.getCommentAuthor = _chunkD54JHQK2cjs.getCommentAuthor; exports.getCommentIdsAt = _chunkD54JHQK2cjs.getCommentIdsAt; exports.getCommentStore = _chunkD54JHQK2cjs.getCommentStore; exports.getCrossReferenceTargets = _chunkD54JHQK2cjs.getCrossReferenceTargets; exports.getDocumentCharts = _chunkYSAGBIRWcjs.getDocumentCharts; exports.getDocumentStructureCommandItems = _chunkD54JHQK2cjs.getDocumentStructureCommandItems; exports.getFindReplaceState = _chunkD54JHQK2cjs.getFindReplaceState; exports.getFindReplaceStore = _chunkD54JHQK2cjs.getFindReplaceStore; exports.getFootnotes = _chunkD54JHQK2cjs.getFootnotes; exports.getMentionNodes = _chunkD54JHQK2cjs.getMentionNodes; exports.getOutline = _chunkD54JHQK2cjs.getOutline; exports.getParagraphStyleAt = _chunkD54JHQK2cjs.getParagraphStyleAt; exports.getStyleRegistry = _chunkD54JHQK2cjs.getStyleRegistry; exports.getTableActionState = _chunkYSAGBIRWcjs.getTableActionState; exports.getTableOfContentsEntries = _chunkD54JHQK2cjs.getTableOfContentsEntries; exports.getTableState = _chunkYSAGBIRWcjs.getTableState; exports.getTrackChangesStore = _chunk34RQAGWIcjs.getTrackChangesStore; exports.getTrackedChangeAt = _chunk34RQAGWIcjs.getTrackedChangeAt; exports.getTrackedChanges = _chunk34RQAGWIcjs.getTrackedChanges; exports.handleImageInsertion = _chunkD54JHQK2cjs.handleImageInsertion; exports.handleTablePasteWithoutNesting = _chunkYSAGBIRWcjs.handleTablePasteWithoutNesting; exports.imagePastePluginKey = _chunkD54JHQK2cjs.imagePastePluginKey; exports.insertImageNode = _chunkD54JHQK2cjs.insertImageNode; exports.insertSliceAfterTable = _chunkYSAGBIRWcjs.insertSliceAfterTable; exports.isChartEnabled = _chunkYSAGBIRWcjs.isChartEnabled; exports.isGfmTable = _chunkYSAGBIRWcjs.isGfmTable; exports.isInTableCell = _chunkYSAGBIRWcjs.isInTableCell; exports.isInsidePromptToken = _chunkD54JHQK2cjs.isInsidePromptToken; exports.isMoveSized = _chunk34RQAGWIcjs.isMoveSized; exports.isParagraphStyleAvailable = _chunkD54JHQK2cjs.isParagraphStyleAvailable; exports.isSelectionInTable = _chunkYSAGBIRWcjs.isSelectionInTable; exports.isTableEnabled = _chunkYSAGBIRWcjs.isTableEnabled; exports.isTrackChangesEnabled = _chunk34RQAGWIcjs.isTrackChangesEnabled; exports.isValidStyleId = _chunkYN6JKAUEcjs.isValidStyleId; exports.markAgentChanges = _chunkYSAGBIRWcjs.markAgentChanges; exports.navigateToHeading = _chunkD54JHQK2cjs.navigateToHeading; exports.normalizeSparklineValues = _chunkYSAGBIRWcjs.normalizeSparklineValues; exports.normalizeTableCellAlignment = _chunkYSAGBIRWcjs.normalizeTableCellAlignment; exports.normalizeTableCellColor = _chunkYSAGBIRWcjs.normalizeTableCellColor; exports.outermostTableDepth = _chunkYSAGBIRWcjs.outermostTableDepth; exports.outlinePluginKey = _chunkD54JHQK2cjs.outlinePluginKey; exports.paragraphStylesPluginKey = _chunkD54JHQK2cjs.paragraphStylesPluginKey; exports.parseReplacement = _chunkYSAGBIRWcjs.parseReplacement; exports.removeImageNode = _chunkD54JHQK2cjs.removeImageNode; exports.replaceWithTextTransaction = _chunkYSAGBIRWcjs.replaceWithTextTransaction; exports.resolveTrackedChanges = _chunk34RQAGWIcjs.resolveTrackedChanges; exports.richClipboardPluginKey = _chunkD54JHQK2cjs.richClipboardPluginKey; exports.runTableAction = _chunkYSAGBIRWcjs.runTableAction; exports.safeCSSValue = _chunkYN6JKAUEcjs.safeCSSValue; exports.safeMergeAttributes = _chunk34RQAGWIcjs.safeMergeAttributes; exports.searchDocument = _chunkYSAGBIRWcjs.searchDocument; exports.setAgentCaret = _chunkYSAGBIRWcjs.setAgentCaret; exports.setMentionRoleAt = _chunkD54JHQK2cjs.setMentionRoleAt; exports.shouldShowTableBubbleMenu = _chunkYSAGBIRWcjs.shouldShowTableBubbleMenu; exports.sliceContainsTable = _chunkYSAGBIRWcjs.sliceContainsTable; exports.smartQuoteRules = _chunkD54JHQK2cjs.smartQuoteRules; exports.smilieAutocorrectRules = _chunkD54JHQK2cjs.smilieAutocorrectRules; exports.sparklineLabel = _chunkYSAGBIRWcjs.sparklineLabel; exports.staticChartSvg = _chunkYSAGBIRWcjs.staticChartSvg; exports.symbolRules = _chunkD54JHQK2cjs.symbolRules; exports.syncFootnotes = _chunkD54JHQK2cjs.syncFootnotes; exports.tableNestingPluginKey = _chunkYSAGBIRWcjs.tableNestingPluginKey; exports.tableOfContentsMarkdownIt = _chunkD54JHQK2cjs.tableOfContentsMarkdownIt; exports.tableOfContentsPluginKey = _chunkD54JHQK2cjs.tableOfContentsPluginKey; exports.trackChangesPluginKey = _chunk34RQAGWIcjs.trackChangesPluginKey; exports.trackedChangeLabel = _chunk34RQAGWIcjs.trackedChangeLabel; exports.twoInitialCapitalsRules = _chunkD54JHQK2cjs.twoInitialCapitalsRules; exports.typeAgentText = _chunkYSAGBIRWcjs.typeAgentText; exports.unnestTables = _chunkYSAGBIRWcjs.unnestTables; exports.updateImageSrc = _chunkD54JHQK2cjs.updateImageSrc; exports.validateFindPattern = _chunkD54JHQK2cjs.validateFindPattern; exports.writeRichClipboard = _chunkD54JHQK2cjs.writeRichClipboard;
|
|
418
|
+
exports.ALLOW_NESTED_TABLES_META = _chunk64VWWR5Ucjs.ALLOW_NESTED_TABLES_META; exports.AgentCaret = _chunk64VWWR5Ucjs.AgentCaret; exports.Autocorrect = _chunkMKXK6E4Ocjs.Autocorrect; exports.BLOCK_CHANGE_ATTRIBUTE = _chunk34RQAGWIcjs.BLOCK_CHANGE_ATTRIBUTE; exports.Bookmark = _chunkMKXK6E4Ocjs.Bookmark; exports.CHARACTER_STYLE_MARK_NAME = _chunkMKXK6E4Ocjs.CHARACTER_STYLE_MARK_NAME; exports.COMMENT_MARK_NAME = _chunkMKXK6E4Ocjs.COMMENT_MARK_NAME; exports.CharacterStyle = _chunkMKXK6E4Ocjs.CharacterStyle; exports.Chart = _chunk64VWWR5Ucjs.Chart; exports.ChartNodeView = _chunk64VWWR5Ucjs.ChartNodeView; exports.ColorHighlighter = _chunkMKXK6E4Ocjs.ColorHighlighter; exports.CommentStore = _chunk34RQAGWIcjs.CommentStore; exports.Comments = _chunkMKXK6E4Ocjs.Comments; exports.CrossReference = _chunkMKXK6E4Ocjs.CrossReference; exports.DEFAULT_AGENT_CARET_COLOR = _chunk64VWWR5Ucjs.DEFAULT_AGENT_CARET_COLOR; exports.DEFAULT_AGENT_CARET_NAME = _chunk64VWWR5Ucjs.DEFAULT_AGENT_CARET_NAME; exports.DEFAULT_AUTOCORRECT_EXCEPTIONS = _chunkMKXK6E4Ocjs.DEFAULT_AUTOCORRECT_EXCEPTIONS; exports.DEFAULT_STYLES = _chunkYN6JKAUEcjs.DEFAULT_STYLES; exports.DEFAULT_TABLE_OPTIONS = _chunk64VWWR5Ucjs.DEFAULT_TABLE_OPTIONS; exports.DEFAULT_TABLE_TOOLBAR = _chunk64VWWR5Ucjs.DEFAULT_TABLE_TOOLBAR; exports.DELETION_MARK_NAME = _chunk34RQAGWIcjs.DELETION_MARK_NAME; exports.DocumentCompare = _chunkMKXK6E4Ocjs.DocumentCompare; exports.EMPTY_FIND_REPLACE_SNAPSHOT = _chunkMKXK6E4Ocjs.EMPTY_FIND_REPLACE_SNAPSHOT; exports.EMPTY_TABLE_STATE = _chunk64VWWR5Ucjs.EMPTY_TABLE_STATE; exports.FIND_OPTION_TOGGLES = _chunkMKXK6E4Ocjs.FIND_OPTION_TOGGLES; exports.FIND_PARAGRAPH_MARK = _chunk64VWWR5Ucjs.FIND_PARAGRAPH_MARK; exports.FORMAT_CHANGE_MARK_NAME = _chunk34RQAGWIcjs.FORMAT_CHANGE_MARK_NAME; exports.FileImport = _chunkMKXK6E4Ocjs.FileImport; exports.FindReplace = _chunkMKXK6E4Ocjs.FindReplace; exports.FindReplaceStore = _chunkMKXK6E4Ocjs.FindReplaceStore; exports.FontSize = _chunkMKXK6E4Ocjs.FontSize; exports.Footnote = _chunkMKXK6E4Ocjs.Footnote; exports.FootnoteReference = _chunkMKXK6E4Ocjs.FootnoteReference; exports.Footnotes = _chunkMKXK6E4Ocjs.Footnotes; exports.GradientText = _chunkMKXK6E4Ocjs.GradientText; exports.INSERTION_MARK_NAME = _chunk34RQAGWIcjs.INSERTION_MARK_NAME; exports.Image = _chunkMKXK6E4Ocjs.Image; exports.LoadingNode = _chunkMKXK6E4Ocjs.LoadingNode; exports.MAX_FIND_PATTERN_LENGTH = _chunk64VWWR5Ucjs.MAX_FIND_PATTERN_LENGTH; exports.MAX_SPARKLINE_VALUES = _chunk64VWWR5Ucjs.MAX_SPARKLINE_VALUES; exports.MAX_TABLE_COLUMNS = _chunk64VWWR5Ucjs.MAX_TABLE_COLUMNS; exports.MAX_TABLE_ROWS = _chunk64VWWR5Ucjs.MAX_TABLE_ROWS; exports.MOVE_FROM_CLASS = _chunk34RQAGWIcjs.MOVE_FROM_CLASS; exports.MOVE_ID_ATTRIBUTE = _chunk34RQAGWIcjs.MOVE_ID_ATTRIBUTE; exports.MOVE_TO_CLASS = _chunk34RQAGWIcjs.MOVE_TO_CLASS; exports.Markdown = _chunkMKXK6E4Ocjs.Markdown; exports.Mention = _chunkMKXK6E4Ocjs.Mention; exports.NORMAL_STYLE_ID = _chunkYN6JKAUEcjs.NORMAL_STYLE_ID; exports.Outline = _chunkMKXK6E4Ocjs.Outline; exports.ParagraphStyles = _chunkMKXK6E4Ocjs.ParagraphStyles; exports.RichClipboard = _chunkMKXK6E4Ocjs.RichClipboard; exports.SMILIE_REPLACEMENTS = _chunkMKXK6E4Ocjs.SMILIE_REPLACEMENTS; exports.SPARKLINE_KINDS = _chunk64VWWR5Ucjs.SPARKLINE_KINDS; exports.STYLE_ID_ATTRIBUTE = _chunkMKXK6E4Ocjs.STYLE_ID_ATTRIBUTE; exports.SlashCommands = _chunkMKXK6E4Ocjs.SlashCommands; exports.SmilieReplacer = _chunkMKXK6E4Ocjs.SmilieReplacer; exports.Sparkline = _chunk64VWWR5Ucjs.Sparkline; exports.StyleRegistry = _chunkYN6JKAUEcjs.StyleRegistry; exports.TABLE_ACTIONS = _chunk64VWWR5Ucjs.TABLE_ACTIONS; exports.TRACK_CHANGES_SKIP_META = _chunk34RQAGWIcjs.TRACK_CHANGES_SKIP_META; exports.Table = _chunk64VWWR5Ucjs.Table; exports.TableCell = _chunk64VWWR5Ucjs.TableCell; exports.TableHeader = _chunk64VWWR5Ucjs.TableHeader; exports.TableOfContents = _chunkMKXK6E4Ocjs.TableOfContents; exports.TableRow = _chunk64VWWR5Ucjs.TableRow; exports.TemplateSuggestions = _chunkMKXK6E4Ocjs.TemplateSuggestions; exports.TrackChanges = _chunk34RQAGWIcjs.TrackChanges; exports.TrackChangesStore = _chunk34RQAGWIcjs.TrackChangesStore; exports.TrackedDeletion = _chunk34RQAGWIcjs.TrackedDeletion; exports.TrackedFormatChange = _chunk34RQAGWIcjs.TrackedFormatChange; exports.TrackedInsertion = _chunk34RQAGWIcjs.TrackedInsertion; exports.agentCaretPluginKey = _chunk64VWWR5Ucjs.agentCaretPluginKey; exports.applyDocumentComparison = _chunkMKXK6E4Ocjs.applyDocumentComparison; exports.applyReplacements = _chunk64VWWR5Ucjs.applyReplacements; exports.autocorrectPluginKey = _chunkMKXK6E4Ocjs.autocorrectPluginKey; exports.buildOutlineTree = _chunkMKXK6E4Ocjs.buildOutlineTree; exports.capitalizeSentenceRules = _chunkMKXK6E4Ocjs.capitalizeSentenceRules; exports.captureSelectionFormat = _chunkMKXK6E4Ocjs.captureSelectionFormat; exports.chartPluginKey = _chunk64VWWR5Ucjs.chartPluginKey; exports.clearAgentCaret = _chunk64VWWR5Ucjs.clearAgentCaret; exports.commentsPluginKey = _chunkMKXK6E4Ocjs.commentsPluginKey; exports.compareInEditor = _chunkMKXK6E4Ocjs.compareInEditor; exports.compileFindPattern = _chunk64VWWR5Ucjs.compileFindPattern; exports.computeOutline = _chunkMKXK6E4Ocjs.computeOutline; exports.createAgentCaretPlugin = _chunk64VWWR5Ucjs.createAgentCaretPlugin; exports.createChartNodeView = _chunk64VWWR5Ucjs.createChartNodeView; exports.createCommentStore = _chunk34RQAGWIcjs.createCommentStore; exports.createFindReplaceCommands = _chunkMKXK6E4Ocjs.createFindReplaceCommands; exports.createMentionExtension = _chunkMKXK6E4Ocjs.createMentionExtension; exports.createOutlineStore = _chunkMKXK6E4Ocjs.createOutlineStore; exports.createParagraphStylesStore = _chunkMKXK6E4Ocjs.createParagraphStylesStore; exports.createReviewId = _chunk34RQAGWIcjs.createReviewId; exports.createRichTextPreset = _chunkMKXK6E4Ocjs.createRichTextPreset; exports.createSearchBudget = _chunk64VWWR5Ucjs.createSearchBudget; exports.createStyleRegistry = _chunkYN6JKAUEcjs.createStyleRegistry; exports.createTableCommands = _chunkMKXK6E4Ocjs.createTableCommands; exports.createTableExtensions = _chunk64VWWR5Ucjs.createTableExtensions; exports.createTableNestingPlugin = _chunk64VWWR5Ucjs.createTableNestingPlugin; exports.createTableStore = _chunk64VWWR5Ucjs.createTableStore; exports.crossReferencePluginKey = _chunkMKXK6E4Ocjs.crossReferencePluginKey; exports.defaultAutocorrectRules = _chunkMKXK6E4Ocjs.defaultAutocorrectRules; exports.describeBlockChange = _chunk34RQAGWIcjs.describeBlockChange; exports.describeFormatChange = _chunk34RQAGWIcjs.describeFormatChange; exports.documentStructureCommandItems = _chunkMKXK6E4Ocjs.documentStructureCommandItems; exports.ensureAgentCaret = _chunk64VWWR5Ucjs.ensureAgentCaret; exports.expandReplacement = _chunk64VWWR5Ucjs.expandReplacement; exports.fileImportPluginKey = _chunkMKXK6E4Ocjs.fileImportPluginKey; exports.findAllMatches = _chunk64VWWR5Ucjs.findAllMatches; exports.findAutocorrection = _chunkMKXK6E4Ocjs.findAutocorrection; exports.findCommentRanges = _chunkMKXK6E4Ocjs.findCommentRanges; exports.findHexColors = _chunkMKXK6E4Ocjs.findHexColors; exports.findReplacePluginKey = _chunkMKXK6E4Ocjs.findReplacePluginKey; exports.foldCodePoint = _chunk64VWWR5Ucjs.foldCodePoint; exports.footnotesMarkdownIt = _chunkMKXK6E4Ocjs.footnotesMarkdownIt; exports.footnotesPluginKey = _chunkMKXK6E4Ocjs.footnotesPluginKey; exports.formatFindStatus = _chunkMKXK6E4Ocjs.formatFindStatus; exports.formatReviewTime = _chunk34RQAGWIcjs.formatReviewTime; exports.fractionRules = _chunkMKXK6E4Ocjs.fractionRules; exports.getActiveHeading = _chunkMKXK6E4Ocjs.getActiveHeading; exports.getAgentCarets = _chunk64VWWR5Ucjs.getAgentCarets; exports.getBookmarks = _chunkMKXK6E4Ocjs.getBookmarks; exports.getCommentAnchors = _chunkMKXK6E4Ocjs.getCommentAnchors; exports.getCommentAuthor = _chunkMKXK6E4Ocjs.getCommentAuthor; exports.getCommentIdsAt = _chunkMKXK6E4Ocjs.getCommentIdsAt; exports.getCommentStore = _chunkMKXK6E4Ocjs.getCommentStore; exports.getCrossReferenceTargets = _chunkMKXK6E4Ocjs.getCrossReferenceTargets; exports.getDocumentCharts = _chunk64VWWR5Ucjs.getDocumentCharts; exports.getDocumentStructureCommandItems = _chunkMKXK6E4Ocjs.getDocumentStructureCommandItems; exports.getFindReplaceState = _chunkMKXK6E4Ocjs.getFindReplaceState; exports.getFindReplaceStore = _chunkMKXK6E4Ocjs.getFindReplaceStore; exports.getFootnotes = _chunkMKXK6E4Ocjs.getFootnotes; exports.getMentionNodes = _chunkMKXK6E4Ocjs.getMentionNodes; exports.getOutline = _chunkMKXK6E4Ocjs.getOutline; exports.getParagraphStyleAt = _chunkMKXK6E4Ocjs.getParagraphStyleAt; exports.getStyleRegistry = _chunkMKXK6E4Ocjs.getStyleRegistry; exports.getTableActionState = _chunk64VWWR5Ucjs.getTableActionState; exports.getTableOfContentsEntries = _chunkMKXK6E4Ocjs.getTableOfContentsEntries; exports.getTableState = _chunk64VWWR5Ucjs.getTableState; exports.getTrackChangesStore = _chunk34RQAGWIcjs.getTrackChangesStore; exports.getTrackedChangeAt = _chunk34RQAGWIcjs.getTrackedChangeAt; exports.getTrackedChanges = _chunk34RQAGWIcjs.getTrackedChanges; exports.handleImageInsertion = _chunkMKXK6E4Ocjs.handleImageInsertion; exports.handleTablePasteWithoutNesting = _chunk64VWWR5Ucjs.handleTablePasteWithoutNesting; exports.imagePastePluginKey = _chunkMKXK6E4Ocjs.imagePastePluginKey; exports.insertImageNode = _chunkMKXK6E4Ocjs.insertImageNode; exports.insertSliceAfterTable = _chunk64VWWR5Ucjs.insertSliceAfterTable; exports.isChartEnabled = _chunk64VWWR5Ucjs.isChartEnabled; exports.isGfmTable = _chunk64VWWR5Ucjs.isGfmTable; exports.isInTableCell = _chunk64VWWR5Ucjs.isInTableCell; exports.isInsidePromptToken = _chunkMKXK6E4Ocjs.isInsidePromptToken; exports.isMoveSized = _chunk34RQAGWIcjs.isMoveSized; exports.isParagraphStyleAvailable = _chunkMKXK6E4Ocjs.isParagraphStyleAvailable; exports.isSelectionInTable = _chunk64VWWR5Ucjs.isSelectionInTable; exports.isTableEnabled = _chunk64VWWR5Ucjs.isTableEnabled; exports.isTrackChangesEnabled = _chunk34RQAGWIcjs.isTrackChangesEnabled; exports.isValidStyleId = _chunkYN6JKAUEcjs.isValidStyleId; exports.markAgentChanges = _chunk64VWWR5Ucjs.markAgentChanges; exports.navigateToHeading = _chunkMKXK6E4Ocjs.navigateToHeading; exports.normalizeSparklineValues = _chunk64VWWR5Ucjs.normalizeSparklineValues; exports.normalizeTableCellAlignment = _chunk64VWWR5Ucjs.normalizeTableCellAlignment; exports.normalizeTableCellColor = _chunk64VWWR5Ucjs.normalizeTableCellColor; exports.outermostTableDepth = _chunk64VWWR5Ucjs.outermostTableDepth; exports.outlinePluginKey = _chunkMKXK6E4Ocjs.outlinePluginKey; exports.paragraphStylesPluginKey = _chunkMKXK6E4Ocjs.paragraphStylesPluginKey; exports.parseReplacement = _chunk64VWWR5Ucjs.parseReplacement; exports.removeImageNode = _chunkMKXK6E4Ocjs.removeImageNode; exports.replaceWithTextTransaction = _chunk64VWWR5Ucjs.replaceWithTextTransaction; exports.resolveTrackedChanges = _chunk34RQAGWIcjs.resolveTrackedChanges; exports.richClipboardPluginKey = _chunkMKXK6E4Ocjs.richClipboardPluginKey; exports.runTableAction = _chunk64VWWR5Ucjs.runTableAction; exports.safeCSSValue = _chunkYN6JKAUEcjs.safeCSSValue; exports.safeMergeAttributes = _chunk34RQAGWIcjs.safeMergeAttributes; exports.searchDocument = _chunk64VWWR5Ucjs.searchDocument; exports.setAgentCaret = _chunk64VWWR5Ucjs.setAgentCaret; exports.setMentionRoleAt = _chunkMKXK6E4Ocjs.setMentionRoleAt; exports.shouldShowTableBubbleMenu = _chunk64VWWR5Ucjs.shouldShowTableBubbleMenu; exports.sliceContainsTable = _chunk64VWWR5Ucjs.sliceContainsTable; exports.smartQuoteRules = _chunkMKXK6E4Ocjs.smartQuoteRules; exports.smilieAutocorrectRules = _chunkMKXK6E4Ocjs.smilieAutocorrectRules; exports.sparklineLabel = _chunk64VWWR5Ucjs.sparklineLabel; exports.staticChartSvg = _chunk64VWWR5Ucjs.staticChartSvg; exports.symbolRules = _chunkMKXK6E4Ocjs.symbolRules; exports.syncFootnotes = _chunkMKXK6E4Ocjs.syncFootnotes; exports.tableNestingPluginKey = _chunk64VWWR5Ucjs.tableNestingPluginKey; exports.tableOfContentsMarkdownIt = _chunkMKXK6E4Ocjs.tableOfContentsMarkdownIt; exports.tableOfContentsPluginKey = _chunkMKXK6E4Ocjs.tableOfContentsPluginKey; exports.trackChangesPluginKey = _chunk34RQAGWIcjs.trackChangesPluginKey; exports.trackedChangeLabel = _chunk34RQAGWIcjs.trackedChangeLabel; exports.twoInitialCapitalsRules = _chunkMKXK6E4Ocjs.twoInitialCapitalsRules; exports.typeAgentText = _chunk64VWWR5Ucjs.typeAgentText; exports.unnestTables = _chunk64VWWR5Ucjs.unnestTables; exports.updateImageSrc = _chunkMKXK6E4Ocjs.updateImageSrc; exports.validateFindPattern = _chunkMKXK6E4Ocjs.validateFindPattern; exports.writeRichClipboard = _chunkMKXK6E4Ocjs.writeRichClipboard;
|
package/dist/extensions/index.js
CHANGED
|
@@ -95,7 +95,7 @@ import {
|
|
|
95
95
|
updateImageSrc,
|
|
96
96
|
validateFindPattern,
|
|
97
97
|
writeRichClipboard
|
|
98
|
-
} from "../chunk-
|
|
98
|
+
} from "../chunk-2J5VLJHC.js";
|
|
99
99
|
import {
|
|
100
100
|
DEFAULT_STYLES,
|
|
101
101
|
NORMAL_STYLE_ID,
|
|
@@ -104,7 +104,7 @@ import {
|
|
|
104
104
|
isValidStyleId,
|
|
105
105
|
safeCSSValue
|
|
106
106
|
} from "../chunk-CXXKJBQZ.js";
|
|
107
|
-
import "../chunk-
|
|
107
|
+
import "../chunk-CRFSQWKQ.js";
|
|
108
108
|
import "../chunk-V5OOP74P.js";
|
|
109
109
|
import {
|
|
110
110
|
ALLOW_NESTED_TABLES_META,
|
|
@@ -171,10 +171,12 @@ import {
|
|
|
171
171
|
tableNestingPluginKey,
|
|
172
172
|
typeAgentText,
|
|
173
173
|
unnestTables
|
|
174
|
-
} from "../chunk-
|
|
175
|
-
import "../chunk-
|
|
176
|
-
import "../chunk-
|
|
177
|
-
import "../chunk-
|
|
174
|
+
} from "../chunk-X5W645RI.js";
|
|
175
|
+
import "../chunk-FRBRLKNQ.js";
|
|
176
|
+
import "../chunk-KGRZMHZB.js";
|
|
177
|
+
import "../chunk-V5GSY3NC.js";
|
|
178
|
+
import "../chunk-2ZRN43IN.js";
|
|
179
|
+
import "../chunk-O6OGNDND.js";
|
|
178
180
|
import "../chunk-ZLZKGHSZ.js";
|
|
179
181
|
import "../chunk-2INPJDNY.js";
|
|
180
182
|
import "../chunk-RTRQ7XFI.js";
|
|
@@ -214,8 +216,9 @@ import "../chunk-CIQIM2IP.js";
|
|
|
214
216
|
import "../chunk-VDGBHYC7.js";
|
|
215
217
|
import "../chunk-HF5QZS7Z.js";
|
|
216
218
|
import "../chunk-RNSANXPT.js";
|
|
217
|
-
import "../chunk-
|
|
218
|
-
import "../chunk-
|
|
219
|
+
import "../chunk-7272D3K2.js";
|
|
220
|
+
import "../chunk-YBAPT7NL.js";
|
|
221
|
+
import "../chunk-MHLU6GRJ.js";
|
|
219
222
|
import "../chunk-6ONMQ6WF.js";
|
|
220
223
|
export {
|
|
221
224
|
ALLOW_NESTED_TABLES_META,
|
package/dist/gradient/index.cjs
CHANGED
|
@@ -7,13 +7,15 @@ var _chunkFJ2MSI43cjs = require('../chunk-FJ2MSI43.cjs');
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkEUIDTZNQcjs = require('../chunk-EUIDTZNQ.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
+
var _chunkTFF2GTGNcjs = require('../chunk-TFF2GTGN.cjs');
|
|
14
15
|
|
|
15
16
|
|
|
16
|
-
|
|
17
|
+
|
|
18
|
+
var _chunk5UEFBM2Mcjs = require('../chunk-5UEFBM2M.cjs');
|
|
17
19
|
require('../chunk-IPJ3TEYR.cjs');
|
|
18
20
|
|
|
19
21
|
// src/gradient/model.ts
|
|
@@ -69,9 +71,9 @@ function normalizeGradient(input) {
|
|
|
69
71
|
const rawStop = s;
|
|
70
72
|
let normColor = null;
|
|
71
73
|
if (typeof rawStop.color === "string" || rawStop.color && typeof rawStop.color === "object") {
|
|
72
|
-
const dual =
|
|
74
|
+
const dual = _chunkEUIDTZNQcjs.normalizeDualColor.call(void 0, rawStop.color);
|
|
73
75
|
if (dual) {
|
|
74
|
-
normColor =
|
|
76
|
+
normColor = _chunkEUIDTZNQcjs.formatDualColor.call(void 0, dual);
|
|
75
77
|
}
|
|
76
78
|
}
|
|
77
79
|
if (!normColor) {
|
|
@@ -141,7 +143,7 @@ function createGradient(colorsOrOptions, options) {
|
|
|
141
143
|
const stops = resolvedColors.map((color, i) => ({
|
|
142
144
|
id: `s${i + 1}`,
|
|
143
145
|
offset: i / (resolvedColors.length - 1),
|
|
144
|
-
color:
|
|
146
|
+
color: _chunkEUIDTZNQcjs.formatDualColor.call(void 0, _nullishCoalesce(_chunkEUIDTZNQcjs.normalizeDualColor.call(void 0, color), () => ( { light: "#000000", dark: "#000000" })))
|
|
145
147
|
}));
|
|
146
148
|
const res2 = normalizeGradient({
|
|
147
149
|
...options,
|
|
@@ -193,7 +195,7 @@ function isDualColorValue(val) {
|
|
|
193
195
|
if (typeof val === "string") {
|
|
194
196
|
return val.trim().toLowerCase().startsWith("light-dark(");
|
|
195
197
|
}
|
|
196
|
-
if (
|
|
198
|
+
if (_chunkEUIDTZNQcjs.isDualColor.call(void 0, val)) {
|
|
197
199
|
return val.light !== val.dark;
|
|
198
200
|
}
|
|
199
201
|
return false;
|
|
@@ -207,7 +209,7 @@ function resolveGradient(g, scheme) {
|
|
|
207
209
|
center: g.center ? { ...g.center } : void 0,
|
|
208
210
|
stops: g.stops.map((s) => ({
|
|
209
211
|
...s,
|
|
210
|
-
color: _nullishCoalesce(
|
|
212
|
+
color: _nullishCoalesce(_chunkEUIDTZNQcjs.resolveColor.call(void 0, s.color, scheme), () => ( s.color))
|
|
211
213
|
}))
|
|
212
214
|
};
|
|
213
215
|
}
|
|
@@ -235,7 +237,7 @@ function sampleGradient(g, t, scheme = "light") {
|
|
|
235
237
|
if (s0.midpoint !== void 0) {
|
|
236
238
|
u = gradientMidpointRemap(u, s0.midpoint);
|
|
237
239
|
}
|
|
238
|
-
const mixed =
|
|
240
|
+
const mixed = _chunkEUIDTZNQcjs.mixColors.call(void 0, s0.color, s1.color, u, { space: _nullishCoalesce(g.interpolation, () => ( "oklab")) });
|
|
239
241
|
return _nullishCoalesce(mixed, () => ( s0.color));
|
|
240
242
|
}
|
|
241
243
|
function insertGradientStop(g, offset, color) {
|
|
@@ -574,12 +576,12 @@ ${stopsXml.join("\n")}
|
|
|
574
576
|
</linearGradient>`;
|
|
575
577
|
}
|
|
576
578
|
function checkGradient(g, options = {}) {
|
|
577
|
-
const dual = isDualGradient(g) ||
|
|
579
|
+
const dual = isDualGradient(g) || _chunkEUIDTZNQcjs.isDualColor.call(void 0, options.surface) || _chunkEUIDTZNQcjs.isDualColor.call(void 0, options.text);
|
|
578
580
|
if (dual) {
|
|
579
581
|
const lightG = resolveGradient(g, "light");
|
|
580
582
|
const darkG = resolveGradient(g, "dark");
|
|
581
|
-
const lightText = options.text ? _nullishCoalesce(
|
|
582
|
-
const darkText = options.text ? _nullishCoalesce(
|
|
583
|
+
const lightText = options.text ? _nullishCoalesce(_chunkEUIDTZNQcjs.resolveColor.call(void 0, options.text, "light"), () => ( void 0)) : void 0;
|
|
584
|
+
const darkText = options.text ? _nullishCoalesce(_chunkEUIDTZNQcjs.resolveColor.call(void 0, options.text, "dark"), () => ( void 0)) : void 0;
|
|
583
585
|
const checkScheme = (grad, txt, schemeName) => {
|
|
584
586
|
const issues2 = [];
|
|
585
587
|
for (let i = 0; i < grad.stops.length - 1; i++) {
|
|
@@ -587,10 +589,10 @@ function checkGradient(g, options = {}) {
|
|
|
587
589
|
if (gap < 5e-3) {
|
|
588
590
|
issues2.push(`[${schemeName}] Stops "${grad.stops[i].id}" and "${grad.stops[i + 1].id}" are too close (gap < 0.005).`);
|
|
589
591
|
}
|
|
590
|
-
const c1 =
|
|
591
|
-
const c2 =
|
|
592
|
+
const c1 = _chunk5UEFBM2Mcjs.parseColor.call(void 0, grad.stops[i].color);
|
|
593
|
+
const c2 = _chunk5UEFBM2Mcjs.parseColor.call(void 0, grad.stops[i + 1].color);
|
|
592
594
|
if (c1 && c2 && gap < 0.05) {
|
|
593
|
-
const dE =
|
|
595
|
+
const dE = _chunkTFF2GTGNcjs.deltaEOK.call(void 0, c1, c2);
|
|
594
596
|
if (dE > 0.5) {
|
|
595
597
|
issues2.push(
|
|
596
598
|
`[${schemeName}] Banding risk between stops "${grad.stops[i].id}" and "${grad.stops[i + 1].id}" (\u0394EOK = ${dE.toFixed(2)} across gap ${gap.toFixed(3)}).`
|
|
@@ -599,20 +601,20 @@ function checkGradient(g, options = {}) {
|
|
|
599
601
|
}
|
|
600
602
|
}
|
|
601
603
|
for (const s of grad.stops) {
|
|
602
|
-
const c =
|
|
603
|
-
if (c && !
|
|
604
|
+
const c = _chunk5UEFBM2Mcjs.parseColor.call(void 0, s.color);
|
|
605
|
+
if (c && !_chunkTFF2GTGNcjs.inSrgbGamut.call(void 0, c)) {
|
|
604
606
|
issues2.push(`[${schemeName}] Stop "${s.id}" colour ${s.color} is outside standard sRGB gamut.`);
|
|
605
607
|
}
|
|
606
608
|
}
|
|
607
609
|
let lowest;
|
|
608
610
|
if (txt) {
|
|
609
|
-
const parsedTxt =
|
|
611
|
+
const parsedTxt = _chunk5UEFBM2Mcjs.parseColor.call(void 0, txt);
|
|
610
612
|
if (parsedTxt) {
|
|
611
613
|
let minRatio = Infinity;
|
|
612
614
|
for (let step = 0; step <= 32; step++) {
|
|
613
|
-
const sample =
|
|
615
|
+
const sample = _chunk5UEFBM2Mcjs.parseColor.call(void 0, sampleGradient(grad, step / 32, schemeName));
|
|
614
616
|
if (sample) {
|
|
615
|
-
const r =
|
|
617
|
+
const r = _chunk5UEFBM2Mcjs.contrastRatio.call(void 0, parsedTxt, sample);
|
|
616
618
|
if (r < minRatio) minRatio = r;
|
|
617
619
|
}
|
|
618
620
|
}
|
|
@@ -634,10 +636,10 @@ function checkGradient(g, options = {}) {
|
|
|
634
636
|
if (gap < 5e-3) {
|
|
635
637
|
issues.push(`Stops "${g.stops[i].id}" and "${g.stops[i + 1].id}" are too close (gap < 0.005).`);
|
|
636
638
|
}
|
|
637
|
-
const c1 =
|
|
638
|
-
const c2 =
|
|
639
|
+
const c1 = _chunk5UEFBM2Mcjs.parseColor.call(void 0, g.stops[i].color);
|
|
640
|
+
const c2 = _chunk5UEFBM2Mcjs.parseColor.call(void 0, g.stops[i + 1].color);
|
|
639
641
|
if (c1 && c2 && gap < 0.05) {
|
|
640
|
-
const dE =
|
|
642
|
+
const dE = _chunkTFF2GTGNcjs.deltaEOK.call(void 0, c1, c2);
|
|
641
643
|
if (dE > 0.5) {
|
|
642
644
|
issues.push(
|
|
643
645
|
`Banding risk between stops "${g.stops[i].id}" and "${g.stops[i + 1].id}" (\u0394EOK = ${dE.toFixed(2)} across gap ${gap.toFixed(3)}).`
|
|
@@ -646,20 +648,20 @@ function checkGradient(g, options = {}) {
|
|
|
646
648
|
}
|
|
647
649
|
}
|
|
648
650
|
for (const s of g.stops) {
|
|
649
|
-
const c =
|
|
650
|
-
if (c && !
|
|
651
|
+
const c = _chunk5UEFBM2Mcjs.parseColor.call(void 0, s.color);
|
|
652
|
+
if (c && !_chunkTFF2GTGNcjs.inSrgbGamut.call(void 0, c)) {
|
|
651
653
|
issues.push(`Stop "${s.id}" colour ${s.color} is outside standard sRGB gamut.`);
|
|
652
654
|
}
|
|
653
655
|
}
|
|
654
656
|
let lowestTextContrast;
|
|
655
657
|
if (options.text) {
|
|
656
|
-
const parsedTxt =
|
|
658
|
+
const parsedTxt = _chunk5UEFBM2Mcjs.parseColor.call(void 0, options.text);
|
|
657
659
|
if (parsedTxt) {
|
|
658
660
|
let minRatio = Infinity;
|
|
659
661
|
for (let step = 0; step <= 32; step++) {
|
|
660
|
-
const sample =
|
|
662
|
+
const sample = _chunk5UEFBM2Mcjs.parseColor.call(void 0, sampleGradient(g, step / 32, "light"));
|
|
661
663
|
if (sample) {
|
|
662
|
-
const r =
|
|
664
|
+
const r = _chunk5UEFBM2Mcjs.contrastRatio.call(void 0, parsedTxt, sample);
|
|
663
665
|
if (r < minRatio) minRatio = r;
|
|
664
666
|
}
|
|
665
667
|
}
|
package/dist/gradient/index.js
CHANGED
|
@@ -7,13 +7,15 @@ import {
|
|
|
7
7
|
mixColors,
|
|
8
8
|
normalizeDualColor,
|
|
9
9
|
resolveColor
|
|
10
|
-
} from "../chunk-
|
|
10
|
+
} from "../chunk-7272D3K2.js";
|
|
11
11
|
import {
|
|
12
|
-
contrastRatio,
|
|
13
12
|
deltaEOK,
|
|
14
|
-
inSrgbGamut
|
|
13
|
+
inSrgbGamut
|
|
14
|
+
} from "../chunk-YBAPT7NL.js";
|
|
15
|
+
import {
|
|
16
|
+
contrastRatio,
|
|
15
17
|
parseColor
|
|
16
|
-
} from "../chunk-
|
|
18
|
+
} from "../chunk-MHLU6GRJ.js";
|
|
17
19
|
import "../chunk-6ONMQ6WF.js";
|
|
18
20
|
|
|
19
21
|
// src/gradient/model.ts
|