@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/parts/Icon.js
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useParts } from "../SignalcoreProvider.js";
|
|
3
|
-
/**
|
|
4
|
-
* The few marks the cards and the browser need, drawn from Phosphor Icons (MIT, phosphoricons.com;
|
|
5
|
-
* the regular weight, as the web app draws them) so the package carries no icon dependency.
|
|
6
|
-
*/
|
|
7
|
-
const PATHS = {
|
|
8
|
-
check: "M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z",
|
|
9
|
-
question: "M140,180a12,12,0,1,1-12-12A12,12,0,0,1,140,180ZM128,72c-22.06,0-40,16.15-40,36v4a8,8,0,0,0,16,0v-4c0-11,10.77-20,24-20s24,9,24,20-10.77,20-24,20a8,8,0,0,0-8,8v8a8,8,0,0,0,16,0v-.72c18.24-3.35,32-17.9,32-35.28C168,88.15,150.06,72,128,72Zm104,56A104,104,0,1,1,128,24,104.11,104.11,0,0,1,232,128Zm-16,0a88,88,0,1,0-88,88A88.1,88.1,0,0,0,216,128Z",
|
|
10
|
-
listChecks: "M224,128a8,8,0,0,1-8,8H128a8,8,0,0,1,0-16h88A8,8,0,0,1,224,128ZM128,72h88a8,8,0,0,0,0-16H128a8,8,0,0,0,0,16Zm88,112H128a8,8,0,0,0,0,16h88a8,8,0,0,0,0-16ZM82.34,42.34,56,68.69,45.66,58.34A8,8,0,0,0,34.34,69.66l16,16a8,8,0,0,0,11.32,0l32-32A8,8,0,0,0,82.34,42.34Zm0,64L56,132.69,45.66,122.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32,0l32-32a8,8,0,0,0-11.32-11.32Zm0,64L56,196.69,45.66,186.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32,0l32-32a8,8,0,0,0-11.32-11.32Z",
|
|
11
|
-
plug: "M237.66,66.34a8,8,0,0,0-11.32,0L192,100.69,155.31,64l34.35-34.34a8,8,0,1,0-11.32-11.32L144,52.69,117.66,26.34a8,8,0,0,0-11.32,11.32L112.69,44l-53,53a40,40,0,0,0,0,56.57l15.71,15.71L26.34,218.34a8,8,0,0,0,11.32,11.32l49.09-49.09,15.71,15.71a40,40,0,0,0,56.57,0l53-53,6.34,6.35a8,8,0,0,0,11.32-11.32L203.31,112l34.35-34.34A8,8,0,0,0,237.66,66.34ZM147.72,185a24,24,0,0,1-33.95,0L71,142.23a24,24,0,0,1,0-33.95l53-53L200.69,132Z",
|
|
12
|
-
upload: "M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0ZM93.66,77.66,120,51.31V144a8,8,0,0,0,16,0V51.31l26.34,26.35a8,8,0,0,0,11.32-11.32l-40-40a8,8,0,0,0-11.32,0l-40,40A8,8,0,0,0,93.66,77.66Z",
|
|
13
|
-
shieldWarning: "M120,136V96a8,8,0,0,1,16,0v40a8,8,0,0,1-16,0Zm8,48a12,12,0,1,0-12-12A12,12,0,0,0,128,184ZM224,56v56c0,52.72-25.52,84.67-46.93,102.19-23.06,18.86-46,25.27-47,25.53a8,8,0,0,1-4.2,0c-1-.26-23.91-6.67-47-25.53C57.52,196.67,32,164.72,32,112V56A16,16,0,0,1,48,40H208A16,16,0,0,1,224,56Zm-16,0L48,56l0,56c0,37.3,13.82,67.51,41.07,89.81A128.25,128.25,0,0,0,128,223.62a129.3,129.3,0,0,0,39.41-22.2C194.34,179.16,208,149.07,208,112Z",
|
|
14
|
-
key: "M216.57,39.43A80,80,0,0,0,83.91,120.78L28.69,176A15.86,15.86,0,0,0,24,187.31V216a16,16,0,0,0,16,16H72a8,8,0,0,0,8-8V208H96a8,8,0,0,0,8-8V184h16a8,8,0,0,0,5.66-2.34l9.56-9.57A79.73,79.73,0,0,0,160,176h.1A80,80,0,0,0,216.57,39.43ZM224,98.1c-1.09,34.09-29.75,61.86-63.89,61.9H160a63.7,63.7,0,0,1-23.65-4.51,8,8,0,0,0-8.84,1.68L116.69,168H96a8,8,0,0,0-8,8v16H72a8,8,0,0,0-8,8v16H40V187.31l58.83-58.82a8,8,0,0,0,1.68-8.84A63.72,63.72,0,0,1,96,95.92c0-34.14,27.81-62.8,61.9-63.89A64,64,0,0,1,224,98.1ZM192,76a12,12,0,1,1-12-12A12,12,0,0,1,192,76Z",
|
|
15
|
-
cursorClick: "M88,24V16a8,8,0,0,1,16,0v8a8,8,0,0,1-16,0ZM16,104h8a8,8,0,0,0,0-16H16a8,8,0,0,0,0,16ZM124.42,39.16a8,8,0,0,0,10.74-3.58l8-16a8,8,0,0,0-14.31-7.16l-8,16A8,8,0,0,0,124.42,39.16Zm-96,81.69-16,8a8,8,0,0,0,7.16,14.31l16-8a8,8,0,1,0-7.16-14.31ZM219.31,184a16,16,0,0,1,0,22.63l-12.68,12.68a16,16,0,0,1-22.63,0L132.7,168,115,214.09c0,.1-.08.21-.13.32a15.83,15.83,0,0,1-14.6,9.59l-.79,0a15.83,15.83,0,0,1-14.41-11L32.8,52.92A16,16,0,0,1,52.92,32.8L213,85.07a16,16,0,0,1,1.41,29.8l-.32.13L168,132.69ZM208,195.31,156.69,144h0a16,16,0,0,1,4.93-26l.32-.14,45.95-17.64L48,48l52.2,159.86,17.65-46c0-.11.08-.22.13-.33a16,16,0,0,1,11.69-9.34,16.72,16.72,0,0,1,3-.28,16,16,0,0,1,11.3,4.69L195.31,208Z",
|
|
16
|
-
arrowsIn: "M144,104V64a8,8,0,0,1,16,0V84.69l42.34-42.35a8,8,0,0,1,11.32,11.32L171.31,96H192a8,8,0,0,1,0,16H152A8,8,0,0,1,144,104Zm-40,40H64a8,8,0,0,0,0,16H84.69L42.34,202.34a8,8,0,0,0,11.32,11.32L96,171.31V192a8,8,0,0,0,16,0V152A8,8,0,0,0,104,144Zm67.31,16H192a8,8,0,0,0,0-16H152a8,8,0,0,0-8,8v40a8,8,0,0,0,16,0V171.31l42.34,42.35a8,8,0,0,0,11.32-11.32ZM104,56a8,8,0,0,0-8,8V84.69L53.66,42.34A8,8,0,0,0,42.34,53.66L84.69,96H64a8,8,0,0,0,0,16h40a8,8,0,0,0,8-8V64A8,8,0,0,0,104,56Z",
|
|
17
|
-
arrowsOut: "M216,48V96a8,8,0,0,1-16,0V67.31l-42.34,42.35a8,8,0,0,1-11.32-11.32L188.69,56H160a8,8,0,0,1,0-16h48A8,8,0,0,1,216,48ZM98.34,146.34,56,188.69V160a8,8,0,0,0-16,0v48a8,8,0,0,0,8,8H96a8,8,0,0,0,0-16H67.31l42.35-42.34a8,8,0,0,0-11.32-11.32ZM208,152a8,8,0,0,0-8,8v28.69l-42.34-42.35a8,8,0,0,0-11.32,11.32L188.69,200H160a8,8,0,0,0,0,16h48a8,8,0,0,0,8-8V160A8,8,0,0,0,208,152ZM67.31,56H96a8,8,0,0,0,0-16H48a8,8,0,0,0-8,8V96a8,8,0,0,0,16,0V67.31l42.34,42.35a8,8,0,0,0,11.32-11.32Z",
|
|
18
|
-
squareOut: "M224,104a8,8,0,0,1-16,0V59.32l-66.33,66.34a8,8,0,0,1-11.32-11.32L196.68,48H152a8,8,0,0,1,0-16h64a8,8,0,0,1,8,8Zm-40,24a8,8,0,0,0-8,8v72H48V80h72a8,8,0,0,0,0-16H48A16,16,0,0,0,32,80V208a16,16,0,0,0,16,16H176a16,16,0,0,0,16-16V136A8,8,0,0,0,184,128Z",
|
|
19
|
-
arrowUp: "M205.66,117.66a8,8,0,0,1-11.32,0L136,59.31V216a8,8,0,0,1-16,0V59.31L61.66,117.66a8,8,0,0,1-11.32-11.32l72-72a8,8,0,0,1,11.32,0l72,72A8,8,0,0,1,205.66,117.66Z",
|
|
20
|
-
stop: "M200,40H56A16,16,0,0,0,40,56V200a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Z",
|
|
21
|
-
caretDown: "M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z",
|
|
22
|
-
x: "M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z",
|
|
23
|
-
microphone: "M128,176a48.05,48.05,0,0,0,48-48V64a48,48,0,0,0-96,0v64A48.05,48.05,0,0,0,128,176ZM96,64a32,32,0,0,1,64,0v64a32,32,0,0,1-64,0Zm40,143.6V240a8,8,0,0,1-16,0V207.6A80.11,80.11,0,0,1,48,128a8,8,0,0,1,16,0,64,64,0,0,0,128,0,8,8,0,0,1,16,0A80.11,80.11,0,0,1,136,207.6Z",
|
|
24
|
-
microphoneSlash: "M213.92,218.62l-160-176A8,8,0,0,0,42.08,53.38L80,95.09V128a48,48,0,0,0,69.11,43.12l11.1,12.2A63.41,63.41,0,0,1,128,192a64.07,64.07,0,0,1-64-64,8,8,0,0,0-16,0,80.11,80.11,0,0,0,72,79.6V240a8,8,0,0,0,16,0V207.59a78.83,78.83,0,0,0,35.16-12.22l30.92,34a8,8,0,1,0,11.84-10.76ZM128,160a32,32,0,0,1-32-32V112.69l41.66,45.82A32,32,0,0,1,128,160Zm57.52-3.91A63.32,63.32,0,0,0,192,128a8,8,0,0,1,16,0,79.16,79.16,0,0,1-8.11,35.12,8,8,0,0,1-7.19,4.49,7.88,7.88,0,0,1-3.51-.82A8,8,0,0,1,185.52,156.09ZM84,44.87A48,48,0,0,1,176,64v64a49.19,49.19,0,0,1-.26,5,8,8,0,0,1-8,7.17,8.13,8.13,0,0,1-.84,0,8,8,0,0,1-7.12-8.79c.11-1.1.17-2.24.17-3.36V64A32,32,0,0,0,98.64,51.25,8,8,0,1,1,84,44.87Z",
|
|
25
|
-
};
|
|
26
|
-
/**
|
|
27
|
-
* A mark drawn from a Phosphor path (its 256-unit box), for the windows that carry their own
|
|
28
|
-
* tables of them. As large as the text around it; `slot` names it for the places that size it.
|
|
29
|
-
*/
|
|
30
|
-
export function Mark({ path, slot = "icon" }) {
|
|
31
|
-
const part = useParts();
|
|
32
|
-
return (_jsx("svg", { viewBox: "0 0 256 256", fill: "currentColor", "aria-hidden": true, ...part(slot), children: _jsx("path", { d: path }) }));
|
|
33
|
-
}
|
|
34
|
-
/** One of the marks above, as large as the text around it. */
|
|
35
|
-
export function Icon({ name, slot = "icon" }) {
|
|
36
|
-
return _jsx(Mark, { path: PATHS[name], slot: slot });
|
|
37
|
-
}
|
package/dist/parts/Input.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { InputHTMLAttributes } from "react";
|
|
2
|
-
export declare function Input({ className, ...props }: InputHTMLAttributes<HTMLInputElement>): import("react").JSX.Element;
|
|
3
|
-
/** What went wrong with something the user just did, right where they did it. */
|
|
4
|
-
export declare function ErrorText({ children }: {
|
|
5
|
-
children: string;
|
|
6
|
-
}): import("react").JSX.Element;
|
package/dist/parts/Input.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useParts } from "../SignalcoreProvider.js";
|
|
3
|
-
export function Input({ className, ...props }) {
|
|
4
|
-
const part = useParts();
|
|
5
|
-
return _jsx("input", { ...part("input", [], className), ...props });
|
|
6
|
-
}
|
|
7
|
-
/** What went wrong with something the user just did, right where they did it. */
|
|
8
|
-
export function ErrorText({ children }) {
|
|
9
|
-
const part = useParts();
|
|
10
|
-
return (_jsx("p", { role: "alert", ...part("error"), children: children }));
|
|
11
|
-
}
|
package/dist/parts/Spinner.d.ts
DELETED
package/dist/parts/Spinner.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useParts } from "../SignalcoreProvider.js";
|
|
3
|
-
/** A thin arc, quieter than a full ring. */
|
|
4
|
-
export function Spinner() {
|
|
5
|
-
const part = useParts();
|
|
6
|
-
return (_jsxs("svg", { viewBox: "0 0 16 16", fill: "none", "aria-hidden": true, ...part("spinner"), children: [_jsx("circle", { cx: "8", cy: "8", r: "6.25", stroke: "currentColor", strokeOpacity: ".18", strokeWidth: "1.5" }), _jsx("path", { d: "M14.25 8A6.25 6.25 0 0 0 8 1.75", stroke: "currentColor", strokeWidth: "1.5" })] }));
|
|
7
|
-
}
|
package/dist/patterns.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The few places where our own components have two layouts, and the host chooses. Each is a
|
|
3
|
-
* modifier of the slot (`sc-table--compact`) with its styles in styles.css, so a host can restyle
|
|
4
|
-
* a pattern like anything else. They apply to what we draw: a primitive the host replaces
|
|
5
|
-
* (`Table`, `Card`) draws itself. The defaults are the product's.
|
|
6
|
-
*/
|
|
7
|
-
export interface Patterns {
|
|
8
|
-
/** `comfortable`: a row has room. `compact`: rows close together, for a lot of records. */
|
|
9
|
-
table: "comfortable" | "compact";
|
|
10
|
-
/** `inline`: a form's button sits under its fields. `footer`: set apart below, on a line. */
|
|
11
|
-
actions: "inline" | "footer";
|
|
12
|
-
/** `flat`: a card is a bordered area. `raised`: it also lifts a hair off the page. */
|
|
13
|
-
card: "flat" | "raised";
|
|
14
|
-
}
|
|
15
|
-
export declare const DEFAULT_PATTERNS: Patterns;
|
package/dist/patterns.js
DELETED
package/dist/presets.d.ts
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
export declare const SYSTEMS: {
|
|
2
|
-
/** shadcn/ui on Tailwind v4, whose variables hold whole colors (older ones hold bare HSL). */
|
|
3
|
-
readonly shadcn: {
|
|
4
|
-
readonly probe: readonly ["--primary", "--background", "--foreground", "--card", "--border"];
|
|
5
|
-
readonly tokens: {
|
|
6
|
-
readonly bg: "var(--background)";
|
|
7
|
-
readonly surface: "var(--card)";
|
|
8
|
-
readonly sunken: "var(--muted)";
|
|
9
|
-
readonly line: "var(--border)";
|
|
10
|
-
readonly lineStrong: "var(--input)";
|
|
11
|
-
readonly text: "var(--foreground)";
|
|
12
|
-
readonly muted: "var(--muted-foreground)";
|
|
13
|
-
readonly accent: "var(--primary)";
|
|
14
|
-
readonly accentFg: "var(--primary-foreground)";
|
|
15
|
-
readonly danger: "var(--destructive)";
|
|
16
|
-
readonly focus: "var(--ring)";
|
|
17
|
-
readonly radius: "var(--radius)";
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
/**
|
|
21
|
-
* Radix Themes. Its variables live on the `.radix-themes` element, so it is found on the page's
|
|
22
|
-
* root only when the theme is applied there; inside one, name it: `theme="radix"`.
|
|
23
|
-
*/
|
|
24
|
-
readonly radix: {
|
|
25
|
-
readonly probe: readonly ["--accent-9", "--color-background", "--gray-6"];
|
|
26
|
-
readonly tokens: {
|
|
27
|
-
readonly bg: "var(--color-background)";
|
|
28
|
-
readonly surface: "var(--color-panel-solid)";
|
|
29
|
-
readonly sunken: "var(--gray-3)";
|
|
30
|
-
readonly line: "var(--gray-6)";
|
|
31
|
-
readonly lineStrong: "var(--gray-7)";
|
|
32
|
-
readonly text: "var(--gray-12)";
|
|
33
|
-
readonly muted: "var(--gray-11)";
|
|
34
|
-
readonly subtle: "var(--gray-10)";
|
|
35
|
-
readonly accent: "var(--accent-9)";
|
|
36
|
-
readonly accentFg: "var(--accent-contrast)";
|
|
37
|
-
readonly accentSoft: "var(--accent-3)";
|
|
38
|
-
readonly signal: "var(--orange-9)";
|
|
39
|
-
readonly signalSoft: "var(--orange-3)";
|
|
40
|
-
readonly ok: "var(--green-9)";
|
|
41
|
-
readonly okSoft: "var(--green-3)";
|
|
42
|
-
readonly danger: "var(--red-9)";
|
|
43
|
-
readonly dangerSoft: "var(--red-3)";
|
|
44
|
-
readonly focus: "var(--focus-8)";
|
|
45
|
-
readonly radius: "var(--radius-3)";
|
|
46
|
-
readonly font: "var(--default-font-family)";
|
|
47
|
-
readonly fontMono: "var(--code-font-family)";
|
|
48
|
-
};
|
|
49
|
-
};
|
|
50
|
-
/** Material Design 3 (`--md-sys-*` tokens, as Material Web and MUI's CSS variables write them). */
|
|
51
|
-
readonly material: {
|
|
52
|
-
readonly probe: readonly ["--md-sys-color-primary", "--md-sys-color-surface", "--md-sys-color-outline"];
|
|
53
|
-
readonly tokens: {
|
|
54
|
-
readonly bg: "var(--md-sys-color-background)";
|
|
55
|
-
readonly surface: "var(--md-sys-color-surface)";
|
|
56
|
-
readonly sunken: "var(--md-sys-color-surface-container)";
|
|
57
|
-
readonly line: "var(--md-sys-color-outline-variant)";
|
|
58
|
-
readonly lineStrong: "var(--md-sys-color-outline)";
|
|
59
|
-
readonly text: "var(--md-sys-color-on-surface)";
|
|
60
|
-
readonly muted: "var(--md-sys-color-on-surface-variant)";
|
|
61
|
-
readonly subtle: "var(--md-sys-color-outline)";
|
|
62
|
-
readonly accent: "var(--md-sys-color-primary)";
|
|
63
|
-
readonly accentFg: "var(--md-sys-color-on-primary)";
|
|
64
|
-
readonly accentSoft: "var(--md-sys-color-primary-container)";
|
|
65
|
-
readonly signal: "var(--md-sys-color-tertiary)";
|
|
66
|
-
readonly signalSoft: "var(--md-sys-color-tertiary-container)";
|
|
67
|
-
readonly danger: "var(--md-sys-color-error)";
|
|
68
|
-
readonly dangerSoft: "var(--md-sys-color-error-container)";
|
|
69
|
-
readonly radius: "var(--md-sys-shape-corner-medium)";
|
|
70
|
-
};
|
|
71
|
-
};
|
|
72
|
-
};
|
|
73
|
-
export type PresetName = keyof typeof SYSTEMS;
|
|
74
|
-
/**
|
|
75
|
-
* Which system to use: one by name, `"auto"` for the first the page turns out to use (none:
|
|
76
|
-
* the page's own look and ours), or `"none"` to map nothing.
|
|
77
|
-
*/
|
|
78
|
-
export type PresetChoice = "auto" | "none" | PresetName;
|
|
79
|
-
/** The first system whose variables are all defined, in the order above; null when none is. */
|
|
80
|
-
export declare function detectPreset(style: {
|
|
81
|
-
getPropertyValue: (name: string) => string;
|
|
82
|
-
}): PresetName | null;
|
package/dist/presets.js
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
export const SYSTEMS = {
|
|
2
|
-
/** shadcn/ui on Tailwind v4, whose variables hold whole colors (older ones hold bare HSL). */
|
|
3
|
-
shadcn: {
|
|
4
|
-
probe: ["--primary", "--background", "--foreground", "--card", "--border"],
|
|
5
|
-
tokens: {
|
|
6
|
-
bg: "var(--background)",
|
|
7
|
-
surface: "var(--card)",
|
|
8
|
-
sunken: "var(--muted)",
|
|
9
|
-
line: "var(--border)",
|
|
10
|
-
lineStrong: "var(--input)",
|
|
11
|
-
text: "var(--foreground)",
|
|
12
|
-
muted: "var(--muted-foreground)",
|
|
13
|
-
accent: "var(--primary)",
|
|
14
|
-
accentFg: "var(--primary-foreground)",
|
|
15
|
-
danger: "var(--destructive)",
|
|
16
|
-
focus: "var(--ring)",
|
|
17
|
-
radius: "var(--radius)",
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
/**
|
|
21
|
-
* Radix Themes. Its variables live on the `.radix-themes` element, so it is found on the page's
|
|
22
|
-
* root only when the theme is applied there; inside one, name it: `theme="radix"`.
|
|
23
|
-
*/
|
|
24
|
-
radix: {
|
|
25
|
-
probe: ["--accent-9", "--color-background", "--gray-6"],
|
|
26
|
-
tokens: {
|
|
27
|
-
bg: "var(--color-background)",
|
|
28
|
-
surface: "var(--color-panel-solid)",
|
|
29
|
-
sunken: "var(--gray-3)",
|
|
30
|
-
line: "var(--gray-6)",
|
|
31
|
-
lineStrong: "var(--gray-7)",
|
|
32
|
-
text: "var(--gray-12)",
|
|
33
|
-
muted: "var(--gray-11)",
|
|
34
|
-
subtle: "var(--gray-10)",
|
|
35
|
-
accent: "var(--accent-9)",
|
|
36
|
-
accentFg: "var(--accent-contrast)",
|
|
37
|
-
accentSoft: "var(--accent-3)",
|
|
38
|
-
signal: "var(--orange-9)",
|
|
39
|
-
signalSoft: "var(--orange-3)",
|
|
40
|
-
ok: "var(--green-9)",
|
|
41
|
-
okSoft: "var(--green-3)",
|
|
42
|
-
danger: "var(--red-9)",
|
|
43
|
-
dangerSoft: "var(--red-3)",
|
|
44
|
-
focus: "var(--focus-8)",
|
|
45
|
-
radius: "var(--radius-3)",
|
|
46
|
-
font: "var(--default-font-family)",
|
|
47
|
-
fontMono: "var(--code-font-family)",
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
/** Material Design 3 (`--md-sys-*` tokens, as Material Web and MUI's CSS variables write them). */
|
|
51
|
-
material: {
|
|
52
|
-
probe: ["--md-sys-color-primary", "--md-sys-color-surface", "--md-sys-color-outline"],
|
|
53
|
-
tokens: {
|
|
54
|
-
bg: "var(--md-sys-color-background)",
|
|
55
|
-
surface: "var(--md-sys-color-surface)",
|
|
56
|
-
sunken: "var(--md-sys-color-surface-container)",
|
|
57
|
-
line: "var(--md-sys-color-outline-variant)",
|
|
58
|
-
lineStrong: "var(--md-sys-color-outline)",
|
|
59
|
-
text: "var(--md-sys-color-on-surface)",
|
|
60
|
-
muted: "var(--md-sys-color-on-surface-variant)",
|
|
61
|
-
subtle: "var(--md-sys-color-outline)",
|
|
62
|
-
accent: "var(--md-sys-color-primary)",
|
|
63
|
-
accentFg: "var(--md-sys-color-on-primary)",
|
|
64
|
-
accentSoft: "var(--md-sys-color-primary-container)",
|
|
65
|
-
signal: "var(--md-sys-color-tertiary)",
|
|
66
|
-
signalSoft: "var(--md-sys-color-tertiary-container)",
|
|
67
|
-
danger: "var(--md-sys-color-error)",
|
|
68
|
-
dangerSoft: "var(--md-sys-color-error-container)",
|
|
69
|
-
radius: "var(--md-sys-shape-corner-medium)",
|
|
70
|
-
},
|
|
71
|
-
},
|
|
72
|
-
};
|
|
73
|
-
/** The first system whose variables are all defined, in the order above; null when none is. */
|
|
74
|
-
export function detectPreset(style) {
|
|
75
|
-
for (const name of Object.keys(SYSTEMS)) {
|
|
76
|
-
if (SYSTEMS[name].probe.every((variable) => style.getPropertyValue(variable).trim() !== "")) {
|
|
77
|
-
return name;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
return null;
|
|
81
|
-
}
|
package/dist/primitives.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { Primitives } from "./host.js";
|
|
2
|
-
/**
|
|
3
|
-
* The names of the primitives: the only keys of `components` that add nothing to the catalog.
|
|
4
|
-
* `Orb` is the voice window's, so no surface may name it either.
|
|
5
|
-
*/
|
|
6
|
-
export declare const PRIMITIVE_ONLY: ReadonlySet<string>;
|
|
7
|
-
/**
|
|
8
|
-
* Every key of `components` that is a primitive, `Card` too (which is also a catalog name). They
|
|
9
|
-
* take typed props from the surface's own templates, so a surface can never name them as a host
|
|
10
|
-
* component of its own.
|
|
11
|
-
*/
|
|
12
|
-
export declare const PRIMITIVE_NAMES: ReadonlySet<string>;
|
|
13
|
-
/** What a surface is built from. The orb is not one of them: its default lives with the voice. */
|
|
14
|
-
type SurfacePrimitives = Omit<Primitives, "Orb">;
|
|
15
|
-
/**
|
|
16
|
-
* What surfaces are built from: the host's primitives where the provider has them, ours
|
|
17
|
-
* otherwise. Only surfaces ask for these. The platform's own cards use `parts/` directly (and
|
|
18
|
-
* sit under `Platform`, which takes the host's components away), so a host's `Button` can
|
|
19
|
-
* never stand in for an "Aprobar".
|
|
20
|
-
*/
|
|
21
|
-
export declare function usePrimitives(): SurfacePrimitives;
|
|
22
|
-
export {};
|
package/dist/primitives.js
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useMemo } from "react";
|
|
3
|
-
import { Button } from "./parts/Button.js";
|
|
4
|
-
import { Input as TextInput } from "./parts/Input.js";
|
|
5
|
-
import { useParts, useSignalcore } from "./SignalcoreProvider.js";
|
|
6
|
-
/**
|
|
7
|
-
* The names of the primitives: the only keys of `components` that add nothing to the catalog.
|
|
8
|
-
* `Orb` is the voice window's, so no surface may name it either.
|
|
9
|
-
*/
|
|
10
|
-
export const PRIMITIVE_ONLY = new Set([
|
|
11
|
-
"Button",
|
|
12
|
-
"Table",
|
|
13
|
-
"Input",
|
|
14
|
-
"Select",
|
|
15
|
-
"Orb",
|
|
16
|
-
]);
|
|
17
|
-
/**
|
|
18
|
-
* Every key of `components` that is a primitive, `Card` too (which is also a catalog name). They
|
|
19
|
-
* take typed props from the surface's own templates, so a surface can never name them as a host
|
|
20
|
-
* component of its own.
|
|
21
|
-
*/
|
|
22
|
-
export const PRIMITIVE_NAMES = new Set([...PRIMITIVE_ONLY, "Card"]);
|
|
23
|
-
function Card({ title, subtitle, children }) {
|
|
24
|
-
const part = useParts();
|
|
25
|
-
const { patterns } = useSignalcore();
|
|
26
|
-
return (_jsxs("section", { ...part("card", [patterns.card]), children: [(title || subtitle) && (_jsxs("header", { children: [title && _jsx("h3", { ...part("card__title"), children: title }), subtitle && _jsx("p", { ...part("card__subtitle"), children: subtitle })] })), children] }));
|
|
27
|
-
}
|
|
28
|
-
function Table({ columns, rows }) {
|
|
29
|
-
const part = useParts();
|
|
30
|
-
const { patterns } = useSignalcore();
|
|
31
|
-
return (_jsx("div", { ...part("table-wrap"), children: _jsxs("table", { ...part("table", [patterns.table]), children: [_jsx("thead", { children: _jsx("tr", { ...part("table__row", ["head"]), children: columns.map((column) => (_jsx("th", { ...part("table__head"), children: column.label }, column.key))) }) }), _jsx("tbody", { children: rows.map((row, index) => (_jsx("tr", { ...part("table__row"), children: columns.map((column) => (_jsx("td", { ...part("table__cell"), children: row[column.key] }, column.key))) }, index))) })] }) }));
|
|
32
|
-
}
|
|
33
|
-
function Input({ name, type, required, onChange }) {
|
|
34
|
-
return (_jsx(TextInput, { name: name, type: type, required: required, onChange: (event) => {
|
|
35
|
-
onChange(event.target.value);
|
|
36
|
-
} }));
|
|
37
|
-
}
|
|
38
|
-
function Select({ name, options, required, onChange }) {
|
|
39
|
-
const part = useParts();
|
|
40
|
-
return (_jsxs("select", { name: name, required: required, ...part("select"), onChange: (event) => {
|
|
41
|
-
onChange(event.target.value);
|
|
42
|
-
}, children: [_jsx("option", { value: "" }), options.map((option) => (_jsx("option", { value: option.id, children: option.label }, option.id)))] }));
|
|
43
|
-
}
|
|
44
|
-
const DEFAULTS = { Button, Card, Table, Input, Select };
|
|
45
|
-
/**
|
|
46
|
-
* What surfaces are built from: the host's primitives where the provider has them, ours
|
|
47
|
-
* otherwise. Only surfaces ask for these. The platform's own cards use `parts/` directly (and
|
|
48
|
-
* sit under `Platform`, which takes the host's components away), so a host's `Button` can
|
|
49
|
-
* never stand in for an "Aprobar".
|
|
50
|
-
*/
|
|
51
|
-
export function usePrimitives() {
|
|
52
|
-
const { components } = useSignalcore();
|
|
53
|
-
return useMemo(() => {
|
|
54
|
-
const own = Object.keys(DEFAULTS).filter((name) => Object.hasOwn(components, name));
|
|
55
|
-
const replaced = Object.fromEntries(own.map((name) => [name, components[name]]));
|
|
56
|
-
return { ...DEFAULTS, ...replaced };
|
|
57
|
-
}, [components]);
|
|
58
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { type OnResolve } from "./deliver.js";
|
|
2
|
-
import type { AppDirectory, RequestCardData } from "./types.js";
|
|
3
|
-
export interface RequestCardProps {
|
|
4
|
-
card: RequestCardData;
|
|
5
|
-
/**
|
|
6
|
-
* The owner answered. With a client on the provider the card has already sent the answer to
|
|
7
|
-
* the API (`requests.resolve`, and the vault or the documents first, for a secret or a file),
|
|
8
|
-
* and this only tells you, so you can carry on the conversation. Without a client this is how
|
|
9
|
-
* the answer gets anywhere: the card counts itself answered when your promise resolves, and
|
|
10
|
-
* shows the error if it rejects. Secrets and files never pass through here.
|
|
11
|
-
*/
|
|
12
|
-
onResolve?: OnResolve | undefined;
|
|
13
|
-
/** Nothing can be pressed for now (the host is busy). */
|
|
14
|
-
busy?: boolean | undefined;
|
|
15
|
-
/** An answer already given, for a card read back from history. */
|
|
16
|
-
answered?: string | undefined;
|
|
17
|
-
/** This card's browser is the last one in view: a pending hand-over takes the room. */
|
|
18
|
-
inView?: boolean | undefined;
|
|
19
|
-
/** How the host knows its apps (names and logos), for the cards that are about one. */
|
|
20
|
-
apps?: AppDirectory | undefined;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Something an agent needs from the owner, answered right here: a question, a choice, an app to
|
|
24
|
-
* connect, a file, an approval, a secret, or the controls of its browser.
|
|
25
|
-
*
|
|
26
|
-
* These cards are drawn by the platform and never by the agent, and never by the host: they are
|
|
27
|
-
* not in the catalog, and nothing in `SignalcoreProvider.components` reaches them (the
|
|
28
|
-
* provider's primitives, `Button` and the rest, are taken away below this card, see `Platform`),
|
|
29
|
-
* because they are where the owner decides about safety (approve an action, connect an app,
|
|
30
|
-
* enter a secret), and an agent must not be able to fake an "Aprobar" button. A host can only
|
|
31
|
-
* theme them: the `--sc-*` tokens, a preset, `classNames`, `unstyled`; and say how its apps look
|
|
32
|
-
* (`apps`).
|
|
33
|
-
*/
|
|
34
|
-
export declare function RequestCard(props: RequestCardProps): import("react").JSX.Element;
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useState } from "react";
|
|
3
|
-
import { useBrowserFocus } from "../browser/room.js";
|
|
4
|
-
import { Icon } from "../parts/Icon.js";
|
|
5
|
-
import { ErrorText } from "../parts/Input.js";
|
|
6
|
-
import { Platform, Scoped, useMessages, useParts, useSignalcore } from "../SignalcoreProvider.js";
|
|
7
|
-
import { ApprovalPreview } from "./approval/ApprovalPreview.js";
|
|
8
|
-
import { AppLogo, appName } from "./apps.js";
|
|
9
|
-
import { canAnswer, deliver } from "./deliver.js";
|
|
10
|
-
import { handOverOf } from "./handOver.js";
|
|
11
|
-
import { Approval } from "./kinds/Approval.js";
|
|
12
|
-
import { Choice } from "./kinds/Choice.js";
|
|
13
|
-
import { Connect } from "./kinds/Connect.js";
|
|
14
|
-
import { FreeText } from "./kinds/FreeText.js";
|
|
15
|
-
import { HandOver } from "./kinds/HandOver.js";
|
|
16
|
-
import { Secret } from "./kinds/Secret.js";
|
|
17
|
-
import { Upload } from "./kinds/Upload.js";
|
|
18
|
-
/** The mark and the words that head a card: what it asks, or that the controls are the owner's. */
|
|
19
|
-
function headingOf(kind, handOver, messages) {
|
|
20
|
-
if (handOver)
|
|
21
|
-
return { icon: "cursorClick", label: messages.handOver };
|
|
22
|
-
switch (kind) {
|
|
23
|
-
case "choice":
|
|
24
|
-
return { icon: "listChecks", label: messages.choice };
|
|
25
|
-
case "connect":
|
|
26
|
-
return { icon: "plug", label: messages.connect };
|
|
27
|
-
case "upload":
|
|
28
|
-
return { icon: "upload", label: messages.upload };
|
|
29
|
-
case "approval":
|
|
30
|
-
return { icon: "shieldWarning", label: messages.approval };
|
|
31
|
-
case "secret":
|
|
32
|
-
return { icon: "key", label: messages.secret };
|
|
33
|
-
case "question":
|
|
34
|
-
return { icon: "question", label: messages.question };
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Something an agent needs from the owner, answered right here: a question, a choice, an app to
|
|
39
|
-
* connect, a file, an approval, a secret, or the controls of its browser.
|
|
40
|
-
*
|
|
41
|
-
* These cards are drawn by the platform and never by the agent, and never by the host: they are
|
|
42
|
-
* not in the catalog, and nothing in `SignalcoreProvider.components` reaches them (the
|
|
43
|
-
* provider's primitives, `Button` and the rest, are taken away below this card, see `Platform`),
|
|
44
|
-
* because they are where the owner decides about safety (approve an action, connect an app,
|
|
45
|
-
* enter a secret), and an agent must not be able to fake an "Aprobar" button. A host can only
|
|
46
|
-
* theme them: the `--sc-*` tokens, a preset, `classNames`, `unstyled`; and say how its apps look
|
|
47
|
-
* (`apps`).
|
|
48
|
-
*/
|
|
49
|
-
export function RequestCard(props) {
|
|
50
|
-
return (_jsx(Scoped, { children: _jsx(Platform, { children: _jsx(Asked, { ...props }) }) }));
|
|
51
|
-
}
|
|
52
|
-
function Asked({ card, onResolve, busy = false, answered, inView = false, apps, }) {
|
|
53
|
-
const part = useParts();
|
|
54
|
-
const messages = useMessages();
|
|
55
|
-
const { client } = useSignalcore();
|
|
56
|
-
const [answer, setAnswer] = useState(answered ?? null);
|
|
57
|
-
const [working, setWorking] = useState(false);
|
|
58
|
-
const [error, setError] = useState(null);
|
|
59
|
-
const handOver = handOverOf(card);
|
|
60
|
-
const heading = headingOf(card.kind, handOver !== null, messages);
|
|
61
|
-
// The hand-over in play keeps the room until the owner answers; then the host's layout returns.
|
|
62
|
-
const pending = handOver !== null && inView && answer === null;
|
|
63
|
-
const wide = useBrowserFocus().wide && pending;
|
|
64
|
-
const answerable = canAnswer(client, onResolve);
|
|
65
|
-
const reply = async (value, shown, reject = false) => {
|
|
66
|
-
setWorking(true);
|
|
67
|
-
setError(null);
|
|
68
|
-
try {
|
|
69
|
-
await deliver(client, onResolve, { request_id: card.request_id, value, reject, label: shown }, messages.cannotAnswerHere);
|
|
70
|
-
setAnswer(shown);
|
|
71
|
-
}
|
|
72
|
-
catch (reason) {
|
|
73
|
-
setError(reason instanceof Error ? reason.message : messages.cannotSend);
|
|
74
|
-
}
|
|
75
|
-
finally {
|
|
76
|
-
setWorking(false);
|
|
77
|
-
}
|
|
78
|
-
};
|
|
79
|
-
return (_jsxs("div", { ...part("request", [wide && "wide"]), children: [_jsxs("div", { ...part("request__heading"), children: [card.kind === "secret" && card.payload.provider ? (_jsx(AppLogo, { apps: apps, mark: {
|
|
80
|
-
provider: card.payload.provider,
|
|
81
|
-
name: appName(apps, card.payload.provider, messages.theApp),
|
|
82
|
-
icon: undefined,
|
|
83
|
-
size: 20,
|
|
84
|
-
} })) : (_jsx(Icon, { name: heading.icon, slot: "request__icon" })), heading.label] }), _jsxs("div", { ...part("request__body"), children: [_jsx("p", { ...part("request__title"), children: handOver?.reason ?? card.title }), card.payload.details && _jsx("p", { ...part("request__details"), children: card.payload.details }), card.kind === "approval" && _jsx(ApprovalPreview, { payload: card.payload }), answer !== null ? (_jsxs("p", { ...part("request__done"), children: [_jsx(Icon, { name: "check", slot: "request__check" }), " ", answer] })) : answerable ? (_jsx(Actions, { card: card, reply: reply, busy: busy || working, apps: apps, handOver: handOver, active: pending })) : (_jsx("p", { ...part("request__details"), children: messages.cannotAnswerHere })), error && _jsx(ErrorText, { children: error })] })] }));
|
|
85
|
-
}
|
|
86
|
-
function Actions({ handOver, active, ...props }) {
|
|
87
|
-
switch (props.card.kind) {
|
|
88
|
-
case "choice":
|
|
89
|
-
return _jsx(Choice, { ...props });
|
|
90
|
-
case "approval":
|
|
91
|
-
return _jsx(Approval, { ...props });
|
|
92
|
-
case "question":
|
|
93
|
-
return handOver ? (_jsx(HandOver, { handOver: handOver, busy: props.busy, reply: props.reply, active: active })) : (_jsx(FreeText, { ...props }));
|
|
94
|
-
case "upload":
|
|
95
|
-
return _jsx(Upload, { ...props });
|
|
96
|
-
case "connect":
|
|
97
|
-
return _jsx(Connect, { ...props });
|
|
98
|
-
case "secret":
|
|
99
|
-
return _jsx(Secret, { ...props });
|
|
100
|
-
}
|
|
101
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { RequestPayload } from "../types.js";
|
|
2
|
-
/** What the owner is approving: the calls a turn stopped at, and the preview the code gave. */
|
|
3
|
-
export declare function ApprovalPreview({ payload }: {
|
|
4
|
-
payload: RequestPayload;
|
|
5
|
-
}): import("react").JSX.Element | null;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useMessages, useParts } from "../../SignalcoreProvider.js";
|
|
3
|
-
import { callsOf, previewShape } from "./shapes.js";
|
|
4
|
-
const TABLE_ROWS = 8;
|
|
5
|
-
/** What the owner is approving: the calls a turn stopped at, and the preview the code gave. */
|
|
6
|
-
export function ApprovalPreview({ payload }) {
|
|
7
|
-
const part = useParts();
|
|
8
|
-
const calls = callsOf(payload.calls);
|
|
9
|
-
const preview = previewShape(payload.preview);
|
|
10
|
-
if (calls.length === 0 && !preview)
|
|
11
|
-
return null;
|
|
12
|
-
return (_jsxs("div", { ...part("approval"), children: [calls.length > 0 && (_jsx("ul", { ...part("calls"), children: calls.map((call) => (_jsxs("li", { ...part("calls__item"), children: [_jsx("span", { ...part("calls__label"), children: call.label }), call.summary && _jsx("span", { ...part("calls__summary"), children: call.summary })] }, call.id))) })), preview && _jsx(Preview, { shape: preview })] }));
|
|
13
|
-
}
|
|
14
|
-
function Preview({ shape }) {
|
|
15
|
-
const part = useParts();
|
|
16
|
-
const messages = useMessages();
|
|
17
|
-
switch (shape.kind) {
|
|
18
|
-
case "text":
|
|
19
|
-
return _jsx("p", { ...part("request__details"), children: shape.text });
|
|
20
|
-
case "pairs":
|
|
21
|
-
return (_jsx("dl", { ...part("preview-pairs"), children: shape.rows.map((row) => (_jsxs("div", { ...part("preview-pairs__row"), children: [_jsx("dt", { ...part("preview-pairs__label"), children: row.label }), _jsx("dd", { ...part("preview-pairs__value"), children: row.value })] }, row.label))) }));
|
|
22
|
-
case "table":
|
|
23
|
-
return (_jsxs("div", { ...part("preview-table"), children: [_jsxs("table", { ...part("preview-table__table"), children: [_jsx("thead", { children: _jsx("tr", { children: shape.columns.map((column) => (_jsx("th", { ...part("preview-table__head"), children: column }, column))) }) }), _jsx("tbody", { children: shape.rows.slice(0, TABLE_ROWS).map((row, index) => (_jsx("tr", { children: row.map((cell, column) => (_jsx("td", { ...part("preview-table__cell"), children: cell }, column))) }, index))) })] }), shape.rows.length > TABLE_ROWS && (_jsx("p", { ...part("preview-table__more"), children: messages.moreRows(shape.rows.length - TABLE_ROWS) }))] }));
|
|
24
|
-
case "json":
|
|
25
|
-
return _jsx("pre", { ...part("preview-json"), children: shape.text });
|
|
26
|
-
}
|
|
27
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/** What an approval would do, read from the payload the platform attached to the request. */
|
|
2
|
-
export interface CallLine {
|
|
3
|
-
id: string;
|
|
4
|
-
label: string;
|
|
5
|
-
summary: string;
|
|
6
|
-
}
|
|
7
|
-
/** "to: ana@clinica.es, subject: Presupuesto": the arguments of one call, in one line. */
|
|
8
|
-
export declare function summarizeArguments(input: unknown): string;
|
|
9
|
-
/** The calls of a paused turn (`payload.calls`): one line each, named the way the owner reads it. */
|
|
10
|
-
export declare function callsOf(value: unknown): CallLine[];
|
|
11
|
-
export type PreviewShape = {
|
|
12
|
-
kind: "pairs";
|
|
13
|
-
rows: {
|
|
14
|
-
label: string;
|
|
15
|
-
value: string;
|
|
16
|
-
}[];
|
|
17
|
-
} | {
|
|
18
|
-
kind: "table";
|
|
19
|
-
columns: string[];
|
|
20
|
-
rows: string[][];
|
|
21
|
-
} | {
|
|
22
|
-
kind: "text";
|
|
23
|
-
text: string;
|
|
24
|
-
} | {
|
|
25
|
-
kind: "json";
|
|
26
|
-
text: string;
|
|
27
|
-
};
|
|
28
|
-
/**
|
|
29
|
-
* How `payload.preview` (what the agent's code attached with `sc.owner.approve`) reads:
|
|
30
|
-
* label/value pairs for an object, a table for a list of objects, formatted JSON otherwise.
|
|
31
|
-
*/
|
|
32
|
-
export declare function previewShape(value: unknown): PreviewShape | null;
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
/** What an approval would do, read from the payload the platform attached to the request. */
|
|
2
|
-
/** A string, number or flag as the owner reads it in a summary or a cell. */
|
|
3
|
-
function brief(value) {
|
|
4
|
-
if (value === null || value === undefined)
|
|
5
|
-
return "";
|
|
6
|
-
if (typeof value === "string")
|
|
7
|
-
return value;
|
|
8
|
-
if (typeof value === "number" || typeof value === "boolean")
|
|
9
|
-
return String(value);
|
|
10
|
-
return JSON.stringify(value);
|
|
11
|
-
}
|
|
12
|
-
/** "to: ana@clinica.es, subject: Presupuesto": the arguments of one call, in one line. */
|
|
13
|
-
export function summarizeArguments(input) {
|
|
14
|
-
if (typeof input === "string")
|
|
15
|
-
return input;
|
|
16
|
-
if (!input || typeof input !== "object" || Array.isArray(input))
|
|
17
|
-
return brief(input);
|
|
18
|
-
return Object.entries(input)
|
|
19
|
-
.map(([key, value]) => `${key}: ${brief(value)}`)
|
|
20
|
-
.join(", ");
|
|
21
|
-
}
|
|
22
|
-
/** The calls of a paused turn (`payload.calls`): one line each, named the way the owner reads it. */
|
|
23
|
-
export function callsOf(value) {
|
|
24
|
-
if (!Array.isArray(value))
|
|
25
|
-
return [];
|
|
26
|
-
return value.flatMap((item, index) => {
|
|
27
|
-
if (!item || typeof item !== "object")
|
|
28
|
-
return [];
|
|
29
|
-
const call = item;
|
|
30
|
-
const label = brief(call["label"]) || brief(call["tool"]);
|
|
31
|
-
if (!label)
|
|
32
|
-
return [];
|
|
33
|
-
return [
|
|
34
|
-
{ id: brief(call["id"]) || String(index), label, summary: summarizeArguments(call["input"]) },
|
|
35
|
-
];
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* How `payload.preview` (what the agent's code attached with `sc.owner.approve`) reads:
|
|
40
|
-
* label/value pairs for an object, a table for a list of objects, formatted JSON otherwise.
|
|
41
|
-
*/
|
|
42
|
-
export function previewShape(value) {
|
|
43
|
-
if (value === null || value === undefined)
|
|
44
|
-
return null;
|
|
45
|
-
if (typeof value === "string")
|
|
46
|
-
return value.trim() ? { kind: "text", text: value } : null;
|
|
47
|
-
if (Array.isArray(value)) {
|
|
48
|
-
const items = value;
|
|
49
|
-
const objects = items.filter((item) => !!item && typeof item === "object" && !Array.isArray(item));
|
|
50
|
-
if (items.length > 0 && objects.length === items.length) {
|
|
51
|
-
const columns = [...new Set(objects.flatMap((row) => Object.keys(row)))];
|
|
52
|
-
return {
|
|
53
|
-
kind: "table",
|
|
54
|
-
columns,
|
|
55
|
-
rows: objects.map((row) => columns.map((column) => brief(row[column]))),
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
return { kind: "json", text: JSON.stringify(value, null, 2) };
|
|
59
|
-
}
|
|
60
|
-
if (typeof value === "object") {
|
|
61
|
-
const entries = Object.entries(value);
|
|
62
|
-
if (entries.every(([, v]) => v === null || typeof v !== "object")) {
|
|
63
|
-
return { kind: "pairs", rows: entries.map(([label, v]) => ({ label, value: brief(v) })) };
|
|
64
|
-
}
|
|
65
|
-
return { kind: "json", text: JSON.stringify(value, null, 2) };
|
|
66
|
-
}
|
|
67
|
-
return { kind: "text", text: brief(value) };
|
|
68
|
-
}
|
package/dist/request/apps.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { AppDirectory, AppMark } from "./types.js";
|
|
2
|
-
/**
|
|
3
|
-
* How the owner calls an app: the host's name for it, else the slug made readable, else `none`
|
|
4
|
-
* ("the app").
|
|
5
|
-
*/
|
|
6
|
-
export declare function appName(apps: AppDirectory | undefined, provider: string | undefined, none: string): string;
|
|
7
|
-
/** An app's mark: the host's, else the one the app declared (over https), else a monogram. */
|
|
8
|
-
export declare function AppLogo({ apps, mark }: {
|
|
9
|
-
apps: AppDirectory | undefined;
|
|
10
|
-
mark: AppMark;
|
|
11
|
-
}): import("react").JSX.Element;
|