@justanarthur/modo-ui-ai 0.0.0-stage → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/LICENSE.fluid-functionalism +21 -0
- package/README.md +105 -2
- package/blocks/conversation/agent-prompt/examples.mdx +44 -0
- package/blocks/conversation/agent-prompt/index.tsx +114 -0
- package/blocks/conversation/composer/draft.css +25 -0
- package/blocks/conversation/composer/draft.tsx +589 -0
- package/blocks/conversation/composer/examples.mdx +114 -0
- package/blocks/conversation/composer/file-preview-tile.tsx +59 -0
- package/blocks/conversation/composer/file-thumbnail.tsx +146 -0
- package/blocks/conversation/composer/index.tsx +517 -0
- package/blocks/conversation/composer/queued-row.tsx +102 -0
- package/blocks/conversation/composer/shared.ts +38 -0
- package/blocks/conversation/composer/suggestion-row.tsx +64 -0
- package/blocks/conversation/composer/use-composer-files.ts +142 -0
- package/blocks/conversation/composer/use-history-nav.ts +60 -0
- package/blocks/conversation/composer/use-message-queue.ts +108 -0
- package/blocks/conversation/composer/use-region-height.ts +34 -0
- package/blocks/conversation/failure-states/examples.mdx +58 -0
- package/blocks/conversation/failure-states/index.tsx +274 -0
- package/blocks/conversation/transcript/examples.mdx +43 -0
- package/blocks/conversation/transcript/index.tsx +204 -0
- package/blocks/conversation/transcript-search/examples.mdx +50 -0
- package/blocks/conversation/transcript-search/index.tsx +469 -0
- package/blocks/dialogs/command-palette/examples.mdx +33 -0
- package/blocks/dialogs/command-palette/index.tsx +232 -0
- package/blocks/dialogs/hook-dialog/examples.mdx +44 -0
- package/blocks/dialogs/hook-dialog/index.tsx +286 -0
- package/blocks/dialogs/mcp-server-dialog/examples.mdx +57 -0
- package/blocks/dialogs/mcp-server-dialog/index.tsx +415 -0
- package/blocks/dialogs/shortcuts-sheet/examples.mdx +36 -0
- package/blocks/dialogs/shortcuts-sheet/index.tsx +186 -0
- package/blocks/panes/artifacts-pane/examples.mdx +23 -0
- package/blocks/panes/artifacts-pane/index.tsx +82 -0
- package/blocks/panes/changes-pane/examples.mdx +23 -0
- package/blocks/panes/changes-pane/index.tsx +248 -0
- package/blocks/panes/file-pane/examples.mdx +13 -0
- package/blocks/panes/file-pane/index.tsx +102 -0
- package/blocks/panes/pr-pane/examples.mdx +13 -0
- package/blocks/panes/pr-pane/index.tsx +191 -0
- package/blocks/panes/side-pane/examples.mdx +58 -0
- package/blocks/panes/side-pane/index.tsx +187 -0
- package/blocks/panes/tasks-pane/examples.mdx +23 -0
- package/blocks/panes/tasks-pane/index.tsx +127 -0
- package/blocks/panes/terminal-pane/examples.mdx +13 -0
- package/blocks/panes/terminal-pane/index.tsx +99 -0
- package/blocks/panes/usage-pane/examples.mdx +13 -0
- package/blocks/panes/usage-pane/index.tsx +75 -0
- package/blocks/profiles/profile-onboarding/examples.mdx +80 -0
- package/blocks/profiles/profile-onboarding/index.tsx +580 -0
- package/blocks/profiles/profile-switcher/examples.mdx +18 -0
- package/blocks/profiles/profile-switcher/index.tsx +197 -0
- package/blocks/profiles/profile-usage/examples.mdx +21 -0
- package/blocks/profiles/profile-usage/index.tsx +127 -0
- package/blocks/sessions/inbox/examples.mdx +35 -0
- package/blocks/sessions/inbox/index.tsx +372 -0
- package/blocks/sessions/session-board/examples.mdx +34 -0
- package/blocks/sessions/session-board/index.tsx +570 -0
- package/blocks/sessions/session-sidebar/examples.mdx +43 -0
- package/blocks/sessions/session-sidebar/index.tsx +442 -0
- package/blocks/settings/extensions/examples.mdx +10 -0
- package/blocks/settings/extensions/index.tsx +72 -0
- package/blocks/settings/hooks/examples.mdx +16 -0
- package/blocks/settings/hooks/index.tsx +127 -0
- package/blocks/settings/mcp-servers/examples.mdx +26 -0
- package/blocks/settings/mcp-servers/index.tsx +204 -0
- package/blocks/settings/memory/examples.mdx +22 -0
- package/blocks/settings/memory/index.tsx +113 -0
- package/blocks/settings/notifications/examples.mdx +8 -0
- package/blocks/settings/notifications/index.tsx +63 -0
- package/blocks/settings/permission-rules/examples.mdx +37 -0
- package/blocks/settings/permission-rules/index.tsx +317 -0
- package/blocks/settings/plugin-catalog/examples.mdx +52 -0
- package/blocks/settings/plugin-catalog/index.tsx +407 -0
- package/blocks/settings/plugins/examples.mdx +10 -0
- package/blocks/settings/plugins/index.tsx +72 -0
- package/blocks/settings/settings-window/examples.mdx +40 -0
- package/blocks/settings/settings-window/index.tsx +188 -0
- package/blocks/settings/worktrees/examples.mdx +17 -0
- package/blocks/settings/worktrees/index.tsx +145 -0
- package/components/conversation/agent-run/examples.mdx +30 -0
- package/components/conversation/agent-run/index.tsx +82 -0
- package/components/conversation/chapter-nav/examples.mdx +30 -0
- package/components/conversation/chapter-nav/index.tsx +123 -0
- package/components/conversation/message/examples.mdx +53 -0
- package/components/conversation/message/index.tsx +128 -0
- package/components/conversation/message/working.tsx +102 -0
- package/components/conversation/reasoning/examples.mdx +22 -0
- package/components/conversation/reasoning/index.tsx +54 -0
- package/components/conversation/recap/examples.mdx +21 -0
- package/components/conversation/recap/index.tsx +67 -0
- package/components/conversation/todo-list/examples.mdx +32 -0
- package/components/conversation/todo-list/index.tsx +106 -0
- package/components/conversation/tool-call/examples.mdx +48 -0
- package/components/conversation/tool-call/index.tsx +142 -0
- package/components/conversation/work-summary/examples.mdx +50 -0
- package/components/conversation/work-summary/index.tsx +87 -0
- package/components/prompts/permission-request/examples.mdx +32 -0
- package/components/prompts/permission-request/index.tsx +74 -0
- package/components/prompts/plan-approval/examples.mdx +37 -0
- package/components/prompts/plan-approval/index.tsx +76 -0
- package/components/prompts/prompt-card/examples.mdx +31 -0
- package/components/prompts/prompt-card/index.tsx +82 -0
- package/components/prompts/question-prompt/examples.mdx +46 -0
- package/components/prompts/question-prompt/index.tsx +118 -0
- package/dist/blocks/conversation/agent-prompt/index.d.ts +7 -0
- package/dist/blocks/conversation/agent-prompt/index.js +13 -0
- package/dist/blocks/conversation/composer/index.d.ts +4 -0
- package/dist/blocks/conversation/composer/index.js +15 -0
- package/dist/blocks/conversation/failure-states/index.d.ts +4 -0
- package/dist/blocks/conversation/failure-states/index.js +8 -0
- package/dist/blocks/conversation/transcript/index.d.ts +50 -0
- package/dist/blocks/conversation/transcript/index.js +17 -0
- package/dist/blocks/conversation/transcript-search/index.d.ts +4 -0
- package/dist/blocks/conversation/transcript-search/index.js +11 -0
- package/dist/blocks/dialogs/command-palette/index.d.ts +5 -0
- package/dist/blocks/dialogs/command-palette/index.js +20 -0
- package/dist/blocks/dialogs/hook-dialog/index.d.ts +3 -0
- package/dist/blocks/dialogs/hook-dialog/index.js +12 -0
- package/dist/blocks/dialogs/mcp-server-dialog/index.d.ts +5 -0
- package/dist/blocks/dialogs/mcp-server-dialog/index.js +12 -0
- package/dist/blocks/dialogs/shortcuts-sheet/index.d.ts +2 -0
- package/dist/blocks/dialogs/shortcuts-sheet/index.js +11 -0
- package/dist/blocks/panes/artifacts-pane/index.d.ts +3 -0
- package/dist/blocks/panes/artifacts-pane/index.js +9 -0
- package/dist/blocks/panes/changes-pane/index.d.ts +3 -0
- package/dist/blocks/panes/changes-pane/index.js +9 -0
- package/dist/blocks/panes/file-pane/index.d.ts +3 -0
- package/dist/blocks/panes/file-pane/index.js +9 -0
- package/dist/blocks/panes/pr-pane/index.d.ts +3 -0
- package/dist/blocks/panes/pr-pane/index.js +10 -0
- package/dist/blocks/panes/side-pane/index.d.ts +5 -0
- package/dist/blocks/panes/side-pane/index.js +21 -0
- package/dist/blocks/panes/tasks-pane/index.d.ts +3 -0
- package/dist/blocks/panes/tasks-pane/index.js +10 -0
- package/dist/blocks/panes/terminal-pane/index.d.ts +3 -0
- package/dist/blocks/panes/terminal-pane/index.js +9 -0
- package/dist/blocks/panes/usage-pane/index.d.ts +4 -0
- package/dist/blocks/panes/usage-pane/index.js +11 -0
- package/dist/blocks/profiles/profile-onboarding/index.d.ts +4 -0
- package/dist/blocks/profiles/profile-onboarding/index.js +11 -0
- package/dist/blocks/profiles/profile-switcher/index.d.ts +4 -0
- package/dist/blocks/profiles/profile-switcher/index.js +11 -0
- package/dist/blocks/profiles/profile-usage/index.d.ts +4 -0
- package/dist/blocks/profiles/profile-usage/index.js +10 -0
- package/dist/blocks/sessions/inbox/index.d.ts +2 -0
- package/dist/blocks/sessions/inbox/index.js +11 -0
- package/dist/blocks/sessions/session-board/index.d.ts +4 -0
- package/dist/blocks/sessions/session-board/index.js +26 -0
- package/dist/blocks/sessions/session-sidebar/index.d.ts +5 -0
- package/dist/blocks/sessions/session-sidebar/index.js +15 -0
- package/dist/blocks/settings/extensions/index.d.ts +2 -0
- package/dist/blocks/settings/extensions/index.js +9 -0
- package/dist/blocks/settings/hooks/index.d.ts +4 -0
- package/dist/blocks/settings/hooks/index.js +9 -0
- package/dist/blocks/settings/mcp-servers/index.d.ts +4 -0
- package/dist/blocks/settings/mcp-servers/index.js +9 -0
- package/dist/blocks/settings/memory/index.d.ts +4 -0
- package/dist/blocks/settings/memory/index.js +8 -0
- package/dist/blocks/settings/notifications/index.d.ts +2 -0
- package/dist/blocks/settings/notifications/index.js +8 -0
- package/dist/blocks/settings/permission-rules/index.d.ts +3 -0
- package/dist/blocks/settings/permission-rules/index.js +10 -0
- package/dist/blocks/settings/plugin-catalog/index.d.ts +2 -0
- package/dist/blocks/settings/plugin-catalog/index.js +11 -0
- package/dist/blocks/settings/plugins/index.d.ts +4 -0
- package/dist/blocks/settings/plugins/index.js +9 -0
- package/dist/blocks/settings/settings-window/index.d.ts +4 -0
- package/dist/blocks/settings/settings-window/index.js +8 -0
- package/dist/blocks/settings/worktrees/index.d.ts +4 -0
- package/dist/blocks/settings/worktrees/index.js +9 -0
- package/dist/components/conversation/agent-run/index.d.ts +3 -0
- package/dist/components/conversation/agent-run/index.js +10 -0
- package/dist/components/conversation/chapter-nav/index.d.ts +2 -0
- package/dist/components/conversation/chapter-nav/index.js +11 -0
- package/dist/components/conversation/message/index.d.ts +2 -0
- package/dist/components/conversation/message/index.js +15 -0
- package/dist/components/conversation/reasoning/index.d.ts +2 -0
- package/dist/components/conversation/reasoning/index.js +8 -0
- package/dist/components/conversation/recap/index.d.ts +2 -0
- package/dist/components/conversation/recap/index.js +9 -0
- package/dist/components/conversation/todo-list/index.d.ts +2 -0
- package/dist/components/conversation/todo-list/index.js +9 -0
- package/dist/components/conversation/tool-call/index.d.ts +3 -0
- package/dist/components/conversation/tool-call/index.js +13 -0
- package/dist/components/conversation/work-summary/index.d.ts +2 -0
- package/dist/components/conversation/work-summary/index.js +10 -0
- package/dist/components/prompts/permission-request/index.d.ts +2 -0
- package/dist/components/prompts/permission-request/index.js +9 -0
- package/dist/components/prompts/plan-approval/index.d.ts +2 -0
- package/dist/components/prompts/plan-approval/index.js +9 -0
- package/dist/components/prompts/prompt-card/index.d.ts +3 -0
- package/dist/components/prompts/prompt-card/index.js +8 -0
- package/dist/components/prompts/question-prompt/index.d.ts +2 -0
- package/dist/components/prompts/question-prompt/index.js +9 -0
- package/dist/index.d.ts +50 -0
- package/dist/index.js +231 -0
- package/dist/lib/config-parts.d.ts +2 -0
- package/dist/lib/config-parts.js +16 -0
- package/dist/lib/icons.d.ts +2 -0
- package/dist/lib/icons.js +10 -0
- package/dist/lib/pace-bar.d.ts +11 -0
- package/dist/lib/pace-bar.js +6 -0
- package/dist/lib/pace.d.ts +4 -0
- package/dist/lib/pace.js +12 -0
- package/dist/lib/pane-parts.d.ts +25 -0
- package/dist/lib/pane-parts.js +11 -0
- package/dist/lib/row-trigger.d.ts +5 -0
- package/dist/lib/row-trigger.js +7 -0
- package/dist/lib/settings-parts.d.ts +70 -0
- package/dist/lib/settings-parts.js +24 -0
- package/dist/lib/side-pane-types.d.ts +2 -0
- package/dist/lib/side-pane-types.js +1 -0
- package/dist/lib/status-glyph.d.ts +8 -0
- package/dist/lib/status-glyph.js +12 -0
- package/dist/lib/types.d.ts +3 -0
- package/dist/lib/types.js +1 -0
- package/dist/shared/chunk-04a497rr.js +21 -0
- package/dist/shared/chunk-13yf0mza.d.ts +70 -0
- package/dist/shared/chunk-1aq2xzv5.js +558 -0
- package/dist/shared/chunk-1f96cz69.js +45 -0
- package/dist/shared/chunk-1yt061np.d.ts +64 -0
- package/dist/shared/chunk-218qabm5.js +250 -0
- package/dist/shared/chunk-2fk5aq60.js +313 -0
- package/dist/shared/chunk-4248zvmh.js +177 -0
- package/dist/shared/chunk-45rqgey6.d.ts +25 -0
- package/dist/shared/chunk-4n0v64qx.js +179 -0
- package/dist/shared/chunk-4zvhpf2x.js +55 -0
- package/dist/shared/chunk-57hzzmjd.d.ts +67 -0
- package/dist/shared/chunk-58qvny6a.d.ts +29 -0
- package/dist/shared/chunk-5fhkkn39.js +130 -0
- package/dist/shared/chunk-5hw0525a.d.ts +33 -0
- package/dist/shared/chunk-5k6xwqfj.d.ts +68 -0
- package/dist/shared/chunk-5meda998.js +238 -0
- package/dist/shared/chunk-5pqksw7z.js +91 -0
- package/dist/shared/chunk-6220dy5n.js +70 -0
- package/dist/shared/chunk-64bnh22t.d.ts +59 -0
- package/dist/shared/chunk-66sh633m.d.ts +60 -0
- package/dist/shared/chunk-6cmf27g3.d.ts +81 -0
- package/dist/shared/chunk-6g4970a6.d.ts +20 -0
- package/dist/shared/chunk-75zwypyr.d.ts +43 -0
- package/dist/shared/chunk-7rzjmcnh.d.ts +30 -0
- package/dist/shared/chunk-7zvb39cf.d.ts +26 -0
- package/dist/shared/chunk-8mecznyr.js +357 -0
- package/dist/shared/chunk-8pag6vmd.js +255 -0
- package/dist/shared/chunk-8xg5gwwy.js +38 -0
- package/dist/shared/chunk-9kw6m047.d.ts +32 -0
- package/dist/shared/chunk-a4s440b6.js +79 -0
- package/dist/shared/chunk-at0jje23.d.ts +110 -0
- package/dist/shared/chunk-awd573h9.js +34 -0
- package/dist/shared/chunk-b171wjge.d.ts +25 -0
- package/dist/shared/chunk-bh2b5d1z.js +98 -0
- package/dist/shared/chunk-bzs6amnv.js +187 -0
- package/dist/shared/chunk-c36qvrwq.d.ts +30 -0
- package/dist/shared/chunk-c8wp058j.js +153 -0
- package/dist/shared/chunk-cd4f87as.d.ts +28 -0
- package/dist/shared/chunk-cmwby8f9.js +467 -0
- package/dist/shared/chunk-d2t72h4x.d.ts +35 -0
- package/dist/shared/chunk-dh3qy5fj.js +49 -0
- package/dist/shared/chunk-e46apgve.d.ts +40 -0
- package/dist/shared/chunk-ejtknc0w.js +21 -0
- package/dist/shared/chunk-eqajdxn8.js +82 -0
- package/dist/shared/chunk-fbn0h7cr.js +123 -0
- package/dist/shared/chunk-fqhcz6ss.d.ts +29 -0
- package/dist/shared/chunk-g28hweee.d.ts +35 -0
- package/dist/shared/chunk-g88hweqh.d.ts +70 -0
- package/dist/shared/chunk-gewnsgza.js +61 -0
- package/dist/shared/chunk-gkyk663q.d.ts +53 -0
- package/dist/shared/chunk-hd4gtj5z.d.ts +23 -0
- package/dist/shared/chunk-hxjgey30.d.ts +36 -0
- package/dist/shared/chunk-jkkdq1mh.d.ts +213 -0
- package/dist/shared/chunk-jpq101w3.js +91 -0
- package/dist/shared/chunk-k3bv9k1v.d.ts +56 -0
- package/dist/shared/chunk-k5zegxje.d.ts +81 -0
- package/dist/shared/chunk-kreypnzp.d.ts +34 -0
- package/dist/shared/chunk-kw9npka5.js +224 -0
- package/dist/shared/chunk-mrb3fp2f.d.ts +30 -0
- package/dist/shared/chunk-n1qq2wp9.js +6 -0
- package/dist/shared/chunk-n4742y54.js +39 -0
- package/dist/shared/chunk-ndjvdkv7.d.ts +29 -0
- package/dist/shared/chunk-nk4578dr.js +73 -0
- package/dist/shared/chunk-paezqfg1.js +106 -0
- package/dist/shared/chunk-qemm9e3r.d.ts +21 -0
- package/dist/shared/chunk-qhxz1etk.js +96 -0
- package/dist/shared/chunk-qj5ev9ak.js +531 -0
- package/dist/shared/chunk-qnwggvjy.js +150 -0
- package/dist/shared/chunk-r5hz78pb.js +129 -0
- package/dist/shared/chunk-r6nb21kz.d.ts +102 -0
- package/dist/shared/chunk-rjfwje37.d.ts +234 -0
- package/dist/shared/chunk-rqrpvvz4.d.ts +107 -0
- package/dist/shared/chunk-rzajcn44.d.ts +49 -0
- package/dist/shared/chunk-s3r759ec.js +80 -0
- package/dist/shared/chunk-sdtjrw9w.d.ts +98 -0
- package/dist/shared/chunk-sfqvyzcs.d.ts +68 -0
- package/dist/shared/chunk-skg3m9m0.js +56 -0
- package/dist/shared/chunk-szkvrqg1.d.ts +54 -0
- package/dist/shared/chunk-t21t9x7e.js +188 -0
- package/dist/shared/chunk-tc75ng2c.js +235 -0
- package/dist/shared/chunk-tkx1krwc.js +88 -0
- package/dist/shared/chunk-tprdqtb1.d.ts +30 -0
- package/dist/shared/chunk-tv9a1sek.js +137 -0
- package/dist/shared/chunk-tvbd27hg.d.ts +43 -0
- package/dist/shared/chunk-v6yevw62.d.ts +28 -0
- package/dist/shared/chunk-v9q38p0x.js +258 -0
- package/dist/shared/chunk-vd59gzzd.js +86 -0
- package/dist/shared/chunk-vgh4f3sv.js +118 -0
- package/dist/shared/chunk-vjht1zn1.js +391 -0
- package/dist/shared/chunk-vsrkb0sp.d.ts +21 -0
- package/dist/shared/chunk-w5z8qnf8.js +175 -0
- package/dist/shared/chunk-wgvzavx1.js +1488 -0
- package/dist/shared/chunk-whsx7yp9.d.ts +37 -0
- package/dist/shared/chunk-x7az5x1y.d.ts +57 -0
- package/dist/shared/chunk-x9jf26yb.js +318 -0
- package/dist/shared/chunk-xbrrt07s.d.ts +23 -0
- package/dist/shared/chunk-xkchhs2z.js +129 -0
- package/dist/shared/chunk-xzfrskd7.js +202 -0
- package/dist/shared/chunk-y4cj4y54.js +423 -0
- package/dist/shared/chunk-y934at6m.js +7 -0
- package/dist/shared/chunk-zbpwhpjy.d.ts +75 -0
- package/dist/shared/chunk-zfhmbb7n.js +63 -0
- package/dist/shared/chunk-zk0t4vq5.js +71 -0
- package/dist/shared/chunk-znp9gna7.d.ts +23 -0
- package/dist/styles.css +467 -0
- package/index.ts +49 -0
- package/lib/config-parts.tsx +97 -0
- package/lib/icons.tsx +149 -0
- package/lib/pace-bar.tsx +24 -0
- package/lib/pace.ts +74 -0
- package/lib/pane-parts.tsx +76 -0
- package/lib/row-trigger.tsx +44 -0
- package/lib/settings-parts.tsx +232 -0
- package/lib/side-pane-types.ts +75 -0
- package/lib/status-glyph.tsx +25 -0
- package/lib/types.ts +204 -0
- package/mock/demo-reply.tsx +33 -0
- package/mock/demo-session.tsx +150 -0
- package/mock/mock-config.ts +173 -0
- package/mock/mock-extras.ts +288 -0
- package/mock/mock-panes.ts +190 -0
- package/mock/mock-settings.ts +92 -0
- package/mock/mock.ts +548 -0
- package/mock/screen-frame.tsx +49 -0
- package/package.json +114 -4
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
useIcon2
|
|
5
|
+
} from "./chunk-xkchhs2z.js";
|
|
6
|
+
|
|
7
|
+
// components/conversation/message/index.tsx
|
|
8
|
+
import { MarkdownProse } from "@justanarthur/modo-ui/components/data-display/markdown";
|
|
9
|
+
import { useShape } from "@justanarthur/modo-ui/lib/shape-context";
|
|
10
|
+
import { cn } from "@justanarthur/modo-ui/lib/utils";
|
|
11
|
+
|
|
12
|
+
// components/conversation/message/working.tsx
|
|
13
|
+
import { GooFilter, useReduceMotion } from "@justanarthur/modo-ui";
|
|
14
|
+
import { spring } from "@justanarthur/modo-ui/lib/springs";
|
|
15
|
+
import { GOO_BLUR_RATIO } from "@justanarthur/modo-ui/lib/use-morph";
|
|
16
|
+
import { AnimatePresence, motion } from "motion/react";
|
|
17
|
+
import { useEffect, useId, useState } from "react";
|
|
18
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
19
|
+
/*!
|
|
20
|
+
* Ported from Fluid Functionalism — github.com/mickadesign/fluid-functionalism
|
|
21
|
+
* `registry/default/thinking-indicator.tsx` @ b3587bdbd83fc66c2a6aae3817ffb856cb09260b
|
|
22
|
+
* MIT License © 2026 Micka Touillaud (notice: LICENSE.fluid-functionalism). Local changes: see ui/PORTING.md
|
|
23
|
+
* (ThinkingIndicator, folded into Message.Working).
|
|
24
|
+
*/
|
|
25
|
+
var WORDS = ["Thinking", "Moonwalking", "Planning", "Refining"];
|
|
26
|
+
var LONGEST = WORDS.reduce((a, b) => a.length >= b.length ? a : b);
|
|
27
|
+
var RADIUS = 2.5;
|
|
28
|
+
var GAP = 9;
|
|
29
|
+
var MERGED = Math.sqrt(3);
|
|
30
|
+
var SWAP_EASE = [0.4, 0, 0.2, 1];
|
|
31
|
+
function GooDots({ still }) {
|
|
32
|
+
const gooId = `working-goo-${useId().replace(/:/g, "")}`;
|
|
33
|
+
const loop = { duration: spring.slow.duration * 8, ease: "easeInOut", repeat: Infinity };
|
|
34
|
+
return /* @__PURE__ */ jsxs("span", {
|
|
35
|
+
"aria-hidden": true,
|
|
36
|
+
className: "relative h-[18px] w-[23px] shrink-0",
|
|
37
|
+
children: [
|
|
38
|
+
/* @__PURE__ */ jsx(GooFilter, {
|
|
39
|
+
id: gooId,
|
|
40
|
+
blur: RADIUS * GOO_BLUR_RATIO
|
|
41
|
+
}),
|
|
42
|
+
/* @__PURE__ */ jsx("span", {
|
|
43
|
+
className: "absolute inset-0 flex items-center justify-center",
|
|
44
|
+
style: { filter: `url(#${gooId})` },
|
|
45
|
+
children: [-1, 0, 1].map((side) => /* @__PURE__ */ jsx(motion.span, {
|
|
46
|
+
className: "absolute size-[5px] rounded-full bg-muted-foreground",
|
|
47
|
+
animate: still ? { x: side * GAP } : side ? { x: [side * GAP, 0, side * GAP] } : { scale: [1, MERGED, 1] },
|
|
48
|
+
transition: still ? { duration: 0 } : loop
|
|
49
|
+
}, side))
|
|
50
|
+
})
|
|
51
|
+
]
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
function CyclingWord({ still }) {
|
|
55
|
+
const [index, setIndex] = useState(0);
|
|
56
|
+
useEffect(() => {
|
|
57
|
+
if (still)
|
|
58
|
+
return;
|
|
59
|
+
const interval = setInterval(() => setIndex((i) => (i + 1) % WORDS.length), 4000);
|
|
60
|
+
return () => clearInterval(interval);
|
|
61
|
+
}, [still]);
|
|
62
|
+
return /* @__PURE__ */ jsxs("span", {
|
|
63
|
+
"aria-hidden": true,
|
|
64
|
+
className: "inline-grid overflow-hidden text-body-compact weight-medium text-muted-foreground",
|
|
65
|
+
children: [
|
|
66
|
+
/* @__PURE__ */ jsx("span", {
|
|
67
|
+
className: "invisible col-start-1 row-start-1",
|
|
68
|
+
children: LONGEST
|
|
69
|
+
}),
|
|
70
|
+
still ? /* @__PURE__ */ jsx("span", {
|
|
71
|
+
className: "col-start-1 row-start-1",
|
|
72
|
+
children: WORDS[0]
|
|
73
|
+
}) : /* @__PURE__ */ jsx(AnimatePresence, {
|
|
74
|
+
mode: "popLayout",
|
|
75
|
+
initial: false,
|
|
76
|
+
children: /* @__PURE__ */ jsx(motion.span, {
|
|
77
|
+
className: "col-start-1 row-start-1",
|
|
78
|
+
initial: { y: "80%", opacity: 0 },
|
|
79
|
+
animate: { y: 0, opacity: 1, transition: { duration: spring.slow.duration, ease: SWAP_EASE } },
|
|
80
|
+
exit: { y: "-80%", opacity: 0, transition: { duration: spring.slow.exit.duration, ease: SWAP_EASE } },
|
|
81
|
+
children: WORDS[index]
|
|
82
|
+
}, WORDS[index])
|
|
83
|
+
})
|
|
84
|
+
]
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
function Working2({ label }) {
|
|
88
|
+
const still = useReduceMotion();
|
|
89
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
90
|
+
role: "status",
|
|
91
|
+
className: "flex items-center gap-2",
|
|
92
|
+
children: [
|
|
93
|
+
/* @__PURE__ */ jsx("span", {
|
|
94
|
+
className: "sr-only",
|
|
95
|
+
children: "Thinking…"
|
|
96
|
+
}),
|
|
97
|
+
/* @__PURE__ */ jsx(GooDots, {
|
|
98
|
+
still
|
|
99
|
+
}),
|
|
100
|
+
/* @__PURE__ */ jsx(CyclingWord, {
|
|
101
|
+
still
|
|
102
|
+
}),
|
|
103
|
+
label && /* @__PURE__ */ jsx("span", {
|
|
104
|
+
className: "text-caption text-muted-foreground",
|
|
105
|
+
children: label
|
|
106
|
+
})
|
|
107
|
+
]
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// components/conversation/message/index.tsx
|
|
112
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
113
|
+
/*!
|
|
114
|
+
* Local addition (not part of Fluid Functionalism): one turn of a chat with an
|
|
115
|
+
* AI. The user's turn is a bubble on the right with its attachments and
|
|
116
|
+
* @-mentions; the assistant's is rendered markdown on the page (Markdown.Prose from modo-ui),
|
|
117
|
+
* with the working dots while it streams (Fluid Functionalism's
|
|
118
|
+
* ThinkingIndicator, in ./working.tsx). Generalised from the AI app's transcript.
|
|
119
|
+
*/
|
|
120
|
+
function Mention2({ path }) {
|
|
121
|
+
const At = useIcon2("at-sign");
|
|
122
|
+
return /* @__PURE__ */ jsxs2("span", {
|
|
123
|
+
className: "inline-flex translate-y-px items-center gap-0.5 rounded-glyph bg-active px-1 align-baseline font-mono text-caption text-foreground",
|
|
124
|
+
children: [
|
|
125
|
+
/* @__PURE__ */ jsx2(At, {
|
|
126
|
+
size: 11,
|
|
127
|
+
strokeWidth: 2,
|
|
128
|
+
className: "shrink-0 text-muted-foreground"
|
|
129
|
+
}),
|
|
130
|
+
path
|
|
131
|
+
]
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
function Attachment2({ name, detail, kind = "file" }) {
|
|
135
|
+
const shape = useShape();
|
|
136
|
+
const Icon = useIcon2(kind === "pasted" ? "clipboard" : kind === "image" ? "image" : "file-text");
|
|
137
|
+
return /* @__PURE__ */ jsxs2("span", {
|
|
138
|
+
className: cn("inline-flex h-11 max-w-56 items-center gap-2 border border-border px-2.5", shape.item),
|
|
139
|
+
children: [
|
|
140
|
+
/* @__PURE__ */ jsx2(Icon, {
|
|
141
|
+
size: 16,
|
|
142
|
+
strokeWidth: 1.5,
|
|
143
|
+
className: "shrink-0 text-muted-foreground"
|
|
144
|
+
}),
|
|
145
|
+
/* @__PURE__ */ jsxs2("span", {
|
|
146
|
+
className: "flex min-w-0 flex-col",
|
|
147
|
+
children: [
|
|
148
|
+
/* @__PURE__ */ jsx2("span", {
|
|
149
|
+
className: "truncate text-caption text-foreground",
|
|
150
|
+
children: name
|
|
151
|
+
}),
|
|
152
|
+
detail && /* @__PURE__ */ jsx2("span", {
|
|
153
|
+
className: "truncate text-caption text-muted-foreground",
|
|
154
|
+
children: detail
|
|
155
|
+
})
|
|
156
|
+
]
|
|
157
|
+
})
|
|
158
|
+
]
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
var Message2 = Object.assign(function Message({ role, children, attachments, streaming = false, className }) {
|
|
162
|
+
const shape = useShape();
|
|
163
|
+
if (role === "assistant")
|
|
164
|
+
return /* @__PURE__ */ jsxs2(MarkdownProse, {
|
|
165
|
+
className,
|
|
166
|
+
children: [
|
|
167
|
+
children,
|
|
168
|
+
streaming && /* @__PURE__ */ jsx2(Working2, {})
|
|
169
|
+
]
|
|
170
|
+
});
|
|
171
|
+
return /* @__PURE__ */ jsxs2("div", {
|
|
172
|
+
className: cn("flex flex-col items-end gap-2 pl-[12%]", className),
|
|
173
|
+
children: [
|
|
174
|
+
attachments && /* @__PURE__ */ jsx2("div", {
|
|
175
|
+
className: "flex flex-wrap justify-end gap-2",
|
|
176
|
+
children: attachments
|
|
177
|
+
}),
|
|
178
|
+
/* @__PURE__ */ jsx2("div", {
|
|
179
|
+
className: cn("min-w-0 bg-muted px-[var(--space-3)] py-[var(--space-2)] text-body text-foreground", shape.container),
|
|
180
|
+
children
|
|
181
|
+
})
|
|
182
|
+
]
|
|
183
|
+
});
|
|
184
|
+
}, { Mention: Mention2, Attachment: Attachment2, Working: Working2 });
|
|
185
|
+
var message_default = Message2;
|
|
186
|
+
|
|
187
|
+
export { Working2, Mention2, Attachment2, Message2, message_default };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Worktree2 } from "./chunk-jkkdq1mh.js";
|
|
2
|
+
import { JSX as JSX_1kxb } from "react";
|
|
3
|
+
interface WorktreesProps2 {
|
|
4
|
+
/** The sessions' checkouts. */
|
|
5
|
+
worktrees: Worktree2[];
|
|
6
|
+
/** Their total size on disk, as the lead says it (`4.4 GB`). */
|
|
7
|
+
onDisk: string;
|
|
8
|
+
/** Worktree paths whose rows start open. Defaults to `[]`. */
|
|
9
|
+
defaultOpen?: string[];
|
|
10
|
+
/** Called when "Clean up" (every merged and stale worktree) is pressed. */
|
|
11
|
+
onCleanUp?: () => void;
|
|
12
|
+
/** Called when an open worktree's "Open in terminal" is pressed. */
|
|
13
|
+
onOpenTerminal?: (worktree: Worktree2) => void;
|
|
14
|
+
/** Called when a worktree's Remove is pressed, from its row or its card. */
|
|
15
|
+
onRemove?: (worktree: Worktree2) => void;
|
|
16
|
+
}
|
|
17
|
+
type Element_12xgc = JSX_1kxb["Element"];
|
|
18
|
+
/**
|
|
19
|
+
* The checkouts sessions work in, and what they cost on disk.
|
|
20
|
+
*
|
|
21
|
+
* A row names the session over its branch, with its state and size on the
|
|
22
|
+
* right. A merged or stale worktree can go: its remove button sits at the
|
|
23
|
+
* row's end on hover (always shown on touch), and Clean up on top removes
|
|
24
|
+
* them all. Press a row and it lifts into a card that says what removing it
|
|
25
|
+
* costs, with its path, branch and size.
|
|
26
|
+
*
|
|
27
|
+
* @example {@include ./examples.mdx}
|
|
28
|
+
*/
|
|
29
|
+
declare function Worktrees2({ worktrees, onDisk, defaultOpen, onCleanUp, onOpenTerminal, onRemove }: WorktreesProps2): Element_12xgc;
|
|
30
|
+
export { WorktreesProps2, Worktrees2 };
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
useIcon2
|
|
5
|
+
} from "./chunk-xkchhs2z.js";
|
|
6
|
+
|
|
7
|
+
// blocks/dialogs/shortcuts-sheet/index.tsx
|
|
8
|
+
import Kbd from "@justanarthur/modo-ui/components/data-display/kbd";
|
|
9
|
+
import Input from "@justanarthur/modo-ui/components/inputs/input";
|
|
10
|
+
import Dialog from "@justanarthur/modo-ui/components/overlays/dialog";
|
|
11
|
+
import { useControllableState } from "@justanarthur/modo-ui/lib/use-controllable-state";
|
|
12
|
+
import { cn } from "@justanarthur/modo-ui/lib/utils";
|
|
13
|
+
import ScrollArea from "@justanarthur/modo-ui/primitives/layout/scroll-area";
|
|
14
|
+
import { useEffect } from "react";
|
|
15
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
16
|
+
/*!
|
|
17
|
+
* Local addition: the AI app's keyboard shortcuts reference. A Dialog with
|
|
18
|
+
* the shortcuts in groups (sessions, navigation, composer, panes), each a
|
|
19
|
+
* label and its keys as Kbd chips, and a field that filters them by what
|
|
20
|
+
* they do or by their keys.
|
|
21
|
+
*/
|
|
22
|
+
function matches(shortcut, query) {
|
|
23
|
+
const q = query.trim().toLowerCase();
|
|
24
|
+
if (!q)
|
|
25
|
+
return true;
|
|
26
|
+
return [shortcut.label, shortcut.keys.join(" "), ...shortcut.keywords ?? []].some((text) => text.toLowerCase().includes(q));
|
|
27
|
+
}
|
|
28
|
+
function ShortcutsSheetPanel2({ groups, query, defaultQuery = "", onQueryChange, className }) {
|
|
29
|
+
const [q, setQ] = useControllableState(query, defaultQuery, onQueryChange);
|
|
30
|
+
const SearchIcon = useIcon2("search");
|
|
31
|
+
const shown = groups.map((group) => ({ ...group, shortcuts: group.shortcuts.filter((s) => matches(s, q)) })).filter((group) => group.shortcuts.length > 0);
|
|
32
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
33
|
+
className: cn("@container flex min-h-0 flex-col gap-[var(--space-4)]", className),
|
|
34
|
+
children: [
|
|
35
|
+
/* @__PURE__ */ jsxs("div", {
|
|
36
|
+
className: "flex items-center gap-[var(--space-3)] pr-[var(--space-6)]",
|
|
37
|
+
children: [
|
|
38
|
+
/* @__PURE__ */ jsx("h2", {
|
|
39
|
+
className: "m-0 text-title text-foreground",
|
|
40
|
+
children: "Keyboard shortcuts"
|
|
41
|
+
}),
|
|
42
|
+
/* @__PURE__ */ jsx(Input, {
|
|
43
|
+
autoFocus: true,
|
|
44
|
+
variant: "bordered",
|
|
45
|
+
size: "compact",
|
|
46
|
+
icon: SearchIcon,
|
|
47
|
+
"aria-label": "Filter shortcuts",
|
|
48
|
+
placeholder: "Filter…",
|
|
49
|
+
className: "ml-auto w-56",
|
|
50
|
+
value: q,
|
|
51
|
+
onValueChange: setQ
|
|
52
|
+
})
|
|
53
|
+
]
|
|
54
|
+
}),
|
|
55
|
+
/* @__PURE__ */ jsx(ScrollArea, {
|
|
56
|
+
className: "min-h-0 flex-1",
|
|
57
|
+
viewportClassName: "scroll-fade",
|
|
58
|
+
children: shown.length === 0 ? /* @__PURE__ */ jsxs("p", {
|
|
59
|
+
className: "m-0 py-[var(--space-6)] text-center text-body text-muted-foreground",
|
|
60
|
+
children: [
|
|
61
|
+
"No shortcut matches “",
|
|
62
|
+
q.trim(),
|
|
63
|
+
"”."
|
|
64
|
+
]
|
|
65
|
+
}) : /* @__PURE__ */ jsx("div", {
|
|
66
|
+
className: "grid grid-cols-1 gap-x-[var(--space-6)] gap-y-[var(--space-5)] @lg:grid-cols-2",
|
|
67
|
+
children: shown.map((group) => /* @__PURE__ */ jsxs("section", {
|
|
68
|
+
"aria-label": group.label,
|
|
69
|
+
className: "flex flex-col",
|
|
70
|
+
children: [
|
|
71
|
+
/* @__PURE__ */ jsx("span", {
|
|
72
|
+
className: "pb-[var(--space-1)] text-caption text-muted-foreground",
|
|
73
|
+
children: group.label
|
|
74
|
+
}),
|
|
75
|
+
/* @__PURE__ */ jsx("dl", {
|
|
76
|
+
className: "m-0 flex flex-col",
|
|
77
|
+
children: group.shortcuts.map((shortcut) => /* @__PURE__ */ jsxs("div", {
|
|
78
|
+
className: "flex h-8 items-center gap-[var(--space-3)] border-b border-border last:border-b-0",
|
|
79
|
+
children: [
|
|
80
|
+
/* @__PURE__ */ jsx("dt", {
|
|
81
|
+
className: "min-w-0 flex-1 truncate text-body text-foreground",
|
|
82
|
+
children: shortcut.label
|
|
83
|
+
}),
|
|
84
|
+
/* @__PURE__ */ jsx("dd", {
|
|
85
|
+
className: "m-0 flex shrink-0 items-center gap-[var(--space-1)]",
|
|
86
|
+
children: shortcut.keys.map((key, i) => /* @__PURE__ */ jsxs("span", {
|
|
87
|
+
className: "flex items-center gap-[var(--space-1)]",
|
|
88
|
+
children: [
|
|
89
|
+
i > 0 && /* @__PURE__ */ jsx("span", {
|
|
90
|
+
className: "text-caption text-muted-foreground",
|
|
91
|
+
children: "then"
|
|
92
|
+
}),
|
|
93
|
+
/* @__PURE__ */ jsx(Kbd, {
|
|
94
|
+
children: key
|
|
95
|
+
})
|
|
96
|
+
]
|
|
97
|
+
}, `${i}-${key}`))
|
|
98
|
+
})
|
|
99
|
+
]
|
|
100
|
+
}, shortcut.label))
|
|
101
|
+
})
|
|
102
|
+
]
|
|
103
|
+
}, group.label))
|
|
104
|
+
})
|
|
105
|
+
})
|
|
106
|
+
]
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
var ShortcutsSheet2 = Object.assign(function ShortcutsSheet({
|
|
110
|
+
groups,
|
|
111
|
+
trigger,
|
|
112
|
+
open,
|
|
113
|
+
defaultOpen = false,
|
|
114
|
+
onOpenChange,
|
|
115
|
+
hotkey = "/",
|
|
116
|
+
defaultQuery
|
|
117
|
+
}) {
|
|
118
|
+
const [isOpen, setOpen] = useControllableState(open, defaultOpen, onOpenChange);
|
|
119
|
+
useEffect(() => {
|
|
120
|
+
if (!hotkey)
|
|
121
|
+
return;
|
|
122
|
+
const onKey = (event) => {
|
|
123
|
+
if ((event.metaKey || event.ctrlKey) && event.key.toLowerCase() === hotkey) {
|
|
124
|
+
event.preventDefault();
|
|
125
|
+
setOpen(!isOpen);
|
|
126
|
+
}
|
|
127
|
+
};
|
|
128
|
+
window.addEventListener("keydown", onKey);
|
|
129
|
+
return () => window.removeEventListener("keydown", onKey);
|
|
130
|
+
}, [hotkey, isOpen, setOpen]);
|
|
131
|
+
return /* @__PURE__ */ jsxs(Dialog, {
|
|
132
|
+
open: isOpen,
|
|
133
|
+
onOpenChange: setOpen,
|
|
134
|
+
children: [
|
|
135
|
+
trigger && /* @__PURE__ */ jsx(Dialog.Trigger, {
|
|
136
|
+
render: trigger
|
|
137
|
+
}),
|
|
138
|
+
/* @__PURE__ */ jsx(Dialog.Content, {
|
|
139
|
+
width: "xl",
|
|
140
|
+
"aria-label": "Keyboard shortcuts",
|
|
141
|
+
className: "flex h-[min(600px,80dvh)] flex-col",
|
|
142
|
+
children: /* @__PURE__ */ jsx(ShortcutsSheetPanel2, {
|
|
143
|
+
groups,
|
|
144
|
+
defaultQuery,
|
|
145
|
+
className: "flex-1"
|
|
146
|
+
})
|
|
147
|
+
})
|
|
148
|
+
]
|
|
149
|
+
});
|
|
150
|
+
}, { Panel: ShortcutsSheetPanel2 });
|
|
151
|
+
var shortcuts_sheet_default = ShortcutsSheet2;
|
|
152
|
+
|
|
153
|
+
export { ShortcutsSheetPanel2, ShortcutsSheet2, shortcuts_sheet_default };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Profile2 } from "./chunk-jkkdq1mh.js";
|
|
2
|
+
import { JSX as JSX_1kxb } from "react";
|
|
3
|
+
interface ProfileUsageProps2 {
|
|
4
|
+
/** The profiles to show. */
|
|
5
|
+
profiles: Profile2[];
|
|
6
|
+
/** Called by the popover's Profiles button. */
|
|
7
|
+
onManage?: () => void;
|
|
8
|
+
}
|
|
9
|
+
type Element_12xgc = JSX_1kxb["Element"];
|
|
10
|
+
/**
|
|
11
|
+
* How much each profile has left, read against the time until each limit
|
|
12
|
+
* resets, in one sidebar row.
|
|
13
|
+
*
|
|
14
|
+
* A share alone raises the wrong alarm: 78% of a weekly limit that resets
|
|
15
|
+
* tomorrow is room to spend, while 42% of a session an hour in is not. So
|
|
16
|
+
* every bar is colored by whether its limit lasts until its reset at the
|
|
17
|
+
* current pace (grey when it does, amber when only just, red when it runs
|
|
18
|
+
* out first), and carries a tick where an even spend would be by now: a
|
|
19
|
+
* fill past the tick is spending faster than the window refills. The row
|
|
20
|
+
* lists every profile by name with its session limit over its tightest
|
|
21
|
+
* weekly one; press it for every limit with its share and time to reset.
|
|
22
|
+
*
|
|
23
|
+
* Put it in a Sidebar (the session sidebar puts it in its footer).
|
|
24
|
+
*
|
|
25
|
+
* @example {@include ./examples.mdx}
|
|
26
|
+
*/
|
|
27
|
+
declare function ProfileUsage2({ profiles, onManage }: ProfileUsageProps2): Element_12xgc;
|
|
28
|
+
export { ProfileUsageProps2, ProfileUsage2 };
|