@arbidocs/blocks 0.4.122 → 0.4.124
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/{StreamedArtifactEditor-IZWYNFMM.cjs → StreamedArtifactEditor-DNBDUNP2.cjs} +5 -5
- package/dist/{StreamedArtifactEditor-IZWYNFMM.cjs.map → StreamedArtifactEditor-DNBDUNP2.cjs.map} +1 -1
- package/dist/{StreamedArtifactEditor-HTNPG4NB.js → StreamedArtifactEditor-WDHPTWX7.js} +3 -3
- package/dist/{StreamedArtifactEditor-HTNPG4NB.js.map → StreamedArtifactEditor-WDHPTWX7.js.map} +1 -1
- package/dist/agents/index.cjs +390 -326
- package/dist/agents/index.js +9 -9
- package/dist/agents/tasks/ConversationListView.d.ts +2 -1
- package/dist/agents/tasks/ConversationTurnSpeaker.d.ts +3 -1
- package/dist/agents/tasks/TaskFlow.d.ts +17 -0
- package/dist/agents/tasks/ThreadLauncher.d.ts +51 -0
- package/dist/agents/tasks/ThreadStatusLine.d.ts +33 -0
- package/dist/agents/tasks/WorkflowRunStatus.d.ts +32 -0
- package/dist/agents/tasks/WorkflowThreadStrip.d.ts +29 -3
- package/dist/agents/tasks/compact-thread-activity.d.ts +5 -2
- package/dist/agents/tasks/index.d.ts +3 -0
- package/dist/agents/workflows/StepBarFrame.d.ts +18 -17
- package/dist/agents/workflows/StepChip.d.ts +37 -0
- package/dist/agents/workflows/StepDocuments.d.ts +64 -0
- package/dist/agents/workflows/WorkflowStepBar.d.ts +1 -2
- package/dist/agents/workflows/index.d.ts +2 -0
- package/dist/agents/workflows/stepKinds.d.ts +24 -0
- package/dist/artifacts/VersionTimeline.d.ts +7 -0
- package/dist/artifacts/index.cjs +21 -21
- package/dist/artifacts/index.js +1 -1
- package/dist/chat/ChatPage.d.ts +1 -1
- package/dist/chat/DraftingDocChip.d.ts +22 -0
- package/dist/chat/WorkflowStepChip.d.ts +23 -5
- package/dist/chat/chat-page-types.d.ts +18 -2
- package/dist/chat/flashMessage.d.ts +6 -0
- package/dist/chat/index.cjs +144 -131
- package/dist/chat/index.d.ts +2 -0
- package/dist/chat/index.js +4 -3
- package/dist/{chunk-SHASZLGD.js → chunk-3AV7HP6G.js} +3 -3
- package/dist/{chunk-SHASZLGD.js.map → chunk-3AV7HP6G.js.map} +1 -1
- package/dist/{chunk-UDK553WP.cjs → chunk-4VCKYR4D.cjs} +4 -4
- package/dist/{chunk-UDK553WP.cjs.map → chunk-4VCKYR4D.cjs.map} +1 -1
- package/dist/chunk-7HAM7Y5U.js +907 -0
- package/dist/chunk-7HAM7Y5U.js.map +1 -0
- package/dist/{chunk-TCNYKDYE.js → chunk-CXLVI3SB.js} +73 -40
- package/dist/chunk-CXLVI3SB.js.map +1 -0
- package/dist/{chunk-N7ARMX3O.cjs → chunk-D7WCGOD4.cjs} +3 -3
- package/dist/{chunk-N7ARMX3O.cjs.map → chunk-D7WCGOD4.cjs.map} +1 -1
- package/dist/{chunk-ZP4IFW2E.js → chunk-EJSJ27HV.js} +733 -185
- package/dist/chunk-EJSJ27HV.js.map +1 -0
- package/dist/{chunk-AY32GGKU.js → chunk-ERNMU6RV.js} +132 -752
- package/dist/chunk-ERNMU6RV.js.map +1 -0
- package/dist/{chunk-XFZ7HNPG.js → chunk-ETN5EZI4.js} +3 -3
- package/dist/{chunk-XFZ7HNPG.js.map → chunk-ETN5EZI4.js.map} +1 -1
- package/dist/{chunk-Z2NSU7D5.cjs → chunk-FL5TEBTM.cjs} +770 -216
- package/dist/chunk-FL5TEBTM.cjs.map +1 -0
- package/dist/chunk-HM23LXUP.cjs +976 -0
- package/dist/chunk-HM23LXUP.cjs.map +1 -0
- package/dist/{chunk-WN64RF46.js → chunk-HQH35JWC.js} +3 -3
- package/dist/{chunk-WN64RF46.js.map → chunk-HQH35JWC.js.map} +1 -1
- package/dist/{chunk-XSUOEJB3.cjs → chunk-MRURIBBB.cjs} +163 -837
- package/dist/chunk-MRURIBBB.cjs.map +1 -0
- package/dist/{chunk-65HZ36MY.js → chunk-OTDGTBAS.js} +20 -3
- package/dist/chunk-OTDGTBAS.js.map +1 -0
- package/dist/{chunk-CK4C3IQR.cjs → chunk-VMZXFYHK.cjs} +47 -6
- package/dist/chunk-VMZXFYHK.cjs.map +1 -0
- package/dist/{chunk-SVJQWLOF.cjs → chunk-W4GXDARU.cjs} +20 -3
- package/dist/chunk-W4GXDARU.cjs.map +1 -0
- package/dist/{chunk-US5ASM4G.cjs → chunk-WEUCLOBB.cjs} +5 -5
- package/dist/{chunk-US5ASM4G.cjs.map → chunk-WEUCLOBB.cjs.map} +1 -1
- package/dist/{chunk-S2KVJYBD.cjs → chunk-WV4IDVDQ.cjs} +76 -43
- package/dist/chunk-WV4IDVDQ.cjs.map +1 -0
- package/dist/{chunk-2FUJXMGO.js → chunk-Y4X3RBFI.js} +44 -6
- package/dist/{chunk-CK4C3IQR.cjs.map → chunk-Y4X3RBFI.js.map} +1 -1
- package/dist/collaboration/index.cjs +1 -1
- package/dist/collaboration/index.js +1 -1
- package/dist/connect/docx.cjs +4 -4
- package/dist/connect/docx.js +3 -3
- package/dist/connect/index.cjs +68 -51
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/index.js +37 -20
- package/dist/connect/index.js.map +1 -1
- package/dist/connection/WorkflowRunThread.d.ts +4 -4
- package/dist/connection/ai.d.ts +2 -0
- package/dist/facts/index.cjs +1 -1
- package/dist/facts/index.js +1 -1
- package/dist/files/index.cjs +3 -3
- package/dist/files/index.js +3 -3
- package/dist/index.cjs +728 -652
- package/dist/index.js +16 -16
- package/dist/settings/index.cjs +1 -1
- package/dist/settings/index.js +1 -1
- package/dist/shell/index.cjs +10 -10
- package/dist/shell/index.js +2 -2
- package/dist/site/index.cjs +5 -5
- package/dist/site/index.js +1 -1
- package/dist/studio/index.cjs +6 -5
- package/dist/studio/index.cjs.map +1 -1
- package/dist/studio/index.js +5 -4
- package/dist/studio/index.js.map +1 -1
- package/dist/workflow-canvas/WorkflowCanvas.d.ts +0 -9
- package/dist/workflow-canvas/edit.d.ts +2 -11
- package/dist/workflow-canvas/index.cjs +63 -87
- package/dist/workflow-canvas/index.cjs.map +1 -1
- package/dist/workflow-canvas/index.js +14 -38
- package/dist/workflow-canvas/index.js.map +1 -1
- package/node_modules/@arbidocs/coedit/dist/commands.cjs +25 -13
- package/node_modules/@arbidocs/coedit/dist/commands.cjs.map +1 -1
- package/node_modules/@arbidocs/coedit/dist/commands.d.cts +3 -1
- package/node_modules/@arbidocs/coedit/dist/commands.d.ts +3 -1
- package/node_modules/@arbidocs/coedit/dist/commands.js +25 -14
- package/node_modules/@arbidocs/coedit/dist/commands.js.map +1 -1
- package/node_modules/@arbidocs/coedit/package.json +1 -1
- package/package.json +4 -4
- package/src/blocks.css +168 -0
- package/src/workflow-canvas/canvas.css +2 -40
- package/dist/chunk-2FUJXMGO.js.map +0 -1
- package/dist/chunk-65HZ36MY.js.map +0 -1
- package/dist/chunk-AY32GGKU.js.map +0 -1
- package/dist/chunk-B4SRYJLM.cjs +0 -107
- package/dist/chunk-B4SRYJLM.cjs.map +0 -1
- package/dist/chunk-HOXKR26S.js +0 -103
- package/dist/chunk-HOXKR26S.js.map +0 -1
- package/dist/chunk-S2KVJYBD.cjs.map +0 -1
- package/dist/chunk-SVJQWLOF.cjs.map +0 -1
- package/dist/chunk-TCNYKDYE.js.map +0 -1
- package/dist/chunk-XSUOEJB3.cjs.map +0 -1
- package/dist/chunk-Z2NSU7D5.cjs.map +0 -1
- package/dist/chunk-ZP4IFW2E.js.map +0 -1
|
@@ -1171,19 +1171,28 @@ function definitionOfAnchor(anchor, definitions) {
|
|
|
1171
1171
|
// src/commands/everywhere.ts
|
|
1172
1172
|
var WORD = "[\\p{L}\\p{N}_\\-\u2010\u2011]";
|
|
1173
1173
|
var escape = (text) => text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
1174
|
+
var ARTICLE = /^(the|a|an|this|that|such|said)\s+/i;
|
|
1175
|
+
var withoutArticle = (words) => words.replace(/\s+/g, " ").trim().replace(ARTICLE, "");
|
|
1176
|
+
var anyCase = (word) => `[${word[0].toUpperCase()}${word[0].toLowerCase()}]${escape(word.slice(1))}`;
|
|
1174
1177
|
function needlesOf(spec) {
|
|
1175
|
-
const term = spec.term
|
|
1176
|
-
const
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1178
|
+
const term = withoutArticle(spec.term);
|
|
1179
|
+
const seen = /* @__PURE__ */ new Set();
|
|
1180
|
+
const needles = [];
|
|
1181
|
+
for (const raw of spec.variants ?? []) {
|
|
1182
|
+
const words = raw.replace(/\s+/g, " ").trim();
|
|
1183
|
+
const article = ARTICLE.exec(words)?.[1] ?? "";
|
|
1184
|
+
const text = words.slice(article ? ARTICLE.exec(words)[0].length : 0);
|
|
1185
|
+
const key = `${article.toLowerCase()} ${text}`;
|
|
1186
|
+
if (!text || text === term || seen.has(key)) continue;
|
|
1187
|
+
seen.add(key);
|
|
1188
|
+
needles.push({ text, article, kind: "variant" });
|
|
1189
|
+
}
|
|
1190
|
+
if (spec.link) needles.push({ text: term, article: "", kind: "term" });
|
|
1183
1191
|
return needles.map((n) => ({
|
|
1184
|
-
|
|
1192
|
+
text: n.text,
|
|
1193
|
+
kind: n.kind,
|
|
1185
1194
|
pattern: new RegExp(
|
|
1186
|
-
`(?<!${WORD})${n.text.split(" ").map(escape).join("\\s+")}(?!${WORD})`,
|
|
1195
|
+
`(?<!${WORD})(${n.article ? `${anyCase(n.article)}\\s+` : ""})(${n.text.split(" ").map(escape).join("\\s+")})(?!${WORD})`,
|
|
1187
1196
|
"gu"
|
|
1188
1197
|
)
|
|
1189
1198
|
}));
|
|
@@ -1192,7 +1201,7 @@ function matchesIn(text, needles) {
|
|
|
1192
1201
|
const found = [];
|
|
1193
1202
|
for (const needle of needles)
|
|
1194
1203
|
for (const m of text.matchAll(needle.pattern))
|
|
1195
|
-
found.push({ offset: m.index ?? 0, text: m[
|
|
1204
|
+
found.push({ offset: (m.index ?? 0) + m[1].length, text: m[2], kind: needle.kind });
|
|
1196
1205
|
found.sort((a, b) => a.offset - b.offset || b.text.length - a.text.length);
|
|
1197
1206
|
const out = [];
|
|
1198
1207
|
for (const m of found)
|
|
@@ -1203,7 +1212,9 @@ function matchesIn(text, needles) {
|
|
|
1203
1212
|
var overlaps = (start, end, from, to) => start < to && from < end;
|
|
1204
1213
|
function findTermUses(paragraphs, spec, bookmark) {
|
|
1205
1214
|
const needles = needlesOf(spec);
|
|
1206
|
-
const defining = new Set(
|
|
1215
|
+
const defining = new Set(
|
|
1216
|
+
[spec.term, ...spec.variants ?? []].map((w) => termKey(withoutArticle(w)))
|
|
1217
|
+
);
|
|
1207
1218
|
const uses = [];
|
|
1208
1219
|
const skipped = [];
|
|
1209
1220
|
for (const p of paragraphs) {
|
|
@@ -1242,7 +1253,7 @@ var TermEverywhereError = class extends Error {
|
|
|
1242
1253
|
}
|
|
1243
1254
|
};
|
|
1244
1255
|
function applyTermEverywhere(port, spec, { accept } = {}) {
|
|
1245
|
-
const term = spec.term
|
|
1256
|
+
const term = withoutArticle(spec.term);
|
|
1246
1257
|
if (!term) throw new Error("Name the defined term.");
|
|
1247
1258
|
let addedDefinition = false;
|
|
1248
1259
|
let link;
|
|
@@ -1419,5 +1430,6 @@ exports.tableState = tableState;
|
|
|
1419
1430
|
exports.termKey = termKey;
|
|
1420
1431
|
exports.termLinkXml = termLinkXml;
|
|
1421
1432
|
exports.undoOps = undoOps;
|
|
1433
|
+
exports.withoutArticle = withoutArticle;
|
|
1422
1434
|
//# sourceMappingURL=commands.cjs.map
|
|
1423
1435
|
//# sourceMappingURL=commands.cjs.map
|