@asanchez-sa/abby 0.0.0-stage → 0.1.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 +245 -2
- package/dist/_virtual/_rolldown/runtime.js +26 -0
- package/dist/agents/approvals.d.ts +46 -0
- package/dist/agents/approvals.js +58 -0
- package/dist/agents/changes.d.ts +21 -0
- package/dist/agents/changes.js +21 -0
- package/dist/agents/hooks.d.ts +20 -0
- package/dist/agents/hooks.js +58 -0
- package/dist/agents/index.d.ts +11 -0
- package/dist/agents/index.js +9 -0
- package/dist/agents/run-tool.d.ts +44 -0
- package/dist/agents/run-tool.js +79 -0
- package/dist/agents/ui-sdk.d.ts +5 -0
- package/dist/agents/ui-sdk.js +3 -0
- package/dist/behaviors/canvas/index.d.ts +2 -0
- package/dist/behaviors/canvas/index.js +1 -0
- package/dist/behaviors/canvas/ui-sdk.d.ts +2 -0
- package/dist/behaviors/canvas/ui-sdk.js +1 -0
- package/dist/behaviors/drag-and-drop/index.d.ts +2 -0
- package/dist/behaviors/drag-and-drop/index.js +1 -0
- package/dist/behaviors/drag-and-drop/ui-sdk.d.ts +2 -0
- package/dist/behaviors/drag-and-drop/ui-sdk.js +1 -0
- package/dist/behaviors/dragging/index.d.ts +2 -0
- package/dist/behaviors/dragging/index.js +1 -0
- package/dist/behaviors/dragging/ui-sdk.d.ts +2 -0
- package/dist/behaviors/dragging/ui-sdk.js +1 -0
- package/dist/behaviors/focus/index.d.ts +2 -0
- package/dist/behaviors/focus/index.js +1 -0
- package/dist/behaviors/focus/ui-sdk.d.ts +2 -0
- package/dist/behaviors/focus/ui-sdk.js +1 -0
- package/dist/behaviors/lists/index.d.ts +3 -0
- package/dist/behaviors/lists/index.js +3 -0
- package/dist/behaviors/lists/ui-sdk.d.ts +3 -0
- package/dist/behaviors/lists/ui-sdk.js +3 -0
- package/dist/behaviors/popups/index.d.ts +3 -0
- package/dist/behaviors/popups/index.js +3 -0
- package/dist/behaviors/popups/ui-sdk.d.ts +3 -0
- package/dist/behaviors/popups/ui-sdk.js +3 -0
- package/dist/behaviors/preferences/index.d.ts +3 -0
- package/dist/behaviors/preferences/index.js +3 -0
- package/dist/behaviors/preferences/ui-sdk.d.ts +3 -0
- package/dist/behaviors/preferences/ui-sdk.js +3 -0
- package/dist/behaviors/selection/index.d.ts +3 -0
- package/dist/behaviors/selection/index.js +3 -0
- package/dist/behaviors/selection/indicator.d.ts +13 -0
- package/dist/behaviors/selection/indicator.js +20 -0
- package/dist/behaviors/selection/ui-sdk.d.ts +2 -0
- package/dist/behaviors/selection/ui-sdk.js +1 -0
- package/dist/behaviors/transitions/index.d.ts +3 -0
- package/dist/behaviors/transitions/index.js +3 -0
- package/dist/behaviors/transitions/ui-sdk.d.ts +3 -0
- package/dist/behaviors/transitions/ui-sdk.js +3 -0
- package/dist/behaviors/trees/index.d.ts +2 -0
- package/dist/behaviors/trees/index.js +1 -0
- package/dist/behaviors/trees/ui-sdk.d.ts +2 -0
- package/dist/behaviors/trees/ui-sdk.js +1 -0
- package/dist/components/accordion/accordion.d.ts +13 -0
- package/dist/components/accordion/accordion.js +165 -0
- package/dist/components/alert/alert.d.ts +13 -0
- package/dist/components/alert/alert.js +131 -0
- package/dist/components/alert-dialog/alert-dialog.d.ts +15 -0
- package/dist/components/alert-dialog/alert-dialog.js +257 -0
- package/dist/components/aspect-ratio/aspect-ratio.d.ts +7 -0
- package/dist/components/aspect-ratio/aspect-ratio.js +57 -0
- package/dist/components/attachment/attachment.d.ts +48 -0
- package/dist/components/attachment/attachment.js +372 -0
- package/dist/components/autocomplete/autocomplete.d.ts +32 -0
- package/dist/components/autocomplete/autocomplete.js +466 -0
- package/dist/components/avatar/avatar.d.ts +6 -0
- package/dist/components/avatar/avatar.js +100 -0
- package/dist/components/avatar-group/avatar-group.d.ts +9 -0
- package/dist/components/avatar-group/avatar-group.js +75 -0
- package/dist/components/badge/badge.d.ts +15 -0
- package/dist/components/badge/badge.js +31 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts +24 -0
- package/dist/components/breadcrumb/breadcrumb.js +279 -0
- package/dist/components/bubble/bubble.d.ts +26 -0
- package/dist/components/bubble/bubble.js +173 -0
- package/dist/components/button/button.d.ts +18 -0
- package/dist/components/button/button.js +91 -0
- package/dist/components/button-group/button-group.d.ts +15 -0
- package/dist/components/button-group/button-group.js +71 -0
- package/dist/components/calendar/calendar.d.ts +29 -0
- package/dist/components/calendar/calendar.js +453 -0
- package/dist/components/card/card.d.ts +14 -0
- package/dist/components/card/card.js +213 -0
- package/dist/components/carousel/carousel.d.ts +16 -0
- package/dist/components/carousel/carousel.js +364 -0
- package/dist/components/chain-of-thought/chain-of-thought.d.ts +72 -0
- package/dist/components/chain-of-thought/chain-of-thought.js +491 -0
- package/dist/components/chat/chat.d.ts +48 -0
- package/dist/components/chat/chat.js +207 -0
- package/dist/components/checkbox/checkbox.d.ts +10 -0
- package/dist/components/checkbox/checkbox.js +118 -0
- package/dist/components/checkpoint/checkpoint.d.ts +24 -0
- package/dist/components/checkpoint/checkpoint.js +178 -0
- package/dist/components/choice-cards/choice-cards.d.ts +38 -0
- package/dist/components/choice-cards/choice-cards.js +255 -0
- package/dist/components/code-block/code-block.d.ts +58 -0
- package/dist/components/code-block/code-block.js +506 -0
- package/dist/components/code-block/highlighter.js +96 -0
- package/dist/components/code-block/use-highlighted-code.d.ts +11 -0
- package/dist/components/code-block/use-highlighted-code.js +54 -0
- package/dist/components/collapsible/collapsible.d.ts +10 -0
- package/dist/components/collapsible/collapsible.js +92 -0
- package/dist/components/color-picker/color-picker.d.ts +17 -0
- package/dist/components/color-picker/color-picker.js +395 -0
- package/dist/components/combobox/combobox.d.ts +54 -0
- package/dist/components/combobox/combobox.js +683 -0
- package/dist/components/command/command.d.ts +23 -0
- package/dist/components/command/command.js +373 -0
- package/dist/components/command-dock/command-dock.d.ts +118 -0
- package/dist/components/command-dock/command-dock.js +944 -0
- package/dist/components/confirmation/confirmation.d.ts +58 -0
- package/dist/components/confirmation/confirmation.js +181 -0
- package/dist/components/context/context.d.ts +82 -0
- package/dist/components/context/context.js +490 -0
- package/dist/components/date-input/date-input.d.ts +16 -0
- package/dist/components/date-input/date-input.js +89 -0
- package/dist/components/date-picker/date-picker.d.ts +28 -0
- package/dist/components/date-picker/date-picker.js +361 -0
- package/dist/components/dialog/dialog.d.ts +14 -0
- package/dist/components/dialog/dialog.js +261 -0
- package/dist/components/drawer/drawer.d.ts +16 -0
- package/dist/components/drawer/drawer.js +309 -0
- package/dist/components/empty/empty.d.ts +18 -0
- package/dist/components/empty/empty.js +192 -0
- package/dist/components/field/field.d.ts +15 -0
- package/dist/components/field/field.js +261 -0
- package/dist/components/file-input/file-input.d.ts +12 -0
- package/dist/components/file-input/file-input.js +216 -0
- package/dist/components/file-tree/file-tree.d.ts +45 -0
- package/dist/components/file-tree/file-tree.js +283 -0
- package/dist/components/hover-card/hover-card.d.ts +10 -0
- package/dist/components/hover-card/hover-card.js +118 -0
- package/dist/components/icon/icon.d.ts +14 -0
- package/dist/components/icon/icon.js +60 -0
- package/dist/components/image-cropper/image-cropper.d.ts +15 -0
- package/dist/components/image-cropper/image-cropper.js +334 -0
- package/dist/components/inline-citation/inline-citation.d.ts +46 -0
- package/dist/components/inline-citation/inline-citation.js +269 -0
- package/dist/components/input/input.d.ts +9 -0
- package/dist/components/input/input.js +43 -0
- package/dist/components/input-group/input-group.d.ts +42 -0
- package/dist/components/input-group/input-group.js +192 -0
- package/dist/components/item/item.d.ts +32 -0
- package/dist/components/item/item.js +394 -0
- package/dist/components/kbd/kbd.d.ts +9 -0
- package/dist/components/kbd/kbd.js +75 -0
- package/dist/components/label/label.d.ts +6 -0
- package/dist/components/label/label.js +40 -0
- package/dist/components/link/link.d.ts +21 -0
- package/dist/components/link/link.js +126 -0
- package/dist/components/listbox/listbox.d.ts +20 -0
- package/dist/components/listbox/listbox.js +199 -0
- package/dist/components/marker/marker.d.ts +11 -0
- package/dist/components/marker/marker.js +88 -0
- package/dist/components/menu/menu.d.ts +38 -0
- package/dist/components/menu/menu.js +553 -0
- package/dist/components/menubar/menubar.d.ts +9 -0
- package/dist/components/menubar/menubar.js +47 -0
- package/dist/components/message/message.d.ts +44 -0
- package/dist/components/message/message.js +328 -0
- package/dist/components/message-scroller/message-scroller.d.ts +111 -0
- package/dist/components/message-scroller/message-scroller.js +957 -0
- package/dist/components/meter/meter.d.ts +8 -0
- package/dist/components/meter/meter.js +162 -0
- package/dist/components/model-selector/model-selector.d.ts +155 -0
- package/dist/components/model-selector/model-selector.js +905 -0
- package/dist/components/native-select/native-select.d.ts +27 -0
- package/dist/components/native-select/native-select.js +226 -0
- package/dist/components/navigation-menu/navigation-menu.d.ts +29 -0
- package/dist/components/navigation-menu/navigation-menu.js +318 -0
- package/dist/components/not-label.js +9 -0
- package/dist/components/note-editor/blocks.d.ts +22 -0
- package/dist/components/note-editor/blocks.js +245 -0
- package/dist/components/note-editor/diff.d.ts +19 -0
- package/dist/components/note-editor/diff.js +64 -0
- package/dist/components/note-editor/editor.js +249 -0
- package/dist/components/note-editor/note-editor.d.ts +109 -0
- package/dist/components/note-editor/note-editor.js +954 -0
- package/dist/components/note-editor/parts/comments.d.ts +24 -0
- package/dist/components/note-editor/parts/comments.js +337 -0
- package/dist/components/note-editor/parts/header.d.ts +25 -0
- package/dist/components/note-editor/parts/header.js +263 -0
- package/dist/components/note-editor/parts/history.d.ts +56 -0
- package/dist/components/note-editor/parts/history.js +409 -0
- package/dist/components/note-editor/parts/presence.d.ts +31 -0
- package/dist/components/note-editor/parts/presence.js +140 -0
- package/dist/components/note-editor/parts/suggestions.d.ts +45 -0
- package/dist/components/note-editor/parts/suggestions.js +316 -0
- package/dist/components/note-editor/parts/toolbar.d.ts +38 -0
- package/dist/components/note-editor/parts/toolbar.js +687 -0
- package/dist/components/note-editor/people.d.ts +84 -0
- package/dist/components/note-editor/people.js +276 -0
- package/dist/components/note-editor/person.d.ts +11 -0
- package/dist/components/note-editor/person.js +15 -0
- package/dist/components/note-place/note-place.d.ts +42 -0
- package/dist/components/note-place/note-place.js +256 -0
- package/dist/components/note-status/note-status.d.ts +59 -0
- package/dist/components/note-status/note-status.js +380 -0
- package/dist/components/number-input/number-input.d.ts +12 -0
- package/dist/components/number-input/number-input.js +252 -0
- package/dist/components/otp-input/otp-input.d.ts +12 -0
- package/dist/components/otp-input/otp-input.js +136 -0
- package/dist/components/pagination/pagination.d.ts +23 -0
- package/dist/components/pagination/pagination.js +218 -0
- package/dist/components/password-input/password-input.d.ts +11 -0
- package/dist/components/password-input/password-input.js +117 -0
- package/dist/components/plan/plan.d.ts +51 -0
- package/dist/components/plan/plan.js +320 -0
- package/dist/components/popover/popover.d.ts +16 -0
- package/dist/components/popover/popover.js +268 -0
- package/dist/components/preferences/preferences.d.ts +5 -0
- package/dist/components/preferences/preferences.js +18 -0
- package/dist/components/progress/progress.d.ts +8 -0
- package/dist/components/progress/progress.js +162 -0
- package/dist/components/prompt-input/prompt-input.d.ts +247 -0
- package/dist/components/prompt-input/prompt-input.js +1367 -0
- package/dist/components/questionnaire/questionnaire.d.ts +174 -0
- package/dist/components/questionnaire/questionnaire.js +1628 -0
- package/dist/components/queue/queue.d.ts +82 -0
- package/dist/components/queue/queue.js +471 -0
- package/dist/components/radio/radio.d.ts +7 -0
- package/dist/components/radio/radio.js +101 -0
- package/dist/components/rating/rating.d.ts +10 -0
- package/dist/components/rating/rating.js +95 -0
- package/dist/components/reasoning/reasoning.d.ts +50 -0
- package/dist/components/reasoning/reasoning.js +233 -0
- package/dist/components/resizable/resizable.d.ts +6 -0
- package/dist/components/resizable/resizable.js +100 -0
- package/dist/components/scroll-area/scroll-area.d.ts +17 -0
- package/dist/components/scroll-area/scroll-area.js +211 -0
- package/dist/components/segmented-control/segmented-control.d.ts +16 -0
- package/dist/components/segmented-control/segmented-control.js +142 -0
- package/dist/components/select/select.d.ts +43 -0
- package/dist/components/select/select.js +577 -0
- package/dist/components/separator/separator.d.ts +4 -0
- package/dist/components/separator/separator.js +38 -0
- package/dist/components/sheet/sheet.d.ts +24 -0
- package/dist/components/sheet/sheet.js +330 -0
- package/dist/components/sidebar/sidebar.d.ts +138 -0
- package/dist/components/sidebar/sidebar.js +1374 -0
- package/dist/components/skeleton/skeleton.d.ts +4 -0
- package/dist/components/skeleton/skeleton.js +40 -0
- package/dist/components/slider/slider.d.ts +9 -0
- package/dist/components/slider/slider.js +193 -0
- package/dist/components/sources/sources.d.ts +35 -0
- package/dist/components/sources/sources.js +209 -0
- package/dist/components/spinner/spinner.d.ts +11 -0
- package/dist/components/spinner/spinner.js +59 -0
- package/dist/components/stack-trace/parse-stack-trace.d.ts +21 -0
- package/dist/components/stack-trace/parse-stack-trace.js +61 -0
- package/dist/components/stack-trace/stack-trace.d.ts +79 -0
- package/dist/components/stack-trace/stack-trace.js +434 -0
- package/dist/components/subagent/subagent.d.ts +71 -0
- package/dist/components/subagent/subagent.js +450 -0
- package/dist/components/suggestion/suggestion.d.ts +21 -0
- package/dist/components/suggestion/suggestion.js +130 -0
- package/dist/components/switch/switch.d.ts +6 -0
- package/dist/components/switch/switch.js +70 -0
- package/dist/components/table/table.d.ts +19 -0
- package/dist/components/table/table.js +284 -0
- package/dist/components/table-of-contents/spy.js +84 -0
- package/dist/components/table-of-contents/table-of-contents.d.ts +92 -0
- package/dist/components/table-of-contents/table-of-contents.js +787 -0
- package/dist/components/tabs/tabs.d.ts +25 -0
- package/dist/components/tabs/tabs.js +273 -0
- package/dist/components/task/task.d.ts +40 -0
- package/dist/components/task/task.js +262 -0
- package/dist/components/terminal/terminal.d.ts +82 -0
- package/dist/components/terminal/terminal.js +457 -0
- package/dist/components/test-results/test-results.d.ts +127 -0
- package/dist/components/test-results/test-results.js +687 -0
- package/dist/components/textarea/textarea.d.ts +8 -0
- package/dist/components/textarea/textarea.js +43 -0
- package/dist/components/time-input/time-input.d.ts +7 -0
- package/dist/components/time-input/time-input.js +82 -0
- package/dist/components/timeline/timeline.d.ts +19 -0
- package/dist/components/timeline/timeline.js +247 -0
- package/dist/components/toast/toast.d.ts +12 -0
- package/dist/components/toast/toast.js +285 -0
- package/dist/components/toggle/toggle.d.ts +15 -0
- package/dist/components/toggle/toggle.js +137 -0
- package/dist/components/token-input/token-input.d.ts +7 -0
- package/dist/components/token-input/token-input.js +117 -0
- package/dist/components/tool/tool.d.ts +66 -0
- package/dist/components/tool/tool.js +413 -0
- package/dist/components/toolbar/toolbar.d.ts +91 -0
- package/dist/components/toolbar/toolbar.js +655 -0
- package/dist/components/tooltip/tooltip.d.ts +8 -0
- package/dist/components/tooltip/tooltip.js +97 -0
- package/dist/components/trace/trace.d.ts +31 -0
- package/dist/components/trace/trace.js +309 -0
- package/dist/components/tree/tree.d.ts +13 -0
- package/dist/components/tree/tree.js +258 -0
- package/dist/components/trigger-menu/trigger-menu.d.ts +30 -0
- package/dist/components/trigger-menu/trigger-menu.js +352 -0
- package/dist/components/usage/usage.d.ts +132 -0
- package/dist/components/usage/usage.js +1368 -0
- package/dist/components/waterfall/waterfall.d.ts +20 -0
- package/dist/components/waterfall/waterfall.js +360 -0
- package/dist/components/week-strip/week-strip.d.ts +177 -0
- package/dist/components/week-strip/week-strip.js +1081 -0
- package/dist/core/index.d.ts +7 -0
- package/dist/core/index.js +27 -0
- package/dist/core/ui-sdk.d.ts +3 -0
- package/dist/core/ui-sdk.js +3 -0
- package/dist/core/use-primitive-state.d.ts +14 -0
- package/dist/core/use-primitive-state.js +25 -0
- package/dist/styles/LICENSE-shadcn.md +21 -0
- package/dist/styles/color-scheme.css +32 -0
- package/dist/styles/components.css +303 -0
- package/dist/styles/index.css +41 -0
- package/dist/styles/tokens.css +474 -0
- package/dist/styles/typeset/shadcn.css +506 -0
- package/dist/styles/typeset.css +70 -0
- package/dist/styles/utilities.css +555 -0
- package/dist/tools/observe/index.d.ts +2 -0
- package/dist/tools/observe/index.js +3 -0
- package/dist/tools/observe/ui-sdk.d.ts +1 -0
- package/dist/tools/observe/ui-sdk.js +2 -0
- package/dist/tools/testing/check-agent.d.ts +28 -0
- package/dist/tools/testing/check-agent.js +42 -0
- package/dist/tools/testing/index.d.ts +4 -0
- package/dist/tools/testing/index.js +4 -0
- package/dist/tools/testing/ui-sdk.d.ts +1 -0
- package/dist/tools/testing/ui-sdk.js +2 -0
- package/dist/utilities/cn/index.d.ts +12 -0
- package/dist/utilities/cn/index.js +47 -0
- package/dist/utilities/color/index.d.ts +2 -0
- package/dist/utilities/color/index.js +3 -0
- package/dist/utilities/color/ui-sdk.d.ts +1 -0
- package/dist/utilities/color/ui-sdk.js +2 -0
- package/dist/utilities/date/index.d.ts +2 -0
- package/dist/utilities/date/index.js +6 -0
- package/dist/utilities/date/ui-sdk.d.ts +1 -0
- package/dist/utilities/date/ui-sdk.js +2 -0
- package/dist/utilities/image/index.d.ts +2 -0
- package/dist/utilities/image/index.js +3 -0
- package/dist/utilities/image/ui-sdk.d.ts +1 -0
- package/dist/utilities/image/ui-sdk.js +2 -0
- package/dist/utilities/mobile/index.d.ts +2 -0
- package/dist/utilities/mobile/index.js +1 -0
- package/dist/utilities/mobile/ui-sdk.d.ts +2 -0
- package/dist/utilities/mobile/ui-sdk.js +1 -0
- package/dist/utilities/number/index.d.ts +2 -0
- package/dist/utilities/number/index.js +3 -0
- package/dist/utilities/number/ui-sdk.d.ts +1 -0
- package/dist/utilities/number/ui-sdk.js +2 -0
- package/dist/utilities/platform/index.d.ts +3 -0
- package/dist/utilities/platform/index.js +14 -0
- package/dist/utilities/platform/ui-sdk.d.ts +3 -0
- package/dist/utilities/platform/ui-sdk.js +3 -0
- package/dist/utilities/storage/index.d.ts +2 -0
- package/dist/utilities/storage/index.js +1 -0
- package/dist/utilities/storage/ui-sdk.d.ts +2 -0
- package/dist/utilities/storage/ui-sdk.js +1 -0
- package/dist/utilities/text/index.d.ts +3 -0
- package/dist/utilities/text/index.js +3 -0
- package/dist/utilities/text/ui-sdk.d.ts +3 -0
- package/dist/utilities/text/ui-sdk.js +3 -0
- package/package.json +192 -4
- package/skills/agent-ready-ui/SKILL.md +229 -0
- package/skills/blocks/SKILL.md +262 -0
- package/skills/compose-screens/SKILL.md +354 -0
- package/skills/note-editor/SKILL.md +493 -0
- package/skills/note-status/SKILL.md +295 -0
- package/skills/setup/SKILL.md +136 -0
- package/skills/theming/SKILL.md +216 -0
- package/src/blocks/notes/adapters.ts +77 -0
- package/src/blocks/notes/data.ts +508 -0
- package/src/blocks/notes/notes-block.tsx +244 -0
- package/src/blocks/notes/parts/home.tsx +219 -0
- package/src/blocks/notes/parts/no-access.tsx +84 -0
- package/src/blocks/notes/parts/note-screen.tsx +412 -0
- package/src/blocks/notes/parts/notes-sidebar.tsx +277 -0
- package/src/blocks/notes/parts/panels.tsx +393 -0
- package/src/blocks/notes/parts/place.ts +15 -0
- package/src/blocks/notes/parts/review-dialog.tsx +159 -0
- package/src/blocks/notes/parts/share.tsx +172 -0
- package/src/blocks/notes/texts.ts +135 -0
- package/src/blocks/shell/adapters.ts +69 -0
- package/src/blocks/shell/data.ts +281 -0
- package/src/blocks/shell/parts/compose.tsx +292 -0
- package/src/blocks/shell/parts/home.tsx +203 -0
- package/src/blocks/shell/parts/marks.tsx +144 -0
- package/src/blocks/shell/parts/rail.tsx +166 -0
- package/src/blocks/shell/parts/rooms-column.tsx +326 -0
- package/src/blocks/shell/shell-block.tsx +210 -0
- package/src/blocks/shell/texts.ts +80 -0
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { Folder01Icon, Link01Icon, UserAdd01Icon } from "@hugeicons/core-free-icons";
|
|
4
|
+
import { Avatar, AvatarFallback } from "abby/avatar";
|
|
5
|
+
import { Icon } from "abby/icon";
|
|
6
|
+
import { InputGroup, InputGroupAddon, InputGroupInput } from "abby/input-group";
|
|
7
|
+
import {
|
|
8
|
+
Popover,
|
|
9
|
+
PopoverContent,
|
|
10
|
+
PopoverDescription,
|
|
11
|
+
PopoverTitle,
|
|
12
|
+
PopoverTrigger,
|
|
13
|
+
} from "abby/popover";
|
|
14
|
+
import {
|
|
15
|
+
Select,
|
|
16
|
+
SelectContent,
|
|
17
|
+
SelectItem,
|
|
18
|
+
SelectItemIndicator,
|
|
19
|
+
SelectItemText,
|
|
20
|
+
SelectTrigger,
|
|
21
|
+
} from "abby/select";
|
|
22
|
+
import { Button } from "abby/button";
|
|
23
|
+
import { useState } from "react";
|
|
24
|
+
import type { NoteAccess, NotesNote, NotesWorkspace } from "../data.ts";
|
|
25
|
+
import type { NotesTexts } from "../texts.ts";
|
|
26
|
+
import { placeOf } from "./place.ts";
|
|
27
|
+
|
|
28
|
+
// Share: who can see the note (only you, its area, or people you pick), each
|
|
29
|
+
// person's role, and a link. The access comes from the note's folder unless
|
|
30
|
+
// it's changed here.
|
|
31
|
+
|
|
32
|
+
type Role = "owner" | "writes" | "reads";
|
|
33
|
+
|
|
34
|
+
function RoleSelect({ name, role, texts }: { name: string; role: Role; texts: NotesTexts }) {
|
|
35
|
+
const items = (["owner", "writes", "reads"] as const).map((value) => ({
|
|
36
|
+
value,
|
|
37
|
+
label: texts[value],
|
|
38
|
+
}));
|
|
39
|
+
return (
|
|
40
|
+
<Select<Role> items={items} defaultValue={role}>
|
|
41
|
+
<SelectTrigger aria-label={texts.roleOf(name)} className="h-7 w-auto gap-1" />
|
|
42
|
+
<SelectContent>
|
|
43
|
+
{items.map((item) => (
|
|
44
|
+
<SelectItem key={item.value} value={item.value} label={item.label}>
|
|
45
|
+
<SelectItemText />
|
|
46
|
+
<SelectItemIndicator />
|
|
47
|
+
</SelectItem>
|
|
48
|
+
))}
|
|
49
|
+
</SelectContent>
|
|
50
|
+
</Select>
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const initials = (name: string) =>
|
|
55
|
+
name
|
|
56
|
+
.split(/\s+/)
|
|
57
|
+
.map((word) => word[0])
|
|
58
|
+
.join("")
|
|
59
|
+
.slice(0, 2)
|
|
60
|
+
.toUpperCase();
|
|
61
|
+
|
|
62
|
+
type ShareProps = {
|
|
63
|
+
note: NotesNote;
|
|
64
|
+
workspace: NotesWorkspace;
|
|
65
|
+
texts: NotesTexts;
|
|
66
|
+
defaultOpen?: boolean;
|
|
67
|
+
onAccessChange: (access: NoteAccess) => void;
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export function Share({ note, workspace, texts, defaultOpen, onAccessChange }: ShareProps) {
|
|
71
|
+
const { area, folder } = placeOf(workspace, note.place);
|
|
72
|
+
const [copied, setCopied] = useState(false);
|
|
73
|
+
const areaName = area?.label ?? "";
|
|
74
|
+
const accessItems = [
|
|
75
|
+
{ value: "area" as const, label: texts.accessArea(areaName) },
|
|
76
|
+
{ value: "private" as const, label: texts.accessPrivate },
|
|
77
|
+
{ value: "shared" as const, label: texts.accessShared },
|
|
78
|
+
];
|
|
79
|
+
const people = workspace.people.filter((person) => person.id !== workspace.me.id);
|
|
80
|
+
|
|
81
|
+
return (
|
|
82
|
+
<Popover defaultOpen={defaultOpen}>
|
|
83
|
+
<PopoverTrigger variant="outline" size="sm">
|
|
84
|
+
<Icon icon={UserAdd01Icon} />
|
|
85
|
+
{texts.share}
|
|
86
|
+
</PopoverTrigger>
|
|
87
|
+
<PopoverContent
|
|
88
|
+
align="end"
|
|
89
|
+
className="w-96 gap-3 p-4 data-[presentation=popover]:w-96 data-[presentation=popover]:p-4"
|
|
90
|
+
>
|
|
91
|
+
<div className="flex flex-col gap-1">
|
|
92
|
+
<PopoverTitle>{texts.shareTitle(note.title)}</PopoverTitle>
|
|
93
|
+
<PopoverDescription className="flex items-center gap-1.5">
|
|
94
|
+
<Icon icon={Folder01Icon} className="size-3.5" />
|
|
95
|
+
{texts.inherits([folder?.label, areaName].filter(Boolean).join(" · "))}
|
|
96
|
+
</PopoverDescription>
|
|
97
|
+
</div>
|
|
98
|
+
<Select<NoteAccess>
|
|
99
|
+
items={accessItems}
|
|
100
|
+
value={note.access}
|
|
101
|
+
onValueChange={(value) => value && onAccessChange(value)}
|
|
102
|
+
>
|
|
103
|
+
<SelectTrigger aria-label={texts.whoCanSee} className="w-full" />
|
|
104
|
+
<SelectContent>
|
|
105
|
+
{accessItems.map((item) => (
|
|
106
|
+
<SelectItem key={item.value} value={item.value} label={item.label}>
|
|
107
|
+
<SelectItemText />
|
|
108
|
+
<SelectItemIndicator />
|
|
109
|
+
</SelectItem>
|
|
110
|
+
))}
|
|
111
|
+
</SelectContent>
|
|
112
|
+
</Select>
|
|
113
|
+
<InputGroup>
|
|
114
|
+
<InputGroupAddon>
|
|
115
|
+
<Icon icon={UserAdd01Icon} />
|
|
116
|
+
</InputGroupAddon>
|
|
117
|
+
<InputGroupInput aria-label={texts.addPeopleLabel} placeholder={texts.addPeople} />
|
|
118
|
+
</InputGroup>
|
|
119
|
+
<ul className="flex flex-col gap-1">
|
|
120
|
+
<li className="flex items-center gap-3 py-1">
|
|
121
|
+
<span
|
|
122
|
+
aria-hidden="true"
|
|
123
|
+
className="flex size-8 items-center justify-center rounded-md bg-muted"
|
|
124
|
+
>
|
|
125
|
+
<span className={`size-2.5 rounded-2xs ${area?.mark ?? ""}`} />
|
|
126
|
+
</span>
|
|
127
|
+
<div className="min-w-0 flex-1">
|
|
128
|
+
<p className="text-sm font-medium">{areaName}</p>
|
|
129
|
+
<p className="text-xs text-muted-foreground">{texts.accessAreaDetail(6)}</p>
|
|
130
|
+
</div>
|
|
131
|
+
<RoleSelect name={areaName} role="writes" texts={texts} />
|
|
132
|
+
</li>
|
|
133
|
+
{people.map((person, index) => (
|
|
134
|
+
<li key={person.id} className="flex items-center gap-3 py-1">
|
|
135
|
+
<Avatar aria-hidden="true" className="size-8">
|
|
136
|
+
<AvatarFallback className="text-xs">{initials(person.name)}</AvatarFallback>
|
|
137
|
+
</Avatar>
|
|
138
|
+
<p className="min-w-0 flex-1 truncate text-sm font-medium">{person.name}</p>
|
|
139
|
+
<RoleSelect
|
|
140
|
+
name={person.name}
|
|
141
|
+
role={index === 0 ? "owner" : "writes"}
|
|
142
|
+
texts={texts}
|
|
143
|
+
/>
|
|
144
|
+
</li>
|
|
145
|
+
))}
|
|
146
|
+
</ul>
|
|
147
|
+
<div className="-mx-4 flex flex-col gap-1 border-t border-border px-4 pt-3 text-xs text-muted-foreground">
|
|
148
|
+
<p>{texts.assistantReads}</p>
|
|
149
|
+
<p>{texts.agentsSee}</p>
|
|
150
|
+
</div>
|
|
151
|
+
<div className="flex items-center gap-2">
|
|
152
|
+
<Button
|
|
153
|
+
variant="outline"
|
|
154
|
+
size="sm"
|
|
155
|
+
onClick={() => {
|
|
156
|
+
void navigator.clipboard?.writeText(window.location.href).catch(() => {});
|
|
157
|
+
setCopied(true);
|
|
158
|
+
}}
|
|
159
|
+
>
|
|
160
|
+
<Icon icon={Link01Icon} />
|
|
161
|
+
{texts.copyLink}
|
|
162
|
+
</Button>
|
|
163
|
+
{copied && (
|
|
164
|
+
<span role="status" className="text-xs text-muted-foreground">
|
|
165
|
+
{texts.copied}
|
|
166
|
+
</span>
|
|
167
|
+
)}
|
|
168
|
+
</div>
|
|
169
|
+
</PopoverContent>
|
|
170
|
+
</Popover>
|
|
171
|
+
);
|
|
172
|
+
}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
// Every text the block shows, by key. An app translates the block by passing
|
|
2
|
+
// some or all of them to `NotesBlock`'s `texts`. A text that holds a value is a
|
|
3
|
+
// function of it.
|
|
4
|
+
|
|
5
|
+
export const notesTexts = {
|
|
6
|
+
// The sidebar.
|
|
7
|
+
notes: "Notes",
|
|
8
|
+
searchNotes: "Search notes",
|
|
9
|
+
newNote: "New note",
|
|
10
|
+
tree: "Notes by area",
|
|
11
|
+
toReview: "To review",
|
|
12
|
+
inMemory: "In Memory",
|
|
13
|
+
onlyYou: "Only you",
|
|
14
|
+
writing: (names: string[]) => `${names.join(" and ")} writing`,
|
|
15
|
+
|
|
16
|
+
// Home.
|
|
17
|
+
home: "Home",
|
|
18
|
+
newTitle: "Title of a new note",
|
|
19
|
+
newTitlePlaceholder: "Write a title and start",
|
|
20
|
+
onlyMe: "Only me",
|
|
21
|
+
startWith: "Start with",
|
|
22
|
+
create: "create",
|
|
23
|
+
toReviewHeading: "To review",
|
|
24
|
+
review: (title: string) => `Review ${title}`,
|
|
25
|
+
reviewShort: "Review",
|
|
26
|
+
recent: "Recent",
|
|
27
|
+
seeAll: "See all",
|
|
28
|
+
firstDay:
|
|
29
|
+
"This is where you write what the team wants to keep. When a note is ready, it moves to Memory.",
|
|
30
|
+
|
|
31
|
+
// The note's header.
|
|
32
|
+
sidebar: "Sidebar",
|
|
33
|
+
here: (count: number) => `${count} here`,
|
|
34
|
+
share: "Share",
|
|
35
|
+
history: "History",
|
|
36
|
+
requestReview: "Request review",
|
|
37
|
+
assistant: "Assistant",
|
|
38
|
+
openNext: "Open v2",
|
|
39
|
+
viewing: (label: string) => `Viewing the version from ${label}`,
|
|
40
|
+
backToNote: "Back to the note",
|
|
41
|
+
restore: "Restore this version",
|
|
42
|
+
|
|
43
|
+
// The note.
|
|
44
|
+
note: "Note",
|
|
45
|
+
title: "Title",
|
|
46
|
+
emptyNote: "Write, or press / to insert",
|
|
47
|
+
askAssistant: "Ask the assistant",
|
|
48
|
+
versionEnd: (label: string) => `This is the note as it was ${label}.`,
|
|
49
|
+
seeCurrent: "See the current version",
|
|
50
|
+
outline: "Sections",
|
|
51
|
+
offline: "Offline. Your changes are saved here and merge when you're back.",
|
|
52
|
+
saveFailed: "We couldn't save your last change. It stays here while we try again.",
|
|
53
|
+
retry: "Retry saving",
|
|
54
|
+
inMemorySince: (since: string, by: string) =>
|
|
55
|
+
`In Memory since ${since} · confirmed by ${by} · read only`,
|
|
56
|
+
seeMemory: "See the memory",
|
|
57
|
+
|
|
58
|
+
// The assistant's panel.
|
|
59
|
+
closePanel: "Close panel",
|
|
60
|
+
privateNote: "It's a note only you can read. The assistant won't read it until you share it.",
|
|
61
|
+
openTo: (area: string) => `Open it to ${area}`,
|
|
62
|
+
touches: (count: number) => `This note touches ${count} notes that already exist`,
|
|
63
|
+
askPlaceholder: "Ask about this note…",
|
|
64
|
+
question: "Question for the assistant",
|
|
65
|
+
thinking: "Looking through your notes…",
|
|
66
|
+
|
|
67
|
+
// The history.
|
|
68
|
+
everyChange: "Every change is saved",
|
|
69
|
+
show: "Show",
|
|
70
|
+
all: "All",
|
|
71
|
+
people: "People",
|
|
72
|
+
suggestions: "Suggestions",
|
|
73
|
+
statuses: "Statuses",
|
|
74
|
+
seeChanges: "See the changes",
|
|
75
|
+
seeChangesOf: (title: string, time: string) => `See the changes: ${title}, ${time}`,
|
|
76
|
+
viewingThis: "You're viewing this version",
|
|
77
|
+
|
|
78
|
+
// The memory's panel.
|
|
79
|
+
savedInMemory: "Saved in Memory",
|
|
80
|
+
where: "Where it came from",
|
|
81
|
+
writtenBy: (names: string[]) => `Written by ${names.join(" and ")}`,
|
|
82
|
+
timeline: "Timeline",
|
|
83
|
+
|
|
84
|
+
// Sharing.
|
|
85
|
+
shareTitle: (title: string) => `Share «${title}»`,
|
|
86
|
+
inherits: (from: string) => `Inherits from ${from}`,
|
|
87
|
+
whoCanSee: "Who can see it",
|
|
88
|
+
accessArea: (area: string) => `All of ${area}`,
|
|
89
|
+
accessAreaDetail: (count: number) => `The ${count} people in the area can see it`,
|
|
90
|
+
accessPrivate: "Only me",
|
|
91
|
+
accessShared: "People I pick",
|
|
92
|
+
addPeople: "Add people or areas…",
|
|
93
|
+
addPeopleLabel: "Add people or areas",
|
|
94
|
+
roleOf: (name: string) => `Role of ${name}`,
|
|
95
|
+
owner: "Owner",
|
|
96
|
+
writes: "Writes",
|
|
97
|
+
reads: "Reads",
|
|
98
|
+
assistantReads: "The assistant reads it only for whoever can see it.",
|
|
99
|
+
agentsSee: "Agents see what their owner sees.",
|
|
100
|
+
copyLink: "Copy link",
|
|
101
|
+
copied: "Link copied",
|
|
102
|
+
|
|
103
|
+
// Asking for a review.
|
|
104
|
+
reviewTitle: "Request review",
|
|
105
|
+
reviewMoves: (title: string, from: string, to: string) => `${title} moves from ${from} to ${to}`,
|
|
106
|
+
reviewers: "Who reviews",
|
|
107
|
+
chosen: (count: number) => `${count} chosen`,
|
|
108
|
+
message: "Message",
|
|
109
|
+
optional: "optional",
|
|
110
|
+
messagePlaceholder: "What should they look at? For example, what we left out.",
|
|
111
|
+
messageHint: "They get it in Home, under «Waiting for you».",
|
|
112
|
+
memoryWhenAll: "Moves to Memory once everyone gives their OK.",
|
|
113
|
+
cancel: "Cancel",
|
|
114
|
+
sendReview: "Send for review",
|
|
115
|
+
reviewFailed: "We couldn't send it. The note stays as it was.",
|
|
116
|
+
|
|
117
|
+
// A note the person can't open.
|
|
118
|
+
noAccess: "You don't have access to this note",
|
|
119
|
+
noAccessDetail: (area: string, owner: string) =>
|
|
120
|
+
`It belongs to ${area}. ${owner} decides who sees it.`,
|
|
121
|
+
accessMessage: (owner: string) => `Message for ${owner} (optional)`,
|
|
122
|
+
accessHint: (owner: string) => `${owner} gets your request in Home, under «Waiting for you».`,
|
|
123
|
+
requestAccess: "Request access",
|
|
124
|
+
backToNotes: "Back to Notes",
|
|
125
|
+
requested: (owner: string) => `Requested. We'll let you know when ${owner} answers.`,
|
|
126
|
+
|
|
127
|
+
// Statuses, as the select and the tree say them.
|
|
128
|
+
status: "Status",
|
|
129
|
+
draft: "Draft",
|
|
130
|
+
doing: "In progress",
|
|
131
|
+
inReview: "In review",
|
|
132
|
+
done: "In Memory",
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
export type NotesTexts = typeof notesTexts;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import type { ShellWorkspace } from "./data.ts";
|
|
2
|
+
|
|
3
|
+
// What an app plugs into the block: where a message goes, what the assistant
|
|
4
|
+
// is asked, the search palette. The block keeps what's on screen and calls
|
|
5
|
+
// these; each returns a promise, and a rejected one keeps what was typed.
|
|
6
|
+
|
|
7
|
+
/** Where the assistant thinks a message from ⌘N belongs. */
|
|
8
|
+
export type ShellRoute = {
|
|
9
|
+
/** A room that already exists, which Enter picks. */
|
|
10
|
+
room?: { id: string; title: string; area: string; detail: string };
|
|
11
|
+
/** A new room, which ⌘Enter makes: where it goes ("Marketing › Campañas") and its name. */
|
|
12
|
+
newRoom: { area: string; place: string; name: string };
|
|
13
|
+
/** Why it chose so, under the choices. */
|
|
14
|
+
reason?: string;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
/** Where a message from ⌘N goes. */
|
|
18
|
+
export type ShellDestination =
|
|
19
|
+
| { kind: "room"; id: string }
|
|
20
|
+
| { kind: "new"; area: string; name: string }
|
|
21
|
+
| { kind: "private" };
|
|
22
|
+
|
|
23
|
+
export type ShellAdapter = {
|
|
24
|
+
/** Asks the assistant where a message belongs, while it's typed into ⌘N. */
|
|
25
|
+
route(text: string): Promise<ShellRoute>;
|
|
26
|
+
/** Sends a message from ⌘N where the person chose. */
|
|
27
|
+
send(input: { text: string; to: ShellDestination }): Promise<void>;
|
|
28
|
+
/** Asks the assistant from the home page; `area` is undefined when it chooses. */
|
|
29
|
+
ask(input: { text: string; area?: string }): Promise<void>;
|
|
30
|
+
markAllRead(): Promise<void>;
|
|
31
|
+
/** Opens the app's search, from the top bar or ⌘K. */
|
|
32
|
+
openSearch(): void;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* An adapter that keeps nothing: every call resolves at once, as if a server
|
|
37
|
+
* had answered. Its routing picks the first room whose title shares a word
|
|
38
|
+
* with the message. The stories use it; an app starts from it and replaces
|
|
39
|
+
* each method with a call to its own API.
|
|
40
|
+
*/
|
|
41
|
+
export function createMemoryAdapter(workspace: ShellWorkspace): ShellAdapter {
|
|
42
|
+
const words = (text: string) =>
|
|
43
|
+
text
|
|
44
|
+
.toLowerCase()
|
|
45
|
+
.split(/[^\p{L}\p{N}]+/u)
|
|
46
|
+
.filter((word) => word.length > 3);
|
|
47
|
+
return {
|
|
48
|
+
route: async (text) => {
|
|
49
|
+
const asked = new Set(words(text));
|
|
50
|
+
const room = workspace.rooms.find((each) => words(each.title).some((w) => asked.has(w)));
|
|
51
|
+
const area = workspace.areas.find((each) => each.id === room?.area) ?? workspace.areas[0];
|
|
52
|
+
const areaName = area?.name ?? workspace.team.name;
|
|
53
|
+
return {
|
|
54
|
+
room: room && {
|
|
55
|
+
id: room.id,
|
|
56
|
+
title: room.title,
|
|
57
|
+
area: room.area,
|
|
58
|
+
detail: `${areaName} · sala abierta · ${room.people.length + 1} personas`,
|
|
59
|
+
},
|
|
60
|
+
newRoom: { area: area?.id ?? "", place: areaName, name: text.slice(0, 32) },
|
|
61
|
+
reason: room ? `Lo decidió por «${room.title}»` : undefined,
|
|
62
|
+
};
|
|
63
|
+
},
|
|
64
|
+
send: async () => {},
|
|
65
|
+
ask: async () => {},
|
|
66
|
+
markAllRead: async () => {},
|
|
67
|
+
openSearch: () => {},
|
|
68
|
+
};
|
|
69
|
+
}
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
// The block's data model and the example team its stories show: Casa Norte,
|
|
2
|
+
// from Alma's design. An app replaces the example with what its adapter loads
|
|
3
|
+
// (see adapters.ts); the types stay.
|
|
4
|
+
|
|
5
|
+
/** Someone on the team, or an agent working for them. */
|
|
6
|
+
export type ShellPerson = {
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
/** Initials for the avatar. From the name when left out. */
|
|
10
|
+
initials?: string;
|
|
11
|
+
/** Any CSS color: it tints the avatar. One of the `presence-*` tokens in the example. */
|
|
12
|
+
color: string;
|
|
13
|
+
/** An agent draws as a small square, in mono, instead of a circle. */
|
|
14
|
+
agent?: boolean;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
/** An area of the team: Marketing, Finance. Its color marks its group and its rooms. */
|
|
18
|
+
export type ShellArea = {
|
|
19
|
+
id: string;
|
|
20
|
+
name: string;
|
|
21
|
+
/** Any CSS color. One of the `chart-*` tokens in the example. */
|
|
22
|
+
color: string;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* What a room's line says, one state at a time: it waits for the person,
|
|
27
|
+
* the assistant is working in it, it has news, or nothing (how long ago).
|
|
28
|
+
*/
|
|
29
|
+
export type ShellRoomStatus = "waiting" | "working" | "news" | "quiet";
|
|
30
|
+
|
|
31
|
+
export type ShellRoom = {
|
|
32
|
+
id: string;
|
|
33
|
+
title: string;
|
|
34
|
+
/** The area's id. A room waiting for the person leaves its area for "For you". */
|
|
35
|
+
area: string;
|
|
36
|
+
status: ShellRoomStatus;
|
|
37
|
+
/** Who is in it, by id, as the line's avatars. */
|
|
38
|
+
people: string[];
|
|
39
|
+
/** The line under the title: "Ana is writing…", "yesterday". */
|
|
40
|
+
line: string;
|
|
41
|
+
/** Something the person hasn't read: the title takes medium weight. */
|
|
42
|
+
unread?: boolean;
|
|
43
|
+
/** The person takes part in it, for "Mine". */
|
|
44
|
+
mine?: boolean;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
/** Something on the home page that waits for the person. */
|
|
48
|
+
export type ShellWaiting = {
|
|
49
|
+
id: string;
|
|
50
|
+
/** The room it opens. */
|
|
51
|
+
room: string;
|
|
52
|
+
/** The line's lead-in, in medium weight: "Alma proposes to keep:". */
|
|
53
|
+
lead: string;
|
|
54
|
+
text: string;
|
|
55
|
+
detail: string;
|
|
56
|
+
/** Review is the page's one black button; reply is an outline. */
|
|
57
|
+
action: "review" | "reply";
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
/** What the assistant learned overnight, by kind. */
|
|
61
|
+
export type ShellLearning = { kind: "lesson" | "warning"; area: string; text: string };
|
|
62
|
+
|
|
63
|
+
/** The assistant's night, at the sidebar's foot. */
|
|
64
|
+
export type ShellDream = {
|
|
65
|
+
/** "v43": the memory's version after the night. */
|
|
66
|
+
version: string;
|
|
67
|
+
/** What it did, then what it asks the person, in warning. */
|
|
68
|
+
text: string;
|
|
69
|
+
question?: string;
|
|
70
|
+
nights: number;
|
|
71
|
+
of: number;
|
|
72
|
+
learnings: number;
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
export type ShellWorkspace = {
|
|
76
|
+
team: { name: string; initials: string; color: string };
|
|
77
|
+
me: ShellPerson;
|
|
78
|
+
people: ShellPerson[];
|
|
79
|
+
areas: ShellArea[];
|
|
80
|
+
rooms: ShellRoom[];
|
|
81
|
+
/** Who has been in today, for the page's top bar. */
|
|
82
|
+
today: { count: number; people: string[] };
|
|
83
|
+
/** The home page's line under the greeting. */
|
|
84
|
+
summary: string;
|
|
85
|
+
waiting: ShellWaiting[];
|
|
86
|
+
/** What happened while the person was away. Text between `**` is the room's name, in medium weight. */
|
|
87
|
+
timeline: { time: string; text: string }[];
|
|
88
|
+
learned: { total: number; items: ShellLearning[] };
|
|
89
|
+
dream?: ShellDream;
|
|
90
|
+
/** A team with no rooms yet: the first steps, each done or not. */
|
|
91
|
+
setup?: { label: string; done: boolean }[];
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
const people: ShellPerson[] = [
|
|
95
|
+
{ id: "lp", name: "Lucía Pérez", color: "var(--presence-3)" },
|
|
96
|
+
{ id: "dr", name: "Diego Ruiz", color: "var(--presence-1)" },
|
|
97
|
+
{ id: "ms", name: "Marta Soler", color: "var(--presence-4)" },
|
|
98
|
+
{ id: "ag", name: "Ana Gil", color: "var(--presence-2)" },
|
|
99
|
+
{
|
|
100
|
+
id: "cc",
|
|
101
|
+
name: "Claude Code de Diego",
|
|
102
|
+
initials: "CC",
|
|
103
|
+
color: "var(--foreground)",
|
|
104
|
+
agent: true,
|
|
105
|
+
},
|
|
106
|
+
];
|
|
107
|
+
|
|
108
|
+
export const areas: ShellArea[] = [
|
|
109
|
+
{ id: "sales", name: "Ventas", color: "var(--chart-1)" },
|
|
110
|
+
{ id: "marketing", name: "Marketing", color: "var(--chart-3)" },
|
|
111
|
+
{ id: "finance", name: "Finanzas", color: "var(--chart-4)" },
|
|
112
|
+
{ id: "product", name: "Producto", color: "var(--chart-2)" },
|
|
113
|
+
];
|
|
114
|
+
|
|
115
|
+
export const workspace: ShellWorkspace = {
|
|
116
|
+
team: { name: "Casa Norte", initials: "CN", color: "#8b6a3e" },
|
|
117
|
+
me: people[0]!,
|
|
118
|
+
people,
|
|
119
|
+
areas,
|
|
120
|
+
rooms: [
|
|
121
|
+
{
|
|
122
|
+
id: "pricing-2027",
|
|
123
|
+
title: "Precios 2027",
|
|
124
|
+
area: "sales",
|
|
125
|
+
status: "waiting",
|
|
126
|
+
people: ["ms"],
|
|
127
|
+
line: "Alma propone un precio · tu OK",
|
|
128
|
+
mine: true,
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
id: "campaigns-2015",
|
|
132
|
+
title: "Campañas 2015–2020",
|
|
133
|
+
area: "marketing",
|
|
134
|
+
status: "waiting",
|
|
135
|
+
people: ["dr"],
|
|
136
|
+
line: "Diego te preguntó en un hilo",
|
|
137
|
+
mine: true,
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
id: "summer-brief",
|
|
141
|
+
title: "Brief de verano 2027",
|
|
142
|
+
area: "marketing",
|
|
143
|
+
status: "working",
|
|
144
|
+
people: ["dr"],
|
|
145
|
+
line: "Alma lee Finanzas",
|
|
146
|
+
unread: true,
|
|
147
|
+
mine: true,
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
id: "spring-launch",
|
|
151
|
+
title: "Lanzamiento primavera",
|
|
152
|
+
area: "marketing",
|
|
153
|
+
status: "news",
|
|
154
|
+
people: ["lp", "ag"],
|
|
155
|
+
line: "Ana escribe…",
|
|
156
|
+
unread: true,
|
|
157
|
+
mine: true,
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
id: "brand-tone",
|
|
161
|
+
title: "Tono de marca 2027",
|
|
162
|
+
area: "marketing",
|
|
163
|
+
status: "quiet",
|
|
164
|
+
people: ["lp"],
|
|
165
|
+
line: "ayer",
|
|
166
|
+
mine: true,
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
id: "budget-2027",
|
|
170
|
+
title: "Presupuesto 2027",
|
|
171
|
+
area: "finance",
|
|
172
|
+
status: "working",
|
|
173
|
+
people: ["cc"],
|
|
174
|
+
line: "Claude Code de Diego lee",
|
|
175
|
+
mine: true,
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
id: "q3-close",
|
|
179
|
+
title: "Cierre del Q3",
|
|
180
|
+
area: "finance",
|
|
181
|
+
status: "quiet",
|
|
182
|
+
people: ["ms"],
|
|
183
|
+
line: "Marta cerró la sala · hace 2 h",
|
|
184
|
+
mine: true,
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
id: "roadmap-2027",
|
|
188
|
+
title: "Hoja de ruta 2027",
|
|
189
|
+
area: "product",
|
|
190
|
+
status: "news",
|
|
191
|
+
people: ["lp", "ag"],
|
|
192
|
+
line: "3 mensajes nuevos",
|
|
193
|
+
unread: true,
|
|
194
|
+
mine: true,
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
id: "client-onboarding",
|
|
198
|
+
title: "Onboarding de clientes",
|
|
199
|
+
area: "product",
|
|
200
|
+
status: "quiet",
|
|
201
|
+
people: ["ag"],
|
|
202
|
+
line: "hace 3 d",
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
id: "sales-playbook",
|
|
206
|
+
title: "Guion de ventas",
|
|
207
|
+
area: "sales",
|
|
208
|
+
status: "quiet",
|
|
209
|
+
people: ["ms", "dr"],
|
|
210
|
+
line: "hace 1 semana",
|
|
211
|
+
},
|
|
212
|
+
],
|
|
213
|
+
today: { count: 8, people: ["dr", "ms", "ag"] },
|
|
214
|
+
summary: "Dos cosas te esperan. Anoche Alma aprendió cuatro cosas nuevas del equipo.",
|
|
215
|
+
waiting: [
|
|
216
|
+
{
|
|
217
|
+
id: "keep-price",
|
|
218
|
+
room: "pricing-2027",
|
|
219
|
+
lead: "Alma propone guardar:",
|
|
220
|
+
text: "«Precio base 59 € al mes desde enero de 2027»",
|
|
221
|
+
detail:
|
|
222
|
+
"Ventas · Precios 2027 · lo dijeron Marta y Diego en la sala · contradice una nota de 2026",
|
|
223
|
+
action: "review",
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
id: "diego-asks",
|
|
227
|
+
room: "campaigns-2015",
|
|
228
|
+
lead: "Diego te preguntó:",
|
|
229
|
+
text: "«¿por qué no repetimos Vecinos en 2020?»",
|
|
230
|
+
detail: "Marketing · Campañas 2015–2020 · hilo con 4 respuestas · hace 12 min",
|
|
231
|
+
action: "reply",
|
|
232
|
+
},
|
|
233
|
+
],
|
|
234
|
+
timeline: [
|
|
235
|
+
{ time: "08:40", text: "Marta cerró **Cierre del Q3**. Alma guardó 3 decisiones en Finanzas." },
|
|
236
|
+
{ time: "08:12", text: "Claude Code de Diego leyó 12 memorias de Producto y no cambió nada." },
|
|
237
|
+
{ time: "07:55", text: "Slack trajo 48 mensajes de #ventas. Alma propuso 2 memorias." },
|
|
238
|
+
],
|
|
239
|
+
learned: {
|
|
240
|
+
total: 4,
|
|
241
|
+
items: [
|
|
242
|
+
{
|
|
243
|
+
kind: "lesson",
|
|
244
|
+
area: "Ventas",
|
|
245
|
+
text: "Los descuentos de fin de año bajan la renovación de enero un 9 %.",
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
kind: "warning",
|
|
249
|
+
area: "Marketing",
|
|
250
|
+
text: "Dos notas dicen cosas distintas del precio de 2026. Te pregunta cuál vale.",
|
|
251
|
+
},
|
|
252
|
+
],
|
|
253
|
+
},
|
|
254
|
+
dream: {
|
|
255
|
+
version: "v43",
|
|
256
|
+
text: "Unió 3 notas de precios, enlazó 9 memorias y tiene",
|
|
257
|
+
question: "1 duda para ti",
|
|
258
|
+
nights: 5,
|
|
259
|
+
of: 7,
|
|
260
|
+
learnings: 31,
|
|
261
|
+
},
|
|
262
|
+
};
|
|
263
|
+
|
|
264
|
+
/** A team just created: no rooms, nothing waiting, and the first steps in the sidebar. */
|
|
265
|
+
export const emptyWorkspace: ShellWorkspace = {
|
|
266
|
+
...workspace,
|
|
267
|
+
areas: [],
|
|
268
|
+
rooms: [],
|
|
269
|
+
today: { count: 1, people: [] },
|
|
270
|
+
summary: "Escribe la primera pregunta. Alma crea la sala y te avisa cuando aprenda algo.",
|
|
271
|
+
waiting: [],
|
|
272
|
+
timeline: [],
|
|
273
|
+
learned: { total: 0, items: [] },
|
|
274
|
+
dream: undefined,
|
|
275
|
+
setup: [
|
|
276
|
+
{ label: "Crear la organización", done: true },
|
|
277
|
+
{ label: "Crear dos áreas", done: false },
|
|
278
|
+
{ label: "Conectar Slack o el correo", done: false },
|
|
279
|
+
{ label: "Invitar a tres personas", done: false },
|
|
280
|
+
],
|
|
281
|
+
};
|