annotation-kit 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (121) hide show
  1. package/LICENSE +21 -0
  2. package/NOTICE +75 -0
  3. package/README.md +114 -2
  4. package/README.zh-CN.md +112 -0
  5. package/dist/annotation-kit.css +157 -0
  6. package/dist/chunks/references-ukB-tSle.js +1126 -0
  7. package/dist/chunks/references-ukB-tSle.js.map +1 -0
  8. package/dist/electron/element-context.cjs +72 -0
  9. package/dist/electron/guest-preload.cjs +327 -0
  10. package/dist/electron.js +394 -0
  11. package/dist/electron.js.map +1 -0
  12. package/dist/index.js +910 -0
  13. package/dist/index.js.map +1 -0
  14. package/dist/react.js +2256 -0
  15. package/dist/react.js.map +1 -0
  16. package/dist/styles.d.ts +2 -0
  17. package/dist/types/address.d.ts +53 -0
  18. package/dist/types/address.d.ts.map +1 -0
  19. package/dist/types/client/Workbench.d.ts +11 -0
  20. package/dist/types/client/Workbench.d.ts.map +1 -0
  21. package/dist/types/client/composer/PacketPreview.d.ts +12 -0
  22. package/dist/types/client/composer/PacketPreview.d.ts.map +1 -0
  23. package/dist/types/client/composer/ReferenceCard.d.ts +12 -0
  24. package/dist/types/client/composer/ReferenceCard.d.ts.map +1 -0
  25. package/dist/types/client/composer/attachments.d.ts +10 -0
  26. package/dist/types/client/composer/attachments.d.ts.map +1 -0
  27. package/dist/types/client/composer/commit.d.ts +4 -0
  28. package/dist/types/client/composer/commit.d.ts.map +1 -0
  29. package/dist/types/client/composer/packets.d.ts +53 -0
  30. package/dist/types/client/composer/packets.d.ts.map +1 -0
  31. package/dist/types/client/composer/reference-presentation.d.ts +4 -0
  32. package/dist/types/client/composer/reference-presentation.d.ts.map +1 -0
  33. package/dist/types/client/error-copy.d.ts +69 -0
  34. package/dist/types/client/error-copy.d.ts.map +1 -0
  35. package/dist/types/client/errors.d.ts +10 -0
  36. package/dist/types/client/errors.d.ts.map +1 -0
  37. package/dist/types/client/files/FileSelectionAction.d.ts +7 -0
  38. package/dist/types/client/files/FileSelectionAction.d.ts.map +1 -0
  39. package/dist/types/client/files/SelectionCard.d.ts +14 -0
  40. package/dist/types/client/files/SelectionCard.d.ts.map +1 -0
  41. package/dist/types/client/files/document-workflow.d.ts +34 -0
  42. package/dist/types/client/files/document-workflow.d.ts.map +1 -0
  43. package/dist/types/client/files/pages/DocumentChrome.d.ts +30 -0
  44. package/dist/types/client/files/pages/DocumentChrome.d.ts.map +1 -0
  45. package/dist/types/client/files/pages/PageSelectionAction.d.ts +7 -0
  46. package/dist/types/client/files/pages/PageSelectionAction.d.ts.map +1 -0
  47. package/dist/types/client/files/pages/batches.d.ts +21 -0
  48. package/dist/types/client/files/pages/batches.d.ts.map +1 -0
  49. package/dist/types/client/files/pages/geometry.d.ts +16 -0
  50. package/dist/types/client/files/pages/geometry.d.ts.map +1 -0
  51. package/dist/types/client/files/pages/image-store.d.ts +8 -0
  52. package/dist/types/client/files/pages/image-store.d.ts.map +1 -0
  53. package/dist/types/client/files/pages/images.d.ts +41 -0
  54. package/dist/types/client/files/pages/images.d.ts.map +1 -0
  55. package/dist/types/client/files/pages/interaction.d.ts +55 -0
  56. package/dist/types/client/files/pages/interaction.d.ts.map +1 -0
  57. package/dist/types/client/files/pages/selection.d.ts +25 -0
  58. package/dist/types/client/files/pages/selection.d.ts.map +1 -0
  59. package/dist/types/client/files/pages/snapshot.d.ts +31 -0
  60. package/dist/types/client/files/pages/snapshot.d.ts.map +1 -0
  61. package/dist/types/client/files/references.d.ts +80 -0
  62. package/dist/types/client/files/references.d.ts.map +1 -0
  63. package/dist/types/client/files/selection.d.ts +11 -0
  64. package/dist/types/client/files/selection.d.ts.map +1 -0
  65. package/dist/types/client/files/sheets/SheetRecovery.d.ts +12 -0
  66. package/dist/types/client/files/sheets/SheetRecovery.d.ts.map +1 -0
  67. package/dist/types/client/files/sheets/SheetSurface.d.ts +27 -0
  68. package/dist/types/client/files/sheets/SheetSurface.d.ts.map +1 -0
  69. package/dist/types/client/files/sheets/geometry.d.ts +30 -0
  70. package/dist/types/client/files/sheets/geometry.d.ts.map +1 -0
  71. package/dist/types/client/files/sheets/navigation.d.ts +4 -0
  72. package/dist/types/client/files/sheets/navigation.d.ts.map +1 -0
  73. package/dist/types/client/files/sheets/snapshot.d.ts +45 -0
  74. package/dist/types/client/files/sheets/snapshot.d.ts.map +1 -0
  75. package/dist/types/client/locales.d.ts +148 -0
  76. package/dist/types/client/locales.d.ts.map +1 -0
  77. package/dist/types/client/messages/SentAnnotations.d.ts +18 -0
  78. package/dist/types/client/messages/SentAnnotations.d.ts.map +1 -0
  79. package/dist/types/client/messages/presentation.d.ts +39 -0
  80. package/dist/types/client/messages/presentation.d.ts.map +1 -0
  81. package/dist/types/client/model.d.ts +68 -0
  82. package/dist/types/client/model.d.ts.map +1 -0
  83. package/dist/types/client/quoted-context.d.ts +3 -0
  84. package/dist/types/client/quoted-context.d.ts.map +1 -0
  85. package/dist/types/client/responses/ResponseCard.d.ts +12 -0
  86. package/dist/types/client/responses/ResponseCard.d.ts.map +1 -0
  87. package/dist/types/client/responses/ResponseOverlay.d.ts +7 -0
  88. package/dist/types/client/responses/ResponseOverlay.d.ts.map +1 -0
  89. package/dist/types/client/responses/composer.d.ts +11 -0
  90. package/dist/types/client/responses/composer.d.ts.map +1 -0
  91. package/dist/types/client/responses/controller.d.ts +39 -0
  92. package/dist/types/client/responses/controller.d.ts.map +1 -0
  93. package/dist/types/client/responses/references.d.ts +62 -0
  94. package/dist/types/client/responses/references.d.ts.map +1 -0
  95. package/dist/types/client/responses/selection.d.ts +43 -0
  96. package/dist/types/client/responses/selection.d.ts.map +1 -0
  97. package/dist/types/electron/bridge.d.mts +45 -0
  98. package/dist/types/electron/bridge.d.mts.map +1 -0
  99. package/dist/types/electron/build-preload.d.mts +4 -0
  100. package/dist/types/electron/build-preload.d.mts.map +1 -0
  101. package/dist/types/electron/element-context.d.cts +7 -0
  102. package/dist/types/electron/element-context.d.cts.map +1 -0
  103. package/dist/types/electron/guest-preload.d.cts +2 -0
  104. package/dist/types/electron/guest-preload.d.cts.map +1 -0
  105. package/dist/types/electron/index.d.ts +5 -0
  106. package/dist/types/electron/index.d.ts.map +1 -0
  107. package/dist/types/host-contracts.d.ts +104 -0
  108. package/dist/types/host-contracts.d.ts.map +1 -0
  109. package/dist/types/index.d.ts +32 -0
  110. package/dist/types/index.d.ts.map +1 -0
  111. package/dist/types/react.d.ts +14 -0
  112. package/dist/types/react.d.ts.map +1 -0
  113. package/dist/types/shared/desktop.d.ts +75 -0
  114. package/dist/types/shared/desktop.d.ts.map +1 -0
  115. package/dist/types/shared/surface.d.ts +11 -0
  116. package/dist/types/shared/surface.d.ts.map +1 -0
  117. package/dist/types/ui/icons.d.ts +11 -0
  118. package/dist/types/ui/icons.d.ts.map +1 -0
  119. package/dist/types/ui/regions.d.ts +28 -0
  120. package/dist/types/ui/regions.d.ts.map +1 -0
  121. package/package.json +82 -3
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../src/client/locales.ts","../src/client/model.ts","../src/client/composer/commit.ts","../src/client/composer/reference-presentation.ts","../src/client/files/pages/images.ts","../src/client/responses/selection.ts","../src/client/responses/controller.ts"],"sourcesContent":["import { errorEn, errorZh } from './error-copy.ts'\n\n// Preserve the reference workflow while translating its controls for each locale.\nconst documentEn = {\n 'page.request': 'Request edits', 'page.ask': 'Ask for change',\n 'page.placeholder': 'Describe a change or ask a question', 'page.pick': 'Select content and ask for changes',\n 'page.comment': 'Comment', 'page.edit': 'Edit annotation', 'page.delete': 'Delete annotation',\n 'page.one': 'annotation', 'page.many': 'annotations', 'page.cancel': 'Cancel', 'page.save': 'Save',\n 'page.send': 'Send', 'page.sending': 'Sending…',\n 'page.senderUnavailable': 'Document annotations cannot be sent in this session.',\n 'page.changes': 'Describe your changes…', 'page.submit': 'Submit requested changes',\n}\nexport const zh = {\n ...errorZh,\n 'response.title': '回复批注', 'response.add': '添加到会话', 'response.placeholder': '添加可选评论…',\n 'response.selected': '所选文字', 'response.source': '查看原回复', 'response.edit': '编辑批注',\n 'response.location': '助手回复', 'response.save': '保存评论',\n 'sheet.unavailable': '来源文件暂不可用。以下选区保留了保存时的内容,仍可查看或发送。',\n 'sheet.cell': '单元格', 'sheet.value': '保存时的值', 'sheet.formula': '公式', 'sheet.raw': '原始值', 'sheet.empty': '空值',\n 'page.request': '请求修改', 'page.ask': '提出修改',\n 'page.placeholder': '描述修改或提出问题', 'page.pick': '选择内容并提出修改',\n 'page.comment': '添加批注', 'page.edit': '编辑批注', 'page.delete': '删除批注',\n 'page.one': '条批注', 'page.many': '条批注', 'page.cancel': '取消', 'page.save': '保存',\n 'page.send': '发送', 'page.sending': '正在发送…',\n 'page.changes': '描述你希望的修改…', 'page.submit': '提交修改请求',\n 'page.senderUnavailable': '当前会话不支持发送文档批注。',\n 'page.region': '框选区域', 'page.regionHint': '在页面上拖动,选择要加入聊天的区域',\n 'page.restoring': '正在恢复区域图片…', 'page.imageMissing': '区域图片不可用',\n 'page.officePage': '页码对应当前文档预览',\n 'file.one': '个选区', 'file.many': '个选区', 'file.selections': '所选文本',\n 'file.remove': '移除选区', 'file.removeAll': '移除全部选区',\n 'file.openSource': '打开来源文件', 'file.openFailed': '无法打开来源文件,已保存的选区仍可查看。',\n 'file.sourceBlock': '所示行号为来源段落范围', 'file.snapshot': '保留添加时的内容',\n 'message.expand': '展开', 'message.collapse': '收起', 'message.evidence': '查看发送给模型的完整上下文',\n adjust: '调整选区', cancel: '取消', placeholder: '添加评论…',\n annotating: '批注中', send: '发送',\n 'packet.one': '条批注', 'packet.many': '条批注', 'packet.edit': '编辑批注',\n 'packet.removeAll': '移除全部批注',\n annotate: '批注', element: '选择元素', region: '选择区域', close: '结束批注',\n pick: '点击元素或拖出区域以添加评论。', comment: '评论', save: '保存',\n saving: '正在截图…', add: '加入聊天', adding: '正在添加…', delete: '删除',\n noSession: '请先打开一个会话。', empty: '尚未保存批注。', saved: '已保存批注',\n screenshot: '保存时自动截取页面。', selection: '已选择目标',\n 'packet.title': '网页批注', 'packet.screenshot': '批注截图', 'packet.done': '完成', 'packet.remove': '移除批注',\n 'file.add': '加入聊天', 'file.adding': '正在添加…',\n 'file.addTitle': '把所选内容加入当前会话', 'file.openSession': '请先打开会话',\n 'file.addFailed': '添加选区失败',\n}\nexport const en: Record<keyof typeof zh, string> = {\n ...errorEn,\n 'response.title': 'Response annotations', 'response.add': 'Add to chat', 'response.placeholder': 'Add an optional comment…',\n 'response.selected': 'Selected text', 'response.source': 'View original response', 'response.edit': 'Edit annotation',\n 'response.location': 'Assistant response', 'response.save': 'Save comment',\n 'sheet.unavailable': 'The source is unavailable. These saved selections can still be reviewed or sent.',\n 'sheet.cell': 'Cell', 'sheet.value': 'Saved value', 'sheet.formula': 'Formula', 'sheet.raw': 'Raw value', 'sheet.empty': 'Empty',\n ...documentEn,\n 'page.region': 'Select region', 'page.regionHint': 'Drag on a page to select a region for chat',\n 'page.restoring': 'Restoring region image…', 'page.imageMissing': 'Region image unavailable',\n 'page.officePage': 'Page numbers refer to the document preview',\n 'file.one': 'selection', 'file.many': 'selections', 'file.selections': 'Selected text',\n 'file.remove': 'Remove selection', 'file.removeAll': 'Remove all selections',\n 'file.openSource': 'Open source file', 'file.openFailed': 'Could not open the source. The saved selection is still available.',\n 'file.sourceBlock': 'Lines refer to the source block', 'file.snapshot': 'Content saved when added',\n 'message.expand': 'Expand', 'message.collapse': 'Collapse', 'message.evidence': 'View full context sent to the model',\n adjust: 'Adjust', cancel: 'Cancel', placeholder: 'Add a comment…',\n annotating: 'Annotating', send: 'Send',\n 'packet.one': 'annotation', 'packet.many': 'annotations', 'packet.edit': 'Edit annotation',\n 'packet.removeAll': 'Remove all annotations',\n annotate: 'Annotate', element: 'Select element', region: 'Select region', close: 'End annotations',\n pick: 'Click an element or drag a region to add a comment.', comment: 'Comment', save: 'Save',\n saving: 'Capturing…', add: 'Add to chat', adding: 'Adding…', delete: 'Delete',\n noSession: 'Open a conversation first.', empty: 'No saved annotations.', saved: 'Saved annotations',\n screenshot: 'Saving captures the page automatically.', selection: 'Target selected',\n 'packet.title': 'Browser comments', 'packet.screenshot': 'Annotation screenshot', 'packet.done': 'Done', 'packet.remove': 'Remove comments',\n 'file.add': 'Add to chat', 'file.adding': 'Adding…',\n 'file.addTitle': 'Add the selection to the current conversation', 'file.openSession': 'Open a conversation first',\n 'file.addFailed': 'Could not add the selection',\n}\nexport type AnnotationKey = keyof typeof zh\n","import type { BrowserSurfaceHandle } from '../shared/surface.ts'\nimport type { BrowserAnnotationSelection, DesktopAnnotations, DesktopAnnotationEvent } from '../shared/desktop.ts'\nimport type { ComposerBridge } from '../host-contracts.ts'\nimport type { AnnotationEntry } from './composer/packets.ts'\nimport { AnnotationError, annotationFailure, type AnnotationFailure } from './errors.ts'\nexport { formatAnnotations } from './composer/packets.ts'\n\nexport interface AnnotationDraft {\n readonly active: boolean\n readonly mode: 'element' | 'region'\n readonly lease: string\n readonly epoch: string\n readonly selection?: BrowserAnnotationSelection\n readonly comment: string\n readonly saving: boolean\n readonly error?: AnnotationFailure\n readonly target?: string\n readonly editing?: { readonly entry: AnnotationEntry; readonly commit: (comment: string) => void }\n}\n\nexport interface AnnotationState {\n readonly drafts: Readonly<Record<string, AnnotationDraft>>\n}\n\nconst emptyState: AnnotationState = { drafts: {} }\n\n/** Window-local snapshots. Navigation only invalidates targets not yet saved. */\nexport class AnnotationsModel {\n private state: AnnotationState = emptyState\n private readonly listeners = new Set<() => void>()\n private readonly surfaces = new Map<string, BrowserSurfaceHandle>()\n private readonly operations = new Map<string, number>()\n private alive = true\n private nextId = 1\n private readonly visibleMarkers = new Set<number>()\n private readonly pending = new Map<string, AbortController>()\n private readonly unsubscribe: () => void\n\n constructor(private readonly desktop: DesktopAnnotations | undefined, private readonly composer: ComposerBridge,\n private readonly leaseOf: (surface: BrowserSurfaceHandle) => string | undefined = surface => {\n const viewport = document.getElementById(surface.viewportId)\n return viewport?.querySelector('webview')?.getAttribute('name') ?? undefined\n }) {\n this.unsubscribe = desktop?.subscribe(event => this.receive(event)) ?? (() => {})\n }\n\n readonly getSnapshot = (): AnnotationState => this.state\n readonly subscribe = (listener: () => void): (() => void) => {\n this.listeners.add(listener)\n return () => { this.listeners.delete(listener) }\n }\n readonly refresh = (): void => {\n for (const [id, draft] of Object.entries(this.state.drafts)) {\n if (draft.selection && draft.target !== this.composer.targetKey()) {\n this.nextOperation(id)\n this.update(id, { ...draft, selection: undefined, saving: false, comment: '', error: undefined })\n }\n }\n this.publish({ ...this.state })\n }\n available(surface: BrowserSurfaceHandle): boolean {\n return this.alive && this.desktop?.protocolVersion === 1 && surface.enabled && !surface.signal?.aborted\n }\n hasTarget(): boolean { return this.composer.hasTarget() }\n controls() { return this.composer.annotationControls?.() }\n markerVisible(id: number): boolean { return this.visibleMarkers.has(id) }\n\n readonly edit = (entry: AnnotationEntry, commit: (comment: string) => void): boolean => {\n const surface = entry.surfaceId ? this.surfaces.get(entry.surfaceId) : undefined\n if (!surface || !this.available(surface) || surface.url !== entry.selection.url || !this.visibleMarkers.has(entry.id)) return false\n const draft = this.state.drafts[surface.id]\n if (!draft?.active) return false\n this.update(surface.id, { ...draft, selection: entry.selection, comment: entry.comment,\n target: this.composer.targetKey(), editing: { entry, commit }, error: undefined })\n return true\n }\n\n async toggle(surface: BrowserSurfaceHandle): Promise<void> {\n const draft = this.state.drafts[surface.id]\n if (draft?.active) {\n this.nextOperation(surface.id)\n this.update(surface.id, { ...draft, active: false, selection: undefined, saving: false, comment: '' })\n await this.desktop?.setMode(draft.lease, 'off').catch(() => {})\n return\n }\n if (!this.available(surface)) return\n const lease = this.leaseOf(surface)\n const operation = this.nextOperation(surface.id)\n this.surfaces.set(surface.id, surface)\n const starting: AnnotationDraft = {\n active: true, mode: 'element', lease: lease ?? '', epoch: '', comment: draft?.comment ?? '', saving: false,\n }\n this.update(surface.id, starting)\n if (!lease) { this.update(surface.id, { ...starting, error: new AnnotationError('error.browserNotReady') }); return }\n try {\n const response = await this.desktop!.setMode(lease, 'element')\n const latest = this.currentOperation(surface, operation, lease)\n if (latest) this.update(surface.id, { ...latest, epoch: response.documentEpoch, error: undefined })\n } catch (error) {\n const latest = this.currentOperation(surface, operation, lease)\n if (latest) this.update(surface.id, { ...latest, error: annotationFailure(error) })\n }\n }\n\n async setMode(surface: BrowserSurfaceHandle, mode: 'element' | 'region'): Promise<void> {\n const current = this.state.drafts[surface.id]\n if (!current?.active || current.saving || !this.available(surface)) return\n const operation = this.nextOperation(surface.id)\n try {\n const response = await this.desktop!.setMode(current.lease, mode)\n const latest = this.currentOperation(surface, operation, current.lease)\n if (latest) this.update(surface.id, { ...latest, mode, epoch: response.documentEpoch, selection: undefined, error: undefined })\n } catch (error) {\n const latest = this.currentOperation(surface, operation, current.lease)\n if (latest) this.update(surface.id, { ...latest, error: annotationFailure(error) })\n }\n }\n\n setComment(surfaceId: string, comment: string): void {\n const draft = this.state.drafts[surfaceId]\n if (draft) this.update(surfaceId, { ...draft, comment })\n }\n\n cancel(surfaceId: string): void {\n const draft = this.state.drafts[surfaceId]\n if (!draft) return\n this.nextOperation(surfaceId)\n this.update(surfaceId, { ...draft, selection: undefined, comment: '', saving: false, editing: undefined, error: undefined })\n void this.desktop?.setMode(draft.lease, draft.mode).catch(() => {})\n }\n\n async save(surface: BrowserSurfaceHandle): Promise<void> {\n const draft = this.state.drafts[surface.id]\n if (!draft?.selection || !draft.epoch || draft.saving || !draft.comment.trim() || !this.available(surface)) return\n const operation = this.operations.get(surface.id)\n if (!draft.target || draft.target !== this.composer.targetKey()) {\n this.update(surface.id, { ...draft, error: new AnnotationError('error.originalSession') })\n return\n }\n if (draft.editing) {\n draft.editing.commit(draft.comment)\n this.cancel(surface.id)\n return\n }\n const controller = new AbortController()\n this.pending.set(surface.id, controller)\n const id = this.nextId++\n const pending = { ...draft, saving: true, error: undefined }\n this.update(surface.id, pending)\n try {\n const captured = await this.desktop!.capture(draft.lease, draft.epoch, draft.selection, id)\n const latest = operation === undefined ? undefined : this.currentOperation(surface, operation, draft.lease)\n if (!latest?.saving || latest.epoch !== draft.epoch) return\n const image = new File([new Uint8Array(captured.png)], `annotation-${crypto.randomUUID()}-${id}.png`, { type: 'image/png' })\n const entry = { id, source: surface.source, surfaceId: surface.id, selection: draft.selection, comment: draft.comment, image }\n await this.composer.add({ text: '', annotations: [entry], images: [image], expectedTarget: draft.target,\n signal: controller.signal, focus: false })\n if (controller.signal.aborted || !this.currentOperation(surface, operation!, draft.lease)) return\n this.visibleMarkers.add(id)\n this.update(surface.id, { ...latest, saving: false, selection: undefined, comment: '' })\n void this.desktop?.setMode(draft.lease, draft.mode).catch(() => {})\n } catch (error) {\n const latest = operation === undefined ? undefined : this.currentOperation(surface, operation, draft.lease)\n if (latest?.saving && latest.epoch === draft.epoch) this.update(surface.id, { ...latest, saving: false, error: annotationFailure(error) })\n } finally { if (this.pending.get(surface.id) === controller) this.pending.delete(surface.id) }\n }\n\n dispose(): void {\n this.alive = false\n for (const controller of this.pending.values()) controller.abort()\n this.pending.clear()\n this.unsubscribe()\n for (const draft of Object.values(this.state.drafts)) {\n if (draft.active && draft.lease) void this.desktop?.setMode(draft.lease, 'off').catch(() => {})\n }\n this.listeners.clear()\n this.surfaces.clear()\n this.operations.clear()\n this.state = emptyState\n }\n\n private receive(event: DesktopAnnotationEvent): void {\n if (!this.alive) return\n if (event.kind === 'identity-cleared') {\n const drafts = { ...this.state.drafts }\n for (const [id, surface] of this.surfaces) if (surface.source === event.source) {\n this.nextOperation(id)\n delete drafts[id]\n this.surfaces.delete(id)\n }\n this.publish({ ...this.state, drafts })\n return\n }\n for (const [id, draft] of Object.entries(this.state.drafts)) {\n if (draft.lease !== event.lease) continue\n if (event.kind !== 'selection') {\n for (const entry of this.controls()?.entries ?? []) if (entry.surfaceId === id) this.visibleMarkers.delete(entry.id)\n this.nextOperation(id)\n this.update(id, { ...draft, active: event.kind === 'selection-cleared' && draft.active,\n selection: undefined, saving: false, editing: undefined, epoch: event.documentEpoch })\n } else if (draft.active && !draft.saving && draft.epoch === event.documentEpoch) {\n this.update(id, { ...draft, selection: event.selection, target: this.composer.targetKey(), comment: '', editing: undefined, error: undefined })\n }\n }\n }\n\n private update(id: string, draft: AnnotationDraft): void {\n this.publish({ ...this.state, drafts: { ...this.state.drafts, [id]: draft } })\n }\n private nextOperation(id: string): number {\n this.pending.get(id)?.abort()\n this.pending.delete(id)\n const next = (this.operations.get(id) ?? 0) + 1\n this.operations.set(id, next)\n return next\n }\n private currentOperation(surface: BrowserSurfaceHandle, operation: number, lease: string): AnnotationDraft | undefined {\n const draft = this.state.drafts[surface.id]\n return this.alive && !surface.signal?.aborted && this.operations.get(surface.id) === operation\n && draft?.active && draft.lease === lease ? draft : undefined\n }\n private publish(state: AnnotationState): void {\n if (!this.alive) return\n this.state = state\n for (const listener of this.listeners) listener()\n }\n}\n","import { AnnotationError } from '../errors.ts'\nimport type { DraftAttachmentId, InputActions } from '../../host-contracts.ts'\n\n/** Admission is synchronous: neither a new selection nor a model switch can interleave. */\nexport function commitToComposer(\n actions: InputActions,\n text: string,\n ids: readonly DraftAttachmentId[],\n current: () => boolean,\n release: (id: DraftAttachmentId) => void,\n insert?: (span: ReturnType<InputActions['captureInsertion']>) => boolean,\n): void {\n let attached = false\n try {\n if (!current()) throw new AnnotationError('error.sessionChangedAdd')\n if (ids.length > 0 && !actions.addAttachments(ids)) throw new AnnotationError('error.composerImages')\n attached = ids.length > 0\n if (!current()) throw new AnnotationError('error.sessionChangedAdd')\n const span = actions.captureInsertion()\n if (!current()) throw new AnnotationError('error.sessionChangedAdd')\n if (!(insert ? insert(span) : actions.insertText(text, span))) throw new AnnotationError('error.draftChanged')\n } catch (error) {\n if (attached) for (const id of ids) actions.removeAttachment(id)\n for (const id of ids) release(id)\n throw error\n }\n}\n","import type { InputState } from '../../host-contracts.ts'\n\n/** Keep restored Lexical references behind the plugin's grouped attachment UI. */\nexport function bindReferencePresentation(\n card: Element,\n input: Pick<InputState, 'occurrences' | 'draft'>,\n owns: (source: string, ref: string) => boolean,\n): () => void {\n const nodes = new Set<HTMLElement>()\n const editors = new Set<HTMLElement>()\n const sync = (): void => {\n const indexes = new Map<string, number>()\n for (const node of card.querySelectorAll<HTMLElement>('[data-composer-chip]')) {\n const source = node.dataset.composerChip!\n const index = indexes.get(source) ?? 0\n indexes.set(source, index + 1)\n const ref = input.occurrences.filter(item => item.source === source)[index]\n const owned = !!ref && owns(source, ref.ref)\n if (owned || nodes.has(node)) node.toggleAttribute('data-aione-annotation-owned', owned)\n if (owned) nodes.add(node)\n }\n const refs = input.occurrences.filter(item => owns(item.source, item.ref))\n let visibleText = input.draft\n for (const ref of [...refs].reverse()) visibleText = visibleText.slice(0, ref.offset) + visibleText.slice(ref.offset + ref.length)\n const editor = card.querySelector<HTMLElement>('[contenteditable=\"true\"]')\n if (editor) {\n editors.add(editor)\n editor.toggleAttribute('data-aione-annotation-only', refs.length > 0 && !visibleText.trim())\n }\n }\n sync()\n // Lexical may mount restored chips after the overlay slot's layout effect.\n const observer = new MutationObserver(sync)\n observer.observe(card, { childList: true, subtree: true })\n return () => {\n observer.disconnect()\n nodes.forEach(node => node.removeAttribute('data-aione-annotation-owned'))\n editors.forEach(editor => editor.removeAttribute('data-aione-annotation-only'))\n }\n}\n","import { AnnotationError, type AnnotationFailure } from '../../errors.ts'\nimport type { SessionId } from '../../../host-contracts.ts'\nimport type { DraftAttachmentId, InputActions, InputState } from '../../../host-contracts.ts'\nimport { imageDrafts, type DraftFactory } from '../../composer/attachments.ts'\nimport { selectedFiles, type FileSnapshot } from '../references.ts'\nimport { pageImageStore, type PageImageStore } from './image-store.ts'\nimport type { PageSnapshot } from './snapshot.ts'\n\ninterface Entry {\n session: SessionId\n snapshot: PageSnapshot\n ids: readonly DraftAttachmentId[]\n factory: DraftFactory\n file?: File\n url?: string\n error?: AnnotationFailure\n staged: boolean\n}\n\n/** Own screenshot admission together with its semantic reference, including undo and restoration. */\nexport class PageImages {\n private entries = new Map<string, Entry>()\n private listeners = new Set<() => void>()\n private revision = 0\n private disposed = false\n constructor(private readonly store: PageImageStore = pageImageStore()) {}\n readonly subscribe = (listener: () => void) => { this.listeners.add(listener); return () => { this.listeners.delete(listener) } }\n readonly getSnapshot = () => this.revision\n private changed() { this.revision++; for (const listener of this.listeners) listener() }\n preview(snapshot: FileSnapshot) { return this.entries.get(snapshot.id) }\n\n async save(snapshot: PageSnapshot, file: File, signal?: AbortSignal) {\n if (!snapshot.image || file.name !== snapshot.image.name || file.type !== 'image/png') throw new AnnotationError('error.pageImageMismatch')\n signal?.throwIfAborted()\n await this.store.put(snapshot.id, file)\n if (signal?.aborted || this.disposed) { await this.store.remove(snapshot.id); throw new AnnotationError('error.cancelled') }\n }\n stage(session: SessionId, snapshot: PageSnapshot, file: File, factory: DraftFactory, ids: readonly DraftAttachmentId[]) {\n this.entries.set(snapshot.id, { session, snapshot, file, factory, ids, staged: true, url: URL.createObjectURL(file) })\n }\n activate(id: string) { const entry = this.entries.get(id); if (entry) entry.staged = false; this.changed() }\n validate(snapshot: FileSnapshot) {\n if (snapshot.version !== 2 || !snapshot.image) return\n const entry = this.entries.get(snapshot.id)\n if (!entry?.file || entry.ids.length !== 1 || entry.factory.resolveDraftAttachments(entry.ids)[0]?.file !== entry.file) {\n throw entry?.error ?? new AnnotationError('error.imageRestoring')\n }\n }\n imageIdsFor(input: InputState | undefined) {\n return new Set(input ? selectedFiles(input).flatMap(({ snapshot }) => this.entries.get(snapshot.id)?.ids ?? []) : [])\n }\n reconcile(session: SessionId, input: InputState, actions: InputActions, factory: DraftFactory) {\n if (this.disposed || input.phase !== 'plain') return\n const active = new Map(selectedFiles(input).flatMap(({ snapshot }) => snapshot.version === 2 && snapshot.image ? [[snapshot.id, snapshot] as const] : []))\n for (const [id, snapshot] of active) {\n if (this.entries.has(id)) continue\n const entry: Entry = { session, snapshot, factory, ids: [], staged: false }\n this.entries.set(id, entry)\n void this.store.get(id, snapshot.image!.name).then(file => {\n if (this.disposed || this.entries.get(id) !== entry) return\n if (!file) throw new AnnotationError('error.imageDraftLost')\n entry.file = file; entry.url = URL.createObjectURL(file); this.changed()\n }).catch(error => {\n if (this.disposed || this.entries.get(id) !== entry) return\n entry.error = error instanceof Error ? error : new AnnotationError('error.restoreImage'); this.changed()\n })\n }\n for (const [id, entry] of this.entries) {\n if (entry.session !== session || entry.staged) continue\n if (active.has(id)) {\n if (entry.file && !entry.ids.length && !entry.error) {\n entry.staged = true\n try {\n const ids = imageDrafts(factory, session, [entry.file])\n entry.ids = ids\n if (!actions.addAttachments(ids)) throw new AnnotationError('error.restoreAttachmentRetry')\n } catch (error) {\n for (const imageId of entry.ids) factory.releaseDraftAttachment(imageId)\n entry.ids = []\n entry.error = error instanceof Error ? error : new AnnotationError('error.restoreAttachment')\n } finally { entry.staged = false }\n this.changed()\n }\n } else if (entry.ids.some(imageId => input.attachmentIds.includes(imageId))) {\n const ids = entry.ids; entry.ids = []\n for (const imageId of ids) { actions.removeAttachment(imageId); factory.releaseDraftAttachment(imageId) }\n this.changed()\n } else if (entry.ids.length && !factory.resolveDraftAttachments(entry.ids).length) {\n // Successful sends have durable Host images and cut editor undo history.\n this.discard(id)\n void this.store.remove(id).catch(() => undefined)\n }\n }\n }\n discard(id: string) {\n const entry = this.entries.get(id)\n if (entry?.url) URL.revokeObjectURL(entry.url)\n this.entries.delete(id); this.changed()\n }\n async cancel(id: string) { this.discard(id); await this.store.remove(id) }\n dispose() {\n this.disposed = true\n for (const entry of this.entries.values()) if (entry.url) URL.revokeObjectURL(entry.url)\n this.entries.clear(); this.listeners.clear()\n }\n}\n","import type { ResponseTextAnchor, ResponseAnnotationSnapshot } from './references.ts'\n\nexport interface ResponseSource {\n readonly sessionId: string\n readonly nodeKey: string\n readonly nodeId: string\n readonly turn: number\n readonly step: number\n readonly seq: number\n readonly blockIndex: number\n readonly text: string\n}\nexport interface ResponseSurface { readonly root: HTMLElement; readonly source: ResponseSource; readonly reveal: () => void }\ninterface TextSegment { readonly node: Text; readonly start: number; readonly end: number }\nexport interface TextProjection { readonly text: string; readonly segments: readonly TextSegment[] }\nconst excluded = 'button,input,textarea,select,svg,script,style,[role=\"button\"],[aria-hidden=\"true\"],[hidden],[inert],[data-code-block-banner],[data-response-annotation-ui]'\nconst blocks = /^(P|DIV|LI|UL|OL|BLOCKQUOTE|PRE|H[1-6]|TR|TABLE|SECTION)$/u\n\n/** A deterministic visible-text coordinate plane; formatting separators are explicit. */\nexport function projectResponseText(root: HTMLElement): TextProjection {\n let text = ''\n const segments: TextSegment[] = []\n const separator = (value: string) => { if (text && !text.endsWith(value)) text += value }\n const visit = (node: Node): void => {\n if (node.nodeType === Node.TEXT_NODE) {\n const value = node.textContent ?? ''\n if (value) { segments.push({ node: node as Text, start: text.length, end: text.length + value.length }); text += value }\n return\n }\n if (!(node instanceof HTMLElement) || node.matches(excluded)) return\n const style = getComputedStyle(node)\n if (style.display === 'none' || style.visibility === 'hidden') return\n if (node.tagName === 'BR') { text += '\\n'; return }\n if (blocks.test(node.tagName)) separator('\\n')\n if (node.tagName === 'TD' || node.tagName === 'TH') separator('\\t')\n node.childNodes.forEach(visit)\n if (blocks.test(node.tagName)) separator('\\n')\n }\n root.childNodes.forEach(visit)\n // Remove only synthetic trailing separators; literal code whitespace remains intact.\n return { text: text.slice(0, segments.at(-1)?.end ?? 0), segments }\n}\n\nexport function prefixHash(text: string): string {\n let hash = 2166136261\n for (let index = 0; index < text.length; index++) hash = Math.imul(hash ^ text.charCodeAt(index), 16777619)\n return (hash >>> 0).toString(16).padStart(8, '0')\n}\n\nfunction sliceRange(range: Range, segment: TextSegment): { start: number; end: number } | undefined {\n const nodeRange = document.createRange()\n nodeRange.selectNodeContents(segment.node)\n if (range.compareBoundaryPoints(Range.END_TO_START, nodeRange) >= 0 || range.compareBoundaryPoints(Range.START_TO_END, nodeRange) <= 0) return undefined\n const start = range.startContainer === segment.node ? range.startOffset : 0\n const end = range.endContainer === segment.node ? range.endOffset : segment.node.length\n return end > start ? { start: segment.start + start, end: segment.start + end } : undefined\n}\n\nexport interface ResponseSelection {\n readonly snapshot: ResponseAnnotationSnapshot\n readonly ranges: readonly Range[]\n readonly sources: readonly { readonly surface: ResponseSurface; readonly text: string }[]\n}\n\n/** Both boundaries must belong to registered text blocks of the same assistant node. */\nexport function readResponseSelection(range: Range, surfaces: readonly ResponseSurface[], sessionId: string): ResponseSelection | undefined {\n if (range.collapsed) return undefined\n const first = surfaces.find(surface => surface.root.contains(range.startContainer))\n const last = surfaces.find(surface => surface.root.contains(range.endContainer))\n if (!first || !last || first.source.sessionId !== sessionId || last.source.sessionId !== sessionId\n || first.source.nodeKey !== last.source.nodeKey) return undefined\n const selected = surfaces.filter(surface => surface.source.sessionId === sessionId && surface.source.nodeKey === first.source.nodeKey\n && range.intersectsNode(surface.root)).sort((a, b) => a.source.blockIndex - b.source.blockIndex)\n const anchors: ResponseTextAnchor[] = []\n const ranges: Range[] = []\n for (const surface of selected) {\n const projection = projectResponseText(surface.root)\n const portions = projection.segments.flatMap(segment => { const portion = sliceRange(range, segment); return portion ? [portion] : [] })\n if (!portions.length) continue\n const start = portions[0]!.start\n const end = portions.at(-1)!.end\n const anchor: ResponseTextAnchor = { blockIndex: surface.source.blockIndex, start, end,\n text: projection.text.slice(start, end), prefixHash: prefixHash(projection.text.slice(0, end)) }\n anchors.push(anchor)\n ranges.push(...rangesForAnchor(projection, anchor))\n }\n const text = anchors.map(anchor => anchor.text).join('\\n\\n')\n if (!text.trim()) return undefined\n const { blockIndex: _block, text: _source, ...source } = first.source\n return { snapshot: { version: 1, id: crypto.randomUUID(), ...source, text, comment: '', anchors }, ranges,\n sources: selected.map(surface => ({ surface, text: surface.source.text })) }\n}\n\n/** Reuse saved positions only while the original prefix and selection still agree. */\nexport function rangesForAnchor(projection: TextProjection, anchor: ResponseTextAnchor): Range[] {\n if (projection.text.slice(anchor.start, anchor.end) !== anchor.text || prefixHash(projection.text.slice(0, anchor.end)) !== anchor.prefixHash) return []\n return projection.segments.flatMap(segment => {\n const start = Math.max(anchor.start, segment.start)\n const end = Math.min(anchor.end, segment.end)\n if (end <= start) return []\n const range = document.createRange()\n range.setStart(segment.node, start - segment.start)\n range.setEnd(segment.node, end - segment.start)\n return [range]\n })\n}\n\nexport function selectionCurrent(selection: ResponseSelection): boolean {\n return selection.sources.every(({ surface, text }) => surface.root.isConnected && surface.source.text === text)\n && selection.snapshot.anchors.every(anchor => {\n const surface = selection.sources.find(item => item.surface.source.blockIndex === anchor.blockIndex)?.surface\n return !!surface && rangesForAnchor(projectResponseText(surface.root), anchor).length > 0\n })\n}\n","import { AnnotationError, annotationFailure, type AnnotationFailure } from '../errors.ts'\nimport type { ComposerBridge } from '../../host-contracts.ts'\nimport type { ResponseAnnotationSnapshot } from './references.ts'\nimport { projectResponseText, rangesForAnchor, readResponseSelection, selectionCurrent, type ResponseSelection, type ResponseSurface } from './selection.ts'\n\nexport interface ResponseEditor {\n readonly snapshot: ResponseAnnotationSnapshot\n readonly initial: boolean\n readonly trigger?: HTMLElement\n}\n\n/** Ephemeral surface/interaction state only. All saved content lives in Composer references. */\nexport class ResponseController {\n readonly surfaces = new Set<ResponseSurface>()\n private listeners = new Set<() => void>()\n private revision = 0\n private operation = 0\n private disposed = false\n candidate?: ResponseSelection\n editor?: ResponseEditor\n selectedId?: string\n selected?: ResponseAnnotationSnapshot\n failure?: AnnotationFailure\n busy = false\n\n constructor(readonly composer: ComposerBridge, private readonly load: (sessionId: string, seq: number) => Promise<void>) {}\n getSnapshot = (): number => this.revision\n subscribe = (listener: () => void): (() => void) => { this.listeners.add(listener); return () => { this.listeners.delete(listener) } }\n changed = (): void => { this.revision++; for (const listener of this.listeners) listener() }\n register(surface: ResponseSurface): () => void {\n this.surfaces.add(surface)\n this.changed()\n return () => { this.surfaces.delete(surface); this.changed() }\n }\n select(sessionId: string): void {\n if (this.busy || this.editor || this.composer.targetKey() !== sessionId) return\n const selection = window.getSelection()\n this.candidate = selection?.rangeCount === 1\n ? readResponseSelection(selection.getRangeAt(0), [...this.surfaces], sessionId) : undefined\n this.changed()\n }\n dismiss(restoreFocus = false): void {\n const editor = this.editor\n this.operation++\n this.candidate = undefined\n this.editor = undefined\n this.selectedId = undefined\n this.selected = undefined\n this.failure = undefined\n this.changed()\n if (restoreFocus && editor) {\n if (editor.trigger?.isConnected) editor.trigger.focus()\n else this.composer.responses?.focus(editor.snapshot.sessionId)\n }\n }\n async add(): Promise<void> {\n const selection = this.candidate\n if (!selection || this.busy) return\n const operation = ++this.operation\n this.failure = undefined\n this.busy = true\n this.changed()\n try {\n if (!selectionCurrent(selection)) throw new AnnotationError('error.responseChanged')\n await this.composer.add({ text: '', responseSelection: selection.snapshot, expectedTarget: selection.snapshot.sessionId, focus: false })\n if (this.disposed || operation !== this.operation || this.composer.targetKey() !== selection.snapshot.sessionId) return\n this.candidate = undefined\n window.getSelection()?.removeAllRanges()\n this.editor = { snapshot: selection.snapshot, initial: true }\n this.selectedId = selection.snapshot.id\n this.selected = selection.snapshot\n } catch (error) { if (operation === this.operation) { this.candidate = undefined; this.failure = annotationFailure(error) } }\n finally { this.busy = false; if (!this.disposed) this.changed() }\n }\n ranges(snapshot: ResponseAnnotationSnapshot): Range[] {\n const ranges = snapshot.anchors.map(anchor => {\n const surface = [...this.surfaces].find(item => item.source.sessionId === snapshot.sessionId && item.source.nodeKey === snapshot.nodeKey\n && item.source.blockIndex === anchor.blockIndex)\n return surface ? rangesForAnchor(projectResponseText(surface.root), anchor) : []\n })\n return ranges.every(part => part.length > 0) ? ranges.flat() : []\n }\n async open(snapshot: ResponseAnnotationSnapshot, edit: boolean, trigger?: HTMLElement): Promise<void> {\n if (this.composer.targetKey() !== snapshot.sessionId) throw new AnnotationError('error.sessionChangedAdd')\n const operation = ++this.operation\n if (edit) {\n snapshot = this.composer.responses?.read(snapshot.sessionId).find(item => item.id === snapshot.id) ?? snapshot\n }\n const unavailable = () => {\n if (!edit) throw new AnnotationError('error.responseUnavailable')\n this.candidate = undefined\n this.editor = { snapshot, initial: false, trigger }\n this.selectedId = snapshot.id\n this.selected = snapshot\n this.failure = new AnnotationError('error.responseUnavailable')\n this.changed()\n }\n try { await this.load(snapshot.sessionId, snapshot.seq) }\n catch { if (operation === this.operation && this.composer.targetKey() === snapshot.sessionId) unavailable(); return }\n for (let attempt = 0; attempt < 20; attempt++) {\n if (this.disposed || operation !== this.operation || this.composer.targetKey() !== snapshot.sessionId) throw new AnnotationError('error.cancelled')\n const surface = [...this.surfaces].find(item => item.source.sessionId === snapshot.sessionId && item.source.nodeKey === snapshot.nodeKey)\n if (surface) {\n surface.reveal()\n if (!this.ranges(snapshot).length) { unavailable(); return }\n surface.root.scrollIntoView({ block: 'center', behavior: 'instant' })\n this.candidate = undefined\n this.failure = undefined\n this.selectedId = snapshot.id\n this.selected = snapshot\n this.editor = edit ? { snapshot, initial: false, trigger } : undefined\n this.changed()\n return\n }\n await new Promise(resolve => setTimeout(resolve, 50))\n }\n unavailable()\n }\n save(comment: string): void {\n if (!this.editor) return\n try {\n const snapshot = this.editor.snapshot\n this.composer.responses?.replace({ ...snapshot, comment })\n this.dismiss()\n this.composer.responses?.focus(snapshot.sessionId)\n } catch (error) { this.failure = annotationFailure(error); this.changed() }\n }\n remove(): void {\n if (!this.editor) return\n try {\n const snapshot = this.editor.snapshot\n this.composer.responses?.remove(snapshot.sessionId, snapshot.id)\n this.dismiss()\n this.composer.responses?.focus(snapshot.sessionId)\n } catch (error) { this.failure = annotationFailure(error); this.changed() }\n }\n dispose(): void { this.disposed = true; this.operation++; this.surfaces.clear(); this.listeners.clear() }\n}\n"],"names":[],"mappings":";;AAGA,MAAM,aAAa;AAAA,EACjB,gBAAgB;AAAA,EAAiB,YAAY;AAAA,EAC7C,oBAAoB;AAAA,EAAuC,aAAa;AAAA,EACxE,gBAAgB;AAAA,EAAW,aAAa;AAAA,EAAmB,eAAe;AAAA,EAC1E,YAAY;AAAA,EAAc,aAAa;AAAA,EAAe,eAAe;AAAA,EAAU,aAAa;AAAA,EAC5F,aAAa;AAAA,EAAQ,gB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