@arbidocs/blocks 0.4.106 → 0.4.107

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 (112) hide show
  1. package/bin/arbidocs-render-take.mjs +27 -0
  2. package/dist/NativeDocxEditor-3VKJT43D.js +10 -0
  3. package/dist/NativeDocxEditor-3VKJT43D.js.map +1 -0
  4. package/dist/NativeDocxEditor-GNG5QV7V.cjs +31 -0
  5. package/dist/NativeDocxEditor-GNG5QV7V.cjs.map +1 -0
  6. package/dist/agents/index.cjs +209 -209
  7. package/dist/agents/index.js +4 -4
  8. package/dist/chat/index.cjs +125 -125
  9. package/dist/chat/index.js +3 -3
  10. package/dist/{chunk-PIT2YZCK.js → chunk-2PYENCW5.js} +3 -3
  11. package/dist/{chunk-PIT2YZCK.js.map → chunk-2PYENCW5.js.map} +1 -1
  12. package/dist/{chunk-W2RTZOK3.js → chunk-2SJTXYRM.js} +1749 -1778
  13. package/dist/chunk-2SJTXYRM.js.map +1 -0
  14. package/dist/{chunk-S7RHJI5Q.js → chunk-7NLPKJV5.js} +3 -3
  15. package/dist/{chunk-S7RHJI5Q.js.map → chunk-7NLPKJV5.js.map} +1 -1
  16. package/dist/{chunk-ZWWN4CUL.cjs → chunk-BHKFENKT.cjs} +1748 -1778
  17. package/dist/chunk-BHKFENKT.cjs.map +1 -0
  18. package/dist/{chunk-3R6XBYL7.cjs → chunk-DTBSGG36.cjs} +7 -2
  19. package/dist/chunk-DTBSGG36.cjs.map +1 -0
  20. package/dist/{chunk-3Y6NQIDE.js → chunk-EB7QAZLH.js} +5 -5
  21. package/dist/{chunk-3Y6NQIDE.js.map → chunk-EB7QAZLH.js.map} +1 -1
  22. package/dist/{chunk-TP3FAP5J.cjs → chunk-FZGMY6NQ.cjs} +5 -5
  23. package/dist/{chunk-TP3FAP5J.cjs.map → chunk-FZGMY6NQ.cjs.map} +1 -1
  24. package/dist/{chunk-W7NZRZ54.js → chunk-GFYGYME3.js} +3 -3
  25. package/dist/{chunk-W7NZRZ54.js.map → chunk-GFYGYME3.js.map} +1 -1
  26. package/dist/chunk-GYAUJ4KT.js +71 -0
  27. package/dist/chunk-GYAUJ4KT.js.map +1 -0
  28. package/dist/{chunk-XMBYDLZQ.cjs → chunk-HUJLKDWX.cjs} +4 -4
  29. package/dist/{chunk-XMBYDLZQ.cjs.map → chunk-HUJLKDWX.cjs.map} +1 -1
  30. package/dist/{chunk-4GFB5U3K.js → chunk-LHBJJ2GE.js} +4 -3
  31. package/dist/chunk-LHBJJ2GE.js.map +1 -0
  32. package/dist/{chunk-MP6FK43E.cjs → chunk-O5NDG4EA.cjs} +3 -3
  33. package/dist/{chunk-MP6FK43E.cjs.map → chunk-O5NDG4EA.cjs.map} +1 -1
  34. package/dist/{chunk-5YXG342J.cjs → chunk-OR4CO743.cjs} +3 -3
  35. package/dist/{chunk-5YXG342J.cjs.map → chunk-OR4CO743.cjs.map} +1 -1
  36. package/dist/{chunk-LGX6UFYG.js → chunk-P2KPDPFF.js} +8 -3
  37. package/dist/chunk-P2KPDPFF.js.map +1 -0
  38. package/dist/{chunk-DDF5GPIJ.js → chunk-P5ST47VY.js} +3 -3
  39. package/dist/{chunk-DDF5GPIJ.js.map → chunk-P5ST47VY.js.map} +1 -1
  40. package/dist/{chunk-EWSEQEPL.js → chunk-PFA43QNX.js} +3 -3
  41. package/dist/{chunk-EWSEQEPL.js.map → chunk-PFA43QNX.js.map} +1 -1
  42. package/dist/{chunk-7LLLQUM7.cjs → chunk-Q57MEBCK.cjs} +6 -5
  43. package/dist/chunk-Q57MEBCK.cjs.map +1 -0
  44. package/dist/{chunk-LLFW2T6S.cjs → chunk-R6APX23R.cjs} +11 -11
  45. package/dist/{chunk-LLFW2T6S.cjs.map → chunk-R6APX23R.cjs.map} +1 -1
  46. package/dist/{chunk-24ND4S6Y.cjs → chunk-RILMICOP.cjs} +5 -5
  47. package/dist/{chunk-24ND4S6Y.cjs.map → chunk-RILMICOP.cjs.map} +1 -1
  48. package/dist/chunk-S24XEVPS.cjs +73 -0
  49. package/dist/chunk-S24XEVPS.cjs.map +1 -0
  50. package/dist/{chunk-XQDM6T6C.js → chunk-WDD255XQ.js} +3 -3
  51. package/dist/{chunk-XQDM6T6C.js.map → chunk-WDD255XQ.js.map} +1 -1
  52. package/dist/{chunk-Z5VUZ6YD.cjs → chunk-ZV3BKLFY.cjs} +3 -3
  53. package/dist/{chunk-Z5VUZ6YD.cjs.map → chunk-ZV3BKLFY.cjs.map} +1 -1
  54. package/dist/collaboration/index.cjs +15 -15
  55. package/dist/collaboration/index.js +1 -1
  56. package/dist/collaboration/mail/MailMessageView.d.ts +3 -1
  57. package/dist/connect/docx.cjs +7 -6
  58. package/dist/connect/docx.cjs.map +1 -1
  59. package/dist/connect/docx.js +5 -4
  60. package/dist/connect/docx.js.map +1 -1
  61. package/dist/connect/index.cjs +407 -91
  62. package/dist/connect/index.cjs.map +1 -1
  63. package/dist/connect/index.js +361 -46
  64. package/dist/connect/index.js.map +1 -1
  65. package/dist/connection/mail/ConnectedMailComposer.d.ts +12 -2
  66. package/dist/connection/mail/ConnectedMailMessage.d.ts +19 -0
  67. package/dist/connection/mail/ConnectedMailbox.d.ts +7 -3
  68. package/dist/connection/mail/MailComposerForm.d.ts +12 -2
  69. package/dist/connection/mail/index.d.ts +2 -1
  70. package/dist/connection/mail/types.d.ts +15 -0
  71. package/dist/connection/mail/useWordBody.d.ts +48 -0
  72. package/dist/docx/NativeDocxEditor.d.ts +9 -1
  73. package/dist/docx/index.cjs +51 -50
  74. package/dist/docx/index.cjs.map +1 -1
  75. package/dist/docx/index.js +4 -3
  76. package/dist/docx/index.js.map +1 -1
  77. package/dist/facts/index.cjs +2 -2
  78. package/dist/facts/index.js +2 -2
  79. package/dist/files/index.cjs +2 -2
  80. package/dist/files/index.js +2 -2
  81. package/dist/home/index.cjs +17 -17
  82. package/dist/home/index.js +3 -3
  83. package/dist/index.cjs +442 -442
  84. package/dist/index.js +8 -8
  85. package/dist/record/index.cjs +307 -66
  86. package/dist/record/index.cjs.map +1 -1
  87. package/dist/record/index.d.ts +145 -26
  88. package/dist/record/index.js +301 -67
  89. package/dist/record/index.js.map +1 -1
  90. package/dist/retrieval/index.cjs +1 -1
  91. package/dist/retrieval/index.js +1 -1
  92. package/dist/settings/index.cjs +35 -35
  93. package/dist/settings/index.js +2 -2
  94. package/dist/shell/index.cjs +1 -1
  95. package/dist/shell/index.js +1 -1
  96. package/dist/studio/index.cjs +4 -4
  97. package/dist/studio/index.js +3 -3
  98. package/dist/workflow-canvas/index.cjs +11 -11
  99. package/dist/workflow-canvas/index.js +4 -4
  100. package/dist/workspaces/index.cjs +2 -2
  101. package/dist/workspaces/index.js +2 -2
  102. package/node_modules/@arbidocs/coedit/package.json +1 -1
  103. package/package.json +8 -5
  104. package/record/render-overlays.mjs +152 -0
  105. package/record/render-take.py +985 -0
  106. package/src/docx/styles.css +22 -0
  107. package/dist/chunk-3R6XBYL7.cjs.map +0 -1
  108. package/dist/chunk-4GFB5U3K.js.map +0 -1
  109. package/dist/chunk-7LLLQUM7.cjs.map +0 -1
  110. package/dist/chunk-LGX6UFYG.js.map +0 -1
  111. package/dist/chunk-W2RTZOK3.js.map +0 -1
  112. package/dist/chunk-ZWWN4CUL.cjs.map +0 -1
