@arbidocs/blocks 0.5.128 → 0.5.130
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/{ConnectedCallDock-XJOYVVAH.cjs → ConnectedCallDock-CJ7RWP5B.cjs} +11 -11
- package/dist/{ConnectedCallDock-XJOYVVAH.cjs.map → ConnectedCallDock-CJ7RWP5B.cjs.map} +1 -1
- package/dist/{ConnectedCallRoom-CUDYAPQK.cjs → ConnectedCallRoom-JPJCXP6X.cjs} +11 -11
- package/dist/{ConnectedCallRoom-CUDYAPQK.cjs.map → ConnectedCallRoom-JPJCXP6X.cjs.map} +1 -1
- package/dist/{ConnectedNativeDocxComparison-JUF2TI2P.cjs → ConnectedNativeDocxComparison-5TZAIR4V.cjs} +9 -9
- package/dist/{ConnectedNativeDocxComparison-JUF2TI2P.cjs.map → ConnectedNativeDocxComparison-5TZAIR4V.cjs.map} +1 -1
- package/dist/{ConnectedPresentation-SI3L77J4.cjs → ConnectedPresentation-SEUUNFUA.cjs} +12 -12
- package/dist/{ConnectedPresentation-SI3L77J4.cjs.map → ConnectedPresentation-SEUUNFUA.cjs.map} +1 -1
- package/dist/{ConnectedSlidesTab-E76OVY34.cjs → ConnectedSlidesTab-3ATAKNSJ.cjs} +12 -12
- package/dist/{ConnectedSlidesTab-E76OVY34.cjs.map → ConnectedSlidesTab-3ATAKNSJ.cjs.map} +1 -1
- package/dist/{ConnectedStreamedWordArtifact-Q64DRRQD.cjs → ConnectedStreamedWordArtifact-BKPOMQ6G.cjs} +9 -9
- package/dist/{ConnectedStreamedWordArtifact-Q64DRRQD.cjs.map → ConnectedStreamedWordArtifact-BKPOMQ6G.cjs.map} +1 -1
- package/dist/{FilesViewerDialog-C7XHGK36.cjs → FilesViewerDialog-EFRMXIM5.cjs} +20 -20
- package/dist/{FilesViewerDialog-C7XHGK36.cjs.map → FilesViewerDialog-EFRMXIM5.cjs.map} +1 -1
- package/dist/{StreamedArtifactEditor-7KJ2HLLU.cjs → StreamedArtifactEditor-RSPUSZ2B.cjs} +5 -5
- package/dist/{StreamedArtifactEditor-7KJ2HLLU.cjs.map → StreamedArtifactEditor-RSPUSZ2B.cjs.map} +1 -1
- package/dist/{WorkspaceTableView-3XYAV4BV.cjs → WorkspaceTableView-QPROJRCF.cjs} +5 -5
- package/dist/{WorkspaceTableView-3XYAV4BV.cjs.map → WorkspaceTableView-QPROJRCF.cjs.map} +1 -1
- package/dist/agents/index.cjs +361 -361
- package/dist/agents/workflows/StepParts.d.ts +3 -0
- package/dist/agents/workflows/StepParts.js +20 -3
- package/dist/agents/workflows/StepParts.js.map +2 -2
- package/dist/agents/workflows/WorkflowStepAction.js +14 -3
- package/dist/agents/workflows/WorkflowStepAction.js.map +2 -2
- package/dist/agents/workflows/planSteps.js +6 -1
- package/dist/agents/workflows/planSteps.js.map +2 -2
- package/dist/agents/workflows/workflow.d.ts +11 -2
- package/dist/agents/workflows/workflow.js +16 -1
- package/dist/agents/workflows/workflow.js.map +2 -2
- package/dist/{ai-IEIR7SC2.cjs → ai-4XJ2VFNS.cjs} +23 -23
- package/dist/ai-4XJ2VFNS.cjs.map +1 -0
- package/dist/artifacts/VersionTimeline.d.ts +5 -1
- package/dist/artifacts/VersionTimeline.js +15 -0
- package/dist/artifacts/VersionTimeline.js.map +2 -2
- package/dist/artifacts/index.cjs +24 -24
- package/dist/calls/index.cjs +2 -2
- package/dist/chat/index.cjs +58 -58
- package/dist/{chunk-XF355M7O.cjs → chunk-2Z25MUAY.cjs} +17 -17
- package/dist/{chunk-XF355M7O.cjs.map → chunk-2Z25MUAY.cjs.map} +1 -1
- package/dist/{chunk-7JLJH5CW.cjs → chunk-5A6T4W46.cjs} +7 -7
- package/dist/{chunk-7JLJH5CW.cjs.map → chunk-5A6T4W46.cjs.map} +1 -1
- package/dist/{chunk-QG2U2JGX.cjs → chunk-7LEN65YI.cjs} +9 -9
- package/dist/{chunk-QG2U2JGX.cjs.map → chunk-7LEN65YI.cjs.map} +1 -1
- package/dist/{chunk-IDCD5TEZ.cjs → chunk-A6GBPE5E.cjs} +18 -18
- package/dist/{chunk-IDCD5TEZ.cjs.map → chunk-A6GBPE5E.cjs.map} +1 -1
- package/dist/{chunk-MMSHIIKG.cjs → chunk-AFXLRO6E.cjs} +4 -4
- package/dist/{chunk-MMSHIIKG.cjs.map → chunk-AFXLRO6E.cjs.map} +1 -1
- package/dist/{chunk-KNGZZC4O.cjs → chunk-B3BZ6MNI.cjs} +6 -6
- package/dist/{chunk-KNGZZC4O.cjs.map → chunk-B3BZ6MNI.cjs.map} +1 -1
- package/dist/{chunk-WAV762GP.cjs → chunk-DBN6GBRQ.cjs} +6 -6
- package/dist/{chunk-WAV762GP.cjs.map → chunk-DBN6GBRQ.cjs.map} +1 -1
- package/dist/{chunk-QGVOT7E4.cjs → chunk-EQTZQD66.cjs} +8 -8
- package/dist/{chunk-QGVOT7E4.cjs.map → chunk-EQTZQD66.cjs.map} +1 -1
- package/dist/{chunk-M2FOXGJU.cjs → chunk-F6CEPWIF.cjs} +7 -7
- package/dist/{chunk-M2FOXGJU.cjs.map → chunk-F6CEPWIF.cjs.map} +1 -1
- package/dist/{chunk-VWBYE3XY.cjs → chunk-FQRJCAT2.cjs} +6 -6
- package/dist/{chunk-VWBYE3XY.cjs.map → chunk-FQRJCAT2.cjs.map} +1 -1
- package/dist/{chunk-E3L5DB5F.cjs → chunk-GEZB3OEC.cjs} +4 -4
- package/dist/{chunk-E3L5DB5F.cjs.map → chunk-GEZB3OEC.cjs.map} +1 -1
- package/dist/{chunk-YP5EBGLU.cjs → chunk-GOQV6NOK.cjs} +73 -73
- package/dist/{chunk-YP5EBGLU.cjs.map → chunk-GOQV6NOK.cjs.map} +1 -1
- package/dist/{chunk-XCKHOXRP.cjs → chunk-H4ID6S4P.cjs} +6 -6
- package/dist/{chunk-XCKHOXRP.cjs.map → chunk-H4ID6S4P.cjs.map} +1 -1
- package/dist/{chunk-UFT22LAB.cjs → chunk-HBUHOCWF.cjs} +16 -16
- package/dist/{chunk-UFT22LAB.cjs.map → chunk-HBUHOCWF.cjs.map} +1 -1
- package/dist/{chunk-ZQNTYINE.cjs → chunk-HORAMB52.cjs} +91 -31
- package/dist/chunk-HORAMB52.cjs.map +1 -0
- package/dist/{chunk-3IH55CDE.cjs → chunk-IZBAWZTB.cjs} +16 -2
- package/dist/chunk-IZBAWZTB.cjs.map +1 -0
- package/dist/{chunk-QRAQZTJE.cjs → chunk-JN5YMHGI.cjs} +18 -3
- package/dist/chunk-JN5YMHGI.cjs.map +1 -0
- package/dist/{chunk-IZJ5L246.cjs → chunk-KWHGYHRC.cjs} +5 -5
- package/dist/{chunk-IZJ5L246.cjs.map → chunk-KWHGYHRC.cjs.map} +1 -1
- package/dist/{chunk-EG7EJFUE.cjs → chunk-MHIG6GGS.cjs} +17 -2
- package/dist/chunk-MHIG6GGS.cjs.map +1 -0
- package/dist/{chunk-IWMHQTVL.cjs → chunk-MI3N3ZOT.cjs} +80 -70
- package/dist/chunk-MI3N3ZOT.cjs.map +1 -0
- package/dist/{chunk-7NLO7ASW.cjs → chunk-MXGXKUSW.cjs} +17 -17
- package/dist/{chunk-7NLO7ASW.cjs.map → chunk-MXGXKUSW.cjs.map} +1 -1
- package/dist/{chunk-ZCU72Q76.cjs → chunk-NM7RWZ4E.cjs} +10 -10
- package/dist/{chunk-ZCU72Q76.cjs.map → chunk-NM7RWZ4E.cjs.map} +1 -1
- package/dist/{chunk-CQQQIZU4.cjs → chunk-OD6NGGL3.cjs} +133 -106
- package/dist/chunk-OD6NGGL3.cjs.map +1 -0
- package/dist/{chunk-TP5PGWIO.cjs → chunk-QFXOTJ6G.cjs} +20 -15
- package/dist/chunk-QFXOTJ6G.cjs.map +1 -0
- package/dist/{chunk-7L4X6QN2.cjs → chunk-QXMPATG6.cjs} +8 -8
- package/dist/{chunk-7L4X6QN2.cjs.map → chunk-QXMPATG6.cjs.map} +1 -1
- package/dist/{chunk-WXUU3COI.cjs → chunk-SUOHAB7N.cjs} +11 -11
- package/dist/{chunk-WXUU3COI.cjs.map → chunk-SUOHAB7N.cjs.map} +1 -1
- package/dist/{chunk-NTDQQLDD.cjs → chunk-TDA6KESI.cjs} +4 -4
- package/dist/{chunk-NTDQQLDD.cjs.map → chunk-TDA6KESI.cjs.map} +1 -1
- package/dist/{chunk-VLQCLQAS.cjs → chunk-TZYB22FM.cjs} +7 -7
- package/dist/{chunk-VLQCLQAS.cjs.map → chunk-TZYB22FM.cjs.map} +1 -1
- package/dist/{chunk-HSLPFBK2.cjs → chunk-VL7ZX4KQ.cjs} +6 -6
- package/dist/{chunk-HSLPFBK2.cjs.map → chunk-VL7ZX4KQ.cjs.map} +1 -1
- package/dist/{chunk-2F57IO7S.cjs → chunk-XCW6OY7E.cjs} +27 -27
- package/dist/{chunk-2F57IO7S.cjs.map → chunk-XCW6OY7E.cjs.map} +1 -1
- package/dist/{chunk-NG2EE7HR.cjs → chunk-YWHUWIHP.cjs} +9 -9
- package/dist/{chunk-NG2EE7HR.cjs.map → chunk-YWHUWIHP.cjs.map} +1 -1
- package/dist/connect/docx.cjs +12 -12
- package/dist/connect/index.cjs +1272 -520
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/index.d.ts +2 -0
- package/dist/connect/index.js +12 -0
- package/dist/connect/index.js.map +2 -2
- package/dist/connect/viewer.cjs +9 -9
- package/dist/connection/ConnectedWorkflowBuilder.d.ts +12 -0
- package/dist/connection/ConnectedWorkflowBuilder.js +6 -1
- package/dist/connection/ConnectedWorkflowBuilder.js.map +2 -2
- package/dist/connection/assistant/AssistantDrafts.d.ts +21 -0
- package/dist/connection/assistant/AssistantDrafts.js +158 -0
- package/dist/connection/assistant/AssistantDrafts.js.map +7 -0
- package/dist/connection/assistant/AssistantPlan.d.ts +16 -0
- package/dist/connection/assistant/AssistantPlan.js +72 -0
- package/dist/connection/assistant/AssistantPlan.js.map +7 -0
- package/dist/connection/assistant/AssistantStatusPanel.d.ts +28 -0
- package/dist/connection/assistant/AssistantStatusPanel.js +206 -0
- package/dist/connection/assistant/AssistantStatusPanel.js.map +7 -0
- package/dist/connection/assistant/ConnectedAssistantPage.d.ts +39 -0
- package/dist/connection/assistant/ConnectedAssistantPage.js +377 -0
- package/dist/connection/assistant/ConnectedAssistantPage.js.map +7 -0
- package/dist/connection/billing/AddAddonDialog.d.ts +2 -2
- package/dist/connection/billing/AddAddonDialog.js.map +1 -1
- package/dist/connection/billing/ConnectedQuotaDialog.d.ts +1 -1
- package/dist/connection/billing/ConnectedQuotaDialog.js.map +1 -1
- package/dist/connection/billing/MonthlySpendCap.js +1 -1
- package/dist/connection/billing/MonthlySpendCap.js.map +1 -1
- package/dist/connection/billing/ProjectBilling.js.map +1 -1
- package/dist/connection/billing/ProjectPurchaseOptions.js +1 -1
- package/dist/connection/billing/ProjectPurchaseOptions.js.map +1 -1
- package/dist/connection/billing/ProjectUsageCard.js +1 -1
- package/dist/connection/billing/ProjectUsageCard.js.map +1 -1
- package/dist/connection/billing/ReduceAddonDialog.d.ts +1 -1
- package/dist/connection/billing/ReduceAddonDialog.js.map +1 -1
- package/dist/connection/billing/StripeCheckoutModal.d.ts +1 -1
- package/dist/connection/billing/StripeCheckoutModal.js.map +1 -1
- package/dist/connection/billing/addon-pricing.d.ts +4 -4
- package/dist/connection/billing/addon-pricing.js.map +1 -1
- package/dist/connection/billing/plan-constants.d.ts +3 -3
- package/dist/connection/billing/plan-constants.js +2 -2
- package/dist/connection/billing/plan-constants.js.map +1 -1
- package/dist/connection/billing/plan-pricing.d.ts +2 -2
- package/dist/connection/billing/plan-pricing.js.map +1 -1
- package/dist/connection/billing/useAddonPurchase.d.ts +1 -1
- package/dist/connection/billing/useAddonPurchase.js.map +1 -1
- package/dist/connection/conversation/AgentSteps.js +19 -2
- package/dist/connection/conversation/AgentSteps.js.map +2 -2
- package/dist/connection/viewer/ConnectedDocumentViewer.js +22 -2
- package/dist/connection/viewer/ConnectedDocumentViewer.js.map +2 -2
- package/dist/connection/viewer/useDocumentVersionRestore.d.ts +14 -0
- package/dist/connection/viewer/useDocumentVersionRestore.js +48 -0
- package/dist/connection/viewer/useDocumentVersionRestore.js.map +7 -0
- package/dist/connection/viewer/useViewerTabs.d.ts +1 -1
- package/dist/connection/viewer/useViewerTabs.js +6 -3
- package/dist/connection/viewer/useViewerTabs.js.map +2 -2
- package/dist/document-tools/VersionSnapshotBar.d.ts +4 -1
- package/dist/document-tools/VersionSnapshotBar.js +14 -0
- package/dist/document-tools/VersionSnapshotBar.js.map +2 -2
- package/dist/document-tools/index.cjs +13 -13
- package/dist/embed/index.cjs +19 -19
- package/dist/index.cjs +470 -470
- package/dist/office/index.cjs +5 -5
- package/dist/studio/index.cjs +14 -14
- package/dist/styles.css +1 -1
- package/dist/workflow-canvas/TriggerInspector.d.ts +7 -0
- package/dist/workflow-canvas/TriggerInspector.js +56 -0
- package/dist/workflow-canvas/TriggerInspector.js.map +2 -2
- package/dist/workflow-canvas/index.cjs +137 -76
- package/dist/workflow-canvas/index.cjs.map +1 -1
- package/node_modules/@arbidocs/coedit/package.json +1 -1
- package/package.json +5 -5
- package/dist/ai-IEIR7SC2.cjs.map +0 -1
- package/dist/chunk-3IH55CDE.cjs.map +0 -1
- package/dist/chunk-CQQQIZU4.cjs.map +0 -1
- package/dist/chunk-EG7EJFUE.cjs.map +0 -1
- package/dist/chunk-IWMHQTVL.cjs.map +0 -1
- package/dist/chunk-QRAQZTJE.cjs.map +0 -1
- package/dist/chunk-TP5PGWIO.cjs.map +0 -1
- package/dist/chunk-ZQNTYINE.cjs.map +0 -1
|
@@ -81,6 +81,7 @@ function fragment(field, value, ctx) {
|
|
|
81
81
|
return typeof value === "string" ? value.trim() : String(value ?? "");
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
|
+
const EVENT_FACTS = /* @__PURE__ */ new Set(["sender", "doc_ext_id", "reason", "version"]);
|
|
84
85
|
function composeWorkflowPrompt(workflow, inputs, ctx) {
|
|
85
86
|
if (workflow.run.kind !== "prompt") return "";
|
|
86
87
|
const byName = new Map(workflow.inputs.map((f) => [f.name, f]));
|
|
@@ -98,7 +99,7 @@ function composeWorkflowPrompt(workflow, inputs, ctx) {
|
|
|
98
99
|
for (const m of template.matchAll(/\{\{\s*([a-z][a-z0-9_]*)\s*\}\}/gi)) {
|
|
99
100
|
append(template.slice(last, m.index), false);
|
|
100
101
|
const field = byName.get(m[1]);
|
|
101
|
-
append(field ? fragment(field, inputs[m[1]], ctx) : "", true);
|
|
102
|
+
append(field ? fragment(field, inputs[m[1]], ctx) : EVENT_FACTS.has(m[1]) ? m[0] : "", true);
|
|
102
103
|
last = m.index + m[0].length;
|
|
103
104
|
}
|
|
104
105
|
append(template.slice(last), false);
|
|
@@ -283,6 +284,18 @@ function fieldToFrontmatter(field) {
|
|
|
283
284
|
});
|
|
284
285
|
}
|
|
285
286
|
const compact = (o) => Object.fromEntries(Object.entries(o).filter(([, v]) => v !== void 0));
|
|
287
|
+
function gmailLink(url) {
|
|
288
|
+
if (typeof url !== "string" || !url) return void 0;
|
|
289
|
+
try {
|
|
290
|
+
const parsed = new URL(url);
|
|
291
|
+
return parsed.protocol === "https:" && parsed.hostname === "mail.google.com" ? url : void 0;
|
|
292
|
+
} catch {
|
|
293
|
+
return void 0;
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
function gmailDraftUrl(waiting) {
|
|
297
|
+
return waiting?.provider === "gmail" ? gmailLink(waiting.url) : void 0;
|
|
298
|
+
}
|
|
286
299
|
export {
|
|
287
300
|
SKILL_PROMPT_FALLBACK_PLACEHOLDER,
|
|
288
301
|
SKILL_PROMPT_LABEL,
|
|
@@ -291,6 +304,8 @@ export {
|
|
|
291
304
|
defaultInputs,
|
|
292
305
|
fieldToFrontmatter,
|
|
293
306
|
fieldsFromFrontmatter,
|
|
307
|
+
gmailDraftUrl,
|
|
308
|
+
gmailLink,
|
|
294
309
|
inputsFromContext,
|
|
295
310
|
isEmptyWorkflowScope,
|
|
296
311
|
isWorkflowScope,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/agents/workflows/workflow.ts"],
|
|
4
|
-
"sourcesContent": ["import { isTone } from '../../components/tones'\nimport {\n EMPTY_WORKFLOW_SCOPE,\n type WorkflowDefinition,\n type WorkflowErrors,\n type WorkflowField,\n type WorkflowFieldOption,\n type WorkflowContextKind,\n type WorkflowFieldType,\n type WorkflowInputs,\n type WorkflowInputValue,\n type WorkflowLaunch,\n type WorkflowScope,\n} from './types'\n\nexport const isWorkflowScope = (value: unknown): value is WorkflowScope =>\n typeof value === 'object' &&\n value !== null &&\n Array.isArray((value as WorkflowScope).folders) &&\n Array.isArray((value as WorkflowScope).labels)\n\nexport const isEmptyWorkflowScope = (scope: WorkflowScope): boolean =>\n scope.folders.length === 0 && scope.labels.length === 0 && !scope.documents?.length\n\n/** A field that selects files: a folder/label scope or an explicit pick. */\nconst isFileField = (field: WorkflowField): boolean =>\n field.type === 'scope' || field.type === 'documents'\n\nfunction emptyValue(field: WorkflowField): WorkflowInputValue {\n switch (field.type) {\n case 'boolean':\n return false\n case 'scope':\n return { folders: [], labels: [] }\n case 'documents':\n return { folders: [], labels: [], documents: [] }\n default:\n return ''\n }\n}\n\n/** The inputs a fresh form starts with: each field's default, else an empty value of its type. */\nexport function defaultInputs(workflow: WorkflowDefinition): WorkflowInputs {\n const inputs: WorkflowInputs = {}\n for (const field of workflow.inputs) {\n const d = field.default\n inputs[field.name] =\n d === undefined\n ? emptyValue(field)\n : isWorkflowScope(d)\n ? { ...d }\n : (d as WorkflowInputValue)\n }\n return inputs\n}\n\n/** Required-field and range problems, keyed by field name. Empty object = launchable. */\nexport function validateInputs(\n workflow: WorkflowDefinition,\n inputs: WorkflowInputs\n): WorkflowErrors {\n const errors: WorkflowErrors = {}\n for (const field of workflow.inputs) {\n const value = inputs[field.name]\n if (field.type === 'number') {\n const blank = value === '' || value === undefined\n if (blank) {\n if (field.required) errors[field.name] = 'required'\n continue\n }\n const n = Number(value)\n if (Number.isNaN(n)) errors[field.name] = 'number'\n else if (field.min !== undefined && n < field.min) errors[field.name] = 'min'\n else if (field.max !== undefined && n > field.max) errors[field.name] = 'max'\n continue\n }\n if (!field.required) continue\n if (field.type === 'documents') {\n if (!isWorkflowScope(value) || !value.documents?.length) errors[field.name] = 'required'\n continue\n }\n if (field.type === 'boolean' || field.type === 'scope') continue\n if (typeof value !== 'string' || value.trim() === '') errors[field.name] = 'required'\n }\n return errors\n}\n\n/**\n * The field that holds what the user asks for: the first common (not folded away) free-text field.\n * Text typed after a slash pre-fills it; the form puts the cursor in it when it comes first.\n */\nexport function promptFieldName(workflow: WorkflowDefinition): string | undefined {\n return workflow.inputs.find((f) => !f.advanced && (f.type === 'text' || f.type === 'longtext'))\n ?.name\n}\n\n/** What the host knows that the inputs alone do not: file ids resolved to names for the wording. */\nexport interface WorkflowComposeContext {\n documentTitles?: Record<string, string>\n}\n\nconst quoteList = (names: string[]): string => {\n const quoted = names.map((n) => `\"${n}\"`)\n return quoted.length <= 1\n ? (quoted[0] ?? '')\n : `${quoted.slice(0, -1).join(', ')} and ${quoted[quoted.length - 1]}`\n}\n\nfunction fragment(\n field: WorkflowField,\n value: WorkflowInputValue | undefined,\n ctx: WorkflowComposeContext | undefined\n): string {\n switch (field.type) {\n case 'documents': {\n // The quoted file name(s): \"the document <name>\" reads the same whichever file was picked.\n const ids = isWorkflowScope(value) ? (value.documents ?? []) : []\n const names = ids.flatMap((id) => {\n const title = ctx?.documentTitles?.[id]\n return title ? [title] : []\n })\n return quoteList(names)\n }\n case 'boolean':\n return value ? (field.trueText ?? 'yes') : (field.falseText ?? 'no')\n case 'select': {\n const option = field.options?.find((o) => o.value === value)\n return option ? (option.text ?? option.label) : String(value ?? '')\n }\n case 'scope':\n // The scope decides WHICH files the run is given; naming it in the wording only churns it.\n return ''\n default:\n return typeof value === 'string' ? value.trim() : String(value ?? '')\n }\n}\n\n/**\n * The single place a prompt string is composed from (workflow, inputs): `{{name}}` placeholders in\n * the template are replaced by each field's text. Whitespace left by empty fragments is tidied.\n */\nexport function composeWorkflowPrompt(\n workflow: WorkflowDefinition,\n inputs: WorkflowInputs,\n ctx?: WorkflowComposeContext\n): string {\n if (workflow.run.kind !== 'prompt') return ''\n const byName = new Map(workflow.inputs.map((f) => [f.name, f]))\n const template = workflow.run.promptTemplate\n // Whitespace left by empty fragments is tidied in the template's own text only: what the user\n // typed or selected (tabs, runs of spaces) reaches the prompt exactly as it was.\n let out = ''\n let last = 0\n const append = (text: string, isValue: boolean) => {\n let t = text\n if (!isValue) {\n t = t.replace(/[ \\t]{2,}/g, ' ')\n if (/[ \\t]$/.test(out)) t = t.replace(/^[ \\t]+/, '')\n }\n out += t\n }\n for (const m of template.matchAll(/\\{\\{\\s*([a-z][a-z0-9_]*)\\s*\\}\\}/gi)) {\n append(template.slice(last, m.index), false)\n const field = byName.get(m[1])\n append(field ? fragment(field, inputs[m[1]], ctx) : '', true)\n last = m.index + m[0].length\n }\n append(template.slice(last), false)\n return out.trim()\n}\n\n/** Assemble the launch the host receives: inputs, the hoisted scope and the chosen agent. */\nexport function buildLaunch(\n workflow: WorkflowDefinition,\n inputs: WorkflowInputs,\n agentId?: string\n): WorkflowLaunch {\n const scopeField = workflow.inputs.find(isFileField)\n const raw = scopeField ? inputs[scopeField.name] : undefined\n const scope = isWorkflowScope(raw) ? raw : { ...EMPTY_WORKFLOW_SCOPE }\n return { workflow, inputs, scope, agentId: agentId || workflow.defaultAgentId || undefined }\n}\n\n/* --------------------------- context launch --------------------------- */\n\n/** What a surface hands a workflow: the files in view, the selected text, the image on screen. */\nexport interface WorkflowContext {\n documents?: string[]\n selection?: string\n /** A file id. */\n image?: string\n}\n\n/** The kinds of context a workflow declares it can be started from. */\nexport function workflowAccepts(workflow: WorkflowDefinition): WorkflowContextKind[] {\n const kinds = new Set<WorkflowContextKind>()\n for (const field of workflow.inputs) if (field.context) kinds.add(field.context)\n return [...kinds]\n}\n\n/** Workflows a surface can offer: those that accept at least one kind of context it supplies. */\nexport function workflowsAccepting(\n workflows: WorkflowDefinition[],\n supplied: WorkflowContextKind[]\n): WorkflowDefinition[] {\n return workflows.filter((w) => workflowAccepts(w).some((k) => supplied.includes(k)))\n}\n\n/** Workflows a host offers: its own plus every one that is not tied to another host. */\nexport function workflowsForHost(\n workflows: WorkflowDefinition[],\n host: string\n): WorkflowDefinition[] {\n return workflows.filter((w) => !w.host || w.host === host)\n}\n\n/**\n * The inputs a context pre-fills: each field bound to a kind the surface supplied. Fields it does\n * not supply are left to the form's defaults, so the dialog still asks for them.\n */\nexport function inputsFromContext(\n workflow: WorkflowDefinition,\n context: WorkflowContext\n): WorkflowInputs {\n const inputs: WorkflowInputs = {}\n for (const field of workflow.inputs) {\n if (!field.context) continue\n if (field.context === 'selection') {\n if (context.selection) inputs[field.name] = context.selection\n continue\n }\n const ids =\n field.context === 'image' ? (context.image ? [context.image] : []) : context.documents\n if (ids?.length && isFileField(field)) {\n inputs[field.name] = { folders: [], labels: [], documents: ids.slice(0, field.max ?? 1) }\n }\n }\n return inputs\n}\n\n/* ------------------------------ skills ------------------------------- */\n\n/** The slice of a skill listing row the model needs (`SkillSummaryResponse`). */\nexport interface SkillLike {\n name: string\n slug: string\n description?: string\n arg_hint?: string\n}\n\n/** The prompt field's label when a skill brings none of its own. */\nexport const SKILL_PROMPT_LABEL = 'What should it work on?'\nexport const SKILL_PROMPT_FALLBACK_PLACEHOLDER = 'Describe what you want'\n\n/** `<prompt>` / `[topic]` becomes `prompt` / `topic`: a hint reads as a placeholder, not syntax. */\nconst plainHint = (hint: string): string => hint.replace(/^[<[]\\s*|\\s*[>\\]]$/g, '').trim()\n\n/**\n * A skill is run WITH a prompt, so it always gets a one-field form: a required free-text field\n * (`args`) whose placeholder is the skill's `arg_hint` (brackets removed). Starting one with\n * nothing is never offered; text typed after the slash pre-fills the field.\n */\nexport function skillToWorkflow(skill: SkillLike): WorkflowDefinition {\n const hint = plainHint((skill.arg_hint ?? '').trim())\n const inputs: WorkflowField[] = [\n {\n name: 'args',\n type: 'longtext',\n label: SKILL_PROMPT_LABEL,\n placeholder: hint || SKILL_PROMPT_FALLBACK_PLACEHOLDER,\n required: true,\n },\n ]\n return {\n id: skill.slug,\n skill: skill.slug,\n title: skill.name || skill.slug,\n description: skill.description ?? '',\n inputs,\n run: { kind: 'prompt', promptTemplate: `/${skill.slug} {{args}}` },\n landing: 'chat',\n schedulable: true,\n }\n}\n\n/** A skill named like its slug (\"deep-research\") reads as a title (\"Deep research\"); a written name is kept. */\nexport function skillTitle(name: string): string {\n if (!/^[a-z0-9]+(?:[-_][a-z0-9]+)*$/.test(name)) return name\n const words = name.replace(/[-_]+/g, ' ')\n return words.charAt(0).toUpperCase() + words.slice(1)\n}\n\n/** A skill as the skills list returns it (`GET /v1/assistant/skills`). */\nexport interface SkillListing extends Omit<SkillLike, 'arg_hint' | 'description'> {\n description?: string | null\n arg_hint?: string | null\n /** `builtin` ships with ARBI; `mine` and `global` are documents someone uploaded. */\n visibility?: string | null\n}\n\n/**\n * The host's own workflows together with the skills the user can run, as one list of workflows:\n * `host` (in its order) and `skills` (by slug, each a one-field form, icon `skill`). An uploaded skill with a\n * host workflow's id replaces it (your own copy is used instead of the original); a built-in skill\n * the host already offers keeps the host's richer form, so nothing is listed twice.\n */\nexport function mergeSkillWorkflows(\n host: WorkflowDefinition[],\n listings: SkillListing[]\n): { host: WorkflowDefinition[]; skills: WorkflowDefinition[] } {\n const hostIds = new Set(host.map((w) => w.id))\n const skills = listings\n .filter((s) => !(s.visibility === 'builtin' && hostIds.has(s.slug)))\n .map((s) => ({\n ...skillToWorkflow({\n name: skillTitle(s.name || s.slug),\n slug: s.slug,\n description: s.description ?? undefined,\n arg_hint: s.arg_hint ?? undefined,\n }),\n icon: 'skill',\n }))\n .sort((a, b) => a.id.localeCompare(b.id))\n const shadowed = new Set(skills.map((w) => w.id))\n return { host: host.filter((w) => !shadowed.has(w.id)), skills }\n}\n\nconst FIELD_TYPES: WorkflowFieldType[] = [\n 'text',\n 'longtext',\n 'boolean',\n 'select',\n 'number',\n 'date',\n 'scope',\n 'documents',\n]\n\nconst str = (v: unknown): string | undefined => (typeof v === 'string' ? v : undefined)\nconst num = (v: unknown): number | undefined => (typeof v === 'number' ? v : undefined)\nconst bool = (v: unknown): boolean | undefined => (typeof v === 'boolean' ? v : undefined)\n\nfunction fieldFromFrontmatter(raw: unknown): WorkflowField | null {\n if (typeof raw !== 'object' || raw === null) return null\n const r = raw as Record<string, unknown>\n const name = str(r.name)\n const type = FIELD_TYPES.find((t) => t === r.type)\n if (!name || !/^[a-z][a-z0-9_]*$/.test(name) || !type) return null\n const options = Array.isArray(r.options)\n ? r.options.flatMap((o): WorkflowFieldOption[] => {\n const ro = o as Record<string, unknown>\n const value = str(ro?.value)\n const label = str(ro?.label)\n return value && label\n ? [\n {\n value,\n label,\n description: str(ro.description),\n text: str(ro.text),\n icon: str(ro.icon),\n tone: isTone(ro.tone) ? ro.tone : undefined,\n },\n ]\n : []\n })\n : undefined\n return {\n name,\n type,\n label: str(r.label) ?? name,\n description: str(r.description),\n placeholder: str(r.placeholder),\n required: bool(r.required),\n default: r.default as WorkflowInputValue | undefined,\n options,\n min: num(r.min),\n max: num(r.max),\n trueText: str(r.true_text),\n falseText: str(r.false_text),\n advanced: bool(r.advanced),\n accept: r.accept === 'image' ? 'image' : undefined,\n context:\n r.context === 'documents' || r.context === 'selection' || r.context === 'image'\n ? r.context\n : undefined,\n by: Array.isArray(r.by)\n ? (r.by.filter((b) => b === 'folders' || b === 'labels') as Array<'folders' | 'labels'>)\n : undefined,\n }\n}\n\n/** The valid form fields of a SKILL.md frontmatter's `inputs` (snake_case keys); the rest dropped. */\nexport function fieldsFromFrontmatter(raw: unknown): WorkflowField[] {\n return Array.isArray(raw)\n ? raw.flatMap((f) => {\n const field = fieldFromFrontmatter(f)\n return field ? [field] : []\n })\n : []\n}\n\n/**\n * Build a workflow from parsed SKILL.md frontmatter (snake_case keys) and its body (the prompt\n * template). The inverse of what the backend will publish; seeded workflows use the same shape.\n */\nexport function workflowFromFrontmatter(\n id: string,\n frontmatter: Record<string, unknown>,\n body: string\n): WorkflowDefinition {\n const inputs = fieldsFromFrontmatter(frontmatter.inputs)\n return {\n id,\n title: str(frontmatter.name) ?? id,\n description: str(frontmatter.description) ?? '',\n icon: str(frontmatter.icon),\n inputs,\n run: { kind: 'prompt', promptTemplate: body.trim() },\n landing: frontmatter.landing === 'files' ? 'files' : 'chat',\n requiresFiles: bool(frontmatter.requires_files),\n schedulable: bool(frontmatter.schedulable) ?? true,\n }\n}\n\n/** snake_case keys of the on-disk form of a field (what `workflowFromFrontmatter` reads). */\nexport function fieldToFrontmatter(field: WorkflowField): Record<string, unknown> {\n return compact({\n name: field.name,\n type: field.type,\n label: field.label,\n description: field.description,\n placeholder: field.placeholder,\n required: field.required,\n default: field.default,\n options: field.options?.map((o) =>\n compact({\n value: o.value,\n label: o.label,\n description: o.description,\n text: o.text,\n icon: o.icon,\n tone: o.tone,\n })\n ),\n min: field.min,\n max: field.max,\n true_text: field.trueText,\n false_text: field.falseText,\n advanced: field.advanced,\n by: field.by,\n accept: field.accept,\n context: field.context,\n })\n}\n\nconst compact = (o: Record<string, unknown>): Record<string, unknown> =>\n Object.fromEntries(Object.entries(o).filter(([, v]) => v !== undefined))\n"],
|
|
5
|
-
"mappings": ";AAAA,SAAS,cAAc;AACvB;AAAA,EACE;AAAA,
|
|
4
|
+
"sourcesContent": ["import { isTone } from '../../components/tones'\nimport {\n EMPTY_WORKFLOW_SCOPE,\n type WorkflowActionWaiting,\n type WorkflowDefinition,\n type WorkflowErrors,\n type WorkflowField,\n type WorkflowFieldOption,\n type WorkflowContextKind,\n type WorkflowFieldType,\n type WorkflowInputs,\n type WorkflowInputValue,\n type WorkflowLaunch,\n type WorkflowScope,\n} from './types'\n\nexport const isWorkflowScope = (value: unknown): value is WorkflowScope =>\n typeof value === 'object' &&\n value !== null &&\n Array.isArray((value as WorkflowScope).folders) &&\n Array.isArray((value as WorkflowScope).labels)\n\nexport const isEmptyWorkflowScope = (scope: WorkflowScope): boolean =>\n scope.folders.length === 0 && scope.labels.length === 0 && !scope.documents?.length\n\n/** A field that selects files: a folder/label scope or an explicit pick. */\nconst isFileField = (field: WorkflowField): boolean =>\n field.type === 'scope' || field.type === 'documents'\n\nfunction emptyValue(field: WorkflowField): WorkflowInputValue {\n switch (field.type) {\n case 'boolean':\n return false\n case 'scope':\n return { folders: [], labels: [] }\n case 'documents':\n return { folders: [], labels: [], documents: [] }\n default:\n return ''\n }\n}\n\n/** The inputs a fresh form starts with: each field's default, else an empty value of its type. */\nexport function defaultInputs(workflow: WorkflowDefinition): WorkflowInputs {\n const inputs: WorkflowInputs = {}\n for (const field of workflow.inputs) {\n const d = field.default\n inputs[field.name] =\n d === undefined\n ? emptyValue(field)\n : isWorkflowScope(d)\n ? { ...d }\n : (d as WorkflowInputValue)\n }\n return inputs\n}\n\n/** Required-field and range problems, keyed by field name. Empty object = launchable. */\nexport function validateInputs(\n workflow: WorkflowDefinition,\n inputs: WorkflowInputs\n): WorkflowErrors {\n const errors: WorkflowErrors = {}\n for (const field of workflow.inputs) {\n const value = inputs[field.name]\n if (field.type === 'number') {\n const blank = value === '' || value === undefined\n if (blank) {\n if (field.required) errors[field.name] = 'required'\n continue\n }\n const n = Number(value)\n if (Number.isNaN(n)) errors[field.name] = 'number'\n else if (field.min !== undefined && n < field.min) errors[field.name] = 'min'\n else if (field.max !== undefined && n > field.max) errors[field.name] = 'max'\n continue\n }\n if (!field.required) continue\n if (field.type === 'documents') {\n if (!isWorkflowScope(value) || !value.documents?.length) errors[field.name] = 'required'\n continue\n }\n if (field.type === 'boolean' || field.type === 'scope') continue\n if (typeof value !== 'string' || value.trim() === '') errors[field.name] = 'required'\n }\n return errors\n}\n\n/**\n * The field that holds what the user asks for: the first common (not folded away) free-text field.\n * Text typed after a slash pre-fills it; the form puts the cursor in it when it comes first.\n */\nexport function promptFieldName(workflow: WorkflowDefinition): string | undefined {\n return workflow.inputs.find((f) => !f.advanced && (f.type === 'text' || f.type === 'longtext'))\n ?.name\n}\n\n/** What the host knows that the inputs alone do not: file ids resolved to names for the wording. */\nexport interface WorkflowComposeContext {\n documentTitles?: Record<string, string>\n}\n\nconst quoteList = (names: string[]): string => {\n const quoted = names.map((n) => `\"${n}\"`)\n return quoted.length <= 1\n ? (quoted[0] ?? '')\n : `${quoted.slice(0, -1).join(', ')} and ${quoted[quoted.length - 1]}`\n}\n\nfunction fragment(\n field: WorkflowField,\n value: WorkflowInputValue | undefined,\n ctx: WorkflowComposeContext | undefined\n): string {\n switch (field.type) {\n case 'documents': {\n // The quoted file name(s): \"the document <name>\" reads the same whichever file was picked.\n const ids = isWorkflowScope(value) ? (value.documents ?? []) : []\n const names = ids.flatMap((id) => {\n const title = ctx?.documentTitles?.[id]\n return title ? [title] : []\n })\n return quoteList(names)\n }\n case 'boolean':\n return value ? (field.trueText ?? 'yes') : (field.falseText ?? 'no')\n case 'select': {\n const option = field.options?.find((o) => o.value === value)\n return option ? (option.text ?? option.label) : String(value ?? '')\n }\n case 'scope':\n // The scope decides WHICH files the run is given; naming it in the wording only churns it.\n return ''\n default:\n return typeof value === 'string' ? value.trim() : String(value ?? '')\n }\n}\n\n/**\n * The facts an event gives the run it starts (the server's `EVENT_RUN_INPUTS`): an email's sender\n * and document, a new version's document, reason and version. Never form fields.\n */\nconst EVENT_FACTS = new Set(['sender', 'doc_ext_id', 'reason', 'version'])\n\n/**\n * The single place a prompt string is composed from (workflow, inputs): `{{name}}` placeholders in\n * the template are replaced by each field's text. An event fact that is no field stays as written,\n * for the server to fill from the run; any other name that is no field is dropped.\n * Whitespace left by empty fragments is tidied.\n */\nexport function composeWorkflowPrompt(\n workflow: WorkflowDefinition,\n inputs: WorkflowInputs,\n ctx?: WorkflowComposeContext\n): string {\n if (workflow.run.kind !== 'prompt') return ''\n const byName = new Map(workflow.inputs.map((f) => [f.name, f]))\n const template = workflow.run.promptTemplate\n // Whitespace left by empty fragments is tidied in the template's own text only: what the user\n // typed or selected (tabs, runs of spaces) reaches the prompt exactly as it was.\n let out = ''\n let last = 0\n const append = (text: string, isValue: boolean) => {\n let t = text\n if (!isValue) {\n t = t.replace(/[ \\t]{2,}/g, ' ')\n if (/[ \\t]$/.test(out)) t = t.replace(/^[ \\t]+/, '')\n }\n out += t\n }\n for (const m of template.matchAll(/\\{\\{\\s*([a-z][a-z0-9_]*)\\s*\\}\\}/gi)) {\n append(template.slice(last, m.index), false)\n const field = byName.get(m[1])\n append(field ? fragment(field, inputs[m[1]], ctx) : EVENT_FACTS.has(m[1]) ? m[0] : '', true)\n last = m.index + m[0].length\n }\n append(template.slice(last), false)\n return out.trim()\n}\n\n/** Assemble the launch the host receives: inputs, the hoisted scope and the chosen agent. */\nexport function buildLaunch(\n workflow: WorkflowDefinition,\n inputs: WorkflowInputs,\n agentId?: string\n): WorkflowLaunch {\n const scopeField = workflow.inputs.find(isFileField)\n const raw = scopeField ? inputs[scopeField.name] : undefined\n const scope = isWorkflowScope(raw) ? raw : { ...EMPTY_WORKFLOW_SCOPE }\n return { workflow, inputs, scope, agentId: agentId || workflow.defaultAgentId || undefined }\n}\n\n/* --------------------------- context launch --------------------------- */\n\n/** What a surface hands a workflow: the files in view, the selected text, the image on screen. */\nexport interface WorkflowContext {\n documents?: string[]\n selection?: string\n /** A file id. */\n image?: string\n}\n\n/** The kinds of context a workflow declares it can be started from. */\nexport function workflowAccepts(workflow: WorkflowDefinition): WorkflowContextKind[] {\n const kinds = new Set<WorkflowContextKind>()\n for (const field of workflow.inputs) if (field.context) kinds.add(field.context)\n return [...kinds]\n}\n\n/** Workflows a surface can offer: those that accept at least one kind of context it supplies. */\nexport function workflowsAccepting(\n workflows: WorkflowDefinition[],\n supplied: WorkflowContextKind[]\n): WorkflowDefinition[] {\n return workflows.filter((w) => workflowAccepts(w).some((k) => supplied.includes(k)))\n}\n\n/** Workflows a host offers: its own plus every one that is not tied to another host. */\nexport function workflowsForHost(\n workflows: WorkflowDefinition[],\n host: string\n): WorkflowDefinition[] {\n return workflows.filter((w) => !w.host || w.host === host)\n}\n\n/**\n * The inputs a context pre-fills: each field bound to a kind the surface supplied. Fields it does\n * not supply are left to the form's defaults, so the dialog still asks for them.\n */\nexport function inputsFromContext(\n workflow: WorkflowDefinition,\n context: WorkflowContext\n): WorkflowInputs {\n const inputs: WorkflowInputs = {}\n for (const field of workflow.inputs) {\n if (!field.context) continue\n if (field.context === 'selection') {\n if (context.selection) inputs[field.name] = context.selection\n continue\n }\n const ids =\n field.context === 'image' ? (context.image ? [context.image] : []) : context.documents\n if (ids?.length && isFileField(field)) {\n inputs[field.name] = { folders: [], labels: [], documents: ids.slice(0, field.max ?? 1) }\n }\n }\n return inputs\n}\n\n/* ------------------------------ skills ------------------------------- */\n\n/** The slice of a skill listing row the model needs (`SkillSummaryResponse`). */\nexport interface SkillLike {\n name: string\n slug: string\n description?: string\n arg_hint?: string\n}\n\n/** The prompt field's label when a skill brings none of its own. */\nexport const SKILL_PROMPT_LABEL = 'What should it work on?'\nexport const SKILL_PROMPT_FALLBACK_PLACEHOLDER = 'Describe what you want'\n\n/** `<prompt>` / `[topic]` becomes `prompt` / `topic`: a hint reads as a placeholder, not syntax. */\nconst plainHint = (hint: string): string => hint.replace(/^[<[]\\s*|\\s*[>\\]]$/g, '').trim()\n\n/**\n * A skill is run WITH a prompt, so it always gets a one-field form: a required free-text field\n * (`args`) whose placeholder is the skill's `arg_hint` (brackets removed). Starting one with\n * nothing is never offered; text typed after the slash pre-fills the field.\n */\nexport function skillToWorkflow(skill: SkillLike): WorkflowDefinition {\n const hint = plainHint((skill.arg_hint ?? '').trim())\n const inputs: WorkflowField[] = [\n {\n name: 'args',\n type: 'longtext',\n label: SKILL_PROMPT_LABEL,\n placeholder: hint || SKILL_PROMPT_FALLBACK_PLACEHOLDER,\n required: true,\n },\n ]\n return {\n id: skill.slug,\n skill: skill.slug,\n title: skill.name || skill.slug,\n description: skill.description ?? '',\n inputs,\n run: { kind: 'prompt', promptTemplate: `/${skill.slug} {{args}}` },\n landing: 'chat',\n schedulable: true,\n }\n}\n\n/** A skill named like its slug (\"deep-research\") reads as a title (\"Deep research\"); a written name is kept. */\nexport function skillTitle(name: string): string {\n if (!/^[a-z0-9]+(?:[-_][a-z0-9]+)*$/.test(name)) return name\n const words = name.replace(/[-_]+/g, ' ')\n return words.charAt(0).toUpperCase() + words.slice(1)\n}\n\n/** A skill as the skills list returns it (`GET /v1/assistant/skills`). */\nexport interface SkillListing extends Omit<SkillLike, 'arg_hint' | 'description'> {\n description?: string | null\n arg_hint?: string | null\n /** `builtin` ships with ARBI; `mine` and `global` are documents someone uploaded. */\n visibility?: string | null\n}\n\n/**\n * The host's own workflows together with the skills the user can run, as one list of workflows:\n * `host` (in its order) and `skills` (by slug, each a one-field form, icon `skill`). An uploaded skill with a\n * host workflow's id replaces it (your own copy is used instead of the original); a built-in skill\n * the host already offers keeps the host's richer form, so nothing is listed twice.\n */\nexport function mergeSkillWorkflows(\n host: WorkflowDefinition[],\n listings: SkillListing[]\n): { host: WorkflowDefinition[]; skills: WorkflowDefinition[] } {\n const hostIds = new Set(host.map((w) => w.id))\n const skills = listings\n .filter((s) => !(s.visibility === 'builtin' && hostIds.has(s.slug)))\n .map((s) => ({\n ...skillToWorkflow({\n name: skillTitle(s.name || s.slug),\n slug: s.slug,\n description: s.description ?? undefined,\n arg_hint: s.arg_hint ?? undefined,\n }),\n icon: 'skill',\n }))\n .sort((a, b) => a.id.localeCompare(b.id))\n const shadowed = new Set(skills.map((w) => w.id))\n return { host: host.filter((w) => !shadowed.has(w.id)), skills }\n}\n\nconst FIELD_TYPES: WorkflowFieldType[] = [\n 'text',\n 'longtext',\n 'boolean',\n 'select',\n 'number',\n 'date',\n 'scope',\n 'documents',\n]\n\nconst str = (v: unknown): string | undefined => (typeof v === 'string' ? v : undefined)\nconst num = (v: unknown): number | undefined => (typeof v === 'number' ? v : undefined)\nconst bool = (v: unknown): boolean | undefined => (typeof v === 'boolean' ? v : undefined)\n\nfunction fieldFromFrontmatter(raw: unknown): WorkflowField | null {\n if (typeof raw !== 'object' || raw === null) return null\n const r = raw as Record<string, unknown>\n const name = str(r.name)\n const type = FIELD_TYPES.find((t) => t === r.type)\n if (!name || !/^[a-z][a-z0-9_]*$/.test(name) || !type) return null\n const options = Array.isArray(r.options)\n ? r.options.flatMap((o): WorkflowFieldOption[] => {\n const ro = o as Record<string, unknown>\n const value = str(ro?.value)\n const label = str(ro?.label)\n return value && label\n ? [\n {\n value,\n label,\n description: str(ro.description),\n text: str(ro.text),\n icon: str(ro.icon),\n tone: isTone(ro.tone) ? ro.tone : undefined,\n },\n ]\n : []\n })\n : undefined\n return {\n name,\n type,\n label: str(r.label) ?? name,\n description: str(r.description),\n placeholder: str(r.placeholder),\n required: bool(r.required),\n default: r.default as WorkflowInputValue | undefined,\n options,\n min: num(r.min),\n max: num(r.max),\n trueText: str(r.true_text),\n falseText: str(r.false_text),\n advanced: bool(r.advanced),\n accept: r.accept === 'image' ? 'image' : undefined,\n context:\n r.context === 'documents' || r.context === 'selection' || r.context === 'image'\n ? r.context\n : undefined,\n by: Array.isArray(r.by)\n ? (r.by.filter((b) => b === 'folders' || b === 'labels') as Array<'folders' | 'labels'>)\n : undefined,\n }\n}\n\n/** The valid form fields of a SKILL.md frontmatter's `inputs` (snake_case keys); the rest dropped. */\nexport function fieldsFromFrontmatter(raw: unknown): WorkflowField[] {\n return Array.isArray(raw)\n ? raw.flatMap((f) => {\n const field = fieldFromFrontmatter(f)\n return field ? [field] : []\n })\n : []\n}\n\n/**\n * Build a workflow from parsed SKILL.md frontmatter (snake_case keys) and its body (the prompt\n * template). The inverse of what the backend will publish; seeded workflows use the same shape.\n */\nexport function workflowFromFrontmatter(\n id: string,\n frontmatter: Record<string, unknown>,\n body: string\n): WorkflowDefinition {\n const inputs = fieldsFromFrontmatter(frontmatter.inputs)\n return {\n id,\n title: str(frontmatter.name) ?? id,\n description: str(frontmatter.description) ?? '',\n icon: str(frontmatter.icon),\n inputs,\n run: { kind: 'prompt', promptTemplate: body.trim() },\n landing: frontmatter.landing === 'files' ? 'files' : 'chat',\n requiresFiles: bool(frontmatter.requires_files),\n schedulable: bool(frontmatter.schedulable) ?? true,\n }\n}\n\n/** snake_case keys of the on-disk form of a field (what `workflowFromFrontmatter` reads). */\nexport function fieldToFrontmatter(field: WorkflowField): Record<string, unknown> {\n return compact({\n name: field.name,\n type: field.type,\n label: field.label,\n description: field.description,\n placeholder: field.placeholder,\n required: field.required,\n default: field.default,\n options: field.options?.map((o) =>\n compact({\n value: o.value,\n label: o.label,\n description: o.description,\n text: o.text,\n icon: o.icon,\n tone: o.tone,\n })\n ),\n min: field.min,\n max: field.max,\n true_text: field.trueText,\n false_text: field.falseText,\n advanced: field.advanced,\n by: field.by,\n accept: field.accept,\n context: field.context,\n })\n}\n\nconst compact = (o: Record<string, unknown>): Record<string, unknown> =>\n Object.fromEntries(Object.entries(o).filter(([, v]) => v !== undefined))\n\n/* --------------------------- email drafts ---------------------------- */\n\n/**\n * `url` when it is a Gmail page (https://mail.google.com/\u2026), else undefined. A draft's link is read\n * back from stored state and opened as a link, so nothing else is ever one.\n */\nexport function gmailLink(url: unknown): string | undefined {\n if (typeof url !== 'string' || !url) return undefined\n try {\n const parsed = new URL(url)\n return parsed.protocol === 'https:' && parsed.hostname === 'mail.google.com' ? url : undefined\n } catch {\n return undefined\n }\n}\n\n/** A draft saved in the owner's Gmail opens there (`waiting.url`): its id means nothing to ARBI Mail. */\nexport function gmailDraftUrl(waiting: WorkflowActionWaiting | undefined): string | undefined {\n return waiting?.provider === 'gmail' ? gmailLink(waiting.url) : undefined\n}\n"],
|
|
5
|
+
"mappings": ";AAAA,SAAS,cAAc;AACvB;AAAA,EACE;AAAA,OAYK;AAEA,MAAM,kBAAkB,CAAC,UAC9B,OAAO,UAAU,YACjB,UAAU,QACV,MAAM,QAAS,MAAwB,OAAO,KAC9C,MAAM,QAAS,MAAwB,MAAM;AAExC,MAAM,uBAAuB,CAAC,UACnC,M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ACnB,UAAU,MAAM;AAAA,IAChB,SAAS,MAAM;AAAA,IACf,SAAS,MAAM,SAAS;AAAA,MAAI,CAAC,MAC3B,QAAQ;AAAA,QACN,OAAO,EAAE;AAAA,QACT,OAAO,EAAE;AAAA,QACT,aAAa,EAAE;AAAA,QACf,MAAM,EAAE;AAAA,QACR,MAAM,EAAE;AAAA,QACR,MAAM,EAAE;AAAA,MACV,CAAC;AAAA,IACH;AAAA,IACA,KAAK,MAAM;AAAA,IACX,KAAK,MAAM;AAAA,IACX,WAAW,MAAM;AAAA,IACjB,YAAY,MAAM;AAAA,IAClB,UAAU,MAAM;AAAA,IAChB,IAAI,MAAM;AAAA,IACV,QAAQ,MAAM;AAAA,IACd,SAAS,MAAM;AAAA,EACjB,CAAC;AACH;AAEA,MAAM,UAAU,CAAC,MACf,OAAO,YAAY,OAAO,QAAQ,CAAC,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC,MAAM,MAAM,MAAS,CAAC;AAQlE,SAAS,UAAU,KAAkC;AAC1D,MAAI,OAAO,QAAQ,YAAY,CAAC,IAAK,QAAO;AAC5C,MAAI;AACF,UAAM,SAAS,IAAI,IAAI,GAAG;AAC1B,WAAO,OAAO,aAAa,YAAY,OAAO,aAAa,oBAAoB,MAAM;AAAA,EACvF,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAGO,SAAS,cAAc,SAAgE;AAC5F,SAAO,SAAS,aAAa,UAAU,UAAU,QAAQ,GAAG,IAAI;AAClE;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('./chunk-
|
|
6
|
-
require('./chunk-
|
|
7
|
-
require('./chunk-
|
|
8
|
-
require('./chunk-
|
|
9
|
-
require('./chunk-
|
|
4
|
+
var chunkQXMPATG6_cjs = require('./chunk-QXMPATG6.cjs');
|
|
5
|
+
require('./chunk-2Z25MUAY.cjs');
|
|
6
|
+
require('./chunk-XCW6OY7E.cjs');
|
|
7
|
+
require('./chunk-HBUHOCWF.cjs');
|
|
8
|
+
require('./chunk-DBN6GBRQ.cjs');
|
|
9
|
+
require('./chunk-5A6T4W46.cjs');
|
|
10
10
|
require('./chunk-EVZH6Z5O.cjs');
|
|
11
|
-
require('./chunk-
|
|
11
|
+
require('./chunk-SUOHAB7N.cjs');
|
|
12
12
|
require('./chunk-AHDJXIUB.cjs');
|
|
13
13
|
require('./chunk-YVCOQHCE.cjs');
|
|
14
14
|
require('./chunk-JV5TVUOU.cjs');
|
|
@@ -16,9 +16,9 @@ require('./chunk-VZOOGA47.cjs');
|
|
|
16
16
|
require('./chunk-HQDR43JC.cjs');
|
|
17
17
|
require('./chunk-JR2YSBD5.cjs');
|
|
18
18
|
require('./chunk-3YZKDCWY.cjs');
|
|
19
|
-
require('./chunk-
|
|
20
|
-
require('./chunk-
|
|
21
|
-
require('./chunk-
|
|
19
|
+
require('./chunk-B3BZ6MNI.cjs');
|
|
20
|
+
require('./chunk-A6GBPE5E.cjs');
|
|
21
|
+
require('./chunk-F6CEPWIF.cjs');
|
|
22
22
|
require('./chunk-5F4DCIHS.cjs');
|
|
23
23
|
require('./chunk-AFQTQC7A.cjs');
|
|
24
24
|
require('./chunk-XJEXFEWG.cjs');
|
|
@@ -27,9 +27,9 @@ require('./chunk-MCXS6X37.cjs');
|
|
|
27
27
|
require('./chunk-KQF7POTG.cjs');
|
|
28
28
|
require('./chunk-75BNMCUX.cjs');
|
|
29
29
|
require('./chunk-IN6ILI5A.cjs');
|
|
30
|
-
require('./chunk-
|
|
31
|
-
require('./chunk-
|
|
32
|
-
require('./chunk-
|
|
30
|
+
require('./chunk-VL7ZX4KQ.cjs');
|
|
31
|
+
require('./chunk-EQTZQD66.cjs');
|
|
32
|
+
require('./chunk-JN5YMHGI.cjs');
|
|
33
33
|
require('./chunk-UDSHVNU3.cjs');
|
|
34
34
|
require('./chunk-IPSHAMO2.cjs');
|
|
35
35
|
require('./chunk-PPCATBOY.cjs');
|
|
@@ -42,35 +42,35 @@ require('./chunk-PLIF5CUV.cjs');
|
|
|
42
42
|
|
|
43
43
|
Object.defineProperty(exports, "ConnectedAssistantDock", {
|
|
44
44
|
enumerable: true,
|
|
45
|
-
get: function () { return
|
|
45
|
+
get: function () { return chunkQXMPATG6_cjs.ConnectedAssistantDock; }
|
|
46
46
|
});
|
|
47
47
|
Object.defineProperty(exports, "redlineStats", {
|
|
48
48
|
enumerable: true,
|
|
49
|
-
get: function () { return
|
|
49
|
+
get: function () { return chunkQXMPATG6_cjs.redlineStats; }
|
|
50
50
|
});
|
|
51
51
|
Object.defineProperty(exports, "textToArtifact", {
|
|
52
52
|
enumerable: true,
|
|
53
|
-
get: function () { return
|
|
53
|
+
get: function () { return chunkQXMPATG6_cjs.textToArtifact; }
|
|
54
54
|
});
|
|
55
55
|
Object.defineProperty(exports, "toRedlineMarkdown", {
|
|
56
56
|
enumerable: true,
|
|
57
|
-
get: function () { return
|
|
57
|
+
get: function () { return chunkQXMPATG6_cjs.toRedlineMarkdown; }
|
|
58
58
|
});
|
|
59
59
|
Object.defineProperty(exports, "useConnectedAiTask", {
|
|
60
60
|
enumerable: true,
|
|
61
|
-
get: function () { return
|
|
61
|
+
get: function () { return chunkQXMPATG6_cjs.useConnectedAiTask; }
|
|
62
62
|
});
|
|
63
63
|
Object.defineProperty(exports, "useConnectedChat", {
|
|
64
64
|
enumerable: true,
|
|
65
|
-
get: function () { return
|
|
65
|
+
get: function () { return chunkQXMPATG6_cjs.useConnectedChat; }
|
|
66
66
|
});
|
|
67
67
|
Object.defineProperty(exports, "useSemanticSearch", {
|
|
68
68
|
enumerable: true,
|
|
69
|
-
get: function () { return
|
|
69
|
+
get: function () { return chunkQXMPATG6_cjs.useSemanticSearch; }
|
|
70
70
|
});
|
|
71
71
|
Object.defineProperty(exports, "useWorkspaceDocs", {
|
|
72
72
|
enumerable: true,
|
|
73
|
-
get: function () { return
|
|
73
|
+
get: function () { return chunkQXMPATG6_cjs.useWorkspaceDocs; }
|
|
74
74
|
});
|
|
75
|
-
//# sourceMappingURL=ai-
|
|
76
|
-
//# sourceMappingURL=ai-
|
|
75
|
+
//# sourceMappingURL=ai-4XJ2VFNS.cjs.map
|
|
76
|
+
//# sourceMappingURL=ai-4XJ2VFNS.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"ai-4XJ2VFNS.cjs"}
|
|
@@ -11,6 +11,7 @@ export interface VersionTimelineLabels {
|
|
|
11
11
|
/** Why a version exists, keyed by its `reason` (upload | edit | signed | sync). */
|
|
12
12
|
reasons: Record<string, string>;
|
|
13
13
|
open: string;
|
|
14
|
+
restore?: string;
|
|
14
15
|
compare: string;
|
|
15
16
|
/** Heading of the document's translations (separate documents made from its versions). */
|
|
16
17
|
translations: string;
|
|
@@ -73,6 +74,9 @@ export interface VersionTimelineProps {
|
|
|
73
74
|
onOpen: (id: string) => void;
|
|
74
75
|
/** Omit to hide Compare (also hidden for `live`). */
|
|
75
76
|
onCompare?: (id: string) => void;
|
|
77
|
+
/** Restore a snapshot as a new current version; omitted for read-only users. */
|
|
78
|
+
onRestore?: (id: string) => void;
|
|
79
|
+
restoring?: boolean;
|
|
76
80
|
/** The document's translations, listed under its versions; each opens as its own document. */
|
|
77
81
|
translations?: TranslationEntry[];
|
|
78
82
|
onOpenTranslation?: (id: string) => void;
|
|
@@ -88,4 +92,4 @@ export interface VersionTimelineProps {
|
|
|
88
92
|
* Test ids: `version-timeline`, `version-timeline-empty`, `version-row-{id}`,
|
|
89
93
|
* `version-current-badge`, `version-branch-{id}`, `open-version-{id}`, `compare-version-{id}`.
|
|
90
94
|
*/
|
|
91
|
-
export declare function VersionTimeline({ versions, currentId, live, formatDate, onOpen, onCompare, translations, onOpenTranslation, className, labels, testIds, }: VersionTimelineProps): import("react").JSX.Element;
|
|
95
|
+
export declare function VersionTimeline({ versions, currentId, live, formatDate, onOpen, onCompare, onRestore, restoring, translations, onOpenTranslation, className, labels, testIds, }: VersionTimelineProps): import("react").JSX.Element;
|
|
@@ -15,10 +15,12 @@ const DEFAULT_VERSION_TIMELINE_LABELS = {
|
|
|
15
15
|
reasons: {
|
|
16
16
|
upload: "Original upload",
|
|
17
17
|
edit: "Saved edit",
|
|
18
|
+
restore: "Restored snapshot",
|
|
18
19
|
signed: "Signed",
|
|
19
20
|
sync: "Synced"
|
|
20
21
|
},
|
|
21
22
|
open: "Open",
|
|
23
|
+
restore: "Restore this version",
|
|
22
24
|
compare: "Compare",
|
|
23
25
|
translations: "Translations",
|
|
24
26
|
translatedFrom: (n) => `from Version ${n}`,
|
|
@@ -32,6 +34,8 @@ function VersionTimeline({
|
|
|
32
34
|
formatDate,
|
|
33
35
|
onOpen,
|
|
34
36
|
onCompare,
|
|
37
|
+
onRestore,
|
|
38
|
+
restoring = false,
|
|
35
39
|
translations = [],
|
|
36
40
|
onOpenTranslation,
|
|
37
41
|
className,
|
|
@@ -191,6 +195,17 @@ function VersionTimeline({
|
|
|
191
195
|
]
|
|
192
196
|
}
|
|
193
197
|
),
|
|
198
|
+
onRestore && /* @__PURE__ */ jsx(
|
|
199
|
+
"button",
|
|
200
|
+
{
|
|
201
|
+
type: "button",
|
|
202
|
+
disabled: restoring,
|
|
203
|
+
onClick: () => onRestore(v.id),
|
|
204
|
+
className: "inline-flex shrink-0 items-center gap-1 rounded-md px-2.5 py-1.5 text-sm font-medium text-primary hover:bg-accent disabled:opacity-50 pointer-coarse:min-h-11",
|
|
205
|
+
"data-testid": `restore-version-${v.id}`,
|
|
206
|
+
children: l.restore
|
|
207
|
+
}
|
|
208
|
+
),
|
|
194
209
|
canCompare && /* @__PURE__ */ jsxs(
|
|
195
210
|
"button",
|
|
196
211
|
{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/artifacts/VersionTimeline.tsx"],
|
|
4
|
-
"sourcesContent": ["import { Eye, GitCompare, History, Languages } from 'lucide-react'\nimport { cn } from '@arbidocs/react/ui'\nimport { testIdOr } from '../chat/test-id'\n\n/** Every fixed string of the timeline. Pass a partial `labels` to translate or reword. */\nexport interface VersionTimelineLabels {\n emptyLive: string\n emptyDocument: string\n untitled: string\n latest: string\n viewing: string\n current: string\n version: (n: number) => string\n branchedFrom: (n: number) => string\n /** Why a version exists, keyed by its `reason` (upload | edit | signed | sync). */\n reasons: Record<string, string>\n open: string\n compare: string\n /** Heading of the document's translations (separate documents made from its versions). */\n translations: string\n translatedFrom: (n: number) => string\n finalPdf: string\n /** Before the thread a version was made in: \"in {thread}\". */\n madeIn: string\n}\n\nexport const DEFAULT_VERSION_TIMELINE_LABELS: VersionTimelineLabels = {\n emptyLive:\n 'No earlier versions yet. When you ask the assistant for a change, the previous version is kept here.',\n emptyDocument:\n 'No earlier versions yet. Editing this draft and saving creates a new version here.',\n untitled: 'Untitled',\n latest: 'Latest',\n viewing: 'Viewing',\n current: 'Current',\n version: (n) => `Version ${n}`,\n branchedFrom: (n) => `branched from Version ${n}`,\n reasons: {\n upload: 'Original upload',\n edit: 'Saved edit',\n signed: 'Signed',\n sync: 'Synced',\n },\n open: 'Open',\n compare: 'Compare',\n translations: 'Translations',\n translatedFrom: (n) => `from Version ${n}`,\n finalPdf: 'final PDF',\n madeIn: 'in',\n}\n\nexport interface VersionTimelineTestIds {\n root: string\n empty: string\n currentBadge: string\n /** Replaces the whole `version-row-<id>` id. */\n row: (id: string) => string\n branch: (id: string) => string\n open: (id: string) => string\n compare: (id: string) => string\n}\n\nexport interface VersionEntry {\n id: string\n /** File name as stored (live artifacts have their extension stripped for display). */\n name: string\n /** ISO string; formatted with `formatDate`. */\n createdAt: string\n /** 1-based version number; defaults to the row's position. */\n number?: number\n /** The version this one was saved from (a restore when it is not the row above). */\n savedFromId?: string | null\n /** Why the version exists: upload | edit | signed | sync. Shown as a label on the row. */\n reason?: string | null\n /** The thread whose turn made this version: named on the row, opening it at that turn. */\n madeIn?: { label: string; onOpen: () => void } | null\n}\n\n/** A translation of the document: its own document, made from one of these versions. */\nexport interface TranslationEntry {\n id: string\n name: string\n /** ISO string; formatted with `formatDate`. */\n createdAt: string\n /** The source version it translates (null: not recorded). */\n sourceVersion?: number | null\n /** A finalised translation: the PDF saved from a translation (the editable draft is listed too). */\n final?: boolean\n}\n\nexport interface VersionTimelineProps {\n /** Versions in creation order (oldest first). */\n versions: VersionEntry[]\n /** The version currently open. */\n currentId: string\n /**\n * A live (html/react) artifact: plain-language labels for non-developers, no file extension,\n * and no Compare (a text diff of source code means nothing to them).\n */\n live?: boolean\n formatDate: (iso: string) => string\n onOpen: (id: string) => void\n /** Omit to hide Compare (also hidden for `live`). */\n onCompare?: (id: string) => void\n /** The document's translations, listed under its versions; each opens as its own document. */\n translations?: TranslationEntry[]\n onOpenTranslation?: (id: string) => void\n className?: string\n labels?: Partial<VersionTimelineLabels>\n /** Overrides for the test ids (defaults keep the current ids). */\n testIds?: Partial<VersionTimelineTestIds>\n}\n\n/**\n * Clickable timeline of an immutable version chain: open any version or compare it with the\n * current one. Versions are numbered in creation order; a version saved from an OLD version is a\n * deliberate branch and says where it came from instead of implying it follows the row above.\n * Test ids: `version-timeline`, `version-timeline-empty`, `version-row-{id}`,\n * `version-current-badge`, `version-branch-{id}`, `open-version-{id}`, `compare-version-{id}`.\n */\nexport function VersionTimeline({\n versions,\n currentId,\n live = false,\n formatDate,\n onOpen,\n onCompare,\n translations = [],\n onOpenTranslation,\n className,\n labels,\n testIds,\n}: VersionTimelineProps) {\n const l = { ...DEFAULT_VERSION_TIMELINE_LABELS, ...labels }\n const translationList =\n translations.length > 0 ? (\n <section className=\"mx-auto mt-4 max-w-2xl\" data-testid=\"version-translations\">\n <h3 className=\"px-3 pb-1 text-xs font-medium uppercase tracking-wide text-muted-foreground\">\n {l.translations}\n </h3>\n <ul className=\"space-y-1\">\n {translations.map((t) => (\n <li\n key={t.id}\n className=\"flex items-center gap-3 rounded-md px-3 py-2.5\"\n data-testid={`translation-row-${t.id}`}\n >\n <Languages className=\"size-4 shrink-0 text-muted-foreground\" aria-hidden />\n <div className=\"min-w-0 flex-1 truncate text-sm text-muted-foreground\">\n <span className=\"font-semibold text-foreground\">{t.name}</span>\n {t.final ? ` \u00B7 ${l.finalPdf}` : ''}\n {t.sourceVersion ? ` \u00B7 ${l.translatedFrom(t.sourceVersion)}` : ''} \u00B7{' '}\n {formatDate(t.createdAt)}\n </div>\n {onOpenTranslation && (\n <button\n type=\"button\"\n onClick={() => onOpenTranslation(t.id)}\n className=\"inline-flex shrink-0 items-center gap-1 rounded-md px-2.5 py-1.5 text-sm font-medium text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring pointer-coarse:min-h-11\"\n data-testid={`open-translation-${t.id}`}\n >\n <Eye className=\"size-3.5\" /> {l.open}\n </button>\n )}\n </li>\n ))}\n </ul>\n </section>\n ) : null\n const empty = (\n <p\n className={cn(\n 'text-sm text-muted-foreground',\n versions.length ? 'mx-auto mt-3 max-w-2xl px-3' : cn('p-6', !translationList && className)\n )}\n data-testid={testIdOr(testIds?.empty, { testId: 'version-timeline-empty' })}\n >\n {live ? l.emptyLive : l.emptyDocument}\n </p>\n )\n // Nothing recorded at all (a draft not yet saved): only the hint, and any translations.\n if (versions.length === 0) {\n if (!translationList) return empty\n return (\n <div className={cn('h-full overflow-auto p-4', className)}>\n {empty}\n {translationList}\n </div>\n )\n }\n\n const numberById = new Map<string, number>()\n versions.forEach((v, i) => numberById.set(v.id, v.number ?? i + 1))\n const canCompare = !live && !!onCompare\n\n return (\n <div\n className={cn('h-full overflow-auto p-4', className)}\n data-testid={testIdOr(testIds?.root, { testId: 'version-timeline' })}\n >\n <ol className=\"mx-auto max-w-2xl space-y-1\">\n {versions.map((v, i) => {\n const isCurrent = v.id === currentId\n const isLatest = i === versions.length - 1\n const number = v.number ?? i + 1\n const savedFromNumber = v.savedFromId ? numberById.get(v.savedFromId) : undefined\n const branchedFrom =\n savedFromNumber !== undefined && savedFromNumber !== number - 1 ? savedFromNumber : null\n // Live artifacts say \"Latest\"/\"Viewing\" (open vs. newest) instead of \"Current\".\n const badge = !isCurrent ? null : live ? (isLatest ? l.latest : l.viewing) : l.current\n const name = live\n ? (v.name || l.untitled).replace(/\\.[A-Za-z0-9]+$/, '')\n : v.name || l.untitled\n const reason = !live && v.reason ? (l.reasons[v.reason] ?? null) : null\n return (\n <li\n key={v.id}\n className={cn(\n 'flex items-center gap-3 rounded-md px-3 py-2.5',\n isCurrent && 'bg-accent'\n )}\n data-testid={testIdOr(testIds?.row?.(v.id), { testId: `version-row-${v.id}` })}\n >\n <History className=\"size-4 shrink-0 text-muted-foreground\" aria-hidden />\n <div className=\"min-w-0 flex-1\">\n <div className=\"flex items-center gap-2\">\n <span className=\"text-sm font-semibold text-foreground\">{l.version(number)}</span>\n {badge && (\n <span\n className=\"rounded-full bg-background px-2 py-0.5 text-xs font-medium text-accent-foreground\"\n data-testid={testIdOr(testIds?.currentBadge, {\n testId: 'version-current-badge',\n })}\n >\n {badge}\n </span>\n )}\n </div>\n <div className=\"truncate text-sm text-muted-foreground\">\n {name} \u00B7 {formatDate(v.createdAt)}\n {reason && <span data-testid={`version-reason-${v.id}`}> \u00B7 {reason}</span>}\n {v.madeIn && (\n <>\n {' '}\n {l.madeIn}{' '}\n <button\n type=\"button\"\n onClick={v.madeIn.onOpen}\n className=\"font-medium text-foreground underline-offset-2 hover:text-primary hover:underline\"\n title={v.madeIn.label}\n data-testid={`version-thread-${v.id}`}\n >\n {v.madeIn.label}\n </button>\n </>\n )}\n {branchedFrom !== null && (\n <span\n data-testid={testIdOr(testIds?.branch?.(v.id), {\n testId: `version-branch-${v.id}`,\n })}\n >\n {' '}\n \u00B7 {l.branchedFrom(branchedFrom)}\n </span>\n )}\n </div>\n </div>\n {!isCurrent && (\n <>\n <button\n type=\"button\"\n onClick={() => onOpen(v.id)}\n className=\"inline-flex shrink-0 items-center gap-1 rounded-md px-2.5 py-1.5 text-sm font-medium text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring pointer-coarse:min-h-11\"\n data-testid={testIdOr(testIds?.open?.(v.id), {\n testId: `open-version-${v.id}`,\n })}\n >\n <Eye className=\"size-3.5\" /> {l.open}\n </button>\n {canCompare && (\n <button\n type=\"button\"\n onClick={() => onCompare(v.id)}\n className=\"inline-flex shrink-0 items-center gap-1 rounded-md px-2.5 py-1.5 text-sm font-medium text-primary transition-colors hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring pointer-coarse:min-h-11\"\n data-testid={testIdOr(testIds?.compare?.(v.id), {\n testId: `compare-version-${v.id}`,\n })}\n >\n <GitCompare className=\"size-3.5\" /> {l.compare}\n </button>\n )}\n </>\n )}\n </li>\n )\n })}\n </ol>\n {/* A single version is still listed (the original, current); the hint says how more appear. */}\n {versions.length === 1 && empty}\n {translationList}\n </div>\n )\n}\n"],
|
|
5
|
-
"mappings": ";
|
|
4
|
+
"sourcesContent": ["import { Eye, GitCompare, History, Languages } from 'lucide-react'\nimport { cn } from '@arbidocs/react/ui'\nimport { testIdOr } from '../chat/test-id'\n\n/** Every fixed string of the timeline. Pass a partial `labels` to translate or reword. */\nexport interface VersionTimelineLabels {\n emptyLive: string\n emptyDocument: string\n untitled: string\n latest: string\n viewing: string\n current: string\n version: (n: number) => string\n branchedFrom: (n: number) => string\n /** Why a version exists, keyed by its `reason` (upload | edit | signed | sync). */\n reasons: Record<string, string>\n open: string\n restore?: string\n compare: string\n /** Heading of the document's translations (separate documents made from its versions). */\n translations: string\n translatedFrom: (n: number) => string\n finalPdf: string\n /** Before the thread a version was made in: \"in {thread}\". */\n madeIn: string\n}\n\nexport const DEFAULT_VERSION_TIMELINE_LABELS: VersionTimelineLabels = {\n emptyLive:\n 'No earlier versions yet. When you ask the assistant for a change, the previous version is kept here.',\n emptyDocument:\n 'No earlier versions yet. Editing this draft and saving creates a new version here.',\n untitled: 'Untitled',\n latest: 'Latest',\n viewing: 'Viewing',\n current: 'Current',\n version: (n) => `Version ${n}`,\n branchedFrom: (n) => `branched from Version ${n}`,\n reasons: {\n upload: 'Original upload',\n edit: 'Saved edit',\n restore: 'Restored snapshot',\n signed: 'Signed',\n sync: 'Synced',\n },\n open: 'Open',\n restore: 'Restore this version',\n compare: 'Compare',\n translations: 'Translations',\n translatedFrom: (n) => `from Version ${n}`,\n finalPdf: 'final PDF',\n madeIn: 'in',\n}\n\nexport interface VersionTimelineTestIds {\n root: string\n empty: string\n currentBadge: string\n /** Replaces the whole `version-row-<id>` id. */\n row: (id: string) => string\n branch: (id: string) => string\n open: (id: string) => string\n compare: (id: string) => string\n}\n\nexport interface VersionEntry {\n id: string\n /** File name as stored (live artifacts have their extension stripped for display). */\n name: string\n /** ISO string; formatted with `formatDate`. */\n createdAt: string\n /** 1-based version number; defaults to the row's position. */\n number?: number\n /** The version this one was saved from (a restore when it is not the row above). */\n savedFromId?: string | null\n /** Why the version exists: upload | edit | signed | sync. Shown as a label on the row. */\n reason?: string | null\n /** The thread whose turn made this version: named on the row, opening it at that turn. */\n madeIn?: { label: string; onOpen: () => void } | null\n}\n\n/** A translation of the document: its own document, made from one of these versions. */\nexport interface TranslationEntry {\n id: string\n name: string\n /** ISO string; formatted with `formatDate`. */\n createdAt: string\n /** The source version it translates (null: not recorded). */\n sourceVersion?: number | null\n /** A finalised translation: the PDF saved from a translation (the editable draft is listed too). */\n final?: boolean\n}\n\nexport interface VersionTimelineProps {\n /** Versions in creation order (oldest first). */\n versions: VersionEntry[]\n /** The version currently open. */\n currentId: string\n /**\n * A live (html/react) artifact: plain-language labels for non-developers, no file extension,\n * and no Compare (a text diff of source code means nothing to them).\n */\n live?: boolean\n formatDate: (iso: string) => string\n onOpen: (id: string) => void\n /** Omit to hide Compare (also hidden for `live`). */\n onCompare?: (id: string) => void\n /** Restore a snapshot as a new current version; omitted for read-only users. */\n onRestore?: (id: string) => void\n restoring?: boolean\n /** The document's translations, listed under its versions; each opens as its own document. */\n translations?: TranslationEntry[]\n onOpenTranslation?: (id: string) => void\n className?: string\n labels?: Partial<VersionTimelineLabels>\n /** Overrides for the test ids (defaults keep the current ids). */\n testIds?: Partial<VersionTimelineTestIds>\n}\n\n/**\n * Clickable timeline of an immutable version chain: open any version or compare it with the\n * current one. Versions are numbered in creation order; a version saved from an OLD version is a\n * deliberate branch and says where it came from instead of implying it follows the row above.\n * Test ids: `version-timeline`, `version-timeline-empty`, `version-row-{id}`,\n * `version-current-badge`, `version-branch-{id}`, `open-version-{id}`, `compare-version-{id}`.\n */\nexport function VersionTimeline({\n versions,\n currentId,\n live = false,\n formatDate,\n onOpen,\n onCompare,\n onRestore,\n restoring = false,\n translations = [],\n onOpenTranslation,\n className,\n labels,\n testIds,\n}: VersionTimelineProps) {\n const l = { ...DEFAULT_VERSION_TIMELINE_LABELS, ...labels }\n const translationList =\n translations.length > 0 ? (\n <section className=\"mx-auto mt-4 max-w-2xl\" data-testid=\"version-translations\">\n <h3 className=\"px-3 pb-1 text-xs font-medium uppercase tracking-wide text-muted-foreground\">\n {l.translations}\n </h3>\n <ul className=\"space-y-1\">\n {translations.map((t) => (\n <li\n key={t.id}\n className=\"flex items-center gap-3 rounded-md px-3 py-2.5\"\n data-testid={`translation-row-${t.id}`}\n >\n <Languages className=\"size-4 shrink-0 text-muted-foreground\" aria-hidden />\n <div className=\"min-w-0 flex-1 truncate text-sm text-muted-foreground\">\n <span className=\"font-semibold text-foreground\">{t.name}</span>\n {t.final ? ` \u00B7 ${l.finalPdf}` : ''}\n {t.sourceVersion ? ` \u00B7 ${l.translatedFrom(t.sourceVersion)}` : ''} \u00B7{' '}\n {formatDate(t.createdAt)}\n </div>\n {onOpenTranslation && (\n <button\n type=\"button\"\n onClick={() => onOpenTranslation(t.id)}\n className=\"inline-flex shrink-0 items-center gap-1 rounded-md px-2.5 py-1.5 text-sm font-medium text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring pointer-coarse:min-h-11\"\n data-testid={`open-translation-${t.id}`}\n >\n <Eye className=\"size-3.5\" /> {l.open}\n </button>\n )}\n </li>\n ))}\n </ul>\n </section>\n ) : null\n const empty = (\n <p\n className={cn(\n 'text-sm text-muted-foreground',\n versions.length ? 'mx-auto mt-3 max-w-2xl px-3' : cn('p-6', !translationList && className)\n )}\n data-testid={testIdOr(testIds?.empty, { testId: 'version-timeline-empty' })}\n >\n {live ? l.emptyLive : l.emptyDocument}\n </p>\n )\n // Nothing recorded at all (a draft not yet saved): only the hint, and any translations.\n if (versions.length === 0) {\n if (!translationList) return empty\n return (\n <div className={cn('h-full overflow-auto p-4', className)}>\n {empty}\n {translationList}\n </div>\n )\n }\n\n const numberById = new Map<string, number>()\n versions.forEach((v, i) => numberById.set(v.id, v.number ?? i + 1))\n const canCompare = !live && !!onCompare\n\n return (\n <div\n className={cn('h-full overflow-auto p-4', className)}\n data-testid={testIdOr(testIds?.root, { testId: 'version-timeline' })}\n >\n <ol className=\"mx-auto max-w-2xl space-y-1\">\n {versions.map((v, i) => {\n const isCurrent = v.id === currentId\n const isLatest = i === versions.length - 1\n const number = v.number ?? i + 1\n const savedFromNumber = v.savedFromId ? numberById.get(v.savedFromId) : undefined\n const branchedFrom =\n savedFromNumber !== undefined && savedFromNumber !== number - 1 ? savedFromNumber : null\n // Live artifacts say \"Latest\"/\"Viewing\" (open vs. newest) instead of \"Current\".\n const badge = !isCurrent ? null : live ? (isLatest ? l.latest : l.viewing) : l.current\n const name = live\n ? (v.name || l.untitled).replace(/\\.[A-Za-z0-9]+$/, '')\n : v.name || l.untitled\n const reason = !live && v.reason ? (l.reasons[v.reason] ?? null) : null\n return (\n <li\n key={v.id}\n className={cn(\n 'flex items-center gap-3 rounded-md px-3 py-2.5',\n isCurrent && 'bg-accent'\n )}\n data-testid={testIdOr(testIds?.row?.(v.id), { testId: `version-row-${v.id}` })}\n >\n <History className=\"size-4 shrink-0 text-muted-foreground\" aria-hidden />\n <div className=\"min-w-0 flex-1\">\n <div className=\"flex items-center gap-2\">\n <span className=\"text-sm font-semibold text-foreground\">{l.version(number)}</span>\n {badge && (\n <span\n className=\"rounded-full bg-background px-2 py-0.5 text-xs font-medium text-accent-foreground\"\n data-testid={testIdOr(testIds?.currentBadge, {\n testId: 'version-current-badge',\n })}\n >\n {badge}\n </span>\n )}\n </div>\n <div className=\"truncate text-sm text-muted-foreground\">\n {name} \u00B7 {formatDate(v.createdAt)}\n {reason && <span data-testid={`version-reason-${v.id}`}> \u00B7 {reason}</span>}\n {v.madeIn && (\n <>\n {' '}\n {l.madeIn}{' '}\n <button\n type=\"button\"\n onClick={v.madeIn.onOpen}\n className=\"font-medium text-foreground underline-offset-2 hover:text-primary hover:underline\"\n title={v.madeIn.label}\n data-testid={`version-thread-${v.id}`}\n >\n {v.madeIn.label}\n </button>\n </>\n )}\n {branchedFrom !== null && (\n <span\n data-testid={testIdOr(testIds?.branch?.(v.id), {\n testId: `version-branch-${v.id}`,\n })}\n >\n {' '}\n \u00B7 {l.branchedFrom(branchedFrom)}\n </span>\n )}\n </div>\n </div>\n {!isCurrent && (\n <>\n <button\n type=\"button\"\n onClick={() => onOpen(v.id)}\n className=\"inline-flex shrink-0 items-center gap-1 rounded-md px-2.5 py-1.5 text-sm font-medium text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring pointer-coarse:min-h-11\"\n data-testid={testIdOr(testIds?.open?.(v.id), {\n testId: `open-version-${v.id}`,\n })}\n >\n <Eye className=\"size-3.5\" /> {l.open}\n </button>\n {onRestore && (\n <button\n type=\"button\"\n disabled={restoring}\n onClick={() => onRestore(v.id)}\n className=\"inline-flex shrink-0 items-center gap-1 rounded-md px-2.5 py-1.5 text-sm font-medium text-primary hover:bg-accent disabled:opacity-50 pointer-coarse:min-h-11\"\n data-testid={`restore-version-${v.id}`}\n >\n {l.restore}\n </button>\n )}\n {canCompare && (\n <button\n type=\"button\"\n onClick={() => onCompare(v.id)}\n className=\"inline-flex shrink-0 items-center gap-1 rounded-md px-2.5 py-1.5 text-sm font-medium text-primary transition-colors hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring pointer-coarse:min-h-11\"\n data-testid={testIdOr(testIds?.compare?.(v.id), {\n testId: `compare-version-${v.id}`,\n })}\n >\n <GitCompare className=\"size-3.5\" /> {l.compare}\n </button>\n )}\n </>\n )}\n </li>\n )\n })}\n </ol>\n {/* A single version is still listed (the original, current); the hint says how more appear. */}\n {versions.length === 1 && empty}\n {translationList}\n </div>\n )\n}\n"],
|
|
5
|
+
"mappings": ";AAiJQ,SAyGY,UAzGZ,KAWM,YAXN;AAjJR,SAAS,KAAK,YAAY,SAAS,iBAAiB;AACpD,SAAS,UAAU;AACnB,SAAS,gBAAgB;AAyBlB,MAAM,kCAAyD;AAAA,EACpE,WACE;AAAA,EACF,eACE;AAAA,EACF,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS,CAAC,MAAM,WAAW,CAAC;AAAA,EAC5B,cAAc,CAAC,MAAM,yBAAyB,CAAC;AAAA,EAC/C,SAAS;AAAA,IACP,QAAQ;AAAA,IACR,MAAM;AAAA,IACN,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,MAAM;AAAA,EACR;AAAA,EACA,MAAM;AAAA,EACN,SAAS;AAAA,EACT,SAAS;AAAA,EACT,cAAc;AAAA,EACd,gBAAgB,CAAC,MAAM,gBAAgB,CAAC;AAAA,EACxC,UAAU;AAAA,EACV,QAAQ;AACV;AA0EO,SAAS,gBAAgB;AAAA,EAC9B;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,YAAY;AAAA,EACZ,eAAe,CAAC;AAAA,EAChB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAyB;AACvB,QAAM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AAa,SAAS,SAAS,OAAO,EAAE,EAAE,GAAG;AAAA,wBAC3C,QAAQ,gBAAgB,EAAE,EAAE;AAAA,sBAC9B,CAAC;AAAA,sBAED;AAAA,4CAAC,OAAI,WAAU,YAAW;AAAA,wBAAE;AAAA,wBAAE,EAAE;AAAA;AAAA;AAAA,kBAClC;AAAA,kBACC,aACC;AAAA,oBAAC;AAAA;AAAA,sBACC,MAAK;AAAA,sBACL,UAAU;AAAA,sBACV,SAAS,MAAM,UAAU,EAAE,EAAE;AAAA,sBAC7B,WAAU;AAAA,sBACV,eAAa,mBAAmB,EAAE,EAAE;AAAA,sBAEnC,YAAE;AAAA;AAAA,kBACL;AAAA,kBAED,cACC;AAAA,oBAAC;AAAA;AAAA,sBACC,MAAK;AAAA,sBACL,SAAS,MAAM,UAAU,EAAE,EAAE;AAAA,sBAC7B,WAAU;AAAA,sBACV,eAAa,SAAS,SAAS,UAAU,EAAE,EAAE,GAAG;AAAA,wBAC9C,QAAQ,mBAAmB,EAAE,EAAE;AAAA,sBACjC,CAAC;AAAA,sBAED;AAAA,4CAAC,cAAW,WAAU,YAAW;AAAA,wBAAE;AAAA,wBAAE,EAAE;AAAA;AAAA;AAAA,kBACzC;AAAA,mBAEJ;AAAA;AAAA;AAAA,YAvFG,EAAE;AAAA,UAyFT;AAAA,QAEJ,CAAC,GACH;AAAA,QAEC,SAAS,WAAW,KAAK;AAAA,QACzB;AAAA;AAAA;AAAA,EACH;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/artifacts/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var chunkMHIG6GGS_cjs = require('../chunk-MHIG6GGS.cjs');
|
|
5
5
|
var chunkVG24E4JJ_cjs = require('../chunk-VG24E4JJ.cjs');
|
|
6
6
|
var chunkU2FFG2B3_cjs = require('../chunk-U2FFG2B3.cjs');
|
|
7
7
|
require('../chunk-PLIF5CUV.cjs');
|
|
@@ -10,95 +10,95 @@ require('../chunk-PLIF5CUV.cjs');
|
|
|
10
10
|
|
|
11
11
|
Object.defineProperty(exports, "ArtifactCodeView", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkMHIG6GGS_cjs.ArtifactCodeView; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, "ArtifactCompareBar", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkMHIG6GGS_cjs.ArtifactCompareBar; }
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "ArtifactEditor", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunkMHIG6GGS_cjs.ArtifactEditor; }
|
|
22
22
|
});
|
|
23
23
|
Object.defineProperty(exports, "ArtifactEditorBody", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunkMHIG6GGS_cjs.ArtifactEditorBody; }
|
|
26
26
|
});
|
|
27
27
|
Object.defineProperty(exports, "ArtifactPreview", {
|
|
28
28
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
29
|
+
get: function () { return chunkMHIG6GGS_cjs.ArtifactPreview; }
|
|
30
30
|
});
|
|
31
31
|
Object.defineProperty(exports, "ArtifactRedlineView", {
|
|
32
32
|
enumerable: true,
|
|
33
|
-
get: function () { return
|
|
33
|
+
get: function () { return chunkMHIG6GGS_cjs.ArtifactRedlineView; }
|
|
34
34
|
});
|
|
35
35
|
Object.defineProperty(exports, "ArtifactToolbar", {
|
|
36
36
|
enumerable: true,
|
|
37
|
-
get: function () { return
|
|
37
|
+
get: function () { return chunkMHIG6GGS_cjs.ArtifactToolbar; }
|
|
38
38
|
});
|
|
39
39
|
Object.defineProperty(exports, "ArtifactVersionBar", {
|
|
40
40
|
enumerable: true,
|
|
41
|
-
get: function () { return
|
|
41
|
+
get: function () { return chunkMHIG6GGS_cjs.ArtifactVersionBar; }
|
|
42
42
|
});
|
|
43
43
|
Object.defineProperty(exports, "DEFAULT_ARTIFACT_COMPARE_BAR_LABELS", {
|
|
44
44
|
enumerable: true,
|
|
45
|
-
get: function () { return
|
|
45
|
+
get: function () { return chunkMHIG6GGS_cjs.DEFAULT_ARTIFACT_COMPARE_BAR_LABELS; }
|
|
46
46
|
});
|
|
47
47
|
Object.defineProperty(exports, "DEFAULT_ARTIFACT_EDITOR_STATUS_LABELS", {
|
|
48
48
|
enumerable: true,
|
|
49
|
-
get: function () { return
|
|
49
|
+
get: function () { return chunkMHIG6GGS_cjs.DEFAULT_ARTIFACT_EDITOR_STATUS_LABELS; }
|
|
50
50
|
});
|
|
51
51
|
Object.defineProperty(exports, "DEFAULT_ARTIFACT_RUNTIME_URL", {
|
|
52
52
|
enumerable: true,
|
|
53
|
-
get: function () { return
|
|
53
|
+
get: function () { return chunkMHIG6GGS_cjs.DEFAULT_ARTIFACT_RUNTIME_URL; }
|
|
54
54
|
});
|
|
55
55
|
Object.defineProperty(exports, "DEFAULT_ARTIFACT_TOOLBAR_LABELS", {
|
|
56
56
|
enumerable: true,
|
|
57
|
-
get: function () { return
|
|
57
|
+
get: function () { return chunkMHIG6GGS_cjs.DEFAULT_ARTIFACT_TOOLBAR_LABELS; }
|
|
58
58
|
});
|
|
59
59
|
Object.defineProperty(exports, "DEFAULT_ARTIFACT_VERSION_BAR_LABELS", {
|
|
60
60
|
enumerable: true,
|
|
61
|
-
get: function () { return
|
|
61
|
+
get: function () { return chunkMHIG6GGS_cjs.DEFAULT_ARTIFACT_VERSION_BAR_LABELS; }
|
|
62
62
|
});
|
|
63
63
|
Object.defineProperty(exports, "DEFAULT_REDLINE_LABELS", {
|
|
64
64
|
enumerable: true,
|
|
65
|
-
get: function () { return
|
|
65
|
+
get: function () { return chunkMHIG6GGS_cjs.DEFAULT_REDLINE_LABELS; }
|
|
66
66
|
});
|
|
67
67
|
Object.defineProperty(exports, "DEFAULT_VERSION_TIMELINE_LABELS", {
|
|
68
68
|
enumerable: true,
|
|
69
|
-
get: function () { return
|
|
69
|
+
get: function () { return chunkMHIG6GGS_cjs.DEFAULT_VERSION_TIMELINE_LABELS; }
|
|
70
70
|
});
|
|
71
71
|
Object.defineProperty(exports, "RedlineComputing", {
|
|
72
72
|
enumerable: true,
|
|
73
|
-
get: function () { return
|
|
73
|
+
get: function () { return chunkMHIG6GGS_cjs.RedlineComputing; }
|
|
74
74
|
});
|
|
75
75
|
Object.defineProperty(exports, "RedlineDocument", {
|
|
76
76
|
enumerable: true,
|
|
77
|
-
get: function () { return
|
|
77
|
+
get: function () { return chunkMHIG6GGS_cjs.RedlineDocument; }
|
|
78
78
|
});
|
|
79
79
|
Object.defineProperty(exports, "RedlineFrame", {
|
|
80
80
|
enumerable: true,
|
|
81
|
-
get: function () { return
|
|
81
|
+
get: function () { return chunkMHIG6GGS_cjs.RedlineFrame; }
|
|
82
82
|
});
|
|
83
83
|
Object.defineProperty(exports, "RedlineMark", {
|
|
84
84
|
enumerable: true,
|
|
85
|
-
get: function () { return
|
|
85
|
+
get: function () { return chunkMHIG6GGS_cjs.RedlineMark; }
|
|
86
86
|
});
|
|
87
87
|
Object.defineProperty(exports, "RedlineRevertGutter", {
|
|
88
88
|
enumerable: true,
|
|
89
|
-
get: function () { return
|
|
89
|
+
get: function () { return chunkMHIG6GGS_cjs.RedlineRevertGutter; }
|
|
90
90
|
});
|
|
91
91
|
Object.defineProperty(exports, "RedlineStatus", {
|
|
92
92
|
enumerable: true,
|
|
93
|
-
get: function () { return
|
|
93
|
+
get: function () { return chunkMHIG6GGS_cjs.RedlineStatus; }
|
|
94
94
|
});
|
|
95
95
|
Object.defineProperty(exports, "VersionTimeline", {
|
|
96
96
|
enumerable: true,
|
|
97
|
-
get: function () { return
|
|
97
|
+
get: function () { return chunkMHIG6GGS_cjs.VersionTimeline; }
|
|
98
98
|
});
|
|
99
99
|
Object.defineProperty(exports, "loadArtifactRuntime", {
|
|
100
100
|
enumerable: true,
|
|
101
|
-
get: function () { return
|
|
101
|
+
get: function () { return chunkMHIG6GGS_cjs.loadArtifactRuntime; }
|
|
102
102
|
});
|
|
103
103
|
Object.defineProperty(exports, "ARTIFACT_CSP", {
|
|
104
104
|
enumerable: true,
|
package/dist/calls/index.cjs
CHANGED
|
@@ -68,10 +68,10 @@ function ConnectedIncomingCall() {
|
|
|
68
68
|
);
|
|
69
69
|
}
|
|
70
70
|
var ConnectedCallDock = react.lazy(
|
|
71
|
-
() => import('../ConnectedCallDock-
|
|
71
|
+
() => import('../ConnectedCallDock-CJ7RWP5B.cjs').then((m) => ({ default: m.ConnectedCallDock }))
|
|
72
72
|
);
|
|
73
73
|
var ConnectedCallRoom = react.lazy(
|
|
74
|
-
() => import('../ConnectedCallRoom-
|
|
74
|
+
() => import('../ConnectedCallRoom-JPJCXP6X.cjs').then((m) => ({ default: m.ConnectedCallRoom }))
|
|
75
75
|
);
|
|
76
76
|
function ConnectedCallLayer() {
|
|
77
77
|
const hasActiveCall = react$1.useCallSession((s) => s.active !== null);
|