@opencx/widget-react 4.0.61 → 5.0.0-beta.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.
- package/dist/Chart.impl-BnzKZLOH.js +153 -0
- package/dist/Chart.impl-BnzKZLOH.js.map +1 -0
- package/dist/Chart.impl-DOSb1NJk.cjs +2 -0
- package/dist/Chart.impl-DOSb1NJk.cjs.map +1 -0
- package/dist/index-BCiFOCVT.js +11548 -0
- package/dist/index-BCiFOCVT.js.map +1 -0
- package/dist/index-CqbztkwP.cjs +234 -0
- package/dist/index-CqbztkwP.cjs.map +1 -0
- package/dist/index.cjs +1 -50
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -3391
- package/dist/index.js.map +1 -1
- package/dist/package.json.d.ts +82 -0
- package/dist/src/WidgetImperativeHandler.d.ts +1 -0
- package/dist/src/WidgetImperativeHandler.d.ts.map +1 -1
- package/dist/src/WidgetPopoverContent.d.ts.map +1 -1
- package/dist/src/WidgetPopoverTrigger.d.ts.map +1 -1
- package/dist/src/__tests__/motion-contract.spec.d.ts +2 -0
- package/dist/src/__tests__/motion-contract.spec.d.ts.map +1 -0
- package/dist/src/companion/CompanionContent.d.ts +30 -0
- package/dist/src/companion/CompanionContent.d.ts.map +1 -0
- package/dist/src/companion/CompanionFaceIcon.d.ts +15 -0
- package/dist/src/companion/CompanionFaceIcon.d.ts.map +1 -0
- package/dist/src/companion/CompanionFrame.d.ts +19 -0
- package/dist/src/companion/CompanionFrame.d.ts.map +1 -0
- package/dist/src/companion/FrameIconButton.d.ts +15 -0
- package/dist/src/companion/FrameIconButton.d.ts.map +1 -0
- package/dist/src/companion/LayoutPicker.d.ts +7 -0
- package/dist/src/companion/LayoutPicker.d.ts.map +1 -0
- package/dist/src/companion/PanelControls.d.ts +15 -0
- package/dist/src/companion/PanelControls.d.ts.map +1 -0
- package/dist/src/companion/RestingPill.d.ts +14 -0
- package/dist/src/companion/RestingPill.d.ts.map +1 -0
- package/dist/src/companion/SidebarSubmenu.d.ts +21 -0
- package/dist/src/companion/SidebarSubmenu.d.ts.map +1 -0
- package/dist/src/companion/WidgetCompanion.d.ts +3 -0
- package/dist/src/companion/WidgetCompanion.d.ts.map +1 -0
- package/dist/src/companion/__tests__/app-frame.spec.d.ts +2 -0
- package/dist/src/companion/__tests__/app-frame.spec.d.ts.map +1 -0
- package/dist/src/companion/__tests__/companion-dismissal.spec.d.ts +2 -0
- package/dist/src/companion/__tests__/companion-dismissal.spec.d.ts.map +1 -0
- package/dist/src/companion/__tests__/companion-focus.spec.d.ts +2 -0
- package/dist/src/companion/__tests__/companion-focus.spec.d.ts.map +1 -0
- package/dist/src/companion/__tests__/companion-frame.spec.d.ts +2 -0
- package/dist/src/companion/__tests__/companion-frame.spec.d.ts.map +1 -0
- package/dist/src/companion/__tests__/companion-geometry.spec.d.ts +2 -0
- package/dist/src/companion/__tests__/companion-geometry.spec.d.ts.map +1 -0
- package/dist/src/companion/__tests__/companion-keyboard.spec.d.ts +2 -0
- package/dist/src/companion/__tests__/companion-keyboard.spec.d.ts.map +1 -0
- package/dist/src/companion/__tests__/host-scroll-lock.spec.d.ts +2 -0
- package/dist/src/companion/__tests__/host-scroll-lock.spec.d.ts.map +1 -0
- package/dist/src/companion/__tests__/layout-picker.spec.d.ts +2 -0
- package/dist/src/companion/__tests__/layout-picker.spec.d.ts.map +1 -0
- package/dist/src/companion/__tests__/message-styles.spec.d.ts +2 -0
- package/dist/src/companion/__tests__/message-styles.spec.d.ts.map +1 -0
- package/dist/src/companion/__tests__/use-companion-host-effects.spec.d.ts +2 -0
- package/dist/src/companion/__tests__/use-companion-host-effects.spec.d.ts.map +1 -0
- package/dist/src/companion/__tests__/use-companion-measurements.spec.d.ts +2 -0
- package/dist/src/companion/__tests__/use-companion-measurements.spec.d.ts.map +1 -0
- package/dist/src/companion/__tests__/use-host-portal.spec.d.ts +2 -0
- package/dist/src/companion/__tests__/use-host-portal.spec.d.ts.map +1 -0
- package/dist/src/companion/__tests__/use-persisted-pill-drag.spec.d.ts +2 -0
- package/dist/src/companion/__tests__/use-persisted-pill-drag.spec.d.ts.map +1 -0
- package/dist/src/companion/app-frame.d.ts +13 -0
- package/dist/src/companion/app-frame.d.ts.map +1 -0
- package/dist/src/companion/companion-dismissal.d.ts +21 -0
- package/dist/src/companion/companion-dismissal.d.ts.map +1 -0
- package/dist/src/companion/companion-geometry.d.ts +101 -0
- package/dist/src/companion/companion-geometry.d.ts.map +1 -0
- package/dist/src/companion/companion-keyboard.d.ts +43 -0
- package/dist/src/companion/companion-keyboard.d.ts.map +1 -0
- package/dist/src/companion/host-scroll-lock.d.ts +5 -0
- package/dist/src/companion/host-scroll-lock.d.ts.map +1 -0
- package/dist/src/companion/layout-glyphs.d.ts +14 -0
- package/dist/src/companion/layout-glyphs.d.ts.map +1 -0
- package/dist/src/companion/message-styles.d.ts +2 -0
- package/dist/src/companion/message-styles.d.ts.map +1 -0
- package/dist/src/companion/types.d.ts +3 -0
- package/dist/src/companion/types.d.ts.map +1 -0
- package/dist/src/companion/useCompanionHostEffects.d.ts +46 -0
- package/dist/src/companion/useCompanionHostEffects.d.ts.map +1 -0
- package/dist/src/companion/useCompanionMeasurements.d.ts +12 -0
- package/dist/src/companion/useCompanionMeasurements.d.ts.map +1 -0
- package/dist/src/companion/useHostPortal.d.ts +22 -0
- package/dist/src/companion/useHostPortal.d.ts.map +1 -0
- package/dist/src/companion/usePersistedPillDrag.d.ts +29 -0
- package/dist/src/companion/usePersistedPillDrag.d.ts.map +1 -0
- package/dist/src/components/AgentAvatar.d.ts.map +1 -1
- package/dist/src/components/AgentMessageGroup.d.ts +6 -1
- package/dist/src/components/AgentMessageGroup.d.ts.map +1 -1
- package/dist/src/components/ClarificationQuestions.d.ts +17 -0
- package/dist/src/components/ClarificationQuestions.d.ts.map +1 -0
- package/dist/src/components/Dialoger.d.ts.map +1 -1
- package/dist/src/components/FrameDocument.d.ts +31 -0
- package/dist/src/components/FrameDocument.d.ts.map +1 -0
- package/dist/src/components/GroupTimestamp.d.ts.map +1 -1
- package/dist/src/components/Header.d.ts +7 -0
- package/dist/src/components/Header.d.ts.map +1 -1
- package/dist/src/components/MessageActions.d.ts +21 -0
- package/dist/src/components/MessageActions.d.ts.map +1 -0
- package/dist/src/components/RichText.d.ts.map +1 -1
- package/dist/src/components/StepsGroup.d.ts +10 -0
- package/dist/src/components/StepsGroup.d.ts.map +1 -0
- package/dist/src/components/StreamingTurn.d.ts +33 -0
- package/dist/src/components/StreamingTurn.d.ts.map +1 -0
- package/dist/src/components/UserMessage.d.ts.map +1 -1
- package/dist/src/components/ZoomableImage.d.ts +1 -1
- package/dist/src/components/ZoomableImage.d.ts.map +1 -1
- package/dist/src/components/__tests__/clarification-questions.spec.d.ts +2 -0
- package/dist/src/components/__tests__/clarification-questions.spec.d.ts.map +1 -0
- package/dist/src/components/__tests__/dialoger-escape.spec.d.ts +2 -0
- package/dist/src/components/__tests__/dialoger-escape.spec.d.ts.map +1 -0
- package/dist/src/components/__tests__/header-title.spec.d.ts +2 -0
- package/dist/src/components/__tests__/header-title.spec.d.ts.map +1 -0
- package/dist/src/components/__tests__/message-actions.spec.d.ts +2 -0
- package/dist/src/components/__tests__/message-actions.spec.d.ts.map +1 -0
- package/dist/src/components/__tests__/rich-text-sanitize.spec.d.ts +2 -0
- package/dist/src/components/__tests__/rich-text-sanitize.spec.d.ts.map +1 -0
- package/dist/src/components/__tests__/steps-group-collapse.spec.d.ts +2 -0
- package/dist/src/components/__tests__/steps-group-collapse.spec.d.ts.map +1 -0
- package/dist/src/components/__tests__/steps-reasoning-markdown.spec.d.ts +2 -0
- package/dist/src/components/__tests__/steps-reasoning-markdown.spec.d.ts.map +1 -0
- package/dist/src/components/__tests__/steps-tool-io.spec.d.ts +2 -0
- package/dist/src/components/__tests__/steps-tool-io.spec.d.ts.map +1 -0
- package/dist/src/components/__tests__/streaming-turn-customization.spec.d.ts +2 -0
- package/dist/src/components/__tests__/streaming-turn-customization.spec.d.ts.map +1 -0
- package/dist/src/components/__tests__/streaming-turn-working.spec.d.ts +2 -0
- package/dist/src/components/__tests__/streaming-turn-working.spec.d.ts.map +1 -0
- package/dist/src/components/custom-components/AgentMessageDefaultComponent.d.ts.map +1 -1
- package/dist/src/components/custom-components/__tests__/agent-message-spec-history.spec.d.ts +2 -0
- package/dist/src/components/custom-components/__tests__/agent-message-spec-history.spec.d.ts.map +1 -0
- package/dist/src/components/lib/BrailleSpinner.d.ts +10 -0
- package/dist/src/components/lib/BrailleSpinner.d.ts.map +1 -0
- package/dist/src/components/lib/DynamicIcon.d.ts.map +1 -1
- package/dist/src/components/lib/MotionDiv.d.ts.map +1 -1
- package/dist/src/components/lib/MotionDiv__VerticalReveal.d.ts.map +1 -1
- package/dist/src/components/lib/badge.d.ts +1 -1
- package/dist/src/components/lib/button.d.ts +2 -2
- package/dist/src/components/lib/input.d.ts.map +1 -1
- package/dist/src/components/lib/tooltip.d.ts +18 -2
- package/dist/src/components/lib/tooltip.d.ts.map +1 -1
- package/dist/src/hooks/useCanHover.d.ts +8 -0
- package/dist/src/hooks/useCanHover.d.ts.map +1 -0
- package/dist/src/hooks/useTheme.d.ts +17 -2
- package/dist/src/hooks/useTheme.d.ts.map +1 -1
- package/dist/src/hooks/useTranslation.d.ts +3 -2
- package/dist/src/hooks/useTranslation.d.ts.map +1 -1
- package/dist/src/hooks/useTriggerLabel.d.ts +6 -0
- package/dist/src/hooks/useTriggerLabel.d.ts.map +1 -0
- package/dist/src/index.d.ts +12 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/json-render/Chart.d.ts +4 -0
- package/dist/src/json-render/Chart.d.ts.map +1 -0
- package/dist/src/json-render/Chart.impl.d.ts +4 -0
- package/dist/src/json-render/Chart.impl.d.ts.map +1 -0
- package/dist/src/json-render/JsonRenderErrorBoundary.d.ts +27 -0
- package/dist/src/json-render/JsonRenderErrorBoundary.d.ts.map +1 -0
- package/dist/src/json-render/SpecRenderer.d.ts +28 -0
- package/dist/src/json-render/SpecRenderer.d.ts.map +1 -0
- package/dist/src/json-render/__tests__/catalog.spec.d.ts +2 -0
- package/dist/src/json-render/__tests__/catalog.spec.d.ts.map +1 -0
- package/dist/src/json-render/__tests__/chart.spec.d.ts +2 -0
- package/dist/src/json-render/__tests__/chart.spec.d.ts.map +1 -0
- package/dist/src/json-render/__tests__/json-render-error-boundary.spec.d.ts +2 -0
- package/dist/src/json-render/__tests__/json-render-error-boundary.spec.d.ts.map +1 -0
- package/dist/src/json-render/__tests__/normalize-spec.spec.d.ts +2 -0
- package/dist/src/json-render/__tests__/normalize-spec.spec.d.ts.map +1 -0
- package/dist/src/json-render/__tests__/phone-agent-card.spec.d.ts +2 -0
- package/dist/src/json-render/__tests__/phone-agent-card.spec.d.ts.map +1 -0
- package/dist/src/json-render/__tests__/props.spec.d.ts +2 -0
- package/dist/src/json-render/__tests__/props.spec.d.ts.map +1 -0
- package/dist/src/json-render/__tests__/segment-content.spec.d.ts +2 -0
- package/dist/src/json-render/__tests__/segment-content.spec.d.ts.map +1 -0
- package/dist/src/json-render/__tests__/spec-renderer.spec.d.ts +2 -0
- package/dist/src/json-render/__tests__/spec-renderer.spec.d.ts.map +1 -0
- package/dist/src/json-render/catalog.d.ts +260 -0
- package/dist/src/json-render/catalog.d.ts.map +1 -0
- package/dist/src/json-render/host.d.ts +27 -0
- package/dist/src/json-render/host.d.ts.map +1 -0
- package/dist/src/json-render/index.d.ts +12 -0
- package/dist/src/json-render/index.d.ts.map +1 -0
- package/dist/src/json-render/normalize-spec.d.ts +22 -0
- package/dist/src/json-render/normalize-spec.d.ts.map +1 -0
- package/dist/src/json-render/props.d.ts +207 -0
- package/dist/src/json-render/props.d.ts.map +1 -0
- package/dist/src/json-render/registry.d.ts +5 -0
- package/dist/src/json-render/registry.d.ts.map +1 -0
- package/dist/src/json-render/segment-content.d.ts +25 -0
- package/dist/src/json-render/segment-content.d.ts.map +1 -0
- package/dist/src/json-render/ui-prompt.d.ts +22 -0
- package/dist/src/json-render/ui-prompt.d.ts.map +1 -0
- package/dist/src/motion.d.ts +55 -0
- package/dist/src/motion.d.ts.map +1 -0
- package/dist/src/page-context/PageContextPill.d.ts +17 -0
- package/dist/src/page-context/PageContextPill.d.ts.map +1 -0
- package/dist/src/page-context/usePageEntity.d.ts +15 -0
- package/dist/src/page-context/usePageEntity.d.ts.map +1 -0
- package/dist/src/page-marks/MarkThumbnail.d.ts +19 -0
- package/dist/src/page-marks/MarkThumbnail.d.ts.map +1 -0
- package/dist/src/page-marks/PageMarkOverlay.d.ts +23 -0
- package/dist/src/page-marks/PageMarkOverlay.d.ts.map +1 -0
- package/dist/src/page-marks/PageMarkPill.d.ts +16 -0
- package/dist/src/page-marks/PageMarkPill.d.ts.map +1 -0
- package/dist/src/page-marks/PageMarksProvider.d.ts +21 -0
- package/dist/src/page-marks/PageMarksProvider.d.ts.map +1 -0
- package/dist/src/page-marks/SentMarkChip.d.ts +15 -0
- package/dist/src/page-marks/SentMarkChip.d.ts.map +1 -0
- package/dist/src/page-marks/__tests__/agent-mark.spec.d.ts +2 -0
- package/dist/src/page-marks/__tests__/agent-mark.spec.d.ts.map +1 -0
- package/dist/src/page-marks/__tests__/mark-snapshot-upload.spec.d.ts +2 -0
- package/dist/src/page-marks/__tests__/mark-snapshot-upload.spec.d.ts.map +1 -0
- package/dist/src/page-marks/__tests__/page-element-name.spec.d.ts +2 -0
- package/dist/src/page-marks/__tests__/page-element-name.spec.d.ts.map +1 -0
- package/dist/src/page-marks/__tests__/page-element.spec.d.ts +2 -0
- package/dist/src/page-marks/__tests__/page-element.spec.d.ts.map +1 -0
- package/dist/src/page-marks/__tests__/page-mark-pill.spec.d.ts +2 -0
- package/dist/src/page-marks/__tests__/page-mark-pill.spec.d.ts.map +1 -0
- package/dist/src/page-marks/__tests__/page-mark-theme.spec.d.ts +2 -0
- package/dist/src/page-marks/__tests__/page-mark-theme.spec.d.ts.map +1 -0
- package/dist/src/page-marks/__tests__/page-mark-tile.spec.d.ts +2 -0
- package/dist/src/page-marks/__tests__/page-mark-tile.spec.d.ts.map +1 -0
- package/dist/src/page-marks/__tests__/page-marks-provider.spec.d.ts +2 -0
- package/dist/src/page-marks/__tests__/page-marks-provider.spec.d.ts.map +1 -0
- package/dist/src/page-marks/__tests__/picked-elements.spec.d.ts +2 -0
- package/dist/src/page-marks/__tests__/picked-elements.spec.d.ts.map +1 -0
- package/dist/src/page-marks/__tests__/sent-mark-chip.spec.d.ts +2 -0
- package/dist/src/page-marks/__tests__/sent-mark-chip.spec.d.ts.map +1 -0
- package/dist/src/page-marks/__tests__/use-page-marking.spec.d.ts +2 -0
- package/dist/src/page-marks/__tests__/use-page-marking.spec.d.ts.map +1 -0
- package/dist/src/page-marks/agent-mark.d.ts +37 -0
- package/dist/src/page-marks/agent-mark.d.ts.map +1 -0
- package/dist/src/page-marks/mark-thumbnail.d.ts +25 -0
- package/dist/src/page-marks/mark-thumbnail.d.ts.map +1 -0
- package/dist/src/page-marks/page-element.d.ts +89 -0
- package/dist/src/page-marks/page-element.d.ts.map +1 -0
- package/dist/src/page-marks/page-mark-theme.d.ts +30 -0
- package/dist/src/page-marks/page-mark-theme.d.ts.map +1 -0
- package/dist/src/page-marks/page-mark.d.ts +103 -0
- package/dist/src/page-marks/page-mark.d.ts.map +1 -0
- package/dist/src/page-marks/useMarkThumbnail.d.ts +8 -0
- package/dist/src/page-marks/useMarkThumbnail.d.ts.map +1 -0
- package/dist/src/page-marks/usePageMarking.d.ts +53 -0
- package/dist/src/page-marks/usePageMarking.d.ts.map +1 -0
- package/dist/src/screens/chat/ChatCanvas.d.ts.map +1 -1
- package/dist/src/screens/chat/ChatFooter.d.ts.map +1 -1
- package/dist/src/screens/chat/ChatFooterItems.d.ts.map +1 -1
- package/dist/src/screens/chat/ChatInput.d.ts +27 -0
- package/dist/src/screens/chat/ChatInput.d.ts.map +1 -0
- package/dist/src/screens/chat/ChatMain.d.ts.map +1 -1
- package/dist/src/screens/chat/DictationMicButton.d.ts +18 -0
- package/dist/src/screens/chat/DictationMicButton.d.ts.map +1 -0
- package/dist/src/screens/chat/InitialMessages.d.ts +7 -1
- package/dist/src/screens/chat/InitialMessages.d.ts.map +1 -1
- package/dist/src/screens/chat/MentionPicker.d.ts +39 -0
- package/dist/src/screens/chat/MentionPicker.d.ts.map +1 -0
- package/dist/src/screens/chat/MentionText.d.ts +16 -0
- package/dist/src/screens/chat/MentionText.d.ts.map +1 -0
- package/dist/src/screens/chat/MessageGroups.d.ts +12 -0
- package/dist/src/screens/chat/MessageGroups.d.ts.map +1 -0
- package/dist/src/screens/chat/UploadPreview.d.ts +23 -0
- package/dist/src/screens/chat/UploadPreview.d.ts.map +1 -0
- package/dist/src/screens/chat/__tests__/chat-input-clarification.spec.d.ts +2 -0
- package/dist/src/screens/chat/__tests__/chat-input-clarification.spec.d.ts.map +1 -0
- package/dist/src/screens/chat/__tests__/chatInput.spec.d.ts +2 -0
- package/dist/src/screens/chat/__tests__/chatInput.spec.d.ts.map +1 -0
- package/dist/src/screens/chat/__tests__/use-mentions.spec.d.ts +2 -0
- package/dist/src/screens/chat/__tests__/use-mentions.spec.d.ts.map +1 -0
- package/dist/src/screens/chat/__tests__/useSentTextRecall.spec.d.ts +2 -0
- package/dist/src/screens/chat/__tests__/useSentTextRecall.spec.d.ts.map +1 -0
- package/dist/src/screens/chat/agent/AgentChatMain.d.ts +16 -0
- package/dist/src/screens/chat/agent/AgentChatMain.d.ts.map +1 -0
- package/dist/src/screens/chat/agent/AgentChatPageEffects.d.ts +9 -0
- package/dist/src/screens/chat/agent/AgentChatPageEffects.d.ts.map +1 -0
- package/dist/src/screens/chat/agent/QueuedSendsPill.d.ts +18 -0
- package/dist/src/screens/chat/agent/QueuedSendsPill.d.ts.map +1 -0
- package/dist/src/screens/chat/agent/__tests__/agent-chat-main.promotion.spec.d.ts +2 -0
- package/dist/src/screens/chat/agent/__tests__/agent-chat-main.promotion.spec.d.ts.map +1 -0
- package/dist/src/screens/chat/agent/__tests__/agent-chat-page-effects.spec.d.ts +2 -0
- package/dist/src/screens/chat/agent/__tests__/agent-chat-page-effects.spec.d.ts.map +1 -0
- package/dist/src/screens/chat/agent/__tests__/scroll-follow.utils.spec.d.ts +2 -0
- package/dist/src/screens/chat/agent/__tests__/scroll-follow.utils.spec.d.ts.map +1 -0
- package/dist/src/screens/chat/agent/__tests__/useStreamFollow.spec.d.ts +2 -0
- package/dist/src/screens/chat/agent/__tests__/useStreamFollow.spec.d.ts.map +1 -0
- package/dist/src/screens/chat/agent/scroll-follow.utils.d.ts +17 -0
- package/dist/src/screens/chat/agent/scroll-follow.utils.d.ts.map +1 -0
- package/dist/src/screens/chat/agent/useStreamFollow.d.ts +23 -0
- package/dist/src/screens/chat/agent/useStreamFollow.d.ts.map +1 -0
- package/dist/src/screens/chat/caret-position.d.ts +19 -0
- package/dist/src/screens/chat/caret-position.d.ts.map +1 -0
- package/dist/src/screens/chat/composer-styles.d.ts +21 -0
- package/dist/src/screens/chat/composer-styles.d.ts.map +1 -0
- package/dist/src/screens/chat/index.d.ts.map +1 -1
- package/dist/src/screens/chat/useMentions.d.ts +60 -0
- package/dist/src/screens/chat/useMentions.d.ts.map +1 -0
- package/dist/src/screens/chat/usePageMarkComposer.d.ts +25 -0
- package/dist/src/screens/chat/usePageMarkComposer.d.ts.map +1 -0
- package/dist/src/screens/chat/useSentTextRecall.d.ts +29 -0
- package/dist/src/screens/chat/useSentTextRecall.d.ts.map +1 -0
- package/dist/src/screens/sessions/index.d.ts.map +1 -1
- package/dist/src/utils/__tests__/keybindings.spec.d.ts +2 -0
- package/dist/src/utils/__tests__/keybindings.spec.d.ts.map +1 -0
- package/dist/src/utils/__tests__/strip-citation-refs.spec.d.ts +2 -0
- package/dist/src/utils/__tests__/strip-citation-refs.spec.d.ts.map +1 -0
- package/dist/src/utils/__tests__/strip-inline-markdown.spec.d.ts +2 -0
- package/dist/src/utils/__tests__/strip-inline-markdown.spec.d.ts.map +1 -0
- package/dist/src/utils/group-messages-by-type.d.ts +1 -2
- package/dist/src/utils/group-messages-by-type.d.ts.map +1 -1
- package/dist/src/utils/keybindings.d.ts +24 -0
- package/dist/src/utils/keybindings.d.ts.map +1 -0
- package/dist/src/utils/render-custom-trigger.d.ts +11 -0
- package/dist/src/utils/render-custom-trigger.d.ts.map +1 -0
- package/dist/src/utils/strip-citation-refs.d.ts +10 -0
- package/dist/src/utils/strip-citation-refs.d.ts.map +1 -0
- package/dist/src/utils/strip-inline-markdown.d.ts +14 -0
- package/dist/src/utils/strip-inline-markdown.d.ts.map +1 -0
- package/package.json +16 -6
- package/dist/src/components/lib/dropdown-menu.d.ts +0 -28
- package/dist/src/components/lib/dropdown-menu.d.ts.map +0 -1
- package/dist/src/components/lib/popover.d.ts +0 -9
- package/dist/src/components/lib/popover.d.ts.map +0 -1
- package/dist/src/components/lib/switch.d.ts +0 -5
- package/dist/src/components/lib/switch.d.ts.map +0 -1
- package/dist/src/screens/chat/AdvancedInitialMessages.d.ts +0 -3
- package/dist/src/screens/chat/AdvancedInitialMessages.d.ts.map +0 -1
|
@@ -1,11 +1,27 @@
|
|
|
1
1
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
declare const TooltipProvider: React.FC<TooltipPrimitive.TooltipProviderProps>;
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
|
+
* Silences every tooltip rendered inside. Companion's quick-ask bar wraps the
|
|
6
|
+
* composer in it: the shell clips that composer to a thin strip, so a
|
|
7
|
+
* `side="top"` tooltip bleeds above the bar as a dark sliver. Stated once for
|
|
8
|
+
* the whole subtree, so no control inside has to be told individually.
|
|
9
|
+
*/
|
|
10
|
+
declare function SuppressTooltips({ children }: {
|
|
11
|
+
children: React.ReactNode;
|
|
12
|
+
}): React.JSX.Element;
|
|
13
|
+
declare function Tooltippy({ children, content, side, align, shortcut, }: {
|
|
5
14
|
children: React.ReactNode;
|
|
6
15
|
content: React.ReactNode;
|
|
7
16
|
side?: TooltipPrimitive.TooltipContentProps['side'];
|
|
8
17
|
align?: TooltipPrimitive.TooltipContentProps['align'];
|
|
18
|
+
/**
|
|
19
|
+
* Display form of the action's keyboard shortcut (e.g. "⌘⇧F", "Esc"),
|
|
20
|
+
* rendered as a fainter chip after the label. Always produce it with
|
|
21
|
+
* `formatBinding(WIDGET_KEYBINDINGS[action])` so the hint can never drift
|
|
22
|
+
* from the binding the handler actually matches.
|
|
23
|
+
*/
|
|
24
|
+
shortcut?: string;
|
|
9
25
|
}): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | React.JSX.Element | null | undefined;
|
|
10
|
-
export { TooltipProvider, Tooltippy };
|
|
26
|
+
export { TooltipProvider, Tooltippy, SuppressTooltips };
|
|
11
27
|
//# sourceMappingURL=tooltip.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../../../src/components/lib/tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,QAAA,MAAM,eAAe,iDAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../../../src/components/lib/tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,QAAA,MAAM,eAAe,iDAA4B,CAAC;AAyBlD;;;;;GAKG;AACH,iBAAS,gBAAgB,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,qBAIpE;AAED,iBAAS,SAAS,CAAC,EACjB,QAAQ,EACR,OAAO,EACP,IAAI,EACJ,KAAK,EACL,QAAQ,GACT,EAAE;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,IAAI,CAAC,EAAE,gBAAgB,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC;IACpD,KAAK,CAAC,EAAE,gBAAgB,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC;IACtD;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,mSAsBA;AAED,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether the visitor's primary input can hover. Hover-driven motion (pill
|
|
3
|
+
* label reveal, submenu on hover) is gated off coarse pointers, where a tap
|
|
4
|
+
* fires the hover events first and reads as a phantom wiggle before every
|
|
5
|
+
* open. Detected once: an input modality does not change mid-session.
|
|
6
|
+
*/
|
|
7
|
+
export declare function useCanHover(): boolean;
|
|
8
|
+
//# sourceMappingURL=useCanHover.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCanHover.d.ts","sourceRoot":"","sources":["../../../src/hooks/useCanHover.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,wBAAgB,WAAW,IAAI,OAAO,CAOrC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { CSSProperties } from 'react';
|
|
2
1
|
/**
|
|
3
2
|
* @returns The widget config theme with fallback default value
|
|
4
3
|
*/
|
|
@@ -60,6 +59,22 @@ export declare function useTheme(): {
|
|
|
60
59
|
minHeight: string;
|
|
61
60
|
minWidth: string;
|
|
62
61
|
};
|
|
63
|
-
cssVars:
|
|
62
|
+
cssVars: {
|
|
63
|
+
'--opencx-primary': string;
|
|
64
|
+
'--opencx-primary-foreground': string;
|
|
65
|
+
'--opencx-background': string;
|
|
66
|
+
'--opencx-foreground': string;
|
|
67
|
+
'--opencx-destructive': string;
|
|
68
|
+
'--opencx-destructive-foreground': string;
|
|
69
|
+
'--opencx-accent': string;
|
|
70
|
+
'--opencx-accent-foreground': string;
|
|
71
|
+
'--opencx-secondary': string;
|
|
72
|
+
'--opencx-secondary-foreground': string;
|
|
73
|
+
'--opencx-muted': string;
|
|
74
|
+
'--opencx-muted-foreground': string;
|
|
75
|
+
'--opencx-input': string;
|
|
76
|
+
'--opencx-border': string;
|
|
77
|
+
'--opencx-ring': string;
|
|
78
|
+
};
|
|
64
79
|
};
|
|
65
80
|
//# sourceMappingURL=useTheme.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTheme.d.ts","sourceRoot":"","sources":["../../../src/hooks/useTheme.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useTheme.d.ts","sourceRoot":"","sources":["../../../src/hooks/useTheme.ts"],"names":[],"mappings":"AAoBA;;GAEG;AACH,wBAAgB,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqKvB"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { TranslationKeyU } from '@opencx/widget-core';
|
|
2
|
+
export type Translate = (key: TranslationKeyU, params?: Record<string, string | number>) => string;
|
|
2
3
|
export declare function useTranslation(): {
|
|
3
|
-
t:
|
|
4
|
-
language: "
|
|
4
|
+
t: Translate;
|
|
5
|
+
language: "ar" | "bn" | "bg" | "cs" | "da" | "de" | "el" | "en" | "es" | "et" | "fi" | "fil" | "fr" | "hi" | "hr" | "hu" | "is" | "it" | "ja" | "ko" | "lb" | "lt" | "lv" | "mt" | "nb" | "nl" | "no" | "pl" | "pt" | "ro" | "ru" | "sk" | "sv" | "th" | "tr" | "ur" | "vi" | "zh-cn";
|
|
5
6
|
dir: string;
|
|
6
7
|
hostDocumentDir: import('@opencx/widget-core').StringOrLiteral<"ltr" | "rtl">;
|
|
7
8
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTranslation.d.ts","sourceRoot":"","sources":["../../../src/hooks/useTranslation.ts"],"names":[],"mappings":"AAEA,OAAO,EAIL,KAAK,eAAe,EACrB,MAAM,qBAAqB,CAAC;AAE7B,wBAAgB,cAAc
|
|
1
|
+
{"version":3,"file":"useTranslation.d.ts","sourceRoot":"","sources":["../../../src/hooks/useTranslation.ts"],"names":[],"mappings":"AAEA,OAAO,EAIL,KAAK,eAAe,EACrB,MAAM,qBAAqB,CAAC;AAE7B,MAAM,MAAM,SAAS,GAAG,CACtB,GAAG,EAAE,eAAe,EACpB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,KACrC,MAAM,CAAC;AAEZ,wBAAgB,cAAc;;;;;EAe7B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTriggerLabel.d.ts","sourceRoot":"","sources":["../../../src/hooks/useTriggerLabel.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,wBAAgB,eAAe,IAAI,MAAM,CAGxC"}
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,12 +1,23 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { WidgetConfig } from '@opencx/widget-core';
|
|
3
3
|
import { WidgetComponentType } from '@opencx/widget-react-headless';
|
|
4
|
+
import { StreamingSpecComponentProps } from './components/StreamingTurn';
|
|
5
|
+
import { StreamingStepsComponentProps } from './components/StepsGroup';
|
|
6
|
+
import { ClarificationQuestionsProps } from './components/ClarificationQuestions';
|
|
4
7
|
import { WidgetRef } from './WidgetImperativeHandler';
|
|
5
8
|
declare const Widget: React.ForwardRefExoticComponent<{
|
|
6
9
|
options: WidgetConfig;
|
|
7
10
|
components?: WidgetComponentType[];
|
|
8
11
|
loadingComponent?: React.ReactNode;
|
|
12
|
+
errorComponent?: (error: Error) => React.ReactNode;
|
|
9
13
|
} & React.RefAttributes<WidgetRef>>;
|
|
10
14
|
export { Widget };
|
|
11
|
-
|
|
15
|
+
/**
|
|
16
|
+
* The agent's inline UI, for a host page that shows widget transcripts
|
|
17
|
+
* outside the widget (the OpenCX inbox): the same catalog, renderer, and
|
|
18
|
+
* fence parser the widget uses, so what the agent reads is what the customer
|
|
19
|
+
* saw.
|
|
20
|
+
*/
|
|
21
|
+
export { HostedSpecRenderer, segmentContent, type ContentSegment, } from './json-render';
|
|
22
|
+
export type { ClarificationQuestionsProps, StreamingSpecComponentProps, StreamingStepsComponentProps, WidgetRef, };
|
|
12
23
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAGV,YAAY,EACb,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAML,KAAK,mBAAmB,EACzB,MAAM,+BAA+B,CAAC;AAUvC,OAAO,EAEL,KAAK,2BAA2B,EACjC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAEL,KAAK,4BAA4B,EAClC,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAEL,KAAK,2BAA2B,EACjC,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAEL,KAAK,SAAS,EACf,MAAM,2BAA2B,CAAC;AA6EnC,QAAA,MAAM,MAAM;aAGC,YAAY;iBACR,mBAAmB,EAAE;uBACf,KAAK,CAAC,SAAS;qBACjB,CAAC,KAAK,EAAE,KAAK,KAAK,KAAK,CAAC,SAAS;mCA8BpD,CAAC;AAGH,OAAO,EAAE,MAAM,EAAE,CAAC;AAClB;;;;;GAKG;AACH,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,KAAK,cAAc,GACpB,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,2BAA2B,EAC3B,2BAA2B,EAC3B,4BAA4B,EAC5B,SAAS,GACV,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Chart.d.ts","sourceRoot":"","sources":["../../../src/json-render/Chart.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAgB1C,wBAAgB,KAAK,CAAC,KAAK,EAAE,UAAU,qBAOtC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Chart.impl.d.ts","sourceRoot":"","sources":["../../../src/json-render/Chart.impl.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAgB1B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAuD1C,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAChC,IAAI,EACJ,IAAI,EACJ,MAAM,EACN,WAAW,GACZ,EAAE,UAAU,qBAsGZ"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Last-resort guard around a rendered spec. json-render validates props at the
|
|
4
|
+
* registry boundary (`parseProps`), but a genuinely broken tree (e.g. a cyclic
|
|
5
|
+
* `children` ref) could still throw during render — this keeps that from taking
|
|
6
|
+
* down the whole chat transcript. On error we render nothing (the prose in the
|
|
7
|
+
* same message still shows) and log once for diagnosis.
|
|
8
|
+
*/
|
|
9
|
+
export declare class JsonRenderErrorBoundary extends React.Component<{
|
|
10
|
+
children: React.ReactNode;
|
|
11
|
+
resetKey: unknown;
|
|
12
|
+
}, {
|
|
13
|
+
hasError: boolean;
|
|
14
|
+
}> {
|
|
15
|
+
state: {
|
|
16
|
+
hasError: boolean;
|
|
17
|
+
};
|
|
18
|
+
static getDerivedStateFromError(): {
|
|
19
|
+
hasError: boolean;
|
|
20
|
+
};
|
|
21
|
+
componentDidCatch(error: unknown): void;
|
|
22
|
+
componentDidUpdate(prevProps: Readonly<{
|
|
23
|
+
resetKey: unknown;
|
|
24
|
+
}>): void;
|
|
25
|
+
render(): React.ReactNode;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=JsonRenderErrorBoundary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"JsonRenderErrorBoundary.d.ts","sourceRoot":"","sources":["../../../src/json-render/JsonRenderErrorBoundary.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B;;;;;;GAMG;AACH,qBAAa,uBAAwB,SAAQ,KAAK,CAAC,SAAS,CAC1D;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAA;CAAE,EAChD;IAAE,QAAQ,EAAE,OAAO,CAAA;CAAE,CACtB;IACU,KAAK;;MAAuB;IAErC,MAAM,CAAC,wBAAwB;;;IAItB,iBAAiB,CAAC,KAAK,EAAE,OAAO;IAMhC,kBAAkB,CAAC,SAAS,EAAE,QAAQ,CAAC;QAAE,QAAQ,EAAE,OAAO,CAAA;KAAE,CAAC;IAS7D,MAAM;CAIhB"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Spec } from '@json-render/core';
|
|
2
|
+
import { WidgetUiAction } from '@opencx/widget-core';
|
|
3
|
+
import { default as React } from 'react';
|
|
4
|
+
/**
|
|
5
|
+
* The single seam every json-render spec funnels through — both the live
|
|
6
|
+
* streamed turn and persisted (fence-parsed) history go through here, so both
|
|
7
|
+
* get the same recovery + defenses.
|
|
8
|
+
*
|
|
9
|
+
* Applies leaf-`repeat` recovery, guards empty/partial specs, and renders under
|
|
10
|
+
* a per-spec state provider (so `{ "$state": "/path" }` refs resolve against
|
|
11
|
+
* THIS spec's own state) wrapped in an error boundary.
|
|
12
|
+
*/
|
|
13
|
+
export declare function SpecRenderer({ spec }: {
|
|
14
|
+
spec: Spec | null;
|
|
15
|
+
}): React.JSX.Element;
|
|
16
|
+
/**
|
|
17
|
+
* The same renderer for a page that is not the widget but shows what the
|
|
18
|
+
* widget showed — the OpenCX inbox. The host supplies what the widget would
|
|
19
|
+
* have read from its config; nothing else about rendering differs, so a
|
|
20
|
+
* customer and the agent reading their session see one and the same card.
|
|
21
|
+
*/
|
|
22
|
+
export declare function HostedSpecRenderer({ spec, language, onUiAction, anchorTarget, }: {
|
|
23
|
+
spec: Spec | null;
|
|
24
|
+
language?: string;
|
|
25
|
+
onUiAction?: (action: WidgetUiAction) => void;
|
|
26
|
+
anchorTarget?: string;
|
|
27
|
+
}): React.JSX.Element;
|
|
28
|
+
//# sourceMappingURL=SpecRenderer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SpecRenderer.d.ts","sourceRoot":"","sources":["../../../src/json-render/SpecRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAE9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,OAAO,KAAkB,MAAM,OAAO,CAAC;AAWvC;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,IAAI,GAAG,IAAI,CAAA;CAAE,qBAQ3D;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,IAAI,EACJ,QAAQ,EACR,UAAU,EACV,YAAY,GACb,EAAE;IACD,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,cAAc,KAAK,IAAI,CAAC;IAC9C,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,qBAGA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog.spec.d.ts","sourceRoot":"","sources":["../../../../src/json-render/__tests__/catalog.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chart.spec.d.ts","sourceRoot":"","sources":["../../../../src/json-render/__tests__/chart.spec.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"json-render-error-boundary.spec.d.ts","sourceRoot":"","sources":["../../../../src/json-render/__tests__/json-render-error-boundary.spec.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalize-spec.spec.d.ts","sourceRoot":"","sources":["../../../../src/json-render/__tests__/normalize-spec.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"phone-agent-card.spec.d.ts","sourceRoot":"","sources":["../../../../src/json-render/__tests__/phone-agent-card.spec.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"props.spec.d.ts","sourceRoot":"","sources":["../../../../src/json-render/__tests__/props.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"segment-content.spec.d.ts","sourceRoot":"","sources":["../../../../src/json-render/__tests__/segment-content.spec.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spec-renderer.spec.d.ts","sourceRoot":"","sources":["../../../../src/json-render/__tests__/spec-renderer.spec.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The widget's json-render catalog — the closed set of components the agent may
|
|
3
|
+
* emit. It is the single source of truth in two directions: `registry.tsx`
|
|
4
|
+
* binds each name to a React renderer, and the backend prompt is generated from
|
|
5
|
+
* this same catalog (see `ui-prompt.ts`, codegen-only — never imported by the
|
|
6
|
+
* shipped widget), so the model can never emit a component the widget can't
|
|
7
|
+
* render.
|
|
8
|
+
*
|
|
9
|
+
* Kept deliberately small and embed-light (no per-org customization in v1):
|
|
10
|
+
* layout primitives + list / table / metric / callout / chart. `description`
|
|
11
|
+
* and `example` are the model's only guidance — they steer generation, so keep
|
|
12
|
+
* them tight.
|
|
13
|
+
*/
|
|
14
|
+
export declare const widgetCatalog: import('@json-render/core').Catalog<{
|
|
15
|
+
spec: import('@json-render/core').SchemaType<"object", {
|
|
16
|
+
root: import('@json-render/core').SchemaType<"string", unknown>;
|
|
17
|
+
elements: import('@json-render/core').SchemaType<"record", import('@json-render/core').SchemaType<"object", {
|
|
18
|
+
type: import('@json-render/core').SchemaType<"ref", string>;
|
|
19
|
+
props: import('@json-render/core').SchemaType<"propsOf", string>;
|
|
20
|
+
children: import('@json-render/core').SchemaType<"array", import('@json-render/core').SchemaType<"string", unknown>>;
|
|
21
|
+
visible: import('@json-render/core').SchemaType<"any", unknown>;
|
|
22
|
+
}>>;
|
|
23
|
+
}>;
|
|
24
|
+
catalog: import('@json-render/core').SchemaType<"object", {
|
|
25
|
+
components: import('@json-render/core').SchemaType<"map", {
|
|
26
|
+
props: import('@json-render/core').SchemaType<"zod", unknown>;
|
|
27
|
+
slots: import('@json-render/core').SchemaType<"array", import('@json-render/core').SchemaType<"string", unknown>>;
|
|
28
|
+
description: import('@json-render/core').SchemaType<"string", unknown>;
|
|
29
|
+
example: import('@json-render/core').SchemaType<"any", unknown>;
|
|
30
|
+
}>;
|
|
31
|
+
actions: import('@json-render/core').SchemaType<"map", {
|
|
32
|
+
params: import('@json-render/core').SchemaType<"zod", unknown>;
|
|
33
|
+
description: import('@json-render/core').SchemaType<"string", unknown>;
|
|
34
|
+
}>;
|
|
35
|
+
}>;
|
|
36
|
+
}, {
|
|
37
|
+
components: {
|
|
38
|
+
Card: {
|
|
39
|
+
props: import('zod').ZodObject<{
|
|
40
|
+
title: import('zod').ZodOptional<import('zod').ZodNullable<import('zod').ZodString>>;
|
|
41
|
+
description: import('zod').ZodOptional<import('zod').ZodNullable<import('zod').ZodString>>;
|
|
42
|
+
}, import('zod/v4/core').$strip>;
|
|
43
|
+
slots: string[];
|
|
44
|
+
description: string;
|
|
45
|
+
example: {
|
|
46
|
+
title: string;
|
|
47
|
+
description: string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
Stack: {
|
|
51
|
+
props: import('zod').ZodObject<{
|
|
52
|
+
direction: import('zod').ZodOptional<import('zod').ZodNullable<import('zod').ZodEnum<{
|
|
53
|
+
row: "row";
|
|
54
|
+
column: "column";
|
|
55
|
+
}>>>;
|
|
56
|
+
gap: import('zod').ZodOptional<import('zod').ZodNullable<import('zod').ZodEnum<{
|
|
57
|
+
sm: "sm";
|
|
58
|
+
md: "md";
|
|
59
|
+
lg: "lg";
|
|
60
|
+
}>>>;
|
|
61
|
+
align: import('zod').ZodOptional<import('zod').ZodNullable<import('zod').ZodEnum<{
|
|
62
|
+
center: "center";
|
|
63
|
+
start: "start";
|
|
64
|
+
end: "end";
|
|
65
|
+
stretch: "stretch";
|
|
66
|
+
}>>>;
|
|
67
|
+
justify: import('zod').ZodOptional<import('zod').ZodNullable<import('zod').ZodEnum<{
|
|
68
|
+
center: "center";
|
|
69
|
+
start: "start";
|
|
70
|
+
end: "end";
|
|
71
|
+
between: "between";
|
|
72
|
+
}>>>;
|
|
73
|
+
}, import('zod/v4/core').$strip>;
|
|
74
|
+
slots: string[];
|
|
75
|
+
description: string;
|
|
76
|
+
};
|
|
77
|
+
Grid: {
|
|
78
|
+
props: import('zod').ZodObject<{
|
|
79
|
+
columns: import('zod').ZodOptional<import('zod').ZodNullable<import('zod').ZodUnion<readonly [import('zod').ZodLiteral<1>, import('zod').ZodLiteral<2>, import('zod').ZodLiteral<3>]>>>;
|
|
80
|
+
gap: import('zod').ZodOptional<import('zod').ZodNullable<import('zod').ZodEnum<{
|
|
81
|
+
sm: "sm";
|
|
82
|
+
md: "md";
|
|
83
|
+
lg: "lg";
|
|
84
|
+
}>>>;
|
|
85
|
+
}, import('zod/v4/core').$strip>;
|
|
86
|
+
slots: string[];
|
|
87
|
+
description: string;
|
|
88
|
+
};
|
|
89
|
+
Heading: {
|
|
90
|
+
props: import('zod').ZodObject<{
|
|
91
|
+
text: import('zod').ZodString;
|
|
92
|
+
level: import('zod').ZodOptional<import('zod').ZodNullable<import('zod').ZodUnion<readonly [import('zod').ZodLiteral<1>, import('zod').ZodLiteral<2>, import('zod').ZodLiteral<3>, import('zod').ZodLiteral<4>]>>>;
|
|
93
|
+
}, import('zod/v4/core').$strip>;
|
|
94
|
+
description: string;
|
|
95
|
+
example: {
|
|
96
|
+
text: string;
|
|
97
|
+
level: number;
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
Text: {
|
|
101
|
+
props: import('zod').ZodObject<{
|
|
102
|
+
text: import('zod').ZodString;
|
|
103
|
+
variant: import('zod').ZodOptional<import('zod').ZodNullable<import('zod').ZodEnum<{
|
|
104
|
+
body: "body";
|
|
105
|
+
caption: "caption";
|
|
106
|
+
code: "code";
|
|
107
|
+
muted: "muted";
|
|
108
|
+
}>>>;
|
|
109
|
+
}, import('zod/v4/core').$strip>;
|
|
110
|
+
description: string;
|
|
111
|
+
};
|
|
112
|
+
Badge: {
|
|
113
|
+
props: import('zod').ZodObject<{
|
|
114
|
+
text: import('zod').ZodString;
|
|
115
|
+
variant: import('zod').ZodOptional<import('zod').ZodNullable<import('zod').ZodEnum<{
|
|
116
|
+
success: "success";
|
|
117
|
+
default: "default";
|
|
118
|
+
secondary: "secondary";
|
|
119
|
+
warning: "warning";
|
|
120
|
+
destructive: "destructive";
|
|
121
|
+
}>>>;
|
|
122
|
+
}, import('zod/v4/core').$strip>;
|
|
123
|
+
description: string;
|
|
124
|
+
example: {
|
|
125
|
+
text: string;
|
|
126
|
+
variant: string;
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
List: {
|
|
130
|
+
props: import('zod').ZodObject<{
|
|
131
|
+
items: import('zod').ZodArray<import('zod').ZodObject<{
|
|
132
|
+
id: import('zod').ZodOptional<import('zod').ZodNullable<import('zod').ZodString>>;
|
|
133
|
+
label: import('zod').ZodString;
|
|
134
|
+
secondary: import('zod').ZodOptional<import('zod').ZodNullable<import('zod').ZodString>>;
|
|
135
|
+
badge: import('zod').ZodOptional<import('zod').ZodNullable<import('zod').ZodString>>;
|
|
136
|
+
status: import('zod').ZodOptional<import('zod').ZodNullable<import('zod').ZodEnum<{
|
|
137
|
+
success: "success";
|
|
138
|
+
warning: "warning";
|
|
139
|
+
error: "error";
|
|
140
|
+
info: "info";
|
|
141
|
+
neutral: "neutral";
|
|
142
|
+
}>>>;
|
|
143
|
+
href: import('zod').ZodOptional<import('zod').ZodNullable<import('zod').ZodString>>;
|
|
144
|
+
}, import('zod/v4/core').$strip>>;
|
|
145
|
+
maxVisible: import('zod').ZodOptional<import('zod').ZodNullable<import('zod').ZodNumber>>;
|
|
146
|
+
}, import('zod/v4/core').$strip>;
|
|
147
|
+
description: string;
|
|
148
|
+
example: {
|
|
149
|
+
items: {
|
|
150
|
+
label: string;
|
|
151
|
+
secondary: string;
|
|
152
|
+
status: string;
|
|
153
|
+
}[];
|
|
154
|
+
};
|
|
155
|
+
};
|
|
156
|
+
Table: {
|
|
157
|
+
props: import('zod').ZodObject<{
|
|
158
|
+
columns: import('zod').ZodArray<import('zod').ZodString>;
|
|
159
|
+
rows: import('zod').ZodArray<import('zod').ZodArray<import('zod').ZodString>>;
|
|
160
|
+
caption: import('zod').ZodOptional<import('zod').ZodNullable<import('zod').ZodString>>;
|
|
161
|
+
}, import('zod/v4/core').$strip>;
|
|
162
|
+
description: string;
|
|
163
|
+
example: {
|
|
164
|
+
columns: string[];
|
|
165
|
+
rows: string[][];
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
Metric: {
|
|
169
|
+
props: import('zod').ZodObject<{
|
|
170
|
+
label: import('zod').ZodString;
|
|
171
|
+
value: import('zod').ZodString;
|
|
172
|
+
description: import('zod').ZodOptional<import('zod').ZodNullable<import('zod').ZodString>>;
|
|
173
|
+
trend: import('zod').ZodOptional<import('zod').ZodNullable<import('zod').ZodEnum<{
|
|
174
|
+
neutral: "neutral";
|
|
175
|
+
up: "up";
|
|
176
|
+
down: "down";
|
|
177
|
+
}>>>;
|
|
178
|
+
delta: import('zod').ZodOptional<import('zod').ZodNullable<import('zod').ZodObject<{
|
|
179
|
+
value: import('zod').ZodString;
|
|
180
|
+
direction: import('zod').ZodEnum<{
|
|
181
|
+
flat: "flat";
|
|
182
|
+
up: "up";
|
|
183
|
+
down: "down";
|
|
184
|
+
}>;
|
|
185
|
+
label: import('zod').ZodOptional<import('zod').ZodNullable<import('zod').ZodString>>;
|
|
186
|
+
}, import('zod/v4/core').$strip>>>;
|
|
187
|
+
}, import('zod/v4/core').$strip>;
|
|
188
|
+
description: string;
|
|
189
|
+
example: {
|
|
190
|
+
label: string;
|
|
191
|
+
value: string;
|
|
192
|
+
description: string;
|
|
193
|
+
trend: string;
|
|
194
|
+
delta: {
|
|
195
|
+
value: string;
|
|
196
|
+
direction: string;
|
|
197
|
+
label: string;
|
|
198
|
+
};
|
|
199
|
+
};
|
|
200
|
+
};
|
|
201
|
+
Callout: {
|
|
202
|
+
props: import('zod').ZodObject<{
|
|
203
|
+
type: import('zod').ZodOptional<import('zod').ZodNullable<import('zod').ZodEnum<{
|
|
204
|
+
warning: "warning";
|
|
205
|
+
info: "info";
|
|
206
|
+
tip: "tip";
|
|
207
|
+
important: "important";
|
|
208
|
+
}>>>;
|
|
209
|
+
title: import('zod').ZodOptional<import('zod').ZodNullable<import('zod').ZodString>>;
|
|
210
|
+
content: import('zod').ZodString;
|
|
211
|
+
}, import('zod/v4/core').$strip>;
|
|
212
|
+
description: string;
|
|
213
|
+
example: {
|
|
214
|
+
type: string;
|
|
215
|
+
title: string;
|
|
216
|
+
content: string;
|
|
217
|
+
};
|
|
218
|
+
};
|
|
219
|
+
PhoneAgentCard: {
|
|
220
|
+
props: import('zod').ZodObject<{
|
|
221
|
+
agentId: import('zod').ZodString;
|
|
222
|
+
agentName: import('zod').ZodString;
|
|
223
|
+
model: import('zod').ZodOptional<import('zod').ZodNullable<import('zod').ZodString>>;
|
|
224
|
+
}, import('zod/v4/core').$strip>;
|
|
225
|
+
description: string;
|
|
226
|
+
example: {
|
|
227
|
+
agentId: string;
|
|
228
|
+
agentName: string;
|
|
229
|
+
model: string;
|
|
230
|
+
};
|
|
231
|
+
};
|
|
232
|
+
Chart: {
|
|
233
|
+
props: import('zod').ZodObject<{
|
|
234
|
+
type: import('zod').ZodEnum<{
|
|
235
|
+
line: "line";
|
|
236
|
+
bar: "bar";
|
|
237
|
+
pie: "pie";
|
|
238
|
+
}>;
|
|
239
|
+
data: import('zod').ZodArray<import('zod').ZodObject<{
|
|
240
|
+
label: import('zod').ZodString;
|
|
241
|
+
value: import('zod').ZodNumber;
|
|
242
|
+
}, import('zod/v4/core').$strip>>;
|
|
243
|
+
title: import('zod').ZodOptional<import('zod').ZodNullable<import('zod').ZodString>>;
|
|
244
|
+
height: import('zod').ZodOptional<import('zod').ZodNullable<import('zod').ZodNumber>>;
|
|
245
|
+
centerLabel: import('zod').ZodOptional<import('zod').ZodNullable<import('zod').ZodString>>;
|
|
246
|
+
}, import('zod/v4/core').$strip>;
|
|
247
|
+
description: string;
|
|
248
|
+
example: {
|
|
249
|
+
type: string;
|
|
250
|
+
title: string;
|
|
251
|
+
data: {
|
|
252
|
+
label: string;
|
|
253
|
+
value: number;
|
|
254
|
+
}[];
|
|
255
|
+
};
|
|
256
|
+
};
|
|
257
|
+
};
|
|
258
|
+
actions: {};
|
|
259
|
+
}>;
|
|
260
|
+
//# sourceMappingURL=catalog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../../src/json-render/catalog.ts"],"names":[],"mappings":"AAiBA;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2GxB,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { TranslationKeyU, WidgetUiAction } from '@opencx/widget-core';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* What the json-render registry needs from whoever mounts it. Inside the
|
|
5
|
+
* widget that is the widget config; on a host page that shows the same
|
|
6
|
+
* transcripts (the OpenCX inbox) it is a few props. One renderer, one
|
|
7
|
+
* catalog, two hosts — the registry never reaches for widget context itself.
|
|
8
|
+
*/
|
|
9
|
+
export type JsonRenderHost = {
|
|
10
|
+
t: (key: TranslationKeyU, params?: Record<string, string | number>) => string;
|
|
11
|
+
/** Where List links open — the embed's configured anchor target. */
|
|
12
|
+
anchorTarget: string;
|
|
13
|
+
/** Completes card actions the renderer cannot (e.g. test a phone agent). */
|
|
14
|
+
onUiAction?: (action: WidgetUiAction) => void;
|
|
15
|
+
};
|
|
16
|
+
export declare function JsonRenderHostProvider({ host, children, }: {
|
|
17
|
+
host: JsonRenderHost;
|
|
18
|
+
children: React.ReactNode;
|
|
19
|
+
}): React.JSX.Element;
|
|
20
|
+
export declare function useJsonRenderHost(): JsonRenderHost;
|
|
21
|
+
/** A host built from plain props — memoized so the tree does not re-render per keystroke. */
|
|
22
|
+
export declare function useHostFromProps({ language, onUiAction, anchorTarget, }: {
|
|
23
|
+
language?: string;
|
|
24
|
+
onUiAction?: (action: WidgetUiAction) => void;
|
|
25
|
+
anchorTarget?: string;
|
|
26
|
+
}): JsonRenderHost;
|
|
27
|
+
//# sourceMappingURL=host.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"host.d.ts","sourceRoot":"","sources":["../../../src/json-render/host.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,eAAe,EACpB,KAAK,cAAc,EACpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAA6C,MAAM,OAAO,CAAC;AAElE;;;;;GAKG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,CAAC,EAAE,CAAC,GAAG,EAAE,eAAe,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,KAAK,MAAM,CAAC;IAC9E,oEAAoE;IACpE,YAAY,EAAE,MAAM,CAAC;IACrB,4EAA4E;IAC5E,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,cAAc,KAAK,IAAI,CAAC;CAC/C,CAAC;AAeF,wBAAgB,sBAAsB,CAAC,EACrC,IAAI,EACJ,QAAQ,GACT,EAAE;IACD,IAAI,EAAE,cAAc,CAAC;IACrB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,qBAMA;AAED,wBAAgB,iBAAiB,IAAI,cAAc,CAElD;AAED,6FAA6F;AAC7F,wBAAgB,gBAAgB,CAAC,EAC/B,QAAQ,EACR,UAAU,EACV,YAAuB,GACxB,EAAE;IACD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,cAAc,KAAK,IAAI,CAAC;IAC9C,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,GAAG,cAAc,CAKjB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Spec } from '@json-render/core';
|
|
2
|
+
import { DataPart } from '@json-render/react';
|
|
3
|
+
export { HostedSpecRenderer, SpecRenderer } from './SpecRenderer';
|
|
4
|
+
export { segmentContent, type ContentSegment } from './segment-content';
|
|
5
|
+
/**
|
|
6
|
+
* Assemble the accumulated element-tree spec from a message's `data-spec` parts
|
|
7
|
+
* (the json-render patches `pipeJsonRender` emitted server-side). Returns `null`
|
|
8
|
+
* when the message carries no spec parts. Thin wrapper over `buildSpecFromParts`
|
|
9
|
+
* so the stream-mapping layer depends on this module, not the library directly.
|
|
10
|
+
*/
|
|
11
|
+
export declare function buildSpec(parts: DataPart[]): Spec | null;
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/json-render/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAsB,KAAK,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEvE,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAExE;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,QAAQ,EAAE,GAAG,IAAI,GAAG,IAAI,CAExD"}
|