package/dist/index.js CHANGED
@@ -17,7 +17,7 @@ export { DEFAULT_SEARCH_HIT_LABELS, SearchHit } from './chunk-A2YAC22G.js';
17
17
  export { TIMELINE_ZOOM, TimelineCalendar, TimelineGantt, TimelineZoomControl, dayKey, formatSpan, monthLabel, parseIso, utcDay } from './chunk-4EZVCGRL.js';
18
18
  import './chunk-AF6RDAJF.js';
19
19
  export { Callout } from './chunk-UJE32SST.js';
20
- export { AgentAvatarField, AgentBar, AgentBarIconButton, AgentBarMenu, AgentBarNotes, AgentBarProbeAnswer, AgentBarQueuedNote, AgentBarStatus, AgentCard, AgentCreateView, AgentCreatedView, AgentCreator, AgentEditView, AgentGallery, AgentMainView, AgentSelect, AgentTypeSelector, CapabilityGrid, CapabilityTile, ConfigField, ConfigForm, ConsentActions, ConsentBulletList, ConsentCard, ConsentFootnote, ConsentHeader, ConsentMessage, ConsentNotice, ConsentPage, ConsentPermissionList, ConsentSection, ConsentStrong, ConsentText, ConversationListView, ConversationTurnSpeaker, CopyableUrl, DEFAULT_AGENT_AVATAR_FIELD_LABELS, DEFAULT_AGENT_BAR_LABELS, DEFAULT_AGENT_CARD_LABELS, DEFAULT_AGENT_CREATOR_LABELS, DEFAULT_AGENT_GALLERY_LABELS, DEFAULT_AGENT_SELECT_LABELS, DEFAULT_AGENT_STEPS_LABELS, DEFAULT_AGENT_TYPE_SELECTOR_LABELS, DEFAULT_AUTHORIZE_AGENT_LABELS, DEFAULT_CONFIG_FIELD_LABELS, DEFAULT_CONFIG_FORM_LABELS, DEFAULT_CONSENT_ACTIONS_LABELS, DEFAULT_COPYABLE_URL_LABELS, DEFAULT_NEW_THREAD_DIALOG_LABELS, DEFAULT_PILL_SELECT_LABELS, DEFAULT_RECURRENCE, DEFAULT_RECURRENCE_BUILDER_LABELS, DEFAULT_SKILL_CARD_LABELS, DEFAULT_SKILL_EDIT_FORM_LABELS, DEFAULT_SKILL_GENERATE_FORM_LABELS, DEFAULT_SKILL_GLOBAL_BADGE_LABELS, DEFAULT_SKILL_ROW_LABELS, DEFAULT_SKILL_VIEW_TOGGLE_LABELS, DEFAULT_SUBAGENT_ROSTER_LABELS, DEFAULT_TASKS_CHROME_LABELS, DEFAULT_TASK_COMPOSER_LABELS, DEFAULT_TASK_LIST_LABELS, DEFAULT_TASK_OUTPUTS_CELL_LABELS, DEFAULT_TASK_PLAN_LABELS, DEFAULT_TASK_RUNS_DIALOG_LABELS, DEFAULT_TASK_STATUS_PILL_LABELS, DEFAULT_TASK_THREAD_CHIP_LABELS, DEFAULT_TASK_TRIGGER_CHIP_LABELS, DEFAULT_TUPLE_ARRAY_FIELD_LABELS, DEFAULT_UPLOAD_TASK_ITEM_LABELS, DEFAULT_UPLOAD_TASK_LIST_LABELS, DEFAULT_WORKFLOWS_CHROME_LABELS, DEFAULT_WORKFLOW_CONFIG_DIALOG_LABELS, DEFAULT_WORKFLOW_LIST_LABELS, DEFAULT_WORKFLOW_THREAD_STRIP_LABELS, DERIVED_NAME_WORDS, EMPTY_NEW_THREAD, EntityChip, GoalCriteria, MAX_TASK_DEPTH, NewThreadDialog, PersonPill, PillSelect, RecurrenceBuilder, STATUS_LABELS, STATUS_ORDER, STATUS_TONE, SkillActionButton, SkillCard, SkillDetail, SkillDetailSection, SkillEditForm, SkillFilterChips, SkillGenerateForm, SkillGlobalBadge, SkillRow, SkillTile, SkillTypeBadge, SkillViewToggle, StepDetail, StepNarration, StepOutcome, StepParams, StepRow, StepSummary, StepTrace, StepTraceSummary, SubAgentLane, SubStepGroup, SubagentRoster, TASK_COLUMN_ORDER, TRIGGER_LABELS, TaskActivityDialog, TaskComposer, TaskFlow, TaskInbox, TaskMoveDialog, TaskOutputsCell, TaskPlan, TaskRunsDialog, TaskStartDialog, TaskStatusPill, TaskTable, TaskThreadChip, TaskTriggerChip, TasksToolbar, ThreadActivity, ThreadNotifyDialog, TupleArrayField, UploadTaskItem, UploadTaskList, WEEKDAYS, WORKFLOW_COLUMN_ORDER, WorkflowConfigDialog, WorkflowDocumentsField, WorkflowLauncher, WorkflowThreadStartedBy, WorkflowThreadStrip, WorkflowsTable, WorkflowsToolbar, agentConfigSectionToValues, agentCreatorToConfigSection, asTaskStatus, authModeFor, buildRRule, buildTaskRows, buildWorkflowScopeSource, compactThreadActivity, composePersona, composerToTaskQuery, composerToWorkRequest, composerToWorkflowRequest, composerToWorkflowUpdate, createTaskColumns, createWorkflowColumns, createsWork, defaultScopeRenderer, defaultTaskComposerValues, deriveAgentName, deriveWorkflowName, descendantIds, describeRRule, filterConversationRows, firstWords, formatElapsed, goalProgress, groupThreadActivity, hasTaskFields, hasTrigger, humanizeSection, indexTasks, inferType, inputDocumentIds, isAgenticWorkflow, isOutOfBounds, isPlainTodo, isSkillRow, isValidAgentName, isoToLocalInput, linkedRunsFromActivity, localInputToIso, matchWorkflowScope, moveTargets, newThreadToRequest, nextCriterionId, ownerExtId, parseRRule, prettifyKey, resolveScopeInputs, skillSlug, stripPersonaPreamble, summarizeAgent, summarizeCapabilities, taskComposerToCreateRequest, taskComposerToUpdateRequest, taskNeedsAccess, taskToComposerValues, useWorkflowPreview, workflowFromSkillMarkdown, workflowStatus, workflowTaskFields, workflowToComposerValues, workflowToSkillMarkdown, workflowTriggerType, workflowWhen } from './chunk-3Y6NQIDE.js';
20
+ export { AgentAvatarField, AgentBar, AgentBarIconButton, AgentBarMenu, AgentBarNotes, AgentBarProbeAnswer, AgentBarQueuedNote, AgentBarStatus, AgentCard, AgentCreateView, AgentCreatedView, AgentCreator, AgentEditView, AgentGallery, AgentMainView, AgentSelect, AgentTypeSelector, CapabilityGrid, CapabilityTile, ConfigField, ConfigForm, ConsentActions, ConsentBulletList, ConsentCard, ConsentFootnote, ConsentHeader, ConsentMessage, ConsentNotice, ConsentPage, ConsentPermissionList, ConsentSection, ConsentStrong, ConsentText, ConversationListView, ConversationTurnSpeaker, CopyableUrl, DEFAULT_AGENT_AVATAR_FIELD_LABELS, DEFAULT_AGENT_BAR_LABELS, DEFAULT_AGENT_CARD_LABELS, DEFAULT_AGENT_CREATOR_LABELS, DEFAULT_AGENT_GALLERY_LABELS, DEFAULT_AGENT_SELECT_LABELS, DEFAULT_AGENT_STEPS_LABELS, DEFAULT_AGENT_TYPE_SELECTOR_LABELS, DEFAULT_AUTHORIZE_AGENT_LABELS, DEFAULT_CONFIG_FIELD_LABELS, DEFAULT_CONFIG_FORM_LABELS, DEFAULT_CONSENT_ACTIONS_LABELS, DEFAULT_COPYABLE_URL_LABELS, DEFAULT_NEW_THREAD_DIALOG_LABELS, DEFAULT_PILL_SELECT_LABELS, DEFAULT_RECURRENCE, DEFAULT_RECURRENCE_BUILDER_LABELS, DEFAULT_SKILL_CARD_LABELS, DEFAULT_SKILL_EDIT_FORM_LABELS, DEFAULT_SKILL_GENERATE_FORM_LABELS, DEFAULT_SKILL_GLOBAL_BADGE_LABELS, DEFAULT_SKILL_ROW_LABELS, DEFAULT_SKILL_VIEW_TOGGLE_LABELS, DEFAULT_SUBAGENT_ROSTER_LABELS, DEFAULT_TASKS_CHROME_LABELS, DEFAULT_TASK_COMPOSER_LABELS, DEFAULT_TASK_LIST_LABELS, DEFAULT_TASK_OUTPUTS_CELL_LABELS, DEFAULT_TASK_PLAN_LABELS, DEFAULT_TASK_RUNS_DIALOG_LABELS, DEFAULT_TASK_STATUS_PILL_LABELS, DEFAULT_TASK_THREAD_CHIP_LABELS, DEFAULT_TASK_TRIGGER_CHIP_LABELS, DEFAULT_TUPLE_ARRAY_FIELD_LABELS, DEFAULT_UPLOAD_TASK_ITEM_LABELS, DEFAULT_UPLOAD_TASK_LIST_LABELS, DEFAULT_WORKFLOWS_CHROME_LABELS, DEFAULT_WORKFLOW_CONFIG_DIALOG_LABELS, DEFAULT_WORKFLOW_LIST_LABELS, DEFAULT_WORKFLOW_THREAD_STRIP_LABELS, DERIVED_NAME_WORDS, EMPTY_NEW_THREAD, EntityChip, GoalCriteria, MAX_TASK_DEPTH, NewThreadDialog, PersonPill, PillSelect, RecurrenceBuilder, STATUS_LABELS, STATUS_ORDER, STATUS_TONE, SkillActionButton, SkillCard, SkillDetail, SkillDetailSection, SkillEditForm, SkillFilterChips, SkillGenerateForm, SkillGlobalBadge, SkillRow, SkillTile, SkillTypeBadge, SkillViewToggle, StepDetail, StepNarration, StepOutcome, StepParams, StepRow, StepSummary, StepTrace, StepTraceSummary, SubAgentLane, SubStepGroup, SubagentRoster, TASK_COLUMN_ORDER, TRIGGER_LABELS, TaskActivityDialog, TaskComposer, TaskFlow, TaskInbox, TaskMoveDialog, TaskOutputsCell, TaskPlan, TaskRunsDialog, TaskStartDialog, TaskStatusPill, TaskTable, TaskThreadChip, TaskTriggerChip, TasksToolbar, ThreadActivity, ThreadNotifyDialog, TupleArrayField, UploadTaskItem, UploadTaskList, WEEKDAYS, WORKFLOW_COLUMN_ORDER, WorkflowConfigDialog, WorkflowDocumentsField, WorkflowLauncher, WorkflowThreadStartedBy, WorkflowThreadStrip, WorkflowsTable, WorkflowsToolbar, agentConfigSectionToValues, agentCreatorToConfigSection, asTaskStatus, authModeFor, buildRRule, buildTaskRows, buildWorkflowScopeSource, compactThreadActivity, composePersona, composerToTaskQuery, composerToWorkRequest, composerToWorkflowRequest, composerToWorkflowUpdate, createTaskColumns, createWorkflowColumns, createsWork, defaultScopeRenderer, defaultTaskComposerValues, deriveAgentName, deriveWorkflowName, descendantIds, describeRRule, filterConversationRows, firstWords, formatElapsed, goalProgress, groupThreadActivity, hasTaskFields, hasTrigger, humanizeSection, indexTasks, inferType, inputDocumentIds, isAgenticWorkflow, isOutOfBounds, isPlainTodo, isSkillRow, isValidAgentName, isoToLocalInput, linkedRunsFromActivity, localInputToIso, matchWorkflowScope, moveTargets, newThreadToRequest, nextCriterionId, ownerExtId, parseRRule, prettifyKey, resolveScopeInputs, skillSlug, stripPersonaPreamble, summarizeAgent, summarizeCapabilities, taskComposerToCreateRequest, taskComposerToUpdateRequest, taskNeedsAccess, taskToComposerValues, useWorkflowPreview, workflowFromSkillMarkdown, workflowStatus, workflowTaskFields, workflowToComposerValues, workflowToSkillMarkdown, workflowTriggerType, workflowWhen } from './chunk-EB7QAZLH.js';
21
21
  import './chunk-4XJZ6AAY.js';
22
22
  export { EmptyState } from './chunk-P6GHJSLR.js';
23
23
  export { ActionStepBody, ApprovalEvidence, AssigneeLine, DEFAULT_ASSIGNEE_WORDING, DEFAULT_SCHEMA_FORM_LABELS, DEFAULT_STEP_BAR_LABELS, DEFAULT_TASK_ACTIVITY_LABELS, DEFAULT_WORKFLOW_RUNNER_LABELS, DEFAULT_WORKFLOW_STEP_PARTS_LABELS, EMPTY_WORKFLOW_SCOPE, SKILL_PROMPT_FALLBACK_PLACEHOLDER, SKILL_PROMPT_LABEL, SchemaForm, SendBackControl, TaskActivityTimeline, WorkflowRunner, activeStepId, assigneeName, buildLaunch, canAssign, composeStepPrompt, composeWorkflowPrompt, defaultInputs, dependsOn, fieldToFrontmatter, fillRunText, fillStepInputs, fromPlanAssignee, fromPlanDocumentRef, fromPlanSteps, initialRunInputs, inputsFromContext, isEmptyWorkflowScope, isIncompleteSignal, isPersonAction, isPersonStep, isRunFinished, isSteppedWorkflow, isWorkflowScope, layoutFromPlanSteps, nextAction, orderSteps, promptFieldName, reviewInstructions, runFields, runFieldsOf, runThreadTitle, sendBackTargets, skillToWorkflow, splitDocRef, stepConfigProblems, stepDependencies, stepFields, stepLevels, stepPhase, stepStatesFromActivity, stepWindow, taskActivityHeadline, toPlanAssignee, toPlanDocumentRef, toPlanSteps, upstreamSteps, useWorkflowView, validateInputs, validateStep, validateWorkflowGraph, workflowAccepts, workflowFromFrontmatter, workflowSteps, workflowsAccepting, workflowsForHost } from './chunk-PGDL26TQ.js';
@@ -29,29 +29,29 @@ import './chunk-EVUEIBNU.js';
29
29
  export { TONES, isTone } from './chunk-AUS3KBHJ.js';
30
30
  import './chunk-NUNKSZKU.js';
31
31
  export { DEFAULT_FILTER_FIELDS, DEFAULT_FILTER_INPUT_LABELS, FilterInput } from './chunk-YU2KUMGE.js';
32
- import './chunk-DDF5GPIJ.js';
32
+ import './chunk-P5ST47VY.js';
33
33
  import './chunk-XD2M6LIG.js';
34
34
  export { ActionLink } from './chunk-S7PSMMRG.js';
35
35
  export { AccountRecoveryDialog, AuthAlert, AuthConsent, AuthDivider, AuthField, AuthFieldBadge, AuthFooterLinks, AuthHeading, AuthHero, AuthInput, AuthLayout, AuthLink, AuthNote, AuthOfflineBadge, AuthSubmitButton, AuthTabs, DEFAULT_ACCOUNT_RECOVERY_DIALOG_LABELS, DEFAULT_AUTH_CONSENT_LABELS, DEFAULT_AUTH_FOOTER_LINKS_LABELS, DEFAULT_AUTH_OFFLINE_BADGE_LABELS, DEFAULT_RECOVERY_KEY_DIALOG_LABELS, DEFAULT_REVEALABLE_PASSWORD_INPUT_LABELS, DEFAULT_SSO_LOGIN_BUTTON_LABELS, RecoveryKeyDialog, RevealablePasswordInput, SsoLoginButton } from './chunk-SFXVNFES.js';
36
36
  export { DEFAULT_PASSWORD_STRENGTH_INPUT_LABELS, PasswordStrengthInput } from './chunk-VILAPTCB.js';
37
- export { AssistantToaster, BranchControls, ComposerAccessories, ComposerTools, ContextActionButton, ContextCheckRow, ContextPanelContent, ContextPanelFooter, ContextPanelTabs, ContextPickerList, ContextPickerRow, ContextSearchInput, ContextSelectList, ContextSelectRow, Conversation, ConversationBody, ConversationHeader, ConversationHeaderActions, ConversationHistoryPane, ConversationLoading, ConversationMain, ConversationRoot, ConversationSearchView, ConversationSettingsButton, DEFAULT_BRANCH_CONTROLS_LABELS, DEFAULT_CONVERSATION_LAYOUT_LABELS, DEFAULT_CONVERSATION_PARTS_LABELS, DEFAULT_CONVERSATION_SEARCH_LABELS, DEFAULT_LABEL_PIN_ROW_LABELS, DEFAULT_MODEL_PRICING_TIP_LABELS, DEFAULT_PENDING_ANSWER_BAR_LABELS, DEFAULT_PINNED_DOC_CHIP_LABELS, DEFAULT_SLASH_MENU_LABELS, DEFAULT_THREAD_MAP_LABELS, LabelPinRow, ModelAutoIcon, ModelConfigureButton, ModelDot, ModelMenuDivider, ModelMenuMessage, ModelOption, ModelOptionLabel, ModelPickerPopover, ModelPickerTrigger, ModelPricingTip, ModelTierIcon, ModelTierOption, ModelTriggerContent, NewChatButton, NewPaChatButton, PaModeBadge, PendingAnswerBar, PinnedDocChip, SlashMenu, ThreadMap, ThreadMapDiagram, ThreadMapError, ThreadMapLoading, getParticipantTints, hasMessageBody, isLongPastedText, useDismissibleCard, useLongPaste, useRecipientDraft } from './chunk-S7RHJI5Q.js';
37
+ export { AssistantToaster, BranchControls, ComposerAccessories, ComposerTools, ContextActionButton, ContextCheckRow, ContextPanelContent, ContextPanelFooter, ContextPanelTabs, ContextPickerList, ContextPickerRow, ContextSearchInput, ContextSelectList, ContextSelectRow, Conversation, ConversationBody, ConversationHeader, ConversationHeaderActions, ConversationHistoryPane, ConversationLoading, ConversationMain, ConversationRoot, ConversationSearchView, ConversationSettingsButton, DEFAULT_BRANCH_CONTROLS_LABELS, DEFAULT_CONVERSATION_LAYOUT_LABELS, DEFAULT_CONVERSATION_PARTS_LABELS, DEFAULT_CONVERSATION_SEARCH_LABELS, DEFAULT_LABEL_PIN_ROW_LABELS, DEFAULT_MODEL_PRICING_TIP_LABELS, DEFAULT_PENDING_ANSWER_BAR_LABELS, DEFAULT_PINNED_DOC_CHIP_LABELS, DEFAULT_SLASH_MENU_LABELS, DEFAULT_THREAD_MAP_LABELS, LabelPinRow, ModelAutoIcon, ModelConfigureButton, ModelDot, ModelMenuDivider, ModelMenuMessage, ModelOption, ModelOptionLabel, ModelPickerPopover, ModelPickerTrigger, ModelPricingTip, ModelTierIcon, ModelTierOption, ModelTriggerContent, NewChatButton, NewPaChatButton, PaModeBadge, PendingAnswerBar, PinnedDocChip, SlashMenu, ThreadMap, ThreadMapDiagram, ThreadMapError, ThreadMapLoading, getParticipantTints, hasMessageBody, isLongPastedText, useDismissibleCard, useLongPaste, useRecipientDraft } from './chunk-7NLPKJV5.js';
38
38
  export { DEFAULT_DOCK_WIDTH, Toaster } from './chunk-BV7FEMSI.js';
39
- export { AssistantDock, AssistantDockToggle, AssistantModeToggle, ChatDocuments, ChatMessageContent, ChatPage, ChatThreadList, ChatThreadSelect, CitationMark, Composer, ComposerBranchingNotice, ComposerContainer, ComposerDock, ComposerFrame, ComposerInput, ComposerRoot, ComposerSend, ComposerToolbar, ComposerVoiceButton, ContextChip, ConversationEmpty, DEFAULT_ASSISTANT_MODE_TOGGLE_LABELS, DEFAULT_CHAT_PAGE_LABELS, DEFAULT_COMPOSER_LABELS, DEFAULT_CONVERSATION_EMPTY_LABELS, DEFAULT_MESSAGE_ALERT_LABELS, DEFAULT_MESSAGE_LABELS, DEFAULT_MESSAGE_LIST_LABELS, DEFAULT_WORKFLOW_STEP_CHIP_LABELS, Message, MessageActionButton, MessageActionMenu, MessageAlert, MessageBody, MessageBubble, MessageByline, MessageContent, MessageFooter, MessageList, MessageListBanner, MessageListEmpty, MessageListRoot, MessageListRow, MessageListRows, MessageListStatus, MessageListTail, MessageNarration, MessageRoot, MessageSources, MessageSubagentBadge, ScrollToBottom, SourceChip, WorkflowStepChip, toSpeakableText, useAssistantDock, useChatSurface, useRegisterEmbeddedChat, useStreamAnnouncement } from './chunk-EWSEQEPL.js';
39
+ export { AssistantDock, AssistantDockToggle, AssistantModeToggle, ChatDocuments, ChatMessageContent, ChatPage, ChatThreadList, ChatThreadSelect, CitationMark, Composer, ComposerBranchingNotice, ComposerContainer, ComposerDock, ComposerFrame, ComposerInput, ComposerRoot, ComposerSend, ComposerToolbar, ComposerVoiceButton, ContextChip, ConversationEmpty, DEFAULT_ASSISTANT_MODE_TOGGLE_LABELS, DEFAULT_CHAT_PAGE_LABELS, DEFAULT_COMPOSER_LABELS, DEFAULT_CONVERSATION_EMPTY_LABELS, DEFAULT_MESSAGE_ALERT_LABELS, DEFAULT_MESSAGE_LABELS, DEFAULT_MESSAGE_LIST_LABELS, DEFAULT_WORKFLOW_STEP_CHIP_LABELS, Message, MessageActionButton, MessageActionMenu, MessageAlert, MessageBody, MessageBubble, MessageByline, MessageContent, MessageFooter, MessageList, MessageListBanner, MessageListEmpty, MessageListRoot, MessageListRow, MessageListRows, MessageListStatus, MessageListTail, MessageNarration, MessageRoot, MessageSources, MessageSubagentBadge, ScrollToBottom, SourceChip, WorkflowStepChip, toSpeakableText, useAssistantDock, useChatSurface, useRegisterEmbeddedChat, useStreamAnnouncement } from './chunk-PFA43QNX.js';
40
40
  export { BlocksTooltipProvider, DEFAULT_OVERLAY_ZONE_ID, DEFAULT_PAGE_CONTAINER_PADDING, DEFAULT_SIDEBAR_TOGGLE_BUTTON_LABELS, PageContainer, SHELL_BOTTOM_INSET_VAR, Shell, SidebarToggleButton, ToolButton, useDrawerBehavior, useOverlayZoneId, useShellBottomInset } from './chunk-KZJAG7T3.js';
41
41
  export { useMentionAutocomplete } from './chunk-HOXKR26S.js';
42
42
  export { DEFAULT_MENTION_LABELS, MENTION_HREF_PREFIX, MentionChip, MentionMenu, extractMentions, filterMentionCandidates, findMentionQuery, insertMention, linkMentions, mentionFromHref, toMessageMentions, useListKeyNav } from './chunk-AA3PT6KR.js';
43
43
  import './chunk-NPLYHR2E.js';
44
- export { CitationEditor, DEFAULT_PASSAGE_PILL_LABELS, DEFAULT_QUIET_MARK_LABELS, LabelMark, NoteMark, PassageMark, PassagePill, QuietLink, useCopyText } from './chunk-XQKGYGCJ.js';
45
- export { BlocksProvider, useBlocksEnvironment } from './chunk-76JDDMSP.js';
46
- export { daysUntil, displayName, fmtDate, fmtDateTime, formatCount, formatCurrency, formatPageRefs, fromNow, hrs, initials, pct, pluralize } from './chunk-OXF2IFXG.js';
47
44
  export { ActionMenu, AddContactsForm, AddContactsResults, ContactCard, DEFAULT_ADD_CONTACTS_LABELS, DEFAULT_CONTACT_CARD_LABELS, DEFAULT_CONTACT_OUTCOME_LABELS, DEFAULT_DM_ACCESS_REQUEST_BANNER_LABELS, DEFAULT_DM_GRANT_ACCESS_DIALOG_LABELS, DEFAULT_DM_INVITE_CHIP_LABELS, DEFAULT_DM_THREAD_FRAME_LABELS, DEFAULT_MAIL_FOLDER_TREE_LABELS, DEFAULT_RECIPIENT_PICKER_LABELS, DmAccessRequestBanner, DmGrantAccessDialogView, DmInviteAvatar, DmInviteChip, DmNewTabIcon, DmThreadFrame, DmThreadHeader, MAX_INVITE_EMAILS, MailFolderTree, MemberBulkActions, MemberListLoading, MemberMutedText, MemberNameCell, MemberRoleCell, RecipientPicker, RoleSelect, WorkspaceDeleteButton, buildMailFolderTree, contactToVCard, descendantFolderIds, downloadVCard, isInboxFolder, parseEmails, toAddContactsRow, toAddContactsRows, toggleMailFolder, vCardFilename } from './chunk-7C35WXYB.js';
48
45
  import './chunk-NBV56SGU.js';
49
- export { MailDeliveryBadge, MailDeliveryList, MailDocumentPicker, MailGrid, MailMessagePreview, MailMessageView, NEEDS_CONNECTION, PlainMailBodyEditor, draftMailCompose, emptyMailCompose, hasCalendarPart, mailAddressLabel, parseMailRecipients, replyMailCompose } from './chunk-LGX6UFYG.js';
46
+ export { MailDeliveryBadge, MailDeliveryList, MailDocumentPicker, MailGrid, MailMessagePreview, MailMessageView, NEEDS_CONNECTION, PlainMailBodyEditor, draftMailCompose, emptyMailCompose, hasCalendarPart, mailAddressLabel, parseMailRecipients, replyMailCompose } from './chunk-P2KPDPFF.js';
50
47
  export { DEFAULT_SHARE_CONTROL_LABELS, ShareControl } from './chunk-K4BGOPGG.js';
51
48
  import './chunk-TX2ZICS7.js';
52
49
  import './chunk-ZPLG7QYF.js';
53
50
  export { BREAKPOINT_QUERIES, useIsNarrow, useIsPhone, useIsTouchScreen, useMediaQuery } from './chunk-SLSBJRWW.js';
54
51
  import './chunk-7F6CBP3Z.js';
52
+ export { CitationEditor, DEFAULT_PASSAGE_PILL_LABELS, DEFAULT_QUIET_MARK_LABELS, LabelMark, NoteMark, PassageMark, PassagePill, QuietLink, useCopyText } from './chunk-XQKGYGCJ.js';
53
+ export { BlocksProvider, useBlocksEnvironment } from './chunk-76JDDMSP.js';
54
+ export { daysUntil, displayName, fmtDate, fmtDateTime, formatCount, formatCurrency, formatPageRefs, fromNow, hrs, initials, pct, pluralize } from './chunk-OXF2IFXG.js';
55
55
  import './chunk-VUNV25KB.js';
56
56
  import { Search, Pencil, Sparkles, FileText, Lightbulb, MessagesSquare, X, Plus } from 'lucide-react';
57
57
  import { Input, cn, Textarea, Button } from '@arbidocs/react/ui';
@@ -1,6 +1,141 @@
1
1
  'use strict';
2
2
 
3
+ var fs = require('fs');
4
+ var path = require('path');
5
+
6
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
7
+
8
+ var path__default = /*#__PURE__*/_interopDefault(path);
9
+
3
10
  // src/record/index.ts
11
+ var TIMECODE_CELL = 8;
12
+ var round = (n) => Math.round(n * 100) / 100;
13
+ var Take = class _Take {
14
+ constructor(page, options, brand) {
15
+ this.page = page;
16
+ this.options = options;
17
+ this.brand = brand ? cinematicSkin(brand) : {};
18
+ const dir = path__default.default.resolve(options.dir ?? "recordings");
19
+ this.file = path__default.default.join(dir, `${options.name}.waits.json`);
20
+ this.focusFile = path__default.default.join(dir, `${options.name}.focus.json`);
21
+ this.timeline.viewport = page.viewportSize();
22
+ fs.mkdirSync(dir, { recursive: true });
23
+ _Take.active = this;
24
+ this.save();
25
+ }
26
+ page;
27
+ options;
28
+ /** The take running now (one at a time: recordings run one after another). */
29
+ static active = null;
30
+ t0 = Date.now();
31
+ waits = [];
32
+ /** The brand the edit paints the cards, captions and callouts in. */
33
+ brand;
34
+ file;
35
+ focusFile;
36
+ timeline = {
37
+ sync: null,
38
+ viewport: null,
39
+ focus: [],
40
+ cards: [],
41
+ lowerThirds: [],
42
+ captions: []
43
+ };
44
+ /** The take running on `page`, if any. */
45
+ static on(page) {
46
+ return _Take.active?.page === page ? _Take.active : null;
47
+ }
48
+ /** Seconds since the take started. */
49
+ now() {
50
+ return (Date.now() - this.t0) / 1e3;
51
+ }
52
+ /** Log a wait (written at once, so a take that fails part-way still has its cut list). */
53
+ log(label, start, end = this.now()) {
54
+ if (end - start < 1) return;
55
+ this.waits.push({ label, start: round(start), end: round(end) });
56
+ this.save();
57
+ }
58
+ /** Wait for `until` (a UI state), logged as a wait the edit may cut. */
59
+ async wait(label, until) {
60
+ const start = this.now();
61
+ try {
62
+ return await until();
63
+ } finally {
64
+ this.log(label, start);
65
+ }
66
+ }
67
+ /**
68
+ * Paint the sync marker: a magenta frame for a moment, at a logged time. The edit finds it in the
69
+ * video and lines the take's clock up with the video's. Call it before the first navigation.
70
+ */
71
+ async markSync() {
72
+ await this.page.evaluate(
73
+ () => new Promise((done) => {
74
+ document.documentElement.style.background = "#ff00ff";
75
+ if (document.body) document.body.style.background = "#ff00ff";
76
+ requestAnimationFrame(() => requestAnimationFrame(() => done()));
77
+ })
78
+ );
79
+ this.timeline.sync = round(this.now());
80
+ await this.page.waitForTimeout(400);
81
+ this.save();
82
+ }
83
+ /** Log a focus event (a `point` with no end lasts until the next event). */
84
+ record(event) {
85
+ const { focus } = this.timeline;
86
+ const open = focus[focus.length - 1];
87
+ if (open && open.kind === "point" && open.end === void 0) open.end = round(event.start);
88
+ focus.push({
89
+ ...event,
90
+ start: round(event.start),
91
+ end: event.end === void 0 ? void 0 : round(event.end)
92
+ });
93
+ this.save();
94
+ }
95
+ /** @internal The stage's cards, lower-thirds and captions (drawn by the edit). */
96
+ cardStart(card) {
97
+ this.cardEnd();
98
+ this.captionEnd();
99
+ this.timeline.cards.push({ ...card, start: round(this.now()), end: null });
100
+ this.save();
101
+ }
102
+ cardEnd() {
103
+ const last = this.timeline.cards[this.timeline.cards.length - 1];
104
+ if (last && last.end === null) {
105
+ last.end = round(this.now());
106
+ this.save();
107
+ }
108
+ }
109
+ lowerThird(kicker, title, holdMs) {
110
+ const start = round(this.now());
111
+ this.timeline.lowerThirds.push({ kicker, title, start, end: round(start + holdMs / 1e3) });
112
+ this.save();
113
+ }
114
+ captionStart(text) {
115
+ this.captionEnd();
116
+ this.timeline.captions.push({ text, start: round(this.now()), end: null });
117
+ this.save();
118
+ }
119
+ captionEnd() {
120
+ const last = this.timeline.captions[this.timeline.captions.length - 1];
121
+ if (last && last.end === null) {
122
+ last.end = round(this.now());
123
+ this.save();
124
+ }
125
+ }
126
+ save() {
127
+ const { zoom, maxZoom, pip } = this.options;
128
+ fs.writeFileSync(this.file, JSON.stringify({ t0: this.t0, waits: this.waits }, null, 1));
129
+ fs.writeFileSync(
130
+ this.focusFile,
131
+ JSON.stringify(
132
+ { t0: this.t0, config: { zoom, maxZoom, pip }, brand: this.brand, ...this.timeline },
133
+ null,
134
+ 1
135
+ )
136
+ );
137
+ }
138
+ };
4
139
  var DEFAULTS = {
5
140
  displayFont: "ui-serif, Georgia, serif",
6
141
  sansFont: "Inter, ui-sans-serif, system-ui, sans-serif",
@@ -11,9 +146,8 @@ var DEFAULTS = {
11
146
  ink: "#0e1b2d",
12
147
  coverTitle: "#f4f6f8"
13
148
  };
14
- function createCinematic(config) {
15
- const b = config.brand;
16
- const skin = {
149
+ function cinematicSkin(b) {
150
+ return {
17
151
  firmLabel: b.firmLabel,
18
152
  displayFont: b.displayFont ?? DEFAULTS.displayFont,
19
153
  sansFont: b.sansFont ?? DEFAULTS.sansFont,
@@ -25,8 +159,13 @@ function createCinematic(config) {
25
159
  coverTo: b.cover?.to ?? DEFAULTS.cover.to,
26
160
  accent: b.accent ?? DEFAULTS.accent,
27
161
  ink: b.ink ?? DEFAULTS.ink,
28
- coverTitle: b.coverTitle ?? DEFAULTS.coverTitle
162
+ coverTitle: b.coverTitle ?? DEFAULTS.coverTitle,
163
+ fontFiles: b.fontFiles ?? []
29
164
  };
165
+ }
166
+ function createCinematic(config) {
167
+ const b = config.brand;
168
+ const skin = cinematicSkin(b);
30
169
  const loginPath = config.loginPath ?? "/app/login";
31
170
  const appUrlPattern = config.appUrlPattern ?? /\/app$/;
32
171
  const ids = {
@@ -35,113 +174,207 @@ function createCinematic(config) {
35
174
  submit: config.testIds?.submit ?? "auth-login-submit"
36
175
  };
37
176
  const resolve = (page, t) => typeof t === "string" ? page.getByTestId(t) : t;
177
+ async function boxOf(page, loc) {
178
+ const box = await loc.boundingBox().catch(() => null);
179
+ const vp = page.viewportSize();
180
+ if (!box || !vp) return box;
181
+ const x = Math.max(box.x, 0);
182
+ const y = Math.max(box.y, 0);
183
+ const width = Math.min(box.x + box.width, vp.width) - x;
184
+ const height = Math.min(box.y + box.height, vp.height) - y;
185
+ return width > 0 && height > 0 ? { x: round(x), y: round(y), width: round(width), height: round(height) } : null;
186
+ }
187
+ async function glide(page, target) {
188
+ const loc = resolve(page, target).first();
189
+ await loc.scrollIntoViewIfNeeded().catch(() => {
190
+ });
191
+ const box = await boxOf(page, loc);
192
+ if (box) {
193
+ await page.mouse.move(box.x + box.width / 2, box.y + box.height / 2, { steps: 26 });
194
+ await page.waitForTimeout(180);
195
+ }
196
+ return { loc, box };
197
+ }
198
+ async function take(page, options) {
199
+ return new Take(page, options, b);
200
+ }
38
201
  async function installStage(page) {
39
- await page.addInitScript((s) => {
40
- const boot = () => {
41
- if (document.getElementById("__cine_cursor")) return;
42
- const cursor = document.createElement("div");
43
- cursor.id = "__cine_cursor";
44
- cursor.style.cssText = `position:fixed;left:0;top:0;z-index:2147483647;width:22px;height:22px;margin:-11px 0 0 -11px;border-radius:50%;pointer-events:none;transition:transform .09s ease-out;background:radial-gradient(circle at 35% 35%, ${s.cursorFrom}, ${s.cursorTo});box-shadow:0 0 0 3px rgba(255,255,255,.6),0 2px 10px rgba(0,0,0,.4);`;
45
- document.body.appendChild(cursor);
46
- window.addEventListener(
47
- "mousemove",
48
- (e) => {
49
- cursor.style.transform = `translate(${e.clientX}px,${e.clientY}px)`;
50
- },
51
- true
52
- );
53
- window.addEventListener(
54
- "mousedown",
55
- (e) => {
56
- const m = e;
57
- const r = document.createElement("div");
58
- r.style.cssText = `position:fixed;left:${m.clientX}px;top:${m.clientY}px;z-index:2147483646;width:12px;height:12px;margin:-6px 0 0 -6px;border-radius:50%;pointer-events:none;border:2px solid ${s.ripple};animation:__cine_ripple .55s ease-out forwards;`;
59
- document.body.appendChild(r);
60
- setTimeout(() => r.remove(), 600);
61
- },
62
- true
63
- );
64
- const cap = document.createElement("div");
65
- cap.id = "__cine_cap";
66
- cap.style.cssText = `position:fixed;left:50%;bottom:34px;transform:translateX(-50%) translateY(8px);z-index:2147483646;max-width:72%;padding:13px 24px;border-radius:13px;font:500 17px/1.45 ${s.sansFont};color:#fff;letter-spacing:.01em;background:${s.ink}e0;backdrop-filter:blur(7px);box-shadow:0 10px 34px rgba(0,0,0,.4);text-align:center;opacity:0;transition:opacity .35s,transform .35s;`;
67
- document.body.appendChild(cap);
68
- const style = document.createElement("style");
69
- style.textContent = "@keyframes __cine_ripple{to{width:46px;height:46px;margin:-23px 0 0 -23px;opacity:0}}";
70
- document.head.appendChild(style);
71
- window.__cine_cap = (t) => {
72
- cap.textContent = t;
73
- cap.style.opacity = t ? "1" : "0";
74
- cap.style.transform = `translateX(-50%) translateY(${t ? 0 : 8}px)`;
202
+ await page.addInitScript(
203
+ ({ s, t0, TC }) => {
204
+ const boot = () => {
205
+ if (document.getElementById("__cine_cursor")) return;
206
+ const cursor = document.createElement("div");
207
+ cursor.id = "__cine_cursor";
208
+ cursor.style.cssText = `position:fixed;left:0;top:0;z-index:2147483647;width:22px;height:22px;margin:-11px 0 0 -11px;border-radius:50%;pointer-events:none;transition:transform .09s ease-out;background:radial-gradient(circle at 35% 35%, ${s.cursorFrom}, ${s.cursorTo});box-shadow:0 0 0 3px rgba(255,255,255,.6),0 2px 10px rgba(0,0,0,.4);`;
209
+ document.body.appendChild(cursor);
210
+ window.addEventListener(
211
+ "mousemove",
212
+ (e) => {
213
+ cursor.style.transform = `translate(${e.clientX}px,${e.clientY}px)`;
214
+ },
215
+ true
216
+ );
217
+ window.addEventListener(
218
+ "mousedown",
219
+ (e) => {
220
+ const m = e;
221
+ const r = document.createElement("div");
222
+ r.style.cssText = `position:fixed;left:${m.clientX}px;top:${m.clientY}px;z-index:2147483646;width:12px;height:12px;margin:-6px 0 0 -6px;border-radius:50%;pointer-events:none;border:2px solid ${s.ripple};animation:__cine_ripple .55s ease-out forwards;`;
223
+ document.body.appendChild(r);
224
+ setTimeout(() => r.remove(), 600);
225
+ },
226
+ true
227
+ );
228
+ const cap = document.createElement("div");
229
+ cap.id = "__cine_cap";
230
+ cap.style.cssText = `position:fixed;left:50%;bottom:34px;transform:translateX(-50%) translateY(8px);z-index:2147483646;max-width:72%;padding:13px 24px;border-radius:13px;font:500 17px/1.45 ${s.sansFont};color:#fff;letter-spacing:.01em;background:${s.ink}e0;backdrop-filter:blur(7px);box-shadow:0 10px 34px rgba(0,0,0,.4);text-align:center;opacity:0;transition:opacity .35s,transform .35s;`;
231
+ document.body.appendChild(cap);
232
+ const style = document.createElement("style");
233
+ style.textContent = "@keyframes __cine_ripple{to{width:46px;height:46px;margin:-23px 0 0 -23px;opacity:0}}";
234
+ document.head.appendChild(style);
235
+ window.__cine_cap = (t) => {
236
+ cap.textContent = t;
237
+ cap.style.opacity = t ? "1" : "0";
238
+ cap.style.transform = `translateX(-50%) translateY(${t ? 0 : 8}px)`;
239
+ };
240
+ if (t0 !== null) {
241
+ const strip = document.createElement("div");
242
+ strip.id = "__cine_timecode";
243
+ strip.style.cssText = `position:fixed;right:0;bottom:0;z-index:2147483647;display:flex;pointer-events:none;height:${TC}px`;
244
+ const cells = Array.from({ length: 18 }, (_, i) => {
245
+ const cell = document.createElement("div");
246
+ cell.style.cssText = `width:${TC}px;height:${TC}px;background:${i === 0 ? "#fff" : "#000"}`;
247
+ strip.appendChild(cell);
248
+ return cell;
249
+ });
250
+ document.body.appendChild(strip);
251
+ const tick = () => {
252
+ const ds = Math.max(0, Math.round((Date.now() - t0) / 100)) & 65535;
253
+ for (let bit = 0; bit < 16; bit += 1)
254
+ cells[bit + 2].style.background = ds >> 15 - bit & 1 ? "#fff" : "#000";
255
+ requestAnimationFrame(tick);
256
+ };
257
+ tick();
258
+ }
75
259
  };
76
- };
77
- if (document.body) boot();
78
- else document.addEventListener("DOMContentLoaded", boot);
79
- }, skin);
260
+ if (document.body) boot();
261
+ else document.addEventListener("DOMContentLoaded", boot);
262
+ },
263
+ { s: skin, t0: Take.on(page)?.t0 ?? null, TC: TIMECODE_CELL }
264
+ );
80
265
  }
81
266
  async function cover(page, { kicker, title, subtitle }, holdMs = 2600) {
267
+ const running = Take.on(page);
268
+ running?.cardStart({ kicker, title, subtitle });
82
269
  await page.evaluate(
83
- ({ kicker: kicker2, title: title2, subtitle: subtitle2, s }) => {
270
+ ({ kicker: kicker2, title: title2, subtitle: subtitle2, s, instant }) => {
84
271
  document.getElementById("__cine_cover")?.remove();
85
272
  const el = document.createElement("div");
86
273
  el.id = "__cine_cover";
87
- el.style.cssText = `position:fixed;inset:0;z-index:2147483647;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:0 8%;background:linear-gradient(135deg,${s.coverFrom} 0%,${s.coverMid} 48%,${s.coverTo} 165%);opacity:0;transition:opacity .5s ease;font-family:${s.sansFont};`;
274
+ el.style.cssText = `position:fixed;inset:0;z-index:2147483647;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:0 8%;background:linear-gradient(135deg,${s.coverFrom} 0%,${s.coverMid} 48%,${s.coverTo} 165%);opacity:${instant ? 1 : 0};transition:opacity ${instant ? 0 : 0.5}s ease;font-family:${s.sansFont};`;
88
275
  el.innerHTML = `<div style="text-transform:uppercase;letter-spacing:.26em;font-size:13px;font-weight:600;color:${s.accent};margin-bottom:22px">${kicker2}</div><div style="font-family:${s.displayFont};font-weight:600;font-size:52px;line-height:1.08;letter-spacing:-.02em;color:${s.coverTitle};max-width:16ch">${title2}</div>` + (subtitle2 ? `<div style="margin-top:22px;font-size:19px;line-height:1.5;color:${s.coverTitle}b8;max-width:46ch">${subtitle2}</div>` : "") + `<div style="margin-top:44px;display:flex;align-items:center;gap:10px;color:${s.coverTitle}80;font-size:13px;letter-spacing:.02em"><span style="width:26px;height:1px;background:${s.accent}"></span>${s.firmLabel}</div>`;
89
276
  document.body.appendChild(el);
90
277
  requestAnimationFrame(() => el.style.opacity = "1");
91
278
  },
92
- { kicker, title, subtitle: subtitle ?? "", s: skin }
279
+ { kicker, title, subtitle: subtitle ?? "", s: skin, instant: !!running }
93
280
  );
94
281
  await page.waitForTimeout(holdMs);
95
282
  }
96
- async function uncover(page) {
283
+ async function chapter(page, card, holdMs) {
284
+ await cover(page, card, holdMs);
97
285
  await page.evaluate(() => {
286
+ const el = document.getElementById("__cine_cover");
287
+ if (el) el.style.pointerEvents = "none";
288
+ });
289
+ }
290
+ async function uncover(page) {
291
+ const running = Take.on(page);
292
+ await page.evaluate((instant) => {
98
293
  const el = document.getElementById("__cine_cover");
99
294
  if (!el) return;
295
+ if (instant) return el.remove();
100
296
  el.style.opacity = "0";
101
297
  setTimeout(() => el.remove(), 520);
102
- });
298
+ }, !!running);
299
+ running?.cardEnd();
103
300
  await page.waitForTimeout(560);
104
301
  }
302
+ function lowerThird(page, kicker, title, holdMs = 3200) {
303
+ Take.on(page)?.lowerThird(kicker, title, holdMs);
304
+ }
105
305
  async function caption(page, text, holdMs) {
106
- await page.evaluate(
107
- (t) => window.__cine_cap?.(t),
108
- text
109
- );
306
+ const running = Take.on(page);
307
+ if (running) running.captionStart(text);
308
+ else
309
+ await page.evaluate(
310
+ (t) => window.__cine_cap?.(t),
311
+ text
312
+ );
110
313
  const hold = holdMs ?? Math.min(4200, 900 + text.length * 45);
111
314
  await page.waitForTimeout(hold);
112
315
  }
113
316
  async function clearCaption(page) {
114
- await page.evaluate(
115
- () => window.__cine_cap?.("")
116
- );
317
+ const running = Take.on(page);
318
+ if (running) running.captionEnd();
319
+ else
320
+ await page.evaluate(
321
+ () => window.__cine_cap?.("")
322
+ );
117
323
  }
118
324
  async function beat(page, ms = 650) {
119
325
  await page.waitForTimeout(ms);
120
326
  }
121
327
  async function glideTo(page, target) {
122
- const loc = resolve(page, target).first();
123
- await loc.scrollIntoViewIfNeeded().catch(() => {
124
- });
125
- const box = await loc.boundingBox();
126
- if (box) {
127
- await page.mouse.move(box.x + box.width / 2, box.y + box.height / 2, { steps: 26 });
128
- await page.waitForTimeout(180);
129
- }
328
+ const running = Take.on(page);
329
+ const start = running?.now() ?? 0;
330
+ const { loc, box } = await glide(page, target);
331
+ if (running && box) running.record({ kind: "point", start, box });
130
332
  return loc;
131
333
  }
132
334
  async function click(page, target) {
133
- const loc = await glideTo(page, target);
335
+ const running = Take.on(page);
336
+ const start = running?.now() ?? 0;
337
+ const { loc, box } = await glide(page, target);
134
338
  await loc.click();
135
339
  await page.waitForTimeout(260);
340
+ if (running && box) running.record({ kind: "click", start, end: running.now(), box });
136
341
  }
137
342
  async function type(page, target, text) {
138
- const loc = await glideTo(page, target);
343
+ const running = Take.on(page);
344
+ const start = running?.now() ?? 0;
345
+ const { loc, box } = await glide(page, target);
139
346
  await loc.click();
140
347
  await loc.fill("");
141
348
  await loc.pressSequentially(text, { delay: 42 });
142
349
  await page.waitForTimeout(240);
350
+ if (running && box) running.record({ kind: "type", start, end: running.now(), box });
351
+ }
352
+ async function focusOn(page, target, label, {
353
+ holdMs = 2200,
354
+ callout = true,
355
+ mode
356
+ } = {}) {
357
+ const running = Take.on(page);
358
+ const start = running?.now() ?? 0;
359
+ const { box } = await glide(page, target);
360
+ await page.waitForTimeout(holdMs);
361
+ if (running && box)
362
+ running.record({ kind: "focus", label, start, end: running.now(), box, callout, mode });
363
+ }
364
+ async function readDown(page, target, scrolls = 3, pauseMs = 1600) {
365
+ const running = Take.on(page);
366
+ const start = running?.now() ?? 0;
367
+ const { box } = await glide(page, target);
368
+ for (let i = 0; i < scrolls; i += 1) {
369
+ await page.mouse.wheel(0, 320);
370
+ await beat(page, pauseMs);
371
+ }
372
+ await page.mouse.wheel(0, -320 * scrolls);
373
+ await beat(page, 500);
374
+ if (running && box) running.record({ kind: "read", start, end: running.now(), box });
143
375
  }
144
376
  async function login(page, opts = {}) {
377
+ if (!config.creds) throw new Error("createCinematic: pass creds to sign in");
145
378
  await page.goto(loginPath);
146
379
  if (opts.show === false) {
147
380
  await page.getByTestId(ids.email).fill(config.creds.email);
@@ -158,19 +391,27 @@ function createCinematic(config) {
158
391
  await beat(page, 800);
159
392
  }
160
393
  return {
394
+ take,
161
395
  installStage,
162
396
  cover,
397
+ chapter,
163
398
  uncover,
399
+ lowerThird,
164
400
  caption,
165
401
  clearCaption,
166
402
  beat,
167
403
  glideTo,
168
404
  click,
169
405
  type,
406
+ focusOn,
407
+ readDown,
170
408
  login
171
409
  };
172
410
  }
173
411
 
412
+ exports.TIMECODE_CELL = TIMECODE_CELL;
413
+ exports.Take = Take;
414
+ exports.cinematicSkin = cinematicSkin;
174
415
  exports.createCinematic = createCinematic;
175
416
  //# sourceMappingURL=index.cjs.map
176
417
  //# sourceMappingURL=index.cjs.map