@signalcore/ui 0.1.0 → 1.0.0-beta.1
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/README.md +896 -513
- package/dist/AgentAbout.d.ts +186 -0
- package/dist/AgentAbout.js +1020 -0
- package/dist/AgentAbout.js.map +1 -0
- package/dist/AgentCard.d.ts +49 -0
- package/dist/AgentCard.js +77 -0
- package/dist/AgentCard.js.map +1 -0
- package/dist/AgentChat.d.ts +233 -0
- package/dist/AgentChat.js +1127 -0
- package/dist/AgentChat.js.map +1 -0
- package/dist/AgentSpace.d.ts +112 -0
- package/dist/AgentSpace.js +339 -0
- package/dist/AgentSpace.js.map +1 -0
- package/dist/AgentTasks.d.ts +48 -0
- package/dist/AgentTasks.js +120 -0
- package/dist/AgentTasks.js.map +1 -0
- package/dist/BrowserView.d.ts +52 -0
- package/dist/BrowserView.js +328 -0
- package/dist/BrowserView.js.map +1 -0
- package/dist/FileView.d.ts +63 -0
- package/dist/FileView.js +449 -0
- package/dist/FileView.js.map +1 -0
- package/dist/Modes.d.ts +13 -0
- package/dist/Modes.js +75 -0
- package/dist/Modes.js.map +1 -0
- package/dist/VoiceCall.d.ts +91 -0
- package/dist/VoiceCall.js +302 -0
- package/dist/VoiceCall.js.map +1 -0
- package/dist/about.d.ts +212 -0
- package/dist/about.js +136 -0
- package/dist/about.js.map +1 -0
- package/dist/agentIcons.d.ts +33 -0
- package/dist/agentIcons.js +36 -0
- package/dist/agentIcons.js.map +1 -0
- package/dist/automation/Automation.d.ts +35 -0
- package/dist/automation/Automation.js +268 -0
- package/dist/automation/Automation.js.map +1 -0
- package/dist/automation/RunView.d.ts +25 -0
- package/dist/automation/RunView.js +187 -0
- package/dist/automation/RunView.js.map +1 -0
- package/dist/automation/cron.d.ts +41 -0
- package/dist/automation/cron.js +169 -0
- package/dist/automation/cron.js.map +1 -0
- package/dist/automation/marks.js +121 -0
- package/dist/automation/marks.js.map +1 -0
- package/dist/automation/messages.d.ts +113 -0
- package/dist/automation/messages.js +113 -0
- package/dist/automation/messages.js.map +1 -0
- package/dist/automation/record.d.ts +47 -0
- package/dist/automation/record.js +177 -0
- package/dist/automation/record.js.map +1 -0
- package/dist/automation/types.d.ts +143 -0
- package/dist/automation/when.d.ts +36 -0
- package/dist/automation/when.js +168 -0
- package/dist/automation/when.js.map +1 -0
- package/dist/blocks.d.ts +185 -0
- package/dist/browser.js +292 -0
- package/dist/browser.js.map +1 -0
- package/dist/call.d.ts +89 -0
- package/dist/call.js +218 -0
- package/dist/call.js.map +1 -0
- package/dist/channelParts.js +26 -0
- package/dist/channelParts.js.map +1 -0
- package/dist/classes.js +8 -3
- package/dist/classes.js.map +1 -0
- package/dist/client.d.ts +146 -54
- package/dist/client.js +204 -1
- package/dist/client.js.map +1 -0
- package/dist/conversationFiles.js +46 -0
- package/dist/conversationFiles.js.map +1 -0
- package/dist/credentials.d.ts +45 -0
- package/dist/credentials.js +98 -0
- package/dist/credentials.js.map +1 -0
- package/dist/dev.js +17 -0
- package/dist/dev.js.map +1 -0
- package/dist/es.d.ts +17 -0
- package/dist/es.js +382 -0
- package/dist/es.js.map +1 -0
- package/dist/files.d.ts +21 -0
- package/dist/files.js +214 -0
- package/dist/files.js.map +1 -0
- package/dist/frames.d.ts +115 -0
- package/dist/frames.js +219 -0
- package/dist/frames.js.map +1 -0
- package/dist/icons.js +29 -0
- package/dist/icons.js.map +1 -0
- package/dist/index.d.ts +63 -60
- package/dist/index.js +59 -45
- package/dist/kit/AudioPlayer.d.ts +20 -0
- package/dist/kit/AudioPlayer.js +116 -0
- package/dist/kit/AudioPlayer.js.map +1 -0
- package/dist/kit/Button.d.ts +29 -0
- package/dist/kit/Button.js +59 -0
- package/dist/kit/Button.js.map +1 -0
- package/dist/kit/Card.d.ts +16 -0
- package/dist/kit/Card.js +36 -0
- package/dist/kit/Card.js.map +1 -0
- package/dist/kit/Chart.js +152 -0
- package/dist/kit/Chart.js.map +1 -0
- package/dist/kit/Choices.d.ts +21 -0
- package/dist/kit/Choices.js +99 -0
- package/dist/kit/Choices.js.map +1 -0
- package/dist/kit/Combobox.d.ts +26 -0
- package/dist/kit/Combobox.js +190 -0
- package/dist/kit/Combobox.js.map +1 -0
- package/dist/kit/DateField.d.ts +17 -0
- package/dist/kit/DateField.js +133 -0
- package/dist/kit/DateField.js.map +1 -0
- package/dist/kit/Field.d.ts +40 -0
- package/dist/kit/Field.js +98 -0
- package/dist/kit/Field.js.map +1 -0
- package/dist/kit/FileField.d.ts +113 -0
- package/dist/kit/FileField.js +341 -0
- package/dist/kit/FileField.js.map +1 -0
- package/dist/kit/FileMark.d.ts +15 -0
- package/dist/kit/FileMark.js +39 -0
- package/dist/kit/FileMark.js.map +1 -0
- package/dist/kit/Inputs.d.ts +59 -0
- package/dist/kit/Inputs.js +205 -0
- package/dist/kit/Inputs.js.map +1 -0
- package/dist/kit/List.d.ts +47 -0
- package/dist/kit/List.js +85 -0
- package/dist/kit/List.js.map +1 -0
- package/dist/kit/Mark.d.ts +30 -0
- package/dist/kit/Mark.js +27 -0
- package/dist/kit/Mark.js.map +1 -0
- package/dist/kit/MarkStack.d.ts +15 -0
- package/dist/kit/MarkStack.js +26 -0
- package/dist/kit/MarkStack.js.map +1 -0
- package/dist/kit/Note.d.ts +11 -0
- package/dist/kit/Note.js +31 -0
- package/dist/kit/Note.js.map +1 -0
- package/dist/kit/Popover.js +90 -0
- package/dist/kit/Popover.js.map +1 -0
- package/dist/kit/RangeField.d.ts +14 -0
- package/dist/kit/RangeField.js +47 -0
- package/dist/kit/RangeField.js.map +1 -0
- package/dist/kit/RatingField.d.ts +14 -0
- package/dist/kit/RatingField.js +50 -0
- package/dist/kit/RatingField.js.map +1 -0
- package/dist/kit/Stat.d.ts +26 -0
- package/dist/kit/Stat.js +46 -0
- package/dist/kit/Stat.js.map +1 -0
- package/dist/kit/Switch.d.ts +14 -0
- package/dist/kit/Switch.js +21 -0
- package/dist/kit/Switch.js.map +1 -0
- package/dist/kit/Tag.d.ts +16 -0
- package/dist/kit/Tag.js +20 -0
- package/dist/kit/Tag.js.map +1 -0
- package/dist/kit/Tile.d.ts +34 -0
- package/dist/kit/Tile.js +52 -0
- package/dist/kit/Tile.js.map +1 -0
- package/dist/kit/TimeField.d.ts +31 -0
- package/dist/kit/TimeField.js +109 -0
- package/dist/kit/TimeField.js.map +1 -0
- package/dist/kit/context.d.ts +22 -0
- package/dist/kit/context.js +46 -0
- package/dist/kit/context.js.map +1 -0
- package/dist/kit/dates.d.ts +14 -0
- package/dist/kit/dates.js +129 -0
- package/dist/kit/dates.js.map +1 -0
- package/dist/kit/messages.d.ts +99 -0
- package/dist/kit/messages.js +66 -0
- package/dist/kit/messages.js.map +1 -0
- package/dist/kit/numbers.d.ts +12 -0
- package/dist/kit/numbers.js +40 -0
- package/dist/kit/numbers.js.map +1 -0
- package/dist/kit/options.d.ts +10 -0
- package/dist/kit/options.js +23 -0
- package/dist/kit/options.js.map +1 -0
- package/dist/kit/uploads.d.ts +42 -0
- package/dist/kit/uploads.js +165 -0
- package/dist/kit/uploads.js.map +1 -0
- package/dist/kit/waveform.js +76 -0
- package/dist/kit/waveform.js.map +1 -0
- package/dist/locale.d.ts +1 -0
- package/dist/locale.js +1 -0
- package/dist/markdown.js +84 -0
- package/dist/markdown.js.map +1 -0
- package/dist/marks.js +217 -0
- package/dist/marks.js.map +1 -0
- package/dist/reveal.js +48 -0
- package/dist/reveal.js.map +1 -0
- package/dist/stepGlyphs.js +62 -0
- package/dist/stepGlyphs.js.map +1 -0
- package/dist/surface/Form.js +264 -0
- package/dist/surface/Form.js.map +1 -0
- package/dist/surface/Markdown.js +42 -0
- package/dist/surface/Markdown.js.map +1 -0
- package/dist/surface/Surface.d.ts +31 -17
- package/dist/surface/Surface.js +480 -57
- package/dist/surface/Surface.js.map +1 -0
- package/dist/surface/scope.d.ts +32 -0
- package/dist/surface/scope.js +23 -0
- package/dist/surface/scope.js.map +1 -0
- package/dist/surface/values.d.ts +44 -0
- package/dist/surface/values.js +237 -0
- package/dist/surface/values.js.map +1 -0
- package/dist/tint.d.ts +10 -0
- package/dist/tint.js +19 -0
- package/dist/tint.js.map +1 -0
- package/dist/types.d.ts +541 -0
- package/dist/types.js +16 -0
- package/dist/types.js.map +1 -0
- package/dist/useAgentFace.d.ts +18 -0
- package/dist/useAgentFace.js +45 -0
- package/dist/useAgentFace.js.map +1 -0
- package/dist/useCall.d.ts +39 -0
- package/dist/useCall.js +273 -0
- package/dist/useCall.js.map +1 -0
- package/dist/useConversation.d.ts +77 -0
- package/dist/useConversation.js +523 -0
- package/dist/useConversation.js.map +1 -0
- package/dist/useDictation.d.ts +17 -0
- package/dist/useDictation.js +68 -0
- package/dist/useDictation.js.map +1 -0
- package/dist/useLive.d.ts +26 -0
- package/dist/useLive.js +88 -0
- package/dist/useLive.js.map +1 -0
- package/dist/usePolled.js +68 -0
- package/dist/usePolled.js.map +1 -0
- package/dist/voice/Orb.d.ts +10 -9
- package/dist/voice/Orb.js +43 -39
- package/dist/voice/Orb.js.map +1 -0
- package/dist/voice/StillOrb.js +33 -0
- package/dist/voice/StillOrb.js.map +1 -0
- package/dist/voice/WebGLOrb.js +98 -0
- package/dist/voice/WebGLOrb.js.map +1 -0
- package/dist/voice/fluidDots.js +161 -0
- package/dist/voice/fluidDots.js.map +1 -0
- package/dist/voice/motion.js +84 -0
- package/dist/voice/motion.js.map +1 -0
- package/dist/voice/orbs.d.ts +32 -0
- package/dist/voice/orbs.js +16 -0
- package/dist/voice/orbs.js.map +1 -0
- package/dist/voice/useReducedMotion.js +16 -16
- package/dist/voice/useReducedMotion.js.map +1 -0
- package/dist/voice/wave.js +116 -0
- package/dist/voice/wave.js.map +1 -0
- package/dist/voice/webgl.js +177 -0
- package/dist/voice/webgl.js.map +1 -0
- package/dist/widget.js +284 -8
- package/package.json +49 -39
- package/src/AgentAbout.tsx +1621 -0
- package/src/AgentCard.tsx +123 -0
- package/src/AgentChat.tsx +1812 -0
- package/src/AgentSpace.tsx +540 -0
- package/src/AgentTasks.tsx +163 -0
- package/src/BrowserView.tsx +442 -0
- package/src/FileView.tsx +620 -0
- package/src/Modes.tsx +112 -0
- package/src/VoiceCall.tsx +411 -0
- package/src/about.ts +355 -0
- package/src/agentIcons.ts +56 -0
- package/src/automation/Automation.tsx +308 -0
- package/src/automation/RunView.tsx +213 -0
- package/src/automation/cron.ts +196 -0
- package/src/automation/marks.tsx +144 -0
- package/src/automation/messages.ts +231 -0
- package/src/automation/record.ts +206 -0
- package/src/automation/types.ts +146 -0
- package/src/automation/when.ts +195 -0
- package/src/blocks.ts +249 -0
- package/src/browser.ts +334 -0
- package/src/call.ts +300 -0
- package/src/channelParts.ts +17 -0
- package/src/classes.ts +10 -0
- package/src/client.ts +397 -0
- package/src/conversationFiles.ts +54 -0
- package/src/credentials.ts +158 -0
- package/src/dev.ts +20 -0
- package/src/es.ts +423 -0
- package/src/files.ts +238 -0
- package/src/frames.ts +291 -0
- package/src/icons.tsx +49 -0
- package/src/index.ts +271 -0
- package/src/kit/AudioPlayer.tsx +129 -0
- package/src/kit/Button.tsx +97 -0
- package/src/kit/Card.tsx +47 -0
- package/src/kit/Chart.tsx +129 -0
- package/src/kit/Choices.tsx +131 -0
- package/src/kit/Combobox.tsx +247 -0
- package/src/kit/DateField.tsx +156 -0
- package/src/kit/Field.tsx +137 -0
- package/src/kit/FileField.tsx +492 -0
- package/src/kit/FileMark.tsx +56 -0
- package/src/kit/Inputs.tsx +250 -0
- package/src/kit/List.tsx +135 -0
- package/src/kit/Mark.tsx +64 -0
- package/src/kit/MarkStack.tsx +29 -0
- package/src/kit/Note.tsx +42 -0
- package/src/kit/Popover.tsx +121 -0
- package/src/kit/RangeField.tsx +53 -0
- package/src/kit/RatingField.tsx +62 -0
- package/src/kit/Stat.tsx +60 -0
- package/src/kit/Switch.tsx +28 -0
- package/src/kit/Tag.tsx +32 -0
- package/src/kit/Tile.tsx +74 -0
- package/src/kit/TimeField.tsx +157 -0
- package/src/kit/context.tsx +246 -0
- package/src/kit/dates.ts +150 -0
- package/src/kit/messages.ts +160 -0
- package/src/kit/numbers.ts +44 -0
- package/src/kit/options.ts +30 -0
- package/src/kit/uploads.ts +244 -0
- package/src/kit/waveform.ts +84 -0
- package/src/locale.ts +6 -0
- package/src/markdown.ts +69 -0
- package/src/marks.tsx +328 -0
- package/src/reveal.ts +52 -0
- package/src/stepGlyphs.ts +83 -0
- package/src/styles.css +6970 -0
- package/src/surface/Form.tsx +299 -0
- package/src/surface/Markdown.tsx +55 -0
- package/src/surface/Surface.tsx +605 -0
- package/src/surface/scope.ts +82 -0
- package/src/surface/values.ts +361 -0
- package/src/tint.ts +14 -0
- package/src/types.ts +604 -0
- package/src/useAgentFace.ts +47 -0
- package/src/useCall.ts +292 -0
- package/src/useConversation.ts +627 -0
- package/src/useDictation.ts +83 -0
- package/src/useLive.ts +115 -0
- package/src/usePolled.ts +60 -0
- package/src/voice/Orb.tsx +45 -0
- package/src/voice/StillOrb.tsx +29 -0
- package/src/voice/WebGLOrb.tsx +98 -0
- package/src/voice/fluidDots.tsx +171 -0
- package/src/voice/motion.ts +112 -0
- package/src/voice/orbs.ts +39 -0
- package/src/voice/useReducedMotion.ts +24 -0
- package/src/voice/wave.tsx +129 -0
- package/src/voice/webgl.ts +209 -0
- package/src/widget/css.d.ts +5 -0
- package/src/widget/element.tsx +535 -0
- package/src/widget/index.ts +10 -0
- package/src/widget/mount.ts +27 -0
- package/src/widget/widget.css +253 -0
- package/dist/SignalcoreProvider.d.ts +0 -113
- package/dist/SignalcoreProvider.js +0 -84
- package/dist/automations/AppMarks.d.ts +0 -11
- package/dist/automations/AppMarks.js +0 -18
- package/dist/automations/AutomationCard.d.ts +0 -27
- package/dist/automations/AutomationCard.js +0 -53
- package/dist/automations/AutomationsWindow.d.ts +0 -38
- package/dist/automations/AutomationsWindow.js +0 -57
- package/dist/automations/Card.d.ts +0 -46
- package/dist/automations/Card.js +0 -45
- package/dist/automations/ScheduleMarks.d.ts +0 -13
- package/dist/automations/ScheduleMarks.js +0 -24
- package/dist/automations/presentationIcons.d.ts +0 -7
- package/dist/automations/presentationIcons.js +0 -67
- package/dist/automations/schedule.d.ts +0 -25
- package/dist/automations/schedule.js +0 -59
- package/dist/automations/time.d.ts +0 -3
- package/dist/automations/time.js +0 -25
- package/dist/browser/BrowserView.d.ts +0 -43
- package/dist/browser/BrowserView.js +0 -94
- package/dist/browser/room.d.ts +0 -21
- package/dist/browser/room.js +0 -33
- package/dist/browser/useBrowserSession.d.ts +0 -17
- package/dist/browser/useBrowserSession.js +0 -67
- package/dist/builder/BuilderChat.d.ts +0 -32
- package/dist/builder/BuilderChat.js +0 -41
- package/dist/builder/BuilderTranscript.d.ts +0 -49
- package/dist/builder/BuilderTranscript.js +0 -62
- package/dist/builder/StatusLine.d.ts +0 -8
- package/dist/builder/StatusLine.js +0 -17
- package/dist/builder/answer.d.ts +0 -7
- package/dist/builder/answer.js +0 -8
- package/dist/builder/blocks.d.ts +0 -31
- package/dist/builder/blocks.js +0 -74
- package/dist/builder/items.d.ts +0 -15
- package/dist/builder/items.js +0 -21
- package/dist/builder/steps.d.ts +0 -20
- package/dist/builder/steps.js +0 -120
- package/dist/builder/time.d.ts +0 -4
- package/dist/builder/time.js +0 -24
- package/dist/builder/useBuildSession.d.ts +0 -36
- package/dist/builder/useBuildSession.js +0 -130
- package/dist/builder/workingOn.d.ts +0 -7
- package/dist/builder/workingOn.js +0 -15
- package/dist/chat/AgentChat.d.ts +0 -37
- package/dist/chat/AgentChat.js +0 -21
- package/dist/chat/ChatView.d.ts +0 -25
- package/dist/chat/ChatView.js +0 -34
- package/dist/chat/Composer.d.ts +0 -20
- package/dist/chat/Composer.js +0 -22
- package/dist/chat/MessageRow.d.ts +0 -22
- package/dist/chat/MessageRow.js +0 -32
- package/dist/chat/arrival.d.ts +0 -15
- package/dist/chat/arrival.js +0 -25
- package/dist/chat/history.d.ts +0 -24
- package/dist/chat/history.js +0 -45
- package/dist/chat/moments.d.ts +0 -25
- package/dist/chat/moments.js +0 -72
- package/dist/chat/types.d.ts +0 -12
- package/dist/chat/types.js +0 -1
- package/dist/chat/useComposer.d.ts +0 -46
- package/dist/chat/useComposer.js +0 -62
- package/dist/chat/useConversation.d.ts +0 -35
- package/dist/chat/useConversation.js +0 -71
- package/dist/chat/useStickToBottom.d.ts +0 -9
- package/dist/chat/useStickToBottom.js +0 -33
- package/dist/chat/useTurns.d.ts +0 -49
- package/dist/chat/useTurns.js +0 -111
- package/dist/classes.d.ts +0 -2
- package/dist/development.d.ts +0 -5
- package/dist/development.js +0 -8
- package/dist/flow/FlowWindow.d.ts +0 -42
- package/dist/flow/FlowWindow.js +0 -126
- package/dist/flow/index.d.ts +0 -16
- package/dist/flow/index.js +0 -16
- package/dist/flow/kinds.d.ts +0 -23
- package/dist/flow/kinds.js +0 -48
- package/dist/flow/map.d.ts +0 -44
- package/dist/flow/map.js +0 -225
- package/dist/flow/nodePaths.d.ts +0 -7
- package/dist/flow/nodePaths.js +0 -17
- package/dist/flow/relations.d.ts +0 -42
- package/dist/flow/relations.js +0 -174
- package/dist/host.d.ts +0 -124
- package/dist/host.js +0 -1
- package/dist/live/LiveView.d.ts +0 -28
- package/dist/live/LiveView.js +0 -55
- package/dist/live/capture.d.ts +0 -20
- package/dist/live/capture.js +0 -100
- package/dist/live/follow.d.ts +0 -26
- package/dist/live/follow.js +0 -72
- package/dist/live/paint.d.ts +0 -13
- package/dist/live/paint.js +0 -77
- package/dist/live/useLiveStream.d.ts +0 -16
- package/dist/live/useLiveStream.js +0 -57
- package/dist/look.d.ts +0 -33
- package/dist/look.js +0 -241
- package/dist/messages/en.d.ts +0 -3
- package/dist/messages/en.js +0 -251
- package/dist/messages/es.d.ts +0 -3
- package/dist/messages/es.js +0 -251
- package/dist/messages/index.d.ts +0 -16
- package/dist/messages/index.js +0 -33
- package/dist/messages/types.d.ts +0 -246
- package/dist/messages/types.js +0 -1
- package/dist/parts/Button.d.ts +0 -18
- package/dist/parts/Button.js +0 -17
- package/dist/parts/Icon.d.ts +0 -39
- package/dist/parts/Icon.js +0 -37
- package/dist/parts/Input.d.ts +0 -6
- package/dist/parts/Input.js +0 -11
- package/dist/parts/Spinner.d.ts +0 -2
- package/dist/parts/Spinner.js +0 -7
- package/dist/patterns.d.ts +0 -15
- package/dist/patterns.js +0 -5
- package/dist/presets.d.ts +0 -82
- package/dist/presets.js +0 -81
- package/dist/primitives.d.ts +0 -22
- package/dist/primitives.js +0 -58
- package/dist/request/RequestCard.d.ts +0 -34
- package/dist/request/RequestCard.js +0 -101
- package/dist/request/approval/ApprovalPreview.d.ts +0 -5
- package/dist/request/approval/ApprovalPreview.js +0 -27
- package/dist/request/approval/shapes.d.ts +0 -32
- package/dist/request/approval/shapes.js +0 -68
- package/dist/request/apps.d.ts +0 -11
- package/dist/request/apps.js +0 -27
- package/dist/request/cards.d.ts +0 -12
- package/dist/request/cards.js +0 -24
- package/dist/request/deliver.d.ts +0 -12
- package/dist/request/deliver.js +0 -21
- package/dist/request/handOver.d.ts +0 -18
- package/dist/request/handOver.js +0 -33
- package/dist/request/kinds/Approval.d.ts +0 -3
- package/dist/request/kinds/Approval.js +0 -9
- package/dist/request/kinds/Choice.d.ts +0 -3
- package/dist/request/kinds/Choice.js +0 -8
- package/dist/request/kinds/Connect.d.ts +0 -9
- package/dist/request/kinds/Connect.js +0 -119
- package/dist/request/kinds/FreeText.d.ts +0 -3
- package/dist/request/kinds/FreeText.js +0 -20
- package/dist/request/kinds/HandOver.d.ts +0 -13
- package/dist/request/kinds/HandOver.js +0 -20
- package/dist/request/kinds/Secret.d.ts +0 -7
- package/dist/request/kinds/Secret.js +0 -49
- package/dist/request/kinds/Upload.d.ts +0 -6
- package/dist/request/kinds/Upload.js +0 -47
- package/dist/request/types.d.ts +0 -83
- package/dist/request/types.js +0 -1
- package/dist/safeUrl.d.ts +0 -6
- package/dist/safeUrl.js +0 -8
- package/dist/stream/builder.d.ts +0 -176
- package/dist/stream/builder.js +0 -202
- package/dist/stream/reduce.d.ts +0 -51
- package/dist/stream/reduce.js +0 -58
- package/dist/stream/untilAborted.d.ts +0 -7
- package/dist/stream/untilAborted.js +0 -32
- package/dist/stream/useRunStream.d.ts +0 -26
- package/dist/stream/useRunStream.js +0 -137
- package/dist/styles.css +0 -2318
- package/dist/surface/HostNode.d.ts +0 -14
- package/dist/surface/HostNode.js +0 -30
- package/dist/surface/Node.d.ts +0 -7
- package/dist/surface/Node.js +0 -49
- package/dist/surface/SurfaceBoundary.d.ts +0 -26
- package/dist/surface/SurfaceBoundary.js +0 -20
- package/dist/surface/bindings.d.ts +0 -14
- package/dist/surface/bindings.js +0 -37
- package/dist/surface/check.d.ts +0 -27
- package/dist/surface/check.js +0 -102
- package/dist/surface/format.d.ts +0 -10
- package/dist/surface/format.js +0 -32
- package/dist/surface/hosts.d.ts +0 -6
- package/dist/surface/hosts.js +0 -11
- package/dist/surface/scene.d.ts +0 -21
- package/dist/surface/scene.js +0 -8
- package/dist/surface/templates/Browser.d.ts +0 -6
- package/dist/surface/templates/Browser.js +0 -11
- package/dist/surface/templates/Chart.d.ts +0 -6
- package/dist/surface/templates/Chart.js +0 -13
- package/dist/surface/templates/Choices.d.ts +0 -3
- package/dist/surface/templates/Choices.js +0 -12
- package/dist/surface/templates/Form.d.ts +0 -3
- package/dist/surface/templates/Form.js +0 -44
- package/dist/surface/templates/KeyValue.d.ts +0 -3
- package/dist/surface/templates/KeyValue.js +0 -7
- package/dist/surface/templates/Layout.d.ts +0 -5
- package/dist/surface/templates/Layout.js +0 -16
- package/dist/surface/templates/Live.d.ts +0 -6
- package/dist/surface/templates/Live.js +0 -9
- package/dist/surface/templates/Media.d.ts +0 -5
- package/dist/surface/templates/Media.js +0 -13
- package/dist/surface/templates/Slots.d.ts +0 -3
- package/dist/surface/templates/Slots.js +0 -19
- package/dist/surface/templates/Table.d.ts +0 -3
- package/dist/surface/templates/Table.js +0 -12
- package/dist/surface/templates/Text.d.ts +0 -4
- package/dist/surface/templates/Text.js +0 -15
- package/dist/surface/templates/index.d.ts +0 -7
- package/dist/surface/templates/index.js +0 -32
- package/dist/surface/types.d.ts +0 -68
- package/dist/surface/types.js +0 -6
- package/dist/theme.d.ts +0 -62
- package/dist/theme.js +0 -9
- package/dist/useTokens.d.ts +0 -7
- package/dist/useTokens.js +0 -41
- package/dist/voice/VoiceWindow.d.ts +0 -18
- package/dist/voice/VoiceWindow.js +0 -35
- package/dist/voice/index.d.ts +0 -13
- package/dist/voice/index.js +0 -12
- package/dist/voice/meter.d.ts +0 -16
- package/dist/voice/meter.js +0 -52
- package/dist/voice/orbColors.d.ts +0 -16
- package/dist/voice/orbColors.js +0 -75
- package/dist/voice/pushable.d.ts +0 -16
- package/dist/voice/pushable.js +0 -56
- package/dist/voice/useDictation.d.ts +0 -24
- package/dist/voice/useDictation.js +0 -60
- package/dist/voice/useReducedMotion.d.ts +0 -5
- package/dist/voice/useVoice.d.ts +0 -70
- package/dist/voice/useVoice.js +0 -197
- package/dist/voice/useVoicePrimitives.d.ts +0 -7
- package/dist/voice/useVoicePrimitives.js +0 -11
- package/dist/voice/voice.d.ts +0 -55
- package/dist/voice/voice.js +0 -9
- package/dist/voice/webSpeech.d.ts +0 -33
- package/dist/voice/webSpeech.js +0 -258
- package/dist/widget.js.map +0 -1
- package/dist/windows/AgentSpace.d.ts +0 -78
- package/dist/windows/AgentSpace.js +0 -135
- package/dist/windows/Captions.d.ts +0 -13
- package/dist/windows/Captions.js +0 -22
- package/dist/windows/Dock.d.ts +0 -37
- package/dist/windows/Dock.js +0 -22
- package/dist/windows/Journal.d.ts +0 -15
- package/dist/windows/Journal.js +0 -19
- package/dist/windows/KindMark.d.ts +0 -7
- package/dist/windows/KindMark.js +0 -31
- package/dist/windows/Pending.d.ts +0 -8
- package/dist/windows/Pending.js +0 -17
- package/dist/windows/Stage.d.ts +0 -18
- package/dist/windows/Stage.js +0 -21
- package/dist/windows/StatusLabel.d.ts +0 -9
- package/dist/windows/StatusLabel.js +0 -7
- package/dist/windows/Strip.d.ts +0 -17
- package/dist/windows/Strip.js +0 -42
- package/dist/windows/SurfaceWindow.d.ts +0 -20
- package/dist/windows/SurfaceWindow.js +0 -12
- package/dist/windows/WindowFrame.d.ts +0 -23
- package/dist/windows/WindowFrame.js +0 -22
- package/dist/windows/hearing.d.ts +0 -11
- package/dist/windows/hearing.js +0 -26
- package/dist/windows/kinds.d.ts +0 -47
- package/dist/windows/kinds.js +0 -28
- package/dist/windows/reduce.d.ts +0 -98
- package/dist/windows/reduce.js +0 -151
- package/dist/windows/registry.d.ts +0 -18
- package/dist/windows/registry.js +0 -61
- package/dist/windows/reveal.d.ts +0 -9
- package/dist/windows/reveal.js +0 -6
- package/dist/windows/space.d.ts +0 -21
- package/dist/windows/space.js +0 -6
- package/dist/windows/status.d.ts +0 -11
- package/dist/windows/status.js +0 -30
- package/dist/windows/types.d.ts +0 -15
- package/dist/windows/types.js +0 -1
- package/dist/windows/useLoaded.d.ts +0 -44
- package/dist/windows/useLoaded.js +0 -58
- package/dist/windows/useUnread.d.ts +0 -7
- package/dist/windows/useUnread.js +0 -21
- package/dist/windows/useWindows.d.ts +0 -70
- package/dist/windows/useWindows.js +0 -60
package/dist/index.d.ts
CHANGED
|
@@ -1,60 +1,63 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
1
|
+
import { formatSize } from "./kit/numbers.js";
|
|
2
|
+
import { About, AboutOut, AboutState, ActionFact, AskFact, AutomationFact, AutomationKind, ChannelFact, ChannelKind, ConnectionFact, DataFact, DeviceFact, DeviceKind, Does, Facts, FileFact, ICONS, Icon, MemoryFact, Provider, StatusTone, TOPICS, Told, Topic, VaultFact, aboutState, actionWords, appSteps, appTitle, automationsOf, countOf, generatedName, namesOf, toneOf, toolName, toolTitle } from "./about.js";
|
|
3
|
+
import { Automation as Automation$1, AutomationState, AutomationView, Board, Run, RunBy, RunRecord, RunStatus, RunStep, Step, Task, Trigger, Use } from "./automation/types.js";
|
|
4
|
+
import { Credentials, Speaker, VISITOR_KEY } from "./credentials.js";
|
|
5
|
+
import { AutomationBlock, Block, ButtonBlock, CardBlock, ChartBlock, ChartPoint, ChoiceBlock, DividerBlock, Entry, FieldKind, FieldValue, FieldsBlock, FormBlock, FormField, ImageBlock, ListBlock, NoteBlock, Option, StackBlock, StatBlock, Surface as Surface$1, TableBlock, TextBlock, Tone } from "./blocks.js";
|
|
6
|
+
import { Action, AgentFace, Attachment, Author, BrowserControl, BrowserFrame, BrowserInput, BrowserState, BrowserWhere, CallGlance, CallReason, CallToken, Channel, ChannelGlance, ChannelSettings, ChannelStatus, ChannelWeb, ContactGlance, Conversation, ConversationDetail, ConversationFile, ConversationPerson, Decides, Decision, Delivery, FileAt, FileBlock, FileIndex, FilePreview, Handover, Holder, HoursSpan, Message, Request, Step as Step$1, StepApp, StepState, StoredFile, ToolCall, WIDGET_FONTS, WeekHours, Weekday, WidgetConfig, WidgetFont, WidgetLook } from "./types.js";
|
|
7
|
+
import { ApiError, Client, ClientOptions, Files, UploadOptions, createClient } from "./client.js";
|
|
8
|
+
import { AUTOMATION_MESSAGES, AutomationMessages, CallMessages, DayRef, Verb } from "./automation/messages.js";
|
|
9
|
+
import { KIT_MESSAGES, KitLocale, KitMessages } from "./kit/messages.js";
|
|
10
|
+
import { KitClassNames, KitPart, KitProvider } from "./kit/context.js";
|
|
11
|
+
import { ABOUT_HOME, ABOUT_MESSAGES, AboutControls, AboutMessages, AboutPart, AboutTools, AboutView, AgentAbout, AgentAboutProps, AppDirectory, aboutBack } from "./AgentAbout.js";
|
|
12
|
+
import { AGENT_ICONS, AgentIcon, agentGlyph } from "./agentIcons.js";
|
|
13
|
+
import { Automation, AutomationProps } from "./automation/Automation.js";
|
|
14
|
+
import { RunView, RunViewProps } from "./automation/RunView.js";
|
|
15
|
+
import { Cron, Wall, fires, occurrences, offsetOf, parseCron } from "./automation/cron.js";
|
|
16
|
+
import { When, clockOf, dayRefOf, lineOf, momentOf, scheduleOf, timeOf, tookOf, whenOf } from "./automation/when.js";
|
|
17
|
+
import { CallLine, Names, StepGroup, appOf, callWords, groupsOf, namingOf, verbOf } from "./automation/record.js";
|
|
18
|
+
import { AgentTasks, AgentTasksProps, TASKS_POLL_MS, TASK_MESSAGES, TaskMessages, TaskPart, useTasks } from "./AgentTasks.js";
|
|
19
|
+
import { AgentCard, AgentCardProps, CardField, CardPart } from "./AgentCard.js";
|
|
20
|
+
import { FILES_PER_MESSAGE, Frame, TOOL_ERROR_MAX, ToolResult, UpFrame, toolResultOf } from "./frames.js";
|
|
21
|
+
import { LiveConversation, NO_TOOL, ToolHandler, useConversation } from "./useConversation.js";
|
|
22
|
+
import { BROWSER_MESSAGES, BrowserMessages, BrowserPart, BrowserView, BrowserViewProps } from "./BrowserView.js";
|
|
23
|
+
import { Dictate, Dictation, useDictation } from "./useDictation.js";
|
|
24
|
+
import { FileFamily, FileHost, MAX_MB, Uploader, accepts, familyOf } from "./kit/uploads.js";
|
|
25
|
+
import { SurfaceAction, Values, chosen, filled, labelOf, picked, pressed, problemOf } from "./surface/values.js";
|
|
26
|
+
import { BlockProps, SurfaceComponents, SurfacePart } from "./surface/scope.js";
|
|
27
|
+
import { AgentChat, AgentChatProps, CHAT_MESSAGES, ChatCompose, ChatLook, ChatMessages, ChatPart, ChatSteps, HandoverBy } from "./AgentChat.js";
|
|
28
|
+
import { ModeMessages, ModePart, SpaceMode } from "./Modes.js";
|
|
29
|
+
import { AgentTint, agentTint } from "./tint.js";
|
|
30
|
+
import { ORB_STYLES, OrbProps, OrbState, OrbStyle } from "./voice/orbs.js";
|
|
31
|
+
import { AgentActivity, CallEnd, CallEndedBy, CallLook, CallProblem, CallState, durationOf, endedByReason, lookOf, orbOf } from "./call.js";
|
|
32
|
+
import { Call, CallJoin, CallMeter, useCall } from "./useCall.js";
|
|
33
|
+
import { VOICE_CALL_MESSAGES, VoiceCall, VoiceCallMessages, VoiceCallPart, VoiceCallProps } from "./VoiceCall.js";
|
|
34
|
+
import { AgentSpace, AgentSpaceProps, SPACE_MESSAGES, SpaceLayout, SpaceMessages, SpacePart, captionsOf } from "./AgentSpace.js";
|
|
35
|
+
import { AUTOMATION_MESSAGES_ES, BROWSER_MESSAGES_ES, CHAT_MESSAGES_ES, KIT_MESSAGES_ES, SPACE_MESSAGES_ES, TASK_MESSAGES_ES, VOICE_CALL_MESSAGES_ES } from "./es.js";
|
|
36
|
+
import { Orb } from "./voice/Orb.js";
|
|
37
|
+
import { FILE_MESSAGES, FileMessages, FilePart, FileView, FileViewProps } from "./FileView.js";
|
|
38
|
+
import { Preview, cleanDocument, previewOf } from "./files.js";
|
|
39
|
+
import { Button, ButtonProps } from "./kit/Button.js";
|
|
40
|
+
import { Card } from "./kit/Card.js";
|
|
41
|
+
import { ControlBase, Field, FieldIds } from "./kit/Field.js";
|
|
42
|
+
import { Chips, Choices } from "./kit/Choices.js";
|
|
43
|
+
import { Combobox, ComboboxProps } from "./kit/Combobox.js";
|
|
44
|
+
import { DateField, DateFieldProps } from "./kit/DateField.js";
|
|
45
|
+
import { FileChip, FileChipProps, FileChips, FileField, FileFieldProps, Upload, UploadChips, UploadRules, Uploads, useUploads } from "./kit/FileField.js";
|
|
46
|
+
import { FileMark } from "./kit/FileMark.js";
|
|
47
|
+
import { Checkbox, NumberInput, SecretInput, TextArea, TextInput } from "./kit/Inputs.js";
|
|
48
|
+
import { List, Row, RowProps } from "./kit/List.js";
|
|
49
|
+
import { Mark, MarkProps } from "./kit/Mark.js";
|
|
50
|
+
import { MarkStack } from "./kit/MarkStack.js";
|
|
51
|
+
import { Stat, Stats } from "./kit/Stat.js";
|
|
52
|
+
import { Note } from "./kit/Note.js";
|
|
53
|
+
import { RangeField } from "./kit/RangeField.js";
|
|
54
|
+
import { RatingField } from "./kit/RatingField.js";
|
|
55
|
+
import { Switch, SwitchProps } from "./kit/Switch.js";
|
|
56
|
+
import { AudioPlayer, AudioPlayerProps } from "./kit/AudioPlayer.js";
|
|
57
|
+
import { Tag } from "./kit/Tag.js";
|
|
58
|
+
import { Tile, TileProps, Tiles } from "./kit/Tile.js";
|
|
59
|
+
import { DateTimeField, DateTimeFieldProps, TimeField, TimeFieldProps } from "./kit/TimeField.js";
|
|
60
|
+
import { Surface, SurfaceProps } from "./surface/Surface.js";
|
|
61
|
+
import { FaceRead, useAgentFace } from "./useAgentFace.js";
|
|
62
|
+
import { Live, LiveHandlers, useLive } from "./useLive.js";
|
|
63
|
+
export { ABOUT_HOME, ABOUT_MESSAGES, AGENT_ICONS, AUTOMATION_MESSAGES, AUTOMATION_MESSAGES_ES, type About, type AboutControls, type AboutMessages, type AboutOut, type AboutPart, type AboutState, type AboutTools, type AboutView, type Action, type ActionFact, AgentAbout, type AgentAboutProps, type AgentActivity, AgentCard, type AgentCardProps, AgentChat, type AgentChatProps, type AgentFace, type AgentIcon, AgentSpace, type AgentSpaceProps, AgentTasks, type AgentTasksProps, type AgentTint, ApiError, type AppDirectory, type AskFact, type Attachment, AudioPlayer, type AudioPlayerProps, type Author, Automation, type AutomationBlock, type Automation$1 as AutomationData, type AutomationFact, type AutomationKind, type AutomationMessages, type AutomationProps, type AutomationState, type Step as AutomationStep, type AutomationView, BROWSER_MESSAGES, BROWSER_MESSAGES_ES, type Block, type BlockProps, type Board, type BrowserControl, type BrowserFrame, type BrowserInput, type BrowserMessages, type BrowserPart, type BrowserState, BrowserView, type BrowserViewProps, type BrowserWhere, Button, type ButtonBlock, type ButtonProps, CHAT_MESSAGES, CHAT_MESSAGES_ES, type Call, type CallEnd, type CallEndedBy, type CallGlance, type CallJoin, type CallLine, type CallLook, type CallMessages, type CallMeter, type CallProblem, type CallReason, type CallState, type CallToken, Card, type CardBlock, type CardField, type CardPart, type Channel, type ChannelFact, type ChannelGlance, type ChannelKind, type ChannelSettings, type ChannelStatus, type ChannelWeb, type ChartBlock, type ChartPoint, type ChatCompose, type ChatLook, type ChatMessages, type ChatPart, type ChatSteps, Checkbox, Chips, type ChoiceBlock, Choices, type Client, type ClientOptions, Combobox, type ComboboxProps, type ConnectionFact, type ContactGlance, type ControlBase, type Conversation, type ConversationDetail, type ConversationFile, type ConversationPerson, type Credentials, type Cron, type DataFact, DateField, type DateFieldProps, DateTimeField, type DateTimeFieldProps, type DayRef, type Decides, type Decision, type Delivery, type DeviceFact, type DeviceKind, type Dictate, type Dictation, type DividerBlock, type Does, type Entry, FILES_PER_MESSAGE, FILE_MESSAGES, type FaceRead, type Facts, Field, type FieldIds, type FieldKind, type FieldValue, type FieldsBlock, type FileAt, type FileBlock, FileChip, type FileChipProps, FileChips, type FileFact, type FileFamily, FileField, type FileFieldProps, type FileHost, type FileIndex, FileMark, type FileMessages, type FilePart, type FilePreview, FileView, type FileViewProps, type Files, type FormBlock, type FormField, type Frame, type Handover, type HandoverBy, type Holder, type HoursSpan, ICONS, type Icon, type ImageBlock, KIT_MESSAGES, KIT_MESSAGES_ES, type KitClassNames, type KitLocale, type KitMessages, type KitPart, KitProvider, List, type ListBlock, type Live, type LiveConversation, type LiveHandlers, MAX_MB, Mark, type MarkProps, MarkStack, type MemoryFact, type Message, type ModeMessages, type ModePart, NO_TOOL, type Names, Note, type NoteBlock, NumberInput, ORB_STYLES, type Option, Orb, type OrbProps, type OrbState, type OrbStyle, type Preview, type Provider, RangeField, RatingField, type Request, Row, type RowProps, type Run, type RunBy, type RunRecord, type RunStatus, type RunStep, RunView, type RunViewProps, SPACE_MESSAGES, SPACE_MESSAGES_ES, SecretInput, type SpaceLayout, type SpaceMessages, type SpaceMode, type SpacePart, type Speaker, type StackBlock, Stat, type StatBlock, Stats, type StatusTone, type Step$1 as Step, type StepApp, type StepGroup, type StepState, type StoredFile, Surface, type SurfaceAction, type SurfaceComponents, type Surface$1 as SurfaceData, type SurfacePart, type SurfaceProps, Switch, type SwitchProps, TASKS_POLL_MS, TASK_MESSAGES, TASK_MESSAGES_ES, TOOL_ERROR_MAX, TOPICS, type TableBlock, Tag, type Task, type TaskMessages, type TaskPart, TextArea, type TextBlock, TextInput, Tile, type TileProps, Tiles, TimeField, type TimeFieldProps, type Told, type Tone, type ToolCall, type ToolHandler, type ToolResult, type Topic, type Trigger, type UpFrame, type Upload, UploadChips, type UploadOptions, type UploadRules, type Uploader, type Uploads, type Use, VISITOR_KEY, VOICE_CALL_MESSAGES, VOICE_CALL_MESSAGES_ES, type Values, type VaultFact, type Verb, VoiceCall, type VoiceCallMessages, type VoiceCallPart, type VoiceCallProps, WIDGET_FONTS, type Wall, type WeekHours, type Weekday, type When, type WidgetConfig, type WidgetFont, type WidgetLook, aboutBack, aboutState, accepts, actionWords, agentGlyph, agentTint, appOf, appSteps, appTitle, automationsOf, callWords, captionsOf, chosen, cleanDocument, clockOf, countOf, createClient, dayRefOf, durationOf, endedByReason, familyOf, filled, fires, formatSize, generatedName, groupsOf, labelOf, lineOf, lookOf, momentOf, namesOf, namingOf, occurrences, offsetOf, orbOf, parseCron, picked, pressed, previewOf, problemOf, scheduleOf, timeOf, toneOf, tookOf, toolName, toolResultOf, toolTitle, useAgentFace, useCall, useConversation, useDictation, useLive, useTasks, useUploads, verbOf, whenOf };
|
package/dist/index.js
CHANGED
|
@@ -1,45 +1,59 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
1
|
+
import { formatSize } from "./kit/numbers.js";
|
|
2
|
+
import { ICONS, TOPICS, aboutState, actionWords, appSteps, appTitle, automationsOf, countOf, generatedName, namesOf, toneOf, toolName, toolTitle } from "./about.js";
|
|
3
|
+
import { AUTOMATION_MESSAGES } from "./automation/messages.js";
|
|
4
|
+
import { KIT_MESSAGES } from "./kit/messages.js";
|
|
5
|
+
import { KitProvider } from "./kit/context.js";
|
|
6
|
+
import { List, Row } from "./kit/List.js";
|
|
7
|
+
import { Stat, Stats } from "./kit/Stat.js";
|
|
8
|
+
import { Switch } from "./kit/Switch.js";
|
|
9
|
+
import { Tag } from "./kit/Tag.js";
|
|
10
|
+
import { Mark } from "./kit/Mark.js";
|
|
11
|
+
import { appOf, callWords, groupsOf, namingOf, verbOf } from "./automation/record.js";
|
|
12
|
+
import { fires, occurrences, offsetOf, parseCron } from "./automation/cron.js";
|
|
13
|
+
import { clockOf, dayRefOf, lineOf, momentOf, scheduleOf, timeOf, tookOf, whenOf } from "./automation/when.js";
|
|
14
|
+
import { Automation } from "./automation/Automation.js";
|
|
15
|
+
import { Button } from "./kit/Button.js";
|
|
16
|
+
import { Note } from "./kit/Note.js";
|
|
17
|
+
import { RunView } from "./automation/RunView.js";
|
|
18
|
+
import { AGENT_ICONS, agentGlyph } from "./agentIcons.js";
|
|
19
|
+
import { VISITOR_KEY } from "./credentials.js";
|
|
20
|
+
import { ApiError, createClient } from "./client.js";
|
|
21
|
+
import { cleanDocument, previewOf } from "./files.js";
|
|
22
|
+
import { MAX_MB, accepts, familyOf } from "./kit/uploads.js";
|
|
23
|
+
import { FileMark } from "./kit/FileMark.js";
|
|
24
|
+
import { MarkStack } from "./kit/MarkStack.js";
|
|
25
|
+
import { agentTint } from "./tint.js";
|
|
26
|
+
import { ABOUT_HOME, ABOUT_MESSAGES, AgentAbout, aboutBack } from "./AgentAbout.js";
|
|
27
|
+
import { AgentTasks, TASKS_POLL_MS, TASK_MESSAGES, useTasks } from "./AgentTasks.js";
|
|
28
|
+
import { AgentCard } from "./AgentCard.js";
|
|
29
|
+
import { BROWSER_MESSAGES, BrowserView } from "./BrowserView.js";
|
|
30
|
+
import { useDictation } from "./useDictation.js";
|
|
31
|
+
import { FILES_PER_MESSAGE, TOOL_ERROR_MAX, toolResultOf } from "./frames.js";
|
|
32
|
+
import { AudioPlayer } from "./kit/AudioPlayer.js";
|
|
33
|
+
import { Field } from "./kit/Field.js";
|
|
34
|
+
import { FileChip, FileChips, FileField, UploadChips, useUploads } from "./kit/FileField.js";
|
|
35
|
+
import { Card } from "./kit/Card.js";
|
|
36
|
+
import { Chips, Choices } from "./kit/Choices.js";
|
|
37
|
+
import { Combobox } from "./kit/Combobox.js";
|
|
38
|
+
import { DateField } from "./kit/DateField.js";
|
|
39
|
+
import { Checkbox, NumberInput, SecretInput, TextArea, TextInput } from "./kit/Inputs.js";
|
|
40
|
+
import { RangeField } from "./kit/RangeField.js";
|
|
41
|
+
import { RatingField } from "./kit/RatingField.js";
|
|
42
|
+
import { DateTimeField, TimeField } from "./kit/TimeField.js";
|
|
43
|
+
import { chosen, filled, labelOf, picked, pressed, problemOf } from "./surface/values.js";
|
|
44
|
+
import { Surface } from "./surface/Surface.js";
|
|
45
|
+
import { useLive } from "./useLive.js";
|
|
46
|
+
import { NO_TOOL, useConversation } from "./useConversation.js";
|
|
47
|
+
import { AgentChat, CHAT_MESSAGES } from "./AgentChat.js";
|
|
48
|
+
import { useAgentFace } from "./useAgentFace.js";
|
|
49
|
+
import { AgentSpace, SPACE_MESSAGES, captionsOf } from "./AgentSpace.js";
|
|
50
|
+
import { AUTOMATION_MESSAGES_ES, BROWSER_MESSAGES_ES, CHAT_MESSAGES_ES, KIT_MESSAGES_ES, SPACE_MESSAGES_ES, TASK_MESSAGES_ES, VOICE_CALL_MESSAGES_ES } from "./es.js";
|
|
51
|
+
import { durationOf, endedByReason, lookOf, orbOf } from "./call.js";
|
|
52
|
+
import { useCall } from "./useCall.js";
|
|
53
|
+
import { ORB_STYLES } from "./voice/orbs.js";
|
|
54
|
+
import { Orb } from "./voice/Orb.js";
|
|
55
|
+
import { VOICE_CALL_MESSAGES, VoiceCall } from "./VoiceCall.js";
|
|
56
|
+
import { FILE_MESSAGES, FileView } from "./FileView.js";
|
|
57
|
+
import { Tile, Tiles } from "./kit/Tile.js";
|
|
58
|
+
import { WIDGET_FONTS } from "./types.js";
|
|
59
|
+
export { ABOUT_HOME, ABOUT_MESSAGES, AGENT_ICONS, AUTOMATION_MESSAGES, AUTOMATION_MESSAGES_ES, AgentAbout, AgentCard, AgentChat, AgentSpace, AgentTasks, ApiError, AudioPlayer, Automation, BROWSER_MESSAGES, BROWSER_MESSAGES_ES, BrowserView, Button, CHAT_MESSAGES, CHAT_MESSAGES_ES, Card, Checkbox, Chips, Choices, Combobox, DateField, DateTimeField, FILES_PER_MESSAGE, FILE_MESSAGES, Field, FileChip, FileChips, FileField, FileMark, FileView, ICONS, KIT_MESSAGES, KIT_MESSAGES_ES, KitProvider, List, MAX_MB, Mark, MarkStack, NO_TOOL, Note, NumberInput, ORB_STYLES, Orb, RangeField, RatingField, Row, RunView, SPACE_MESSAGES, SPACE_MESSAGES_ES, SecretInput, Stat, Stats, Surface, Switch, TASKS_POLL_MS, TASK_MESSAGES, TASK_MESSAGES_ES, TOOL_ERROR_MAX, TOPICS, Tag, TextArea, TextInput, Tile, Tiles, TimeField, UploadChips, VISITOR_KEY, VOICE_CALL_MESSAGES, VOICE_CALL_MESSAGES_ES, VoiceCall, WIDGET_FONTS, aboutBack, aboutState, accepts, actionWords, agentGlyph, agentTint, appOf, appSteps, appTitle, automationsOf, callWords, captionsOf, chosen, cleanDocument, clockOf, countOf, createClient, dayRefOf, durationOf, endedByReason, familyOf, filled, fires, formatSize, generatedName, groupsOf, labelOf, lineOf, lookOf, momentOf, namesOf, namingOf, occurrences, offsetOf, orbOf, parseCron, picked, pressed, previewOf, problemOf, scheduleOf, timeOf, toneOf, tookOf, toolName, toolResultOf, toolTitle, useAgentFace, useCall, useConversation, useDictation, useLive, useTasks, useUploads, verbOf, whenOf };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ReactEventHandler } from "react";
|
|
2
|
+
//#region src/kit/AudioPlayer.d.ts
|
|
3
|
+
export interface AudioPlayerProps {
|
|
4
|
+
src: string | undefined;
|
|
5
|
+
/** What it is, for screen readers: a voice note, a call's recording, a file's name. */
|
|
6
|
+
label: string;
|
|
7
|
+
onError?: ReactEventHandler<HTMLAudioElement> | undefined;
|
|
8
|
+
/** In a bar, beside other tools: a smaller play, a shorter waveform. */
|
|
9
|
+
compact?: boolean | undefined;
|
|
10
|
+
className?: string | undefined;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Audio, played the kit's way: a quiet round play and pause, the audio's own waveform (its bars
|
|
14
|
+
* light up as it plays; dragging through it seeks), and its time (how long it is until it plays,
|
|
15
|
+
* then how far it is). The browser's own element plays it, never shown; a length the file
|
|
16
|
+
* doesn't tell yet is learnt as it plays.
|
|
17
|
+
*/
|
|
18
|
+
export declare function AudioPlayer({ src, label, onError, compact, className }: AudioPlayerProps): import("react").JSX.Element;
|
|
19
|
+
//#endregion
|
|
20
|
+
//# sourceMappingURL=AudioPlayer.d.ts.map
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { joined, useKit, useParts } from "./context.js";
|
|
2
|
+
import { useWaveform } from "./waveform.js";
|
|
3
|
+
import { useRef, useState } from "react";
|
|
4
|
+
import { PauseIcon, PlayIcon } from "@phosphor-icons/react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
//#region src/kit/AudioPlayer.tsx
|
|
7
|
+
/** How many bars the waveform draws, and how high an even one stands while it is read. */
|
|
8
|
+
const BARS = {
|
|
9
|
+
full: 44,
|
|
10
|
+
compact: 24
|
|
11
|
+
};
|
|
12
|
+
const EVEN = .35;
|
|
13
|
+
/** The quietest bar still shows: silence reads as a line, not as nothing. */
|
|
14
|
+
const LEAST = .12;
|
|
15
|
+
/**
|
|
16
|
+
* Audio, played the kit's way: a quiet round play and pause, the audio's own waveform (its bars
|
|
17
|
+
* light up as it plays; dragging through it seeks), and its time (how long it is until it plays,
|
|
18
|
+
* then how far it is). The browser's own element plays it, never shown; a length the file
|
|
19
|
+
* doesn't tell yet is learnt as it plays.
|
|
20
|
+
*/
|
|
21
|
+
function AudioPlayer({ src, label, onError, compact, className }) {
|
|
22
|
+
const part = useParts();
|
|
23
|
+
const { messages: words } = useKit();
|
|
24
|
+
const audio = useRef(null);
|
|
25
|
+
const [playing, setPlaying] = useState(false);
|
|
26
|
+
const [at, setAt] = useState(0);
|
|
27
|
+
const [length, setLength] = useState(null);
|
|
28
|
+
const bars = compact ? BARS.compact : BARS.full;
|
|
29
|
+
const wave = useWaveform(src, bars);
|
|
30
|
+
const learn = () => {
|
|
31
|
+
const seconds = audio.current?.duration;
|
|
32
|
+
if (seconds !== void 0 && Number.isFinite(seconds)) setLength(seconds);
|
|
33
|
+
};
|
|
34
|
+
const seconds = length ?? wave?.seconds ?? null;
|
|
35
|
+
const played = seconds ? Math.min(1, at / seconds) : 0;
|
|
36
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
37
|
+
role: "group",
|
|
38
|
+
"aria-label": label,
|
|
39
|
+
className: joined(part("sc-audio", ...compact ? ["sc-audio--compact"] : []), className),
|
|
40
|
+
children: [
|
|
41
|
+
/* @__PURE__ */ jsx("audio", {
|
|
42
|
+
ref: audio,
|
|
43
|
+
src,
|
|
44
|
+
preload: "metadata",
|
|
45
|
+
onLoadedMetadata: learn,
|
|
46
|
+
onDurationChange: learn,
|
|
47
|
+
onPlay: () => {
|
|
48
|
+
setPlaying(true);
|
|
49
|
+
},
|
|
50
|
+
onPause: () => {
|
|
51
|
+
setPlaying(false);
|
|
52
|
+
},
|
|
53
|
+
onEnded: () => {
|
|
54
|
+
setPlaying(false);
|
|
55
|
+
setAt(0);
|
|
56
|
+
},
|
|
57
|
+
onTimeUpdate: () => {
|
|
58
|
+
learn();
|
|
59
|
+
setAt(audio.current?.currentTime ?? 0);
|
|
60
|
+
},
|
|
61
|
+
onError
|
|
62
|
+
}),
|
|
63
|
+
/* @__PURE__ */ jsx("button", {
|
|
64
|
+
type: "button",
|
|
65
|
+
className: part("sc-audio__play"),
|
|
66
|
+
"aria-label": playing ? words.pause : words.play,
|
|
67
|
+
disabled: src === void 0,
|
|
68
|
+
onClick: () => {
|
|
69
|
+
const element = audio.current;
|
|
70
|
+
if (element === null) return;
|
|
71
|
+
if (element.paused) element.play();
|
|
72
|
+
else element.pause();
|
|
73
|
+
},
|
|
74
|
+
children: playing ? /* @__PURE__ */ jsx(PauseIcon, { weight: "fill" }) : /* @__PURE__ */ jsx(PlayIcon, { weight: "fill" })
|
|
75
|
+
}),
|
|
76
|
+
/* @__PURE__ */ jsxs("div", {
|
|
77
|
+
className: part("sc-audio__wave"),
|
|
78
|
+
children: [Array.from({ length: bars }, (_, index) => /* @__PURE__ */ jsx("span", {
|
|
79
|
+
"aria-hidden": true,
|
|
80
|
+
"data-played": index / bars < played ? "" : void 0,
|
|
81
|
+
style: { height: `${Math.max(LEAST, wave?.heights[index] ?? EVEN) * 100}%` }
|
|
82
|
+
}, index)), /* @__PURE__ */ jsx("input", {
|
|
83
|
+
type: "range",
|
|
84
|
+
min: 0,
|
|
85
|
+
max: seconds ?? 0,
|
|
86
|
+
step: "any",
|
|
87
|
+
value: Math.min(at, seconds ?? 0),
|
|
88
|
+
disabled: seconds === null,
|
|
89
|
+
"aria-label": words.position,
|
|
90
|
+
"aria-valuetext": clock(at),
|
|
91
|
+
onChange: (event) => {
|
|
92
|
+
const seconds = Number(event.target.value);
|
|
93
|
+
if (audio.current !== null) audio.current.currentTime = seconds;
|
|
94
|
+
setAt(seconds);
|
|
95
|
+
}
|
|
96
|
+
})]
|
|
97
|
+
}),
|
|
98
|
+
/* @__PURE__ */ jsx("span", {
|
|
99
|
+
className: part("sc-audio__time"),
|
|
100
|
+
children: clock(playing || at > 0 ? at : seconds ?? 0)
|
|
101
|
+
})
|
|
102
|
+
]
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
/** Seconds as a player says them: 0:07, 1:42, 1:02:05. */
|
|
106
|
+
function clock(seconds) {
|
|
107
|
+
const whole = Math.max(0, Math.floor(seconds));
|
|
108
|
+
const hours = Math.floor(whole / 3600);
|
|
109
|
+
const minutes = Math.floor(whole % 3600 / 60);
|
|
110
|
+
const rest = String(whole % 60).padStart(2, "0");
|
|
111
|
+
return hours > 0 ? `${hours}:${String(minutes).padStart(2, "0")}:${rest}` : `${minutes}:${rest}`;
|
|
112
|
+
}
|
|
113
|
+
//#endregion
|
|
114
|
+
export { AudioPlayer, clock };
|
|
115
|
+
|
|
116
|
+
//# sourceMappingURL=AudioPlayer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AudioPlayer.js","names":[],"sources":["../../src/kit/AudioPlayer.tsx"],"sourcesContent":["import { PauseIcon, PlayIcon } from \"@phosphor-icons/react\";\nimport { useRef, useState, type ReactEventHandler } from \"react\";\n\nimport { joined, useKit, useParts } from \"./context\";\nimport { useWaveform } from \"./waveform\";\n\nexport interface AudioPlayerProps {\n src: string | undefined;\n /** What it is, for screen readers: a voice note, a call's recording, a file's name. */\n label: string;\n onError?: ReactEventHandler<HTMLAudioElement> | undefined;\n /** In a bar, beside other tools: a smaller play, a shorter waveform. */\n compact?: boolean | undefined;\n className?: string | undefined;\n}\n\n/** How many bars the waveform draws, and how high an even one stands while it is read. */\nconst BARS = { full: 44, compact: 24 } as const;\nconst EVEN = 0.35;\n/** The quietest bar still shows: silence reads as a line, not as nothing. */\nconst LEAST = 0.12;\n\n/**\n * Audio, played the kit's way: a quiet round play and pause, the audio's own waveform (its bars\n * light up as it plays; dragging through it seeks), and its time (how long it is until it plays,\n * then how far it is). The browser's own element plays it, never shown; a length the file\n * doesn't tell yet is learnt as it plays.\n */\nexport function AudioPlayer({ src, label, onError, compact, className }: AudioPlayerProps) {\n const part = useParts();\n const { messages: words } = useKit();\n const audio = useRef<HTMLAudioElement>(null);\n const [playing, setPlaying] = useState(false);\n const [at, setAt] = useState(0);\n const [length, setLength] = useState<number | null>(null);\n const bars = compact ? BARS.compact : BARS.full;\n const wave = useWaveform(src, bars);\n const learn = () => {\n const seconds = audio.current?.duration;\n if (seconds !== undefined && Number.isFinite(seconds)) setLength(seconds);\n };\n // The element's length, else the decoded one (an Ogg tells it only once played through).\n const seconds = length ?? wave?.seconds ?? null;\n const played = seconds ? Math.min(1, at / seconds) : 0;\n return (\n <div\n role=\"group\"\n aria-label={label}\n className={joined(\n part(\"sc-audio\", ...(compact ? ([\"sc-audio--compact\"] as const) : [])),\n className,\n )}\n >\n <audio\n ref={audio}\n src={src}\n preload=\"metadata\"\n onLoadedMetadata={learn}\n onDurationChange={learn}\n onPlay={() => {\n setPlaying(true);\n }}\n onPause={() => {\n setPlaying(false);\n }}\n onEnded={() => {\n setPlaying(false);\n setAt(0);\n }}\n onTimeUpdate={() => {\n learn();\n setAt(audio.current?.currentTime ?? 0);\n }}\n onError={onError}\n />\n <button\n type=\"button\"\n className={part(\"sc-audio__play\")}\n aria-label={playing ? words.pause : words.play}\n disabled={src === undefined}\n onClick={() => {\n const element = audio.current;\n if (element === null) return;\n if (element.paused) void element.play();\n else element.pause();\n }}\n >\n {playing ? <PauseIcon weight=\"fill\" /> : <PlayIcon weight=\"fill\" />}\n </button>\n <div className={part(\"sc-audio__wave\")}>\n {Array.from({ length: bars }, (_, index) => (\n <span\n key={index}\n aria-hidden\n data-played={index / bars < played ? \"\" : undefined}\n style={{ height: `${Math.max(LEAST, wave?.heights[index] ?? EVEN) * 100}%` }}\n />\n ))}\n <input\n type=\"range\"\n min={0}\n max={seconds ?? 0}\n step=\"any\"\n value={Math.min(at, seconds ?? 0)}\n disabled={seconds === null}\n aria-label={words.position}\n aria-valuetext={clock(at)}\n onChange={(event) => {\n const seconds = Number(event.target.value);\n if (audio.current !== null) audio.current.currentTime = seconds;\n setAt(seconds);\n }}\n />\n </div>\n <span className={part(\"sc-audio__time\")}>\n {clock(playing || at > 0 ? at : (seconds ?? 0))}\n </span>\n </div>\n );\n}\n\n/** Seconds as a player says them: 0:07, 1:42, 1:02:05. */\nexport function clock(seconds: number): string {\n const whole = Math.max(0, Math.floor(seconds));\n const hours = Math.floor(whole / 3600);\n const minutes = Math.floor((whole % 3600) / 60);\n const rest = String(whole % 60).padStart(2, \"0\");\n return hours > 0 ? `${hours}:${String(minutes).padStart(2, \"0\")}:${rest}` : `${minutes}:${rest}`;\n}\n"],"mappings":";;;;;;;AAiBA,MAAM,OAAO;CAAE,MAAM;CAAI,SAAS;AAAG;AACrC,MAAM,OAAO;;AAEb,MAAM,QAAQ;;;;;;;AAQd,SAAgB,YAAY,EAAE,KAAK,OAAO,SAAS,SAAS,aAA+B;CACzF,MAAM,OAAO,SAAS;CACtB,MAAM,EAAE,UAAU,UAAU,OAAO;CACnC,MAAM,QAAQ,OAAyB,IAAI;CAC3C,MAAM,CAAC,SAAS,cAAc,SAAS,KAAK;CAC5C,MAAM,CAAC,IAAI,SAAS,SAAS,CAAC;CAC9B,MAAM,CAAC,QAAQ,aAAa,SAAwB,IAAI;CACxD,MAAM,OAAO,UAAU,KAAK,UAAU,KAAK;CAC3C,MAAM,OAAO,YAAY,KAAK,IAAI;CAClC,MAAM,cAAc;EAClB,MAAM,UAAU,MAAM,SAAS;EAC/B,IAAI,YAAY,KAAA,KAAa,OAAO,SAAS,OAAO,GAAG,UAAU,OAAO;CAC1E;CAEA,MAAM,UAAU,UAAU,MAAM,WAAW;CAC3C,MAAM,SAAS,UAAU,KAAK,IAAI,GAAG,KAAK,OAAO,IAAI;CACrD,OACE,qBAAC,OAAD;EACE,MAAK;EACL,cAAY;EACZ,WAAW,OACT,KAAK,YAAY,GAAI,UAAW,CAAC,mBAAmB,IAAc,CAAC,CAAE,GACrE,SACF;EANF,UAAA;GAQE,oBAAC,SAAD;IACE,KAAK;IACA;IACL,SAAQ;IACR,kBAAkB;IAClB,kBAAkB;IAClB,cAAc;KACZ,WAAW,IAAI;IACjB;IACA,eAAe;KACb,WAAW,KAAK;IAClB;IACA,eAAe;KACb,WAAW,KAAK;KAChB,MAAM,CAAC;IACT;IACA,oBAAoB;KAClB,MAAM;KACN,MAAM,MAAM,SAAS,eAAe,CAAC;IACvC;IACS;GACV,CAAA;GACD,oBAAC,UAAD;IACE,MAAK;IACL,WAAW,KAAK,gBAAgB;IAChC,cAAY,UAAU,MAAM,QAAQ,MAAM;IAC1C,UAAU,QAAQ,KAAA;IAClB,eAAe;KACb,MAAM,UAAU,MAAM;KACtB,IAAI,YAAY,MAAM;KACtB,IAAI,QAAQ,QAAQ,QAAa,KAAK;UACjC,QAAQ,MAAM;IACrB;IAEC,UAAA,UAAU,oBAAC,WAAD,EAAW,QAAO,OAAQ,CAAA,IAAI,oBAAC,UAAD,EAAU,QAAO,OAAQ,CAAA;GAC5D,CAAA;GACR,qBAAC,OAAD;IAAK,WAAW,KAAK,gBAAgB;IAArC,UAAA,CACG,MAAM,KAAK,EAAE,QAAQ,KAAK,IAAI,GAAG,UAChC,oBAAC,QAAD;KAEE,eAAA;KACA,eAAa,QAAQ,OAAO,SAAS,KAAK,KAAA;KAC1C,OAAO,EAAE,QAAQ,GAAG,KAAK,IAAI,OAAO,MAAM,QAAQ,UAAU,IAAI,IAAI,IAAI,GAAG;IAC5E,GAJM,KAIN,CACF,GACD,oBAAC,SAAD;KACE,MAAK;KACL,KAAK;KACL,KAAK,WAAW;KAChB,MAAK;KACL,OAAO,KAAK,IAAI,IAAI,WAAW,CAAC;KAChC,UAAU,YAAY;KACtB,cAAY,MAAM;KAClB,kBAAgB,MAAM,EAAE;KACxB,WAAW,UAAU;MACnB,MAAM,UAAU,OAAO,MAAM,OAAO,KAAK;MACzC,IAAI,MAAM,YAAY,MAAM,MAAM,QAAQ,cAAc;MACxD,MAAM,OAAO;KACf;IACD,CAAA,CACE;;GACL,oBAAC,QAAD;IAAM,WAAW,KAAK,gBAAgB;IACnC,UAAA,MAAM,WAAW,KAAK,IAAI,KAAM,WAAW,CAAE;GAC1C,CAAA;EACH;;AAET;;AAGA,SAAgB,MAAM,SAAyB;CAC7C,MAAM,QAAQ,KAAK,IAAI,GAAG,KAAK,MAAM,OAAO,CAAC;CAC7C,MAAM,QAAQ,KAAK,MAAM,QAAQ,IAAI;CACrC,MAAM,UAAU,KAAK,MAAO,QAAQ,OAAQ,EAAE;CAC9C,MAAM,OAAO,OAAO,QAAQ,EAAE,CAAC,CAAC,SAAS,GAAG,GAAG;CAC/C,OAAO,QAAQ,IAAI,GAAG,MAAM,GAAG,OAAO,OAAO,CAAC,CAAC,SAAS,GAAG,GAAG,EAAE,GAAG,SAAS,GAAG,QAAQ,GAAG;AAC5F"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ButtonHTMLAttributes, ReactNode } from "react";
|
|
2
|
+
import { Icon } from "@phosphor-icons/react";
|
|
3
|
+
//#region src/kit/Button.d.ts
|
|
4
|
+
export interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children"> {
|
|
5
|
+
/**
|
|
6
|
+
* primary: the ink, for the one that matters; neutral: a hairline; danger: what can't be
|
|
7
|
+
* undone; ghost: bare until the pointer is on it (a row's ⋯).
|
|
8
|
+
*/
|
|
9
|
+
tone?: "primary" | "neutral" | "danger" | "ghost" | undefined;
|
|
10
|
+
/** sm: 28px, for a row or a line of words. */
|
|
11
|
+
size?: "md" | "sm" | undefined;
|
|
12
|
+
/** A glyph before the words; alone, the button is a square and `aria-label` names it. */
|
|
13
|
+
icon?: Icon | undefined;
|
|
14
|
+
/** A page to open apart instead: the button is a link, an arrow after its words. */
|
|
15
|
+
href?: string | undefined;
|
|
16
|
+
/** With `href`, the link saves what it points at under this name instead of opening it. */
|
|
17
|
+
download?: string | undefined;
|
|
18
|
+
/** It was the one pressed: ringed in the accent. */
|
|
19
|
+
pressed?: boolean | undefined;
|
|
20
|
+
children?: ReactNode;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* A pill to press: a hairline by default, filled with the ink for the main action, the danger
|
|
24
|
+
* tone for what can't be undone, bare for a quiet control. With `href` it is a link that opens
|
|
25
|
+
* its page apart, never sending this page's address along; with `download` too, one that saves.
|
|
26
|
+
*/
|
|
27
|
+
export declare function Button({ tone, size, icon: Glyph, href, download, pressed, className, children, type, part: own, ...rest }: ButtonProps): import("react").JSX.Element;
|
|
28
|
+
//#endregion
|
|
29
|
+
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { joined, useParts } from "./context.js";
|
|
2
|
+
import { ArrowUpRightIcon } from "@phosphor-icons/react";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
//#region src/kit/Button.tsx
|
|
5
|
+
/**
|
|
6
|
+
* A pill to press: a hairline by default, filled with the ink for the main action, the danger
|
|
7
|
+
* tone for what can't be undone, bare for a quiet control. With `href` it is a link that opens
|
|
8
|
+
* its page apart, never sending this page's address along; with `download` too, one that saves.
|
|
9
|
+
*/
|
|
10
|
+
function Button({ tone = "neutral", size = "md", icon: Glyph, href, download, pressed, className, children, type = "button", part: own, ...rest }) {
|
|
11
|
+
const part = useParts();
|
|
12
|
+
const named = joined(own, "button", `button-${tone}`);
|
|
13
|
+
const classes = joined(part("sc-button", `sc-button--${tone}`, ...size === "sm" ? ["sc-button--sm"] : [], ...children === void 0 ? ["sc-button--icon"] : []), className);
|
|
14
|
+
if (href !== void 0 && download !== void 0) return /* @__PURE__ */ jsxs("a", {
|
|
15
|
+
href,
|
|
16
|
+
download,
|
|
17
|
+
"aria-label": rest["aria-label"],
|
|
18
|
+
part: named,
|
|
19
|
+
className: classes,
|
|
20
|
+
children: [Glyph && /* @__PURE__ */ jsx(Glyph, {
|
|
21
|
+
"aria-hidden": true,
|
|
22
|
+
weight: "bold"
|
|
23
|
+
}), children]
|
|
24
|
+
});
|
|
25
|
+
if (href !== void 0) return /* @__PURE__ */ jsxs("a", {
|
|
26
|
+
href,
|
|
27
|
+
target: "_blank",
|
|
28
|
+
rel: "noopener noreferrer",
|
|
29
|
+
"aria-label": rest["aria-label"],
|
|
30
|
+
part: named,
|
|
31
|
+
className: classes,
|
|
32
|
+
children: [
|
|
33
|
+
Glyph && /* @__PURE__ */ jsx(Glyph, {
|
|
34
|
+
"aria-hidden": true,
|
|
35
|
+
weight: "bold"
|
|
36
|
+
}),
|
|
37
|
+
children,
|
|
38
|
+
/* @__PURE__ */ jsx(ArrowUpRightIcon, {
|
|
39
|
+
"aria-hidden": true,
|
|
40
|
+
weight: "bold"
|
|
41
|
+
})
|
|
42
|
+
]
|
|
43
|
+
});
|
|
44
|
+
return /* @__PURE__ */ jsxs("button", {
|
|
45
|
+
type,
|
|
46
|
+
"aria-pressed": pressed || void 0,
|
|
47
|
+
part: named,
|
|
48
|
+
className: classes,
|
|
49
|
+
...rest,
|
|
50
|
+
children: [Glyph && /* @__PURE__ */ jsx(Glyph, {
|
|
51
|
+
"aria-hidden": true,
|
|
52
|
+
weight: "bold"
|
|
53
|
+
}), children]
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
//#endregion
|
|
57
|
+
export { Button };
|
|
58
|
+
|
|
59
|
+
//# sourceMappingURL=Button.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.js","names":[],"sources":["../../src/kit/Button.tsx"],"sourcesContent":["import { ArrowUpRightIcon, type Icon } from \"@phosphor-icons/react\";\nimport type { ButtonHTMLAttributes, ReactNode } from \"react\";\n\nimport { joined, useParts } from \"./context\";\n\nexport interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, \"children\"> {\n /**\n * primary: the ink, for the one that matters; neutral: a hairline; danger: what can't be\n * undone; ghost: bare until the pointer is on it (a row's ⋯).\n */\n tone?: \"primary\" | \"neutral\" | \"danger\" | \"ghost\" | undefined;\n /** sm: 28px, for a row or a line of words. */\n size?: \"md\" | \"sm\" | undefined;\n /** A glyph before the words; alone, the button is a square and `aria-label` names it. */\n icon?: Icon | undefined;\n /** A page to open apart instead: the button is a link, an arrow after its words. */\n href?: string | undefined;\n /** With `href`, the link saves what it points at under this name instead of opening it. */\n download?: string | undefined;\n /** It was the one pressed: ringed in the accent. */\n pressed?: boolean | undefined;\n children?: ReactNode;\n}\n\n/**\n * A pill to press: a hairline by default, filled with the ink for the main action, the danger\n * tone for what can't be undone, bare for a quiet control. With `href` it is a link that opens\n * its page apart, never sending this page's address along; with `download` too, one that saves.\n */\nexport function Button({\n tone = \"neutral\",\n size = \"md\",\n icon: Glyph,\n href,\n download,\n pressed,\n className,\n children,\n type = \"button\",\n part: own,\n ...rest\n}: ButtonProps) {\n const part = useParts();\n // Its part names for a page's `::part()`: the caller's own, then the kit's.\n const named = joined(own, \"button\", `button-${tone}`);\n const classes = joined(\n part(\n \"sc-button\",\n `sc-button--${tone}`,\n ...(size === \"sm\" ? ([\"sc-button--sm\"] as const) : []),\n ...(children === undefined ? ([\"sc-button--icon\"] as const) : []),\n ),\n className,\n );\n if (href !== undefined && download !== undefined) {\n return (\n <a\n href={href}\n download={download}\n aria-label={rest[\"aria-label\"]}\n part={named}\n className={classes}\n >\n {Glyph && <Glyph aria-hidden weight=\"bold\" />}\n {children}\n </a>\n );\n }\n if (href !== undefined) {\n return (\n <a\n href={href}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n aria-label={rest[\"aria-label\"]}\n part={named}\n className={classes}\n >\n {Glyph && <Glyph aria-hidden weight=\"bold\" />}\n {children}\n <ArrowUpRightIcon aria-hidden weight=\"bold\" />\n </a>\n );\n }\n return (\n <button\n type={type}\n aria-pressed={pressed || undefined}\n part={named}\n className={classes}\n {...rest}\n >\n {Glyph && <Glyph aria-hidden weight=\"bold\" />}\n {children}\n </button>\n );\n}\n"],"mappings":";;;;;;;;;AA6BA,SAAgB,OAAO,EACrB,OAAO,WACP,OAAO,MACP,MAAM,OACN,MACA,UACA,SACA,WACA,UACA,OAAO,UACP,MAAM,KACN,GAAG,QACW;CACd,MAAM,OAAO,SAAS;CAEtB,MAAM,QAAQ,OAAO,KAAK,UAAU,UAAU,MAAM;CACpD,MAAM,UAAU,OACd,KACE,aACA,cAAc,QACd,GAAI,SAAS,OAAQ,CAAC,eAAe,IAAc,CAAC,GACpD,GAAI,aAAa,KAAA,IAAa,CAAC,iBAAiB,IAAc,CAAC,CACjE,GACA,SACF;CACA,IAAI,SAAS,KAAA,KAAa,aAAa,KAAA,GACrC,OACE,qBAAC,KAAD;EACQ;EACI;EACV,cAAY,KAAK;EACjB,MAAM;EACN,WAAW;EALb,UAAA,CAOG,SAAS,oBAAC,OAAD;GAAO,eAAA;GAAY,QAAO;EAAQ,CAAA,GAC3C,QACA;;CAGP,IAAI,SAAS,KAAA,GACX,OACE,qBAAC,KAAD;EACQ;EACN,QAAO;EACP,KAAI;EACJ,cAAY,KAAK;EACjB,MAAM;EACN,WAAW;EANb,UAAA;GAQG,SAAS,oBAAC,OAAD;IAAO,eAAA;IAAY,QAAO;GAAQ,CAAA;GAC3C;GACD,oBAAC,kBAAD;IAAkB,eAAA;IAAY,QAAO;GAAQ,CAAA;EAC5C;;CAGP,OACE,qBAAC,UAAD;EACQ;EACN,gBAAc,WAAW,KAAA;EACzB,MAAM;EACN,WAAW;EACX,GAAI;EALN,UAAA,CAOG,SAAS,oBAAC,OAAD;GAAO,eAAA;GAAY,QAAO;EAAQ,CAAA,GAC3C,QACK;;AAEZ"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
//#region src/kit/Card.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Things under a title and a quieter line, set apart in one hairline box lifted a hair. With
|
|
5
|
+
* `image`, the head starts with it, bare, as `Mark` draws a logo.
|
|
6
|
+
*/
|
|
7
|
+
export declare function Card({ title, subtitle, image, className, children }: {
|
|
8
|
+
title?: ReactNode;
|
|
9
|
+
subtitle?: ReactNode;
|
|
10
|
+
/** A logo or a picture at the head's start. */
|
|
11
|
+
image?: string | undefined;
|
|
12
|
+
className?: string | undefined;
|
|
13
|
+
children: ReactNode;
|
|
14
|
+
}): import("react").JSX.Element;
|
|
15
|
+
//#endregion
|
|
16
|
+
//# sourceMappingURL=Card.d.ts.map
|
package/dist/kit/Card.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { joined, useParts } from "./context.js";
|
|
2
|
+
import { Mark } from "./Mark.js";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
//#region src/kit/Card.tsx
|
|
5
|
+
/**
|
|
6
|
+
* Things under a title and a quieter line, set apart in one hairline box lifted a hair. With
|
|
7
|
+
* `image`, the head starts with it, bare, as `Mark` draws a logo.
|
|
8
|
+
*/
|
|
9
|
+
function Card({ title, subtitle, image, className, children }) {
|
|
10
|
+
const part = useParts();
|
|
11
|
+
const words = (title !== void 0 || subtitle !== void 0) && /* @__PURE__ */ jsxs("div", {
|
|
12
|
+
className: part("sc-panel__heading"),
|
|
13
|
+
children: [title !== void 0 && /* @__PURE__ */ jsx("h3", {
|
|
14
|
+
className: part("sc-panel__title"),
|
|
15
|
+
children: title
|
|
16
|
+
}), subtitle !== void 0 && /* @__PURE__ */ jsx("p", {
|
|
17
|
+
className: part("sc-panel__subtitle"),
|
|
18
|
+
children: subtitle
|
|
19
|
+
})]
|
|
20
|
+
});
|
|
21
|
+
return /* @__PURE__ */ jsxs("section", {
|
|
22
|
+
part: "card",
|
|
23
|
+
className: joined(part("sc-panel"), className),
|
|
24
|
+
children: [(words !== false || image !== void 0) && /* @__PURE__ */ jsxs("header", {
|
|
25
|
+
className: part("sc-panel__head", ...image !== void 0 ? ["sc-panel__head--image"] : []),
|
|
26
|
+
children: [image !== void 0 && /* @__PURE__ */ jsx(Mark, {
|
|
27
|
+
src: image,
|
|
28
|
+
size: 44
|
|
29
|
+
}), words]
|
|
30
|
+
}), children]
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
//#endregion
|
|
34
|
+
export { Card };
|
|
35
|
+
|
|
36
|
+
//# sourceMappingURL=Card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Card.js","names":[],"sources":["../../src/kit/Card.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\n\nimport { joined, useParts } from \"./context\";\nimport { Mark } from \"./Mark\";\n\n/**\n * Things under a title and a quieter line, set apart in one hairline box lifted a hair. With\n * `image`, the head starts with it, bare, as `Mark` draws a logo.\n */\nexport function Card({\n title,\n subtitle,\n image,\n className,\n children,\n}: {\n title?: ReactNode;\n subtitle?: ReactNode;\n /** A logo or a picture at the head's start. */\n image?: string | undefined;\n className?: string | undefined;\n children: ReactNode;\n}) {\n const part = useParts();\n const words = (title !== undefined || subtitle !== undefined) && (\n <div className={part(\"sc-panel__heading\")}>\n {title !== undefined && <h3 className={part(\"sc-panel__title\")}>{title}</h3>}\n {subtitle !== undefined && <p className={part(\"sc-panel__subtitle\")}>{subtitle}</p>}\n </div>\n );\n return (\n <section part=\"card\" className={joined(part(\"sc-panel\"), className)}>\n {(words !== false || image !== undefined) && (\n <header\n className={part(\n \"sc-panel__head\",\n ...(image !== undefined ? ([\"sc-panel__head--image\"] as const) : []),\n )}\n >\n {image !== undefined && <Mark src={image} size={44} />}\n {words}\n </header>\n )}\n {children}\n </section>\n );\n}\n"],"mappings":";;;;;;;;AASA,SAAgB,KAAK,EACnB,OACA,UACA,OACA,WACA,YAQC;CACD,MAAM,OAAO,SAAS;CACtB,MAAM,SAAS,UAAU,KAAA,KAAa,aAAa,KAAA,MACjD,qBAAC,OAAD;EAAK,WAAW,KAAK,mBAAmB;EAAxC,UAAA,CACG,UAAU,KAAA,KAAa,oBAAC,MAAD;GAAI,WAAW,KAAK,iBAAiB;GAAI,UAAA;EAAU,CAAA,GAC1E,aAAa,KAAA,KAAa,oBAAC,KAAD;GAAG,WAAW,KAAK,oBAAoB;GAAI,UAAA;EAAY,CAAA,CAC/E;;CAEP,OACE,qBAAC,WAAD;EAAS,MAAK;EAAO,WAAW,OAAO,KAAK,UAAU,GAAG,SAAS;EAAlE,UAAA,EACI,UAAU,SAAS,UAAU,KAAA,MAC7B,qBAAC,UAAD;GACE,WAAW,KACT,kBACA,GAAI,UAAU,KAAA,IAAa,CAAC,uBAAuB,IAAc,CAAC,CACpE;GAJF,UAAA,CAMG,UAAU,KAAA,KAAa,oBAAC,MAAD;IAAM,KAAK;IAAO,MAAM;GAAK,CAAA,GACpD,KACK;EAET,CAAA,GAAA,QACM;;AAEb"}
|