@arbidocs/blocks 0.4.102 → 0.4.104
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/agents/index.cjs +207 -207
- package/dist/agents/index.js +2 -2
- package/dist/{chunk-AOFATOT3.cjs → chunk-2A4MDHJR.cjs} +7 -5
- package/dist/chunk-2A4MDHJR.cjs.map +1 -0
- package/dist/{chunk-G5JH2YMQ.js → chunk-4GFB5U3K.js} +3 -3
- package/dist/{chunk-G5JH2YMQ.js.map → chunk-4GFB5U3K.js.map} +1 -1
- package/dist/chunk-5FYU7ZIU.cjs +139 -0
- package/dist/chunk-5FYU7ZIU.cjs.map +1 -0
- package/dist/{chunk-Y5XW57U4.cjs → chunk-7LLLQUM7.cjs} +5 -5
- package/dist/{chunk-Y5XW57U4.cjs.map → chunk-7LLLQUM7.cjs.map} +1 -1
- package/dist/{chunk-D3QPYKZG.js → chunk-EPHGD4YV.js} +7 -6
- package/dist/chunk-EPHGD4YV.js.map +1 -0
- package/dist/chunk-HFZ45FD3.js +133 -0
- package/dist/chunk-HFZ45FD3.js.map +1 -0
- package/dist/{chunk-5NQIBJPP.js → chunk-NJX774HB.js} +3 -3
- package/dist/{chunk-5NQIBJPP.js.map → chunk-NJX774HB.js.map} +1 -1
- package/dist/{chunk-DDYXFALG.cjs → chunk-NW3LFDZL.cjs} +3 -3
- package/dist/{chunk-DDYXFALG.cjs.map → chunk-NW3LFDZL.cjs.map} +1 -1
- package/dist/{chunk-YGREW5TZ.js → chunk-PIT2YZCK.js} +3 -3
- package/dist/{chunk-YGREW5TZ.js.map → chunk-PIT2YZCK.js.map} +1 -1
- package/dist/{chunk-Z3G65XHZ.js → chunk-S55VDTX3.js} +3 -3
- package/dist/{chunk-Z3G65XHZ.js.map → chunk-S55VDTX3.js.map} +1 -1
- package/dist/{chunk-LENXDIMY.cjs → chunk-SKSE4OT6.cjs} +22 -22
- package/dist/{chunk-LENXDIMY.cjs.map → chunk-SKSE4OT6.cjs.map} +1 -1
- package/dist/{chunk-ZT2EBBSC.cjs → chunk-TP3FAP5J.cjs} +5 -5
- package/dist/{chunk-ZT2EBBSC.cjs.map → chunk-TP3FAP5J.cjs.map} +1 -1
- package/dist/{chunk-MYALCKDR.js → chunk-W2RTZOK3.js} +1533 -263
- package/dist/chunk-W2RTZOK3.js.map +1 -0
- package/dist/{chunk-FAGQTB3D.cjs → chunk-ZWWN4CUL.cjs} +1690 -408
- package/dist/chunk-ZWWN4CUL.cjs.map +1 -0
- package/dist/connect/docx.cjs +8 -7
- package/dist/connect/docx.cjs.map +1 -1
- package/dist/connect/docx.js +6 -5
- package/dist/connect/docx.js.map +1 -1
- package/dist/connect/index.cjs +12 -11
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/index.js +5 -4
- package/dist/connect/index.js.map +1 -1
- package/dist/docx/LinkHoverCard.d.ts +24 -0
- package/dist/docx/NativeDocxEditor.d.ts +6 -0
- package/dist/docx/RibbonMenu.d.ts +4 -1
- package/dist/docx/RibbonOverflow.d.ts +27 -0
- package/dist/docx/WordReferences.d.ts +3 -2
- package/dist/docx/beforeSave.d.ts +9 -0
- package/dist/docx/definitions/fragment.d.ts +19 -1
- package/dist/docx/definitions/port.d.ts +43 -11
- package/dist/docx/index.cjs +85 -36
- package/dist/docx/index.cjs.map +1 -1
- package/dist/docx/index.d.ts +6 -0
- package/dist/docx/index.js +5 -4
- package/dist/docx/index.js.map +1 -1
- package/dist/docx/noteStyles.d.ts +46 -0
- package/dist/docx/overflowPlan.d.ts +15 -0
- package/dist/docx/references/CrossReferences.d.ts +97 -0
- package/dist/docx/references/EditorMenus.d.ts +10 -0
- package/dist/docx/references/commands.d.ts +119 -0
- package/dist/docx/references/numbering.d.ts +49 -0
- package/dist/docx/references/passages.d.ts +32 -0
- package/dist/docx/references/port.d.ts +20 -0
- package/dist/facts/index.cjs +22 -129
- package/dist/facts/index.cjs.map +1 -1
- package/dist/facts/index.js +3 -125
- package/dist/facts/index.js.map +1 -1
- package/dist/files/index.cjs +1 -1
- package/dist/files/index.js +1 -1
- package/dist/home/index.cjs +1 -1
- package/dist/home/index.js +1 -1
- package/dist/index.cjs +314 -314
- package/dist/index.js +8 -8
- package/dist/shell/index.cjs +1 -1
- package/dist/shell/index.js +1 -1
- package/dist/studio/index.cjs +1 -1
- package/dist/studio/index.js +1 -1
- package/dist/tags/ooxml.d.ts +4 -0
- package/dist/workflow-canvas/index.cjs +9 -9
- package/dist/workflow-canvas/index.js +2 -2
- package/node_modules/@arbidocs/coedit/package.json +1 -1
- package/package.json +4 -4
- package/src/docx/README.md +32 -0
- package/src/docx/styles.css +73 -5
- package/dist/chunk-AOFATOT3.cjs.map +0 -1
- package/dist/chunk-D3QPYKZG.js.map +0 -1
- package/dist/chunk-FAGQTB3D.cjs.map +0 -1
- package/dist/chunk-MYALCKDR.js.map +0 -1
package/dist/facts/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
export { DEFAULT_FACT_PASSAGES_LABELS, FactPassageItem, FactSourcesPanel, renderPreviewInline, toPreviewLine } from '../chunk-HFZ45FD3.js';
|
|
2
3
|
import { ViewToggle } from '../chunk-JJA6GQKH.js';
|
|
3
4
|
import { SearchHit } from '../chunk-A2YAC22G.js';
|
|
4
5
|
import { formatSpan, TimelineCalendar, TimelineGantt } from '../chunk-4EZVCGRL.js';
|
|
@@ -8,8 +9,8 @@ import { TabHeader } from '../chunk-4WWM3GQ5.js';
|
|
|
8
9
|
import { SelectionBar, SelectionBarAction } from '../chunk-NUNKSZKU.js';
|
|
9
10
|
import { FilterInput } from '../chunk-YU2KUMGE.js';
|
|
10
11
|
export { DEFAULT_FILTER_INPUT_LABELS as DEFAULT_FACTS_FILTER_INPUT_LABELS, DEFAULT_FILTER_FIELDS as FACTS_SEARCH_FIELD_OPTIONS, FilterInput as FactsFilterInput } from '../chunk-YU2KUMGE.js';
|
|
11
|
-
import { observeResize } from '../chunk-NPLYHR2E.js';
|
|
12
12
|
import '../chunk-76JDDMSP.js';
|
|
13
|
+
import { observeResize } from '../chunk-NPLYHR2E.js';
|
|
13
14
|
import { initials } from '../chunk-OXF2IFXG.js';
|
|
14
15
|
import { GridView } from '../chunk-ZPLG7QYF.js';
|
|
15
16
|
import '../chunk-SLSBJRWW.js';
|
|
@@ -1118,129 +1119,6 @@ function FactDateInput({ value, onChange, idPrefix, labels, testIds }) {
|
|
|
1118
1119
|
] })
|
|
1119
1120
|
] }) });
|
|
1120
1121
|
}
|
|
1121
|
-
var DEFAULT_FACT_PASSAGES_LABELS = {
|
|
1122
|
-
loading: "Loading passage\u2026",
|
|
1123
|
-
close: "Close"
|
|
1124
|
-
};
|
|
1125
|
-
function toPreviewLine(md) {
|
|
1126
|
-
return md.replace(/`{1,3}([^`]*)`{1,3}/g, "$1").replace(/!\[[^\]]*\]\([^)]*\)/g, "").replace(/\[([^\]]*)\]\([^)]*\)/g, "$1").replace(/^[>\s]*#{1,6}\s*/gm, "").replace(/^[>\s]*[-*+]\s+/gm, "").replace(/[*_~]/g, "").replace(/\|/g, " ").replace(/\s+/g, " ").trim();
|
|
1127
|
-
}
|
|
1128
|
-
var SUP_SUB_RE = /<(sup|sub)>([\s\S]*?)<\/\1>/gi;
|
|
1129
|
-
var STRAY_SUP_SUB_RE = /<\/?(?:sup|sub)>/gi;
|
|
1130
|
-
var stripStrayTags = (s) => s.replace(STRAY_SUP_SUB_RE, "");
|
|
1131
|
-
function renderPreviewInline(line) {
|
|
1132
|
-
const nodes = [];
|
|
1133
|
-
let last = 0;
|
|
1134
|
-
let key = 0;
|
|
1135
|
-
for (const m of line.matchAll(SUP_SUB_RE)) {
|
|
1136
|
-
const start = m.index ?? 0;
|
|
1137
|
-
if (start > last) nodes.push(stripStrayTags(line.slice(last, start)));
|
|
1138
|
-
const inner = stripStrayTags(m[2]);
|
|
1139
|
-
nodes.push(
|
|
1140
|
-
m[1].toLowerCase() === "sup" ? /* @__PURE__ */ jsx("sup", { children: inner }, key++) : /* @__PURE__ */ jsx("sub", { children: inner }, key++)
|
|
1141
|
-
);
|
|
1142
|
-
last = start + m[0].length;
|
|
1143
|
-
}
|
|
1144
|
-
if (last < line.length) nodes.push(stripStrayTags(line.slice(last)));
|
|
1145
|
-
return nodes;
|
|
1146
|
-
}
|
|
1147
|
-
function FactPassageItem({
|
|
1148
|
-
index,
|
|
1149
|
-
page,
|
|
1150
|
-
excerpt,
|
|
1151
|
-
isViewing,
|
|
1152
|
-
onSelect,
|
|
1153
|
-
testId,
|
|
1154
|
-
className,
|
|
1155
|
-
labels
|
|
1156
|
-
}) {
|
|
1157
|
-
const l = { ...DEFAULT_FACT_PASSAGES_LABELS, ...labels };
|
|
1158
|
-
return /* @__PURE__ */ jsxs(
|
|
1159
|
-
"button",
|
|
1160
|
-
{
|
|
1161
|
-
type: "button",
|
|
1162
|
-
onClick: onSelect,
|
|
1163
|
-
"data-testid": testIdOr(testId, { testId: "fact-source-passage" }),
|
|
1164
|
-
"aria-current": isViewing || void 0,
|
|
1165
|
-
className: cn(
|
|
1166
|
-
"flex w-full items-start gap-2 rounded px-2 py-1.5 text-left text-xs transition-colors pointer-coarse:min-h-11",
|
|
1167
|
-
isViewing ? "bg-ai-soft text-foreground ring-1 ring-ai-accent/40" : "bg-ai-soft/60 text-foreground hover:bg-ai-soft",
|
|
1168
|
-
className
|
|
1169
|
-
),
|
|
1170
|
-
children: [
|
|
1171
|
-
/* @__PURE__ */ jsxs("span", { className: "mt-0.5 shrink-0 rounded bg-muted px-1 py-0.5 font-mono text-xs text-muted-foreground", children: [
|
|
1172
|
-
index + 1,
|
|
1173
|
-
"."
|
|
1174
|
-
] }),
|
|
1175
|
-
page != null && /* @__PURE__ */ jsxs("span", { className: "mt-0.5 shrink-0 rounded-full bg-muted px-1.5 py-0.5 font-mono text-xs text-muted-foreground", children: [
|
|
1176
|
-
"p.",
|
|
1177
|
-
page
|
|
1178
|
-
] }),
|
|
1179
|
-
/* @__PURE__ */ jsx("span", { className: "block min-w-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap", children: excerpt ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1180
|
-
"\u201C",
|
|
1181
|
-
renderPreviewInline(toPreviewLine(excerpt)),
|
|
1182
|
-
"\u201D"
|
|
1183
|
-
] }) : l.loading })
|
|
1184
|
-
]
|
|
1185
|
-
}
|
|
1186
|
-
);
|
|
1187
|
-
}
|
|
1188
|
-
function FactSourcesPanel({
|
|
1189
|
-
title,
|
|
1190
|
-
onClose,
|
|
1191
|
-
container,
|
|
1192
|
-
children,
|
|
1193
|
-
labels,
|
|
1194
|
-
testIds
|
|
1195
|
-
}) {
|
|
1196
|
-
const l = { ...DEFAULT_FACT_PASSAGES_LABELS, ...labels };
|
|
1197
|
-
return /* @__PURE__ */ jsxs(
|
|
1198
|
-
PopoverContent,
|
|
1199
|
-
{
|
|
1200
|
-
align: "start",
|
|
1201
|
-
side: "bottom",
|
|
1202
|
-
sideOffset: 4,
|
|
1203
|
-
collisionPadding: 16,
|
|
1204
|
-
container,
|
|
1205
|
-
collisionBoundary: container ?? void 0,
|
|
1206
|
-
onInteractOutside: (e) => {
|
|
1207
|
-
const target = e.detail.originalEvent.target;
|
|
1208
|
-
if (target?.closest(
|
|
1209
|
-
'[data-testid="parsed-viewer"], [role="dialog"], [data-radix-popper-content-wrapper]'
|
|
1210
|
-
)) {
|
|
1211
|
-
e.preventDefault();
|
|
1212
|
-
}
|
|
1213
|
-
},
|
|
1214
|
-
className: "w-[34rem] max-w-[var(--radix-popover-content-available-width)] p-0 data-[state=closed]:animate-none",
|
|
1215
|
-
"data-testid": testIdOr(testIds?.popover, { testId: "fact-sources-popover" }),
|
|
1216
|
-
"data-slot": "fact-sources-panel",
|
|
1217
|
-
children: [
|
|
1218
|
-
/* @__PURE__ */ jsxs("div", { className: "sticky top-0 z-10 flex items-center justify-between gap-2 border-b border-border bg-popover px-3 py-2", children: [
|
|
1219
|
-
/* @__PURE__ */ jsx("span", { className: "text-xs font-semibold text-muted-foreground", children: title }),
|
|
1220
|
-
/* @__PURE__ */ jsx(
|
|
1221
|
-
"button",
|
|
1222
|
-
{
|
|
1223
|
-
type: "button",
|
|
1224
|
-
"aria-label": l.close,
|
|
1225
|
-
"data-testid": testIdOr(testIds?.close, { testId: "fact-sources-close" }),
|
|
1226
|
-
onClick: onClose,
|
|
1227
|
-
className: "-m-1.5 flex shrink-0 items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground pointer-coarse:p-3",
|
|
1228
|
-
children: /* @__PURE__ */ jsx(X, { className: "size-3.5" })
|
|
1229
|
-
}
|
|
1230
|
-
)
|
|
1231
|
-
] }),
|
|
1232
|
-
/* @__PURE__ */ jsx(
|
|
1233
|
-
"div",
|
|
1234
|
-
{
|
|
1235
|
-
className: "flex max-h-[min(60vh,var(--radix-popover-content-available-height))] flex-col gap-2 overflow-y-auto p-1.5",
|
|
1236
|
-
"data-testid": testIdOr(testIds?.list, { testId: "fact-sources-list" }),
|
|
1237
|
-
children
|
|
1238
|
-
}
|
|
1239
|
-
)
|
|
1240
|
-
]
|
|
1241
|
-
}
|
|
1242
|
-
);
|
|
1243
|
-
}
|
|
1244
1122
|
var DEFAULT_FACT_SOURCE_GROUP_LABELS = {
|
|
1245
1123
|
remove: "Remove this document",
|
|
1246
1124
|
wholeDocument: "Whole document \u2014 open it to cite specific passages"
|
|
@@ -2252,6 +2130,6 @@ function FactSearchResult({
|
|
|
2252
2130
|
] });
|
|
2253
2131
|
}
|
|
2254
2132
|
|
|
2255
|
-
export { DEFAULT_FACTS_BULK_BAR_LABELS, DEFAULT_FACTS_EMPTY_STATE_LABELS, DEFAULT_FACTS_FIELDS_BUTTON_LABELS, DEFAULT_FACTS_TOOLBAR_LABELS, DEFAULT_FACTS_VIEW_TOGGLE_LABELS, DEFAULT_FACT_COLUMN_LABELS, DEFAULT_FACT_COLUMN_ORDER, DEFAULT_FACT_COMPOSER_LABELS, DEFAULT_FACT_DATE_INPUT_LABELS, DEFAULT_FACT_LABELS_CELL_LABELS,
|
|
2133
|
+
export { DEFAULT_FACTS_BULK_BAR_LABELS, DEFAULT_FACTS_EMPTY_STATE_LABELS, DEFAULT_FACTS_FIELDS_BUTTON_LABELS, DEFAULT_FACTS_TOOLBAR_LABELS, DEFAULT_FACTS_VIEW_TOGGLE_LABELS, DEFAULT_FACT_COLUMN_LABELS, DEFAULT_FACT_COLUMN_ORDER, DEFAULT_FACT_COMPOSER_LABELS, DEFAULT_FACT_DATE_INPUT_LABELS, DEFAULT_FACT_LABELS_CELL_LABELS, DEFAULT_FACT_ROW_ACTIONS_LABELS, DEFAULT_FACT_SEARCH_BAR_LABELS, DEFAULT_FACT_SEARCH_RESULT_LABELS, DEFAULT_FACT_SOURCES_ROW_LABELS, DEFAULT_FACT_SOURCE_GROUP_LABELS, DEFAULT_FACT_TIMELINE_LABELS, EMPTY_FACT_DATE_FIELDS, FactComposer, FactDateInput, FactFieldRow, FactLabelsCell, FactRowActions, FactSearchBar, FactSearchNoMatches, FactSearchPending, FactSearchResult, FactSearchTotals, FactSourceGroup, FactSourcesRow, FactsBulkBar, FactsCalendar, FactsEmptyState, FactsFieldsButton, FactsGanttPane, FactsLoadError, FactsLoading, FactsTable, FactsToolbar, FactsViewToggle, ISO_DATE_FILTER_PARAMS, createFactColumns, detectTimezone, factDateFieldsToSpan, factDateSpanToFields, sourceDocCount, supportedTimezones, toFactRow, toFactRows };
|
|
2256
2134
|
//# sourceMappingURL=index.js.map
|
|
2257
2135
|
//# sourceMappingURL=index.js.map
|