pith-ui 0.0.0-stage → 0.1.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.
Files changed (126) hide show
  1. package/AI.md +67 -0
  2. package/API.md +3281 -0
  3. package/LICENSE +661 -0
  4. package/README.md +80 -2
  5. package/dist/composer.d.ts +38 -0
  6. package/dist/composer.d.ts.map +1 -0
  7. package/dist/composer.js +114 -0
  8. package/dist/composer.js.map +1 -0
  9. package/dist/content/conversation-reader.d.ts +19 -0
  10. package/dist/content/conversation-reader.d.ts.map +1 -0
  11. package/dist/content/conversation-reader.js +280 -0
  12. package/dist/content/conversation-reader.js.map +1 -0
  13. package/dist/content/conversation-view.d.ts +48 -0
  14. package/dist/content/conversation-view.d.ts.map +1 -0
  15. package/dist/content/conversation-view.js +107 -0
  16. package/dist/content/conversation-view.js.map +1 -0
  17. package/dist/content/image-viewer.d.ts +23 -0
  18. package/dist/content/image-viewer.d.ts.map +1 -0
  19. package/dist/content/image-viewer.js +101 -0
  20. package/dist/content/image-viewer.js.map +1 -0
  21. package/dist/content/markdown.d.ts +12 -0
  22. package/dist/content/markdown.d.ts.map +1 -0
  23. package/dist/content/markdown.js +68 -0
  24. package/dist/content/markdown.js.map +1 -0
  25. package/dist/content/paged-preview.d.ts +15 -0
  26. package/dist/content/paged-preview.d.ts.map +1 -0
  27. package/dist/content/paged-preview.js +105 -0
  28. package/dist/content/paged-preview.js.map +1 -0
  29. package/dist/content/views.d.ts +9 -0
  30. package/dist/content/views.d.ts.map +1 -0
  31. package/dist/content/views.js +53 -0
  32. package/dist/content/views.js.map +1 -0
  33. package/dist/content/welcome.d.ts +18 -0
  34. package/dist/content/welcome.d.ts.map +1 -0
  35. package/dist/content/welcome.js +45 -0
  36. package/dist/content/welcome.js.map +1 -0
  37. package/dist/core.d.ts +36 -0
  38. package/dist/core.d.ts.map +1 -0
  39. package/dist/core.js +44 -0
  40. package/dist/core.js.map +1 -0
  41. package/dist/dom.d.ts +14 -0
  42. package/dist/dom.d.ts.map +1 -0
  43. package/dist/dom.js +69 -0
  44. package/dist/dom.js.map +1 -0
  45. package/dist/files/panels.d.ts +95 -0
  46. package/dist/files/panels.d.ts.map +1 -0
  47. package/dist/files/panels.js +245 -0
  48. package/dist/files/panels.js.map +1 -0
  49. package/dist/files/systems.d.ts +91 -0
  50. package/dist/files/systems.d.ts.map +1 -0
  51. package/dist/files/systems.js +256 -0
  52. package/dist/files/systems.js.map +1 -0
  53. package/dist/forms/actions.d.ts +27 -0
  54. package/dist/forms/actions.d.ts.map +1 -0
  55. package/dist/forms/actions.js +19 -0
  56. package/dist/forms/actions.js.map +1 -0
  57. package/dist/forms/custom-connection.d.ts +61 -0
  58. package/dist/forms/custom-connection.d.ts.map +1 -0
  59. package/dist/forms/custom-connection.js +65 -0
  60. package/dist/forms/custom-connection.js.map +1 -0
  61. package/dist/forms/dialog-frame.d.ts +39 -0
  62. package/dist/forms/dialog-frame.d.ts.map +1 -0
  63. package/dist/forms/dialog-frame.js +75 -0
  64. package/dist/forms/dialog-frame.js.map +1 -0
  65. package/dist/forms/history.d.ts +16 -0
  66. package/dist/forms/history.d.ts.map +1 -0
  67. package/dist/forms/history.js +21 -0
  68. package/dist/forms/history.js.map +1 -0
  69. package/dist/forms/identity.d.ts +4 -0
  70. package/dist/forms/identity.d.ts.map +1 -0
  71. package/dist/forms/identity.js +21 -0
  72. package/dist/forms/identity.js.map +1 -0
  73. package/dist/forms/model-editor.d.ts +35 -0
  74. package/dist/forms/model-editor.d.ts.map +1 -0
  75. package/dist/forms/model-editor.js +78 -0
  76. package/dist/forms/model-editor.js.map +1 -0
  77. package/dist/forms/panels.d.ts +57 -0
  78. package/dist/forms/panels.d.ts.map +1 -0
  79. package/dist/forms/panels.js +224 -0
  80. package/dist/forms/panels.js.map +1 -0
  81. package/dist/forms/provider-login.d.ts +22 -0
  82. package/dist/forms/provider-login.d.ts.map +1 -0
  83. package/dist/forms/provider-login.js +114 -0
  84. package/dist/forms/provider-login.js.map +1 -0
  85. package/dist/forms/resource-editor.d.ts +23 -0
  86. package/dist/forms/resource-editor.d.ts.map +1 -0
  87. package/dist/forms/resource-editor.js +24 -0
  88. package/dist/forms/resource-editor.js.map +1 -0
  89. package/dist/index.d.ts +28 -0
  90. package/dist/index.d.ts.map +1 -0
  91. package/dist/index.js +28 -0
  92. package/dist/index.js.map +1 -0
  93. package/dist/navigation/context-menu.d.ts +25 -0
  94. package/dist/navigation/context-menu.d.ts.map +1 -0
  95. package/dist/navigation/context-menu.js +67 -0
  96. package/dist/navigation/context-menu.js.map +1 -0
  97. package/dist/navigation/navigation.d.ts +57 -0
  98. package/dist/navigation/navigation.d.ts.map +1 -0
  99. package/dist/navigation/navigation.js +185 -0
  100. package/dist/navigation/navigation.js.map +1 -0
  101. package/dist/primitives.d.ts +307 -0
  102. package/dist/primitives.d.ts.map +1 -0
  103. package/dist/primitives.js +741 -0
  104. package/dist/primitives.js.map +1 -0
  105. package/dist/styles.css +849 -0
  106. package/dist/tasks/approval.d.ts +25 -0
  107. package/dist/tasks/approval.d.ts.map +1 -0
  108. package/dist/tasks/approval.js +61 -0
  109. package/dist/tasks/approval.js.map +1 -0
  110. package/dist/tasks/permission.d.ts +35 -0
  111. package/dist/tasks/permission.d.ts.map +1 -0
  112. package/dist/tasks/permission.js +67 -0
  113. package/dist/tasks/permission.js.map +1 -0
  114. package/dist/tasks/runtime.d.ts +31 -0
  115. package/dist/tasks/runtime.d.ts.map +1 -0
  116. package/dist/tasks/runtime.js +34 -0
  117. package/dist/tasks/runtime.js.map +1 -0
  118. package/dist/theme.d.ts +4 -0
  119. package/dist/theme.d.ts.map +1 -0
  120. package/dist/theme.js +6 -0
  121. package/dist/theme.js.map +1 -0
  122. package/dist/workspace.d.ts +38 -0
  123. package/dist/workspace.d.ts.map +1 -0
  124. package/dist/workspace.js +183 -0
  125. package/dist/workspace.js.map +1 -0
  126. package/package.json +27 -4
package/API.md ADDED
@@ -0,0 +1,3281 @@
1
+ # Public API reference
2
+
3
+ Generated for `pith-ui@0.1.0` by `node scripts/api-docs.ts` from TypeScript declaration emit. Do not edit this file by hand. The installed public declarations are authoritative; this reference reproduces every public declaration, including all 73 create/install/mount factories and their state, options, callback and handle types.
4
+
5
+ Use the [catalog](https://github.com/minifish-org/pith-ui/blob/main/docs/catalog.md) to choose a complete block first, then inspect its exact signature and linked types here. Gallery links are related experiences; adapter APIs may point to their preferred replacement. Source links point to the implementation, not a second usage contract.
6
+
7
+ Types such as `HTMLElement`, `Node`, `Event`, `Promise` and TypeScript utility types are standard platform types. Named Pith UI references below link to their exact public definitions. Node slots require trusted DOM nodes; there is no arbitrary-HTML extension interface. See [AI.md](./AI.md) for lifecycle, host boundaries and composition rules.
8
+
9
+ Regenerate: `node scripts/api-docs.ts`. Verify without writing: `node scripts/api-docs.ts --check`.
10
+
11
+ ## Factory index
12
+
13
+ | Factory | Related gallery |
14
+ |---|---|
15
+ | [`createActions`](#createactions) | [actions](https://minifish-org.github.io/pith-ui/?item=actions) |
16
+ | [`createApprovalPanel`](#createapprovalpanel) | [approval-panel](https://minifish-org.github.io/pith-ui/?item=approval-panel) |
17
+ | [`createArtifactPanel`](#createartifactpanel) | [artifact-panel](https://minifish-org.github.io/pith-ui/?item=artifact-panel) |
18
+ | [`createAttachments`](#createattachments) | [attachments](https://minifish-org.github.io/pith-ui/?item=attachments) |
19
+ | [`createBranchHistory`](#createbranchhistory) | [branch-history](https://minifish-org.github.io/pith-ui/?item=branch-history) |
20
+ | [`createButton`](#createbutton) | [actions](https://minifish-org.github.io/pith-ui/?item=actions), [button](https://minifish-org.github.io/pith-ui/?item=button), [confirmation](https://minifish-org.github.io/pith-ui/?item=confirmation), [context-menu](https://minifish-org.github.io/pith-ui/?item=context-menu), [conversation-reader](https://minifish-org.github.io/pith-ui/?item=conversation-reader), [copy-feedback](https://minifish-org.github.io/pith-ui/?item=copy-feedback), [dialog](https://minifish-org.github.io/pith-ui/?item=dialog), [drop-feedback](https://minifish-org.github.io/pith-ui/?item=drop-feedback), [feature-dialog](https://minifish-org.github.io/pith-ui/?item=feature-dialog), [foundation-colors](https://minifish-org.github.io/pith-ui/?item=foundation-colors), [foundation-focus](https://minifish-org.github.io/pith-ui/?item=foundation-focus), [foundation-motion](https://minifish-org.github.io/pith-ui/?item=foundation-motion), [foundation-sizing](https://minifish-org.github.io/pith-ui/?item=foundation-sizing), [foundation-spacing](https://minifish-org.github.io/pith-ui/?item=foundation-spacing), [image-viewer](https://minifish-org.github.io/pith-ui/?item=image-viewer), [list-row](https://minifish-org.github.io/pith-ui/?item=list-row), [resources-panel](https://minifish-org.github.io/pith-ui/?item=resources-panel), [runtime-panel](https://minifish-org.github.io/pith-ui/?item=runtime-panel), [text-edit-dialog](https://minifish-org.github.io/pith-ui/?item=text-edit-dialog), [toolbar](https://minifish-org.github.io/pith-ui/?item=toolbar) |
21
+ | [`createCheckbox`](#createcheckbox) | [checkbox](https://minifish-org.github.io/pith-ui/?item=checkbox), [foundation-focus](https://minifish-org.github.io/pith-ui/?item=foundation-focus), [foundation-motion](https://minifish-org.github.io/pith-ui/?item=foundation-motion) |
22
+ | [`createCollectionState`](#createcollectionstate) | [collection-state](https://minifish-org.github.io/pith-ui/?item=collection-state) |
23
+ | [`createCompletionNotices`](#createcompletionnotices) | [completion-notices](https://minifish-org.github.io/pith-ui/?item=completion-notices) |
24
+ | [`createComposerView`](#createcomposerview) | [composer](https://minifish-org.github.io/pith-ui/?item=composer), [drop-feedback](https://minifish-org.github.io/pith-ui/?item=drop-feedback) |
25
+ | [`createConfirmDialog`](#createconfirmdialog) | [confirmation](https://minifish-org.github.io/pith-ui/?item=confirmation) |
26
+ | [`createContextMenu`](#createcontextmenu) | [context-menu](https://minifish-org.github.io/pith-ui/?item=context-menu) |
27
+ | [`createConversationView`](#createconversationview) | [conversation-messages](https://minifish-org.github.io/pith-ui/?item=conversation-messages), [conversation-reader](https://minifish-org.github.io/pith-ui/?item=conversation-reader), [foundation-motion](https://minifish-org.github.io/pith-ui/?item=foundation-motion) |
28
+ | [`createCopyFeedback`](#createcopyfeedback) | [copy-feedback](https://minifish-org.github.io/pith-ui/?item=copy-feedback) |
29
+ | [`createCostLedger`](#createcostledger) | [cost-ledger](https://minifish-org.github.io/pith-ui/?item=cost-ledger) |
30
+ | [`createCustomConnectionEditor`](#createcustomconnectioneditor) | [custom-connection](https://minifish-org.github.io/pith-ui/?item=custom-connection) |
31
+ | [`createCustomModelRow`](#createcustommodelrow) | [custom-connection](https://minifish-org.github.io/pith-ui/?item=custom-connection), [provider-resource-actions](https://minifish-org.github.io/pith-ui/?item=provider-resource-actions), [settings-panel](https://minifish-org.github.io/pith-ui/?item=settings-panel) |
32
+ | [`createDialog`](#createdialog) | [dialog](https://minifish-org.github.io/pith-ui/?item=dialog) |
33
+ | [`createDisclosure`](#createdisclosure) | [disclosure](https://minifish-org.github.io/pith-ui/?item=disclosure) |
34
+ | [`createDivider`](#createdivider) | [divider](https://minifish-org.github.io/pith-ui/?item=divider) |
35
+ | [`createDropFeedback`](#createdropfeedback) | [drop-feedback](https://minifish-org.github.io/pith-ui/?item=drop-feedback) |
36
+ | [`createFeatureDialogFrame`](#createfeaturedialogframe) | [feature-dialog](https://minifish-org.github.io/pith-ui/?item=feature-dialog) |
37
+ | [`createFeatureStatus`](#createfeaturestatus) | [feature-dialog](https://minifish-org.github.io/pith-ui/?item=feature-dialog) |
38
+ | [`createField`](#createfield) | [number-input](https://minifish-org.github.io/pith-ui/?item=number-input), [search-input](https://minifish-org.github.io/pith-ui/?item=search-input), [secret-input](https://minifish-org.github.io/pith-ui/?item=secret-input), [text-area](https://minifish-org.github.io/pith-ui/?item=text-area), [text-input](https://minifish-org.github.io/pith-ui/?item=text-input) |
39
+ | [`createFileActions`](#createfileactions) | [file-actions](https://minifish-org.github.io/pith-ui/?item=file-actions) |
40
+ | [`createFilePreview`](#createfilepreview) | [file-preview](https://minifish-org.github.io/pith-ui/?item=file-preview) |
41
+ | [`createFormSection`](#createformsection) | [form-section](https://minifish-org.github.io/pith-ui/?item=form-section) |
42
+ | [`createFullAccessConfirmation`](#createfullaccessconfirmation) | [full-access-confirmation](https://minifish-org.github.io/pith-ui/?item=full-access-confirmation) |
43
+ | [`createIcon`](#createicon) | [foundation-sizing](https://minifish-org.github.io/pith-ui/?item=foundation-sizing), [icons](https://minifish-org.github.io/pith-ui/?item=icons) |
44
+ | [`createIconButton`](#createiconbutton) | [icon-button](https://minifish-org.github.io/pith-ui/?item=icon-button), [toolbar](https://minifish-org.github.io/pith-ui/?item=toolbar) |
45
+ | [`createImageViewer`](#createimageviewer) | [image-viewer](https://minifish-org.github.io/pith-ui/?item=image-viewer) |
46
+ | [`createKeyValue`](#createkeyvalue) | [foundation-motion](https://minifish-org.github.io/pith-ui/?item=foundation-motion), [key-value](https://minifish-org.github.io/pith-ui/?item=key-value) |
47
+ | [`createListRow`](#createlistrow) | [collection-state](https://minifish-org.github.io/pith-ui/?item=collection-state), [list-row](https://minifish-org.github.io/pith-ui/?item=list-row) |
48
+ | [`createMCPConnectionList`](#createmcpconnectionlist) | [mcp-connections](https://minifish-org.github.io/pith-ui/?item=mcp-connections) |
49
+ | [`createMCPConnectionsPanel`](#createmcpconnectionspanel) | [mcp-connections](https://minifish-org.github.io/pith-ui/?item=mcp-connections) |
50
+ | [`createMenu`](#createmenu) | [menu](https://minifish-org.github.io/pith-ui/?item=menu) |
51
+ | [`createModelEditor`](#createmodeleditor) | [model-picker](https://minifish-org.github.io/pith-ui/?item=model-picker) |
52
+ | [`createModelPicker`](#createmodelpicker) | [model-picker](https://minifish-org.github.io/pith-ui/?item=model-picker) |
53
+ | [`createNotice`](#createnotice) | [notice](https://minifish-org.github.io/pith-ui/?item=notice) |
54
+ | [`createNumberInput`](#createnumberinput) | [number-input](https://minifish-org.github.io/pith-ui/?item=number-input) |
55
+ | [`createPagedPreview`](#createpagedpreview) | [markdown-content](https://minifish-org.github.io/pith-ui/?item=markdown-content), [paged-preview](https://minifish-org.github.io/pith-ui/?item=paged-preview) |
56
+ | [`createPendingMessages`](#creatependingmessages) | [pending-messages](https://minifish-org.github.io/pith-ui/?item=pending-messages) |
57
+ | [`createPermissionControl`](#createpermissioncontrol) | [permission-control](https://minifish-org.github.io/pith-ui/?item=permission-control) |
58
+ | [`createPopover`](#createpopover) | [popover](https://minifish-org.github.io/pith-ui/?item=popover) |
59
+ | [`createProgress`](#createprogress) | [progress](https://minifish-org.github.io/pith-ui/?item=progress) |
60
+ | [`createProviderActions`](#createprovideractions) | [provider-resource-actions](https://minifish-org.github.io/pith-ui/?item=provider-resource-actions) |
61
+ | [`createProviderLoginPanel`](#createproviderloginpanel) | [provider-login](https://minifish-org.github.io/pith-ui/?item=provider-login) |
62
+ | [`createRenameConversation`](#createrenameconversation) | [rename-conversation](https://minifish-org.github.io/pith-ui/?item=rename-conversation) |
63
+ | [`createResourceActions`](#createresourceactions) | [provider-resource-actions](https://minifish-org.github.io/pith-ui/?item=provider-resource-actions), [resources-panel](https://minifish-org.github.io/pith-ui/?item=resources-panel) |
64
+ | [`createResourceEditor`](#createresourceeditor) | [resource-editor](https://minifish-org.github.io/pith-ui/?item=resource-editor) |
65
+ | [`createResourcesPanel`](#createresourcespanel) | [resources-panel](https://minifish-org.github.io/pith-ui/?item=resources-panel) |
66
+ | [`createRuntimePanel`](#createruntimepanel) | [runtime-panel](https://minifish-org.github.io/pith-ui/?item=runtime-panel) |
67
+ | [`createSDKDialogElements`](#createsdkdialogelements) | [feature-dialog](https://minifish-org.github.io/pith-ui/?item=feature-dialog) |
68
+ | [`createScrollArea`](#createscrollarea) | [scroll-area](https://minifish-org.github.io/pith-ui/?item=scroll-area) |
69
+ | [`createSearchInput`](#createsearchinput) | [search-input](https://minifish-org.github.io/pith-ui/?item=search-input) |
70
+ | [`createSecretInput`](#createsecretinput) | [secret-input](https://minifish-org.github.io/pith-ui/?item=secret-input) |
71
+ | [`createSelect`](#createselect) | [foundation-sizing](https://minifish-org.github.io/pith-ui/?item=foundation-sizing), [foundation-spacing](https://minifish-org.github.io/pith-ui/?item=foundation-spacing), [select](https://minifish-org.github.io/pith-ui/?item=select) |
72
+ | [`createSettingsPanel`](#createsettingspanel) | [settings-panel](https://minifish-org.github.io/pith-ui/?item=settings-panel) |
73
+ | [`createStatus`](#createstatus) | [status](https://minifish-org.github.io/pith-ui/?item=status) |
74
+ | [`createTaskFailure`](#createtaskfailure) | [task-failure](https://minifish-org.github.io/pith-ui/?item=task-failure) |
75
+ | [`createTextAction`](#createtextaction) | [text-action](https://minifish-org.github.io/pith-ui/?item=text-action) |
76
+ | [`createTextArea`](#createtextarea) | [foundation-typography](https://minifish-org.github.io/pith-ui/?item=foundation-typography), [text-area](https://minifish-org.github.io/pith-ui/?item=text-area) |
77
+ | [`createTextEditDialog`](#createtexteditdialog) | [pending-messages](https://minifish-org.github.io/pith-ui/?item=pending-messages), [text-edit-dialog](https://minifish-org.github.io/pith-ui/?item=text-edit-dialog) |
78
+ | [`createTextInput`](#createtextinput) | [form-section](https://minifish-org.github.io/pith-ui/?item=form-section), [foundation-focus](https://minifish-org.github.io/pith-ui/?item=foundation-focus), [foundation-sizing](https://minifish-org.github.io/pith-ui/?item=foundation-sizing), [popover](https://minifish-org.github.io/pith-ui/?item=popover), [text-input](https://minifish-org.github.io/pith-ui/?item=text-input) |
79
+ | [`createToolbar`](#createtoolbar) | [button](https://minifish-org.github.io/pith-ui/?item=button), [foundation-motion](https://minifish-org.github.io/pith-ui/?item=foundation-motion), [foundation-spacing](https://minifish-org.github.io/pith-ui/?item=foundation-spacing), [icon-button](https://minifish-org.github.io/pith-ui/?item=icon-button), [icons](https://minifish-org.github.io/pith-ui/?item=icons), [toolbar](https://minifish-org.github.io/pith-ui/?item=toolbar) |
80
+ | [`createUpdatePanel`](#createupdatepanel) | [updates](https://minifish-org.github.io/pith-ui/?item=updates) |
81
+ | [`createWelcomeView`](#createwelcomeview) | [welcome](https://minifish-org.github.io/pith-ui/?item=welcome) |
82
+ | [`createWorkspaceNavigation`](#createworkspacenavigation) | [workspace-navigation](https://minifish-org.github.io/pith-ui/?item=workspace-navigation) |
83
+ | [`createWorkspacePicker`](#createworkspacepicker) | [workspace-picker](https://minifish-org.github.io/pith-ui/?item=workspace-picker) |
84
+ | [`createWorkspaceShell`](#createworkspaceshell) | [workspace-chat](https://minifish-org.github.io/pith-ui/?item=workspace-chat) |
85
+ | [`installConversationReader`](#installconversationreader) | [conversation-reader](https://minifish-org.github.io/pith-ui/?item=conversation-reader) |
86
+ | [`installImageViewer`](#installimageviewer) | [image-viewer](https://minifish-org.github.io/pith-ui/?item=image-viewer) |
87
+ | [`mountPagedPreview`](#mountpagedpreview) | [markdown-content](https://minifish-org.github.io/pith-ui/?item=markdown-content), [paged-preview](https://minifish-org.github.io/pith-ui/?item=paged-preview) |
88
+
89
+ ## src/composer.ts
90
+
91
+ ### createAttachments
92
+
93
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/composer.ts#L63)
94
+
95
+ ```ts
96
+ export declare function createAttachments(options?: {
97
+ container?: HTMLElement;
98
+ onRemove?: (id: string) => void;
99
+ onOpen?: (image: HTMLImageElement) => void;
100
+ }): UIBlock<AttachmentsState>;
101
+ ```
102
+
103
+ Referenced public types and APIs: [`AttachmentsState`](#attachmentsstate), [`UIBlock`](#uiblock).
104
+
105
+ Related gallery: [attachments](https://minifish-org.github.io/pith-ui/?item=attachments).
106
+
107
+ ### createDropFeedback
108
+
109
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/composer.ts#L53)
110
+
111
+ ```ts
112
+ export declare function createDropFeedback(options: {
113
+ container: HTMLElement;
114
+ }): UIBlock<{
115
+ active: boolean;
116
+ disabled?: boolean;
117
+ }>;
118
+ ```
119
+
120
+ Referenced public types and APIs: [`UIBlock`](#uiblock).
121
+
122
+ Related gallery: [drop-feedback](https://minifish-org.github.io/pith-ui/?item=drop-feedback).
123
+
124
+ ### createPendingMessages
125
+
126
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/composer.ts#L10)
127
+
128
+ ```ts
129
+ export declare function createPendingMessages(options?: PendingMessagesOptions): UIBlock<PendingMessagesState>;
130
+ ```
131
+
132
+ Referenced public types and APIs: [`PendingMessagesOptions`](#pendingmessagesoptions), [`PendingMessagesState`](#pendingmessagesstate), [`UIBlock`](#uiblock).
133
+
134
+ Related gallery: [pending-messages](https://minifish-org.github.io/pith-ui/?item=pending-messages).
135
+
136
+ ### AttachmentItem
137
+
138
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/composer.ts#L51)
139
+
140
+ ```ts
141
+ export interface AttachmentItem {
142
+ id: string;
143
+ url: string;
144
+ name: string;
145
+ }
146
+ ```
147
+
148
+ ### AttachmentsState
149
+
150
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/composer.ts#L62)
151
+
152
+ ```ts
153
+ export interface AttachmentsState {
154
+ items: readonly AttachmentItem[];
155
+ disabled?: boolean;
156
+ }
157
+ ```
158
+
159
+ Referenced public types and APIs: [`AttachmentItem`](#attachmentitem).
160
+
161
+ ### PendingMessage
162
+
163
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/composer.ts#L4)
164
+
165
+ ```ts
166
+ export interface PendingMessage {
167
+ id: string;
168
+ text: string;
169
+ mode: string;
170
+ imageCount?: number;
171
+ }
172
+ ```
173
+
174
+ ### PendingMessagesOptions
175
+
176
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/composer.ts#L6)
177
+
178
+ ```ts
179
+ export interface PendingMessagesOptions {
180
+ container?: HTMLElement;
181
+ onAction?: (action: 'edit' | 'delete' | 'steer', id: string) => void;
182
+ }
183
+ ```
184
+
185
+ ### PendingMessagesState
186
+
187
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/composer.ts#L5)
188
+
189
+ ```ts
190
+ export interface PendingMessagesState {
191
+ items: readonly PendingMessage[];
192
+ running: boolean;
193
+ busy: boolean;
194
+ }
195
+ ```
196
+
197
+ Referenced public types and APIs: [`PendingMessage`](#pendingmessage).
198
+
199
+ ## src/content/conversation-reader.ts
200
+
201
+ ### installConversationReader
202
+
203
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/content/conversation-reader.ts#L18)
204
+
205
+ ```ts
206
+ export declare function installConversationReader(scroll: HTMLElement, messages: HTMLElement, bar: HTMLElement, latest: HTMLButtonElement, options?: ConversationReaderOptions): {
207
+ beforeRender(id: string): void;
208
+ afterRender(): void;
209
+ prune(ids: string[]): void;
210
+ followLatest: () => void;
211
+ openFind: () => void;
212
+ closeFind: () => void;
213
+ destroy(): void;
214
+ };
215
+ ```
216
+
217
+ Referenced public types and APIs: [`ConversationReaderOptions`](#conversationreaderoptions).
218
+
219
+ Related gallery: [conversation-reader](https://minifish-org.github.io/pith-ui/?item=conversation-reader).
220
+
221
+ ### ConversationReaderOptions
222
+
223
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/content/conversation-reader.ts#L13)
224
+
225
+ ```ts
226
+ export interface ConversationReaderOptions {
227
+ keyboardTarget?: EventTarget;
228
+ isKeyboardBlocked?: () => boolean;
229
+ }
230
+ ```
231
+
232
+ ### findRanges
233
+
234
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/content/conversation-reader.ts#L4)
235
+
236
+ ```ts
237
+ export declare function findRanges(text: string, query: string): TextRange[];
238
+ ```
239
+
240
+ Referenced public types and APIs: [`TextRange`](#textrange).
241
+
242
+ ### TextRange
243
+
244
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/content/conversation-reader.ts#L1)
245
+
246
+ ```ts
247
+ export interface TextRange {
248
+ start: number;
249
+ end: number;
250
+ }
251
+ ```
252
+
253
+ ## src/content/conversation-view.ts
254
+
255
+ ### createConversationView
256
+
257
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/content/conversation-view.ts#L34)
258
+
259
+ ```ts
260
+ export declare function createConversationView(options?: ConversationViewOptions): UIBlock<ConversationViewState>;
261
+ ```
262
+
263
+ Referenced public types and APIs: [`ConversationViewOptions`](#conversationviewoptions), [`ConversationViewState`](#conversationviewstate), [`UIBlock`](#uiblock).
264
+
265
+ Related gallery: [conversation-messages](https://minifish-org.github.io/pith-ui/?item=conversation-messages), [conversation-reader](https://minifish-org.github.io/pith-ui/?item=conversation-reader), [foundation-motion](https://minifish-org.github.io/pith-ui/?item=foundation-motion).
266
+
267
+ ### ConversationAction
268
+
269
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/content/conversation-view.ts#L25)
270
+
271
+ ```ts
272
+ export interface ConversationAction {
273
+ action: 'copy' | 'edit' | 'branch';
274
+ messageId: string;
275
+ branchKey?: string;
276
+ }
277
+ ```
278
+
279
+ ### ConversationMessage
280
+
281
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/content/conversation-view.ts#L7)
282
+
283
+ ```ts
284
+ /** UI data only. Hosts decide copy/edit/branch eligibility and resolve images. */
285
+ export interface ConversationMessage {
286
+ id: string;
287
+ role: string;
288
+ text: string;
289
+ timestamp?: number;
290
+ toolName?: string;
291
+ toolCallId?: string;
292
+ status?: string;
293
+ images?: Array<{
294
+ index: number;
295
+ mimeType?: string;
296
+ }>;
297
+ command?: {
298
+ text: string;
299
+ cwd: string;
300
+ exitCode?: number;
301
+ };
302
+ actions?: {
303
+ copy?: boolean | string;
304
+ edit?: boolean;
305
+ branch?: {
306
+ key: string;
307
+ label?: string;
308
+ };
309
+ };
310
+ }
311
+ ```
312
+
313
+ Related gallery: [conversation-messages](https://minifish-org.github.io/pith-ui/?item=conversation-messages), [conversation-reader](https://minifish-org.github.io/pith-ui/?item=conversation-reader).
314
+
315
+ ### ConversationViewOptions
316
+
317
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/content/conversation-view.ts#L26)
318
+
319
+ ```ts
320
+ export interface ConversationViewOptions {
321
+ container?: HTMLElement;
322
+ markdown?: (conversationId: string) => MarkdownOptions;
323
+ onAction?: (action: ConversationAction) => void;
324
+ onCopyCode?: (text: string) => void;
325
+ }
326
+ ```
327
+
328
+ Referenced public types and APIs: [`ConversationAction`](#conversationaction), [`MarkdownOptions`](#markdownoptions).
329
+
330
+ ### ConversationViewState
331
+
332
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/content/conversation-view.ts#L19)
333
+
334
+ ```ts
335
+ export interface ConversationViewState {
336
+ id: string;
337
+ messages: readonly ConversationMessage[];
338
+ working: boolean;
339
+ folds?: ReadonlyMap<string, boolean>;
340
+ }
341
+ ```
342
+
343
+ Referenced public types and APIs: [`ConversationMessage`](#conversationmessage).
344
+
345
+ ## src/content/image-viewer.ts
346
+
347
+ ### createImageViewer
348
+
349
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/content/image-viewer.ts#L8)
350
+
351
+ ```ts
352
+ /** A modal above either a generated-file preview or a conversation attachment. */
353
+ export declare function createImageViewer(options?: ImageViewerOptions): {
354
+ element: HTMLDialogElement;
355
+ open(target: HTMLImageElement | ImageViewerInput): void;
356
+ close: () => void;
357
+ destroy(): void;
358
+ };
359
+ ```
360
+
361
+ Referenced public types and APIs: [`ImageViewerInput`](#imageviewerinput), [`ImageViewerOptions`](#imagevieweroptions).
362
+
363
+ Related gallery: [image-viewer](https://minifish-org.github.io/pith-ui/?item=image-viewer).
364
+
365
+ ### installImageViewer
366
+
367
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/content/image-viewer.ts#L87)
368
+
369
+ ```ts
370
+ export declare function installImageViewer(dialog: HTMLDialogElement): {
371
+ element: HTMLDialogElement;
372
+ open(target: HTMLImageElement | ImageViewerInput): void;
373
+ close: () => void;
374
+ destroy(): void;
375
+ };
376
+ ```
377
+
378
+ Referenced public types and APIs: [`ImageViewerInput`](#imageviewerinput).
379
+
380
+ Related gallery: [image-viewer](https://minifish-org.github.io/pith-ui/?item=image-viewer).
381
+
382
+ ### ImageViewerInput
383
+
384
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/content/image-viewer.ts#L4)
385
+
386
+ ```ts
387
+ export interface ImageViewerInput {
388
+ src: string;
389
+ alt?: string;
390
+ returnFocus?: HTMLElement;
391
+ }
392
+ ```
393
+
394
+ ### ImageViewerOptions
395
+
396
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/content/image-viewer.ts#L3)
397
+
398
+ ```ts
399
+ export interface ImageViewerOptions {
400
+ dialog?: HTMLDialogElement;
401
+ headingId?: string;
402
+ }
403
+ ```
404
+
405
+ ## src/content/markdown.ts
406
+
407
+ ### LocalContentLink
408
+
409
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/content/markdown.ts#L5)
410
+
411
+ ```ts
412
+ export interface LocalContentLink {
413
+ path: string;
414
+ conversationId: string;
415
+ }
416
+ ```
417
+
418
+ ### MarkdownOptions
419
+
420
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/content/markdown.ts#L6)
421
+
422
+ ```ts
423
+ export interface MarkdownOptions {
424
+ /** The host validates its own file identity and download permissions. */
425
+ resolveLocalLink?: (href: string) => LocalContentLink | null;
426
+ }
427
+ ```
428
+
429
+ Referenced public types and APIs: [`LocalContentLink`](#localcontentlink).
430
+
431
+ ### renderDiff
432
+
433
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/content/markdown.ts#L67)
434
+
435
+ ```ts
436
+ export declare function renderDiff(diff: string): string;
437
+ ```
438
+
439
+ ### renderMarkdown
440
+
441
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/content/markdown.ts#L12)
442
+
443
+ ```ts
444
+ /** Sanitized content only: embedded images, executable markup and forms are excluded. */
445
+ export declare function renderMarkdown(value: string, options?: MarkdownOptions): string;
446
+ ```
447
+
448
+ Referenced public types and APIs: [`MarkdownOptions`](#markdownoptions).
449
+
450
+ ## src/content/paged-preview.ts
451
+
452
+ ### createPagedPreview
453
+
454
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/content/paged-preview.ts#L30)
455
+
456
+ ```ts
457
+ export declare function createPagedPreview(options: PagedPreviewOptions): UIBlock<PagedPreviewState>;
458
+ ```
459
+
460
+ Referenced public types and APIs: [`PagedPreviewOptions`](#pagedpreviewoptions), [`PagedPreviewState`](#pagedpreviewstate), [`UIBlock`](#uiblock).
461
+
462
+ Related gallery: [markdown-content](https://minifish-org.github.io/pith-ui/?item=markdown-content), [paged-preview](https://minifish-org.github.io/pith-ui/?item=paged-preview).
463
+
464
+ ### mountPagedPreview
465
+
466
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/content/paged-preview.ts#L59)
467
+
468
+ ```ts
469
+ export declare function mountPagedPreview(container: HTMLElement, text: string, kind: PreviewKind): void;
470
+ ```
471
+
472
+ Referenced public types and APIs: [`PreviewKind`](#previewkind).
473
+
474
+ Related gallery: [markdown-content](https://minifish-org.github.io/pith-ui/?item=markdown-content), [paged-preview](https://minifish-org.github.io/pith-ui/?item=paged-preview).
475
+
476
+ ### PagedPreviewOptions
477
+
478
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/content/paged-preview.ts#L28)
479
+
480
+ ```ts
481
+ export interface PagedPreviewOptions extends PagedPreviewState {
482
+ container?: HTMLElement;
483
+ onCopyCode?: (text: string) => void;
484
+ }
485
+ ```
486
+
487
+ Referenced public types and APIs: [`PagedPreviewState`](#pagedpreviewstate).
488
+
489
+ ### PagedPreviewState
490
+
491
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/content/paged-preview.ts#L27)
492
+
493
+ ```ts
494
+ export interface PagedPreviewState {
495
+ text: string;
496
+ kind: PreviewKind;
497
+ }
498
+ ```
499
+
500
+ Referenced public types and APIs: [`PreviewKind`](#previewkind).
501
+
502
+ ### PreviewKind
503
+
504
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/content/paged-preview.ts#L26)
505
+
506
+ ```ts
507
+ export type PreviewKind = 'text' | 'markdown' | 'diff';
508
+ ```
509
+
510
+ ### previewPageBytes
511
+
512
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/content/paged-preview.ts#L6)
513
+
514
+ ```ts
515
+ export declare const previewPageBytes: number;
516
+ ```
517
+
518
+ ### previewPageRanges
519
+
520
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/content/paged-preview.ts#L8)
521
+
522
+ ```ts
523
+ export declare function previewPageRanges(bytes: Uint8Array, window?: number): Array<[
524
+ number,
525
+ number
526
+ ]>;
527
+ ```
528
+
529
+ ## src/content/welcome.ts
530
+
531
+ ### createWelcomeView
532
+
533
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/content/welcome.ts#L17)
534
+
535
+ ```ts
536
+ export declare function createWelcomeView(options?: WelcomeOptions): UIBlock<WelcomeState>;
537
+ ```
538
+
539
+ Referenced public types and APIs: [`UIBlock`](#uiblock), [`WelcomeOptions`](#welcomeoptions), [`WelcomeState`](#welcomestate).
540
+
541
+ Related gallery: [welcome](https://minifish-org.github.io/pith-ui/?item=welcome).
542
+
543
+ ### WelcomeOptions
544
+
545
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/content/welcome.ts#L10)
546
+
547
+ ```ts
548
+ export interface WelcomeOptions {
549
+ container?: HTMLElement;
550
+ logo?: Node;
551
+ onAction?: (action: 'model' | 'settings' | 'workspace') => void;
552
+ onPrompt?: (text: string) => void;
553
+ }
554
+ ```
555
+
556
+ ### WelcomeState
557
+
558
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/content/welcome.ts#L4)
559
+
560
+ ```ts
561
+ export interface WelcomeState {
562
+ workspace?: {
563
+ name: string;
564
+ path: string;
565
+ };
566
+ hasApiKey: boolean;
567
+ hasConnections: boolean;
568
+ modelName: string;
569
+ }
570
+ ```
571
+
572
+ ## src/core.ts
573
+
574
+ ### ActionResult
575
+
576
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/core.ts#L8)
577
+
578
+ ```ts
579
+ export type ActionResult = {
580
+ ok: true;
581
+ } | {
582
+ ok: false;
583
+ error: string;
584
+ };
585
+ ```
586
+
587
+ ### controlDisabled
588
+
589
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/core.ts#L42)
590
+
591
+ ```ts
592
+ /** Combine business availability with pending state owned by the control. */
593
+ export declare function controlDisabled(button: Pick<HTMLButtonElement, 'dataset'>, unavailable: boolean): boolean;
594
+ ```
595
+
596
+ ### Density
597
+
598
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/core.ts#L10)
599
+
600
+ ```ts
601
+ export type Density = 'normal' | 'compact';
602
+ ```
603
+
604
+ ### Generation
605
+
606
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/core.ts#L14)
607
+
608
+ ```ts
609
+ /** Invalidates UI responses without cancelling an already-started business write. */
610
+ export declare class Generation {
611
+ private revision;
612
+ private disposed;
613
+ next(): number;
614
+ current(revision: number): boolean;
615
+ invalidate(): void;
616
+ destroy(): void;
617
+ }
618
+ ```
619
+
620
+ ### Intent
621
+
622
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/core.ts#L11)
623
+
624
+ ```ts
625
+ export type Intent = 'neutral' | 'primary' | 'danger';
626
+ ```
627
+
628
+ ### Lifetime
629
+
630
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/core.ts#L24)
631
+
632
+ ```ts
633
+ /** All listeners and observers belong to the instance, including document listeners. */
634
+ export declare class Lifetime {
635
+ private cleanups;
636
+ private disposed;
637
+ add(cleanup: () => void): void;
638
+ listen(target: EventTarget, type: string, listener: EventListenerOrEventListenerObject, options?: AddEventListenerOptions): void;
639
+ destroy(): void;
640
+ }
641
+ ```
642
+
643
+ ### setControlPending
644
+
645
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/core.ts#L46)
646
+
647
+ ```ts
648
+ export declare function setControlPending(button: HTMLButtonElement, pending: boolean): void;
649
+ ```
650
+
651
+ ### UIAction
652
+
653
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/core.ts#L9)
654
+
655
+ ```ts
656
+ export type UIAction = () => void | ActionResult | Promise<void | ActionResult>;
657
+ ```
658
+
659
+ Referenced public types and APIs: [`ActionResult`](#actionresult).
660
+
661
+ ### UIBlock
662
+
663
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/core.ts#L2)
664
+
665
+ ```ts
666
+ /** An owned DOM instance. Call destroy before releasing or replacing its host. */
667
+ export interface UIBlock<State> {
668
+ readonly element: HTMLElement;
669
+ update(state: Readonly<State>): void;
670
+ destroy(): void;
671
+ }
672
+ ```
673
+
674
+ ## src/dom.ts
675
+
676
+ ### dialogHeading
677
+
678
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/dom.ts#L34)
679
+
680
+ ```ts
681
+ export declare function dialogHeading(title: string, id: string, dialogId: string, eyebrow?: string): string;
682
+ ```
683
+
684
+ ### DOMChild
685
+
686
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/dom.ts#L38)
687
+
688
+ ```ts
689
+ export type DOMChild = Node | string | null | undefined;
690
+ ```
691
+
692
+ ### element
693
+
694
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/dom.ts#L40)
695
+
696
+ ```ts
697
+ /** Safe DOM construction; strings are always text nodes. */
698
+ export declare function element<K extends keyof HTMLElementTagNameMap>(tag: K, className?: string, ...children: DOMChild[]): HTMLElementTagNameMap[K];
699
+ ```
700
+
701
+ Referenced public types and APIs: [`DOMChild`](#domchild).
702
+
703
+ Related gallery: [actions](https://minifish-org.github.io/pith-ui/?item=actions), [artifact-panel](https://minifish-org.github.io/pith-ui/?item=artifact-panel), [button](https://minifish-org.github.io/pith-ui/?item=button), [collection-state](https://minifish-org.github.io/pith-ui/?item=collection-state), [completion-notices](https://minifish-org.github.io/pith-ui/?item=completion-notices), [composer](https://minifish-org.github.io/pith-ui/?item=composer), [context-menu](https://minifish-org.github.io/pith-ui/?item=context-menu), [conversation-messages](https://minifish-org.github.io/pith-ui/?item=conversation-messages), [conversation-reader](https://minifish-org.github.io/pith-ui/?item=conversation-reader), [copy-feedback](https://minifish-org.github.io/pith-ui/?item=copy-feedback), [dialog](https://minifish-org.github.io/pith-ui/?item=dialog), [disclosure](https://minifish-org.github.io/pith-ui/?item=disclosure), [drop-feedback](https://minifish-org.github.io/pith-ui/?item=drop-feedback), [feature-dialog](https://minifish-org.github.io/pith-ui/?item=feature-dialog), [file-actions](https://minifish-org.github.io/pith-ui/?item=file-actions), [file-preview](https://minifish-org.github.io/pith-ui/?item=file-preview), [form-section](https://minifish-org.github.io/pith-ui/?item=form-section), [foundation-borders](https://minifish-org.github.io/pith-ui/?item=foundation-borders), [foundation-colors](https://minifish-org.github.io/pith-ui/?item=foundation-colors), [foundation-focus](https://minifish-org.github.io/pith-ui/?item=foundation-focus), [foundation-motion](https://minifish-org.github.io/pith-ui/?item=foundation-motion), [foundation-sizing](https://minifish-org.github.io/pith-ui/?item=foundation-sizing), [foundation-spacing](https://minifish-org.github.io/pith-ui/?item=foundation-spacing), [foundation-surfaces](https://minifish-org.github.io/pith-ui/?item=foundation-surfaces), [foundation-typography](https://minifish-org.github.io/pith-ui/?item=foundation-typography), [icon-button](https://minifish-org.github.io/pith-ui/?item=icon-button), [icons](https://minifish-org.github.io/pith-ui/?item=icons), [image-viewer](https://minifish-org.github.io/pith-ui/?item=image-viewer), [list-row](https://minifish-org.github.io/pith-ui/?item=list-row), [mcp-connections](https://minifish-org.github.io/pith-ui/?item=mcp-connections), [model-picker](https://minifish-org.github.io/pith-ui/?item=model-picker), [pending-messages](https://minifish-org.github.io/pith-ui/?item=pending-messages), [permission-control](https://minifish-org.github.io/pith-ui/?item=permission-control), [popover](https://minifish-org.github.io/pith-ui/?item=popover), [provider-resource-actions](https://minifish-org.github.io/pith-ui/?item=provider-resource-actions), [resource-editor](https://minifish-org.github.io/pith-ui/?item=resource-editor), [resources-panel](https://minifish-org.github.io/pith-ui/?item=resources-panel), [runtime-panel](https://minifish-org.github.io/pith-ui/?item=runtime-panel), [scroll-area](https://minifish-org.github.io/pith-ui/?item=scroll-area), [toolbar](https://minifish-org.github.io/pith-ui/?item=toolbar), [updates](https://minifish-org.github.io/pith-ui/?item=updates), [workspace-navigation](https://minifish-org.github.io/pith-ui/?item=workspace-navigation).
704
+
705
+ ### escape
706
+
707
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/dom.ts#L29)
708
+
709
+ ```ts
710
+ export declare const escape: (value: unknown) => string;
711
+ ```
712
+
713
+ ### escapeHTML
714
+
715
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/dom.ts#L30)
716
+
717
+ ```ts
718
+ export declare const escapeHTML: (value: unknown) => string;
719
+ ```
720
+
721
+ ### focusableElements
722
+
723
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/dom.ts#L58)
724
+
725
+ ```ts
726
+ export declare function focusableElements(owner: HTMLElement): HTMLElement[];
727
+ ```
728
+
729
+ ### icon
730
+
731
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/dom.ts#L32)
732
+
733
+ ```ts
734
+ /** Compatibility markup from a closed, trusted icon registry. */
735
+ export declare const icon: (name: string, className?: string) => string;
736
+ ```
737
+
738
+ Related gallery: [collection-state](https://minifish-org.github.io/pith-ui/?item=collection-state), [foundation-sizing](https://minifish-org.github.io/pith-ui/?item=foundation-sizing), [icon-button](https://minifish-org.github.io/pith-ui/?item=icon-button), [list-row](https://minifish-org.github.io/pith-ui/?item=list-row), [toolbar](https://minifish-org.github.io/pith-ui/?item=toolbar).
739
+
740
+ ### iconElement
741
+
742
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/dom.ts#L47)
743
+
744
+ ```ts
745
+ export declare function iconElement(name: string): SVGSVGElement;
746
+ ```
747
+
748
+ ### setText
749
+
750
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/dom.ts#L53)
751
+
752
+ ```ts
753
+ export declare function setText(node: HTMLElement, value: unknown): void;
754
+ ```
755
+
756
+ ### showDialogError
757
+
758
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/dom.ts#L66)
759
+
760
+ ```ts
761
+ export declare function showDialogError(owner: HTMLElement, message: string): void;
762
+ ```
763
+
764
+ ### uniqueId
765
+
766
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/dom.ts#L64)
767
+
768
+ ```ts
769
+ export declare function uniqueId(prefix?: string): string;
770
+ ```
771
+
772
+ Related gallery: [foundation-focus](https://minifish-org.github.io/pith-ui/?item=foundation-focus).
773
+
774
+ ## src/files/panels.ts
775
+
776
+ ### createArtifactPanel
777
+
778
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/files/panels.ts#L30)
779
+
780
+ ```ts
781
+ export declare function createArtifactPanel(options: ArtifactPanelOptions): {
782
+ element: HTMLElement;
783
+ setOpen: (value: boolean, restoreFocus?: boolean) => void;
784
+ readonly open: boolean;
785
+ update(state: Readonly<ArtifactPanelState>): void;
786
+ destroy(): void;
787
+ };
788
+ ```
789
+
790
+ Referenced public types and APIs: [`ArtifactPanelOptions`](#artifactpaneloptions), [`ArtifactPanelState`](#artifactpanelstate).
791
+
792
+ Related gallery: [artifact-panel](https://minifish-org.github.io/pith-ui/?item=artifact-panel).
793
+
794
+ ### createFileActions
795
+
796
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/files/panels.ts#L16)
797
+
798
+ ```ts
799
+ export declare function createFileActions(options: FileActionOptions): {
800
+ element: HTMLElement;
801
+ destroy(): void;
802
+ };
803
+ ```
804
+
805
+ Referenced public types and APIs: [`FileActionOptions`](#fileactionoptions).
806
+
807
+ Related gallery: [file-actions](https://minifish-org.github.io/pith-ui/?item=file-actions).
808
+
809
+ ### createFilePreview
810
+
811
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/files/panels.ts#L153)
812
+
813
+ ```ts
814
+ export declare function createFilePreview(options?: FilePreviewOptions): {
815
+ element: HTMLElement;
816
+ clear: () => void;
817
+ open(input: {
818
+ name: string;
819
+ path: string;
820
+ actions: Node;
821
+ }): void;
822
+ update(state: Readonly<FilePreviewState>): void;
823
+ destroy(): void;
824
+ };
825
+ ```
826
+
827
+ Referenced public types and APIs: [`FilePreviewOptions`](#filepreviewoptions), [`FilePreviewState`](#filepreviewstate).
828
+
829
+ Related gallery: [file-preview](https://minifish-org.github.io/pith-ui/?item=file-preview).
830
+
831
+ ### createResourcesPanel
832
+
833
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/files/panels.ts#L94)
834
+
835
+ ```ts
836
+ export declare function createResourcesPanel(options?: ResourcesPanelOptions): {
837
+ element: HTMLElement;
838
+ open(workspaceName: string, toolbar: Node): void;
839
+ setError(message: string): void;
840
+ update(state: Readonly<ResourcesPanelState>): void;
841
+ destroy(): void;
842
+ };
843
+ ```
844
+
845
+ Referenced public types and APIs: [`ResourcesPanelOptions`](#resourcespaneloptions), [`ResourcesPanelState`](#resourcespanelstate).
846
+
847
+ Related gallery: [resources-panel](https://minifish-org.github.io/pith-ui/?item=resources-panel).
848
+
849
+ ### ArtifactPanelOptions
850
+
851
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/files/panels.ts#L29)
852
+
853
+ ```ts
854
+ export interface ArtifactPanelOptions {
855
+ container: HTMLElement;
856
+ control: HTMLElement;
857
+ toggle: HTMLElement;
858
+ count: HTMLElement;
859
+ headingId?: string;
860
+ }
861
+ ```
862
+
863
+ ### ArtifactPanelState
864
+
865
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/files/panels.ts#L28)
866
+
867
+ ```ts
868
+ export interface ArtifactPanelState {
869
+ ownerId: string;
870
+ files: readonly {
871
+ name: string;
872
+ path: string;
873
+ }[];
874
+ loading: boolean;
875
+ error: string;
876
+ copyMode: 'file' | 'path';
877
+ }
878
+ ```
879
+
880
+ ### FileActionOptions
881
+
882
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/files/panels.ts#L5)
883
+
884
+ ```ts
885
+ export interface FileActionOptions {
886
+ kind: string;
887
+ ownerId: string;
888
+ path: string;
889
+ preview?: boolean;
890
+ copyMode?: 'file' | 'path' | 'none';
891
+ onAction?: (action: 'preview' | 'open' | 'reveal' | 'copy' | 'copy-path') => void;
892
+ }
893
+ ```
894
+
895
+ ### fileActionsMarkup
896
+
897
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/files/panels.ts#L10)
898
+
899
+ ```ts
900
+ export declare function fileActionsMarkup(options: FileActionOptions): string;
901
+ ```
902
+
903
+ Referenced public types and APIs: [`FileActionOptions`](#fileactionoptions).
904
+
905
+ ### FilePreviewOptions
906
+
907
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/files/panels.ts#L152)
908
+
909
+ ```ts
910
+ export interface FilePreviewOptions {
911
+ container?: HTMLElement;
912
+ titleId?: string;
913
+ dialogId?: string;
914
+ bodyId?: string;
915
+ onClose?: () => void;
916
+ }
917
+ ```
918
+
919
+ ### FilePreviewState
920
+
921
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/files/panels.ts#L151)
922
+
923
+ ```ts
924
+ export interface FilePreviewState {
925
+ kind: PreviewKind | 'image';
926
+ text?: string;
927
+ imageSrc?: string;
928
+ imageAlt?: string;
929
+ truncated?: boolean;
930
+ error?: string;
931
+ }
932
+ ```
933
+
934
+ Referenced public types and APIs: [`PreviewKind`](#previewkind).
935
+
936
+ ### ResourceDisplayEntry
937
+
938
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/files/panels.ts#L88)
939
+
940
+ ```ts
941
+ export interface ResourceDisplayEntry {
942
+ name: string;
943
+ path: string;
944
+ description?: string;
945
+ content?: string;
946
+ fileActions?: Node;
947
+ actions?: Node;
948
+ }
949
+ ```
950
+
951
+ ### ResourcesPanelOptions
952
+
953
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/files/panels.ts#L93)
954
+
955
+ ```ts
956
+ export interface ResourcesPanelOptions {
957
+ container?: HTMLElement;
958
+ titleId?: string;
959
+ dialogId?: string;
960
+ listId?: string;
961
+ errorId?: string;
962
+ onClose?: () => void;
963
+ }
964
+ ```
965
+
966
+ ### ResourcesPanelState
967
+
968
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/files/panels.ts#L89)
969
+
970
+ ```ts
971
+ export interface ResourcesPanelState {
972
+ instructions: readonly ResourceDisplayEntry[];
973
+ skills: readonly ResourceDisplayEntry[];
974
+ templates: readonly ResourceDisplayEntry[];
975
+ diagnostics: readonly string[];
976
+ createInstructions?: Node;
977
+ }
978
+ ```
979
+
980
+ Referenced public types and APIs: [`ResourceDisplayEntry`](#resourcedisplayentry).
981
+
982
+ ## src/files/systems.ts
983
+
984
+ ### createCompletionNotices
985
+
986
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/files/systems.ts#L120)
987
+
988
+ ```ts
989
+ export declare function createCompletionNotices(options?: {
990
+ container?: HTMLElement;
991
+ onOpen?: (id: string) => void;
992
+ onDismiss?: (runID: string) => void;
993
+ }): UIBlock<readonly CompletionNoticeDisplay[]>;
994
+ ```
995
+
996
+ Referenced public types and APIs: [`CompletionNoticeDisplay`](#completionnoticedisplay), [`UIBlock`](#uiblock).
997
+
998
+ Related gallery: [completion-notices](https://minifish-org.github.io/pith-ui/?item=completion-notices).
999
+
1000
+ ### createCopyFeedback
1001
+
1002
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/files/systems.ts#L159)
1003
+
1004
+ ```ts
1005
+ export declare function createCopyFeedback(options: {
1006
+ status: HTMLElement;
1007
+ isDisabled: (button: HTMLButtonElement) => boolean;
1008
+ onError: (error: unknown) => void;
1009
+ }): {
1010
+ copy(button: HTMLButtonElement, action: () => Promise<void>, announcement: string): Promise<void>;
1011
+ destroy(): void;
1012
+ };
1013
+ ```
1014
+
1015
+ Related gallery: [copy-feedback](https://minifish-org.github.io/pith-ui/?item=copy-feedback).
1016
+
1017
+ ### createCostLedger
1018
+
1019
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/files/systems.ts#L21)
1020
+
1021
+ ```ts
1022
+ export declare function createCostLedger(options?: {
1023
+ container?: HTMLElement;
1024
+ }): {
1025
+ element: HTMLElement;
1026
+ clear(): void;
1027
+ loading(): void;
1028
+ setError(message: string): void;
1029
+ update(report: Readonly<CostLedgerState>): void;
1030
+ destroy(): void;
1031
+ };
1032
+ ```
1033
+
1034
+ Referenced public types and APIs: [`CostLedgerState`](#costledgerstate).
1035
+
1036
+ Related gallery: [cost-ledger](https://minifish-org.github.io/pith-ui/?item=cost-ledger).
1037
+
1038
+ ### createUpdatePanel
1039
+
1040
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/files/systems.ts#L80)
1041
+
1042
+ ```ts
1043
+ export declare function createUpdatePanel(options?: {
1044
+ container?: HTMLElement;
1045
+ productName?: string;
1046
+ onCheck?: () => void;
1047
+ onInstall?: () => void;
1048
+ }): {
1049
+ element: HTMLElement;
1050
+ update(value: Readonly<UpdatePanelState>): void;
1051
+ setPending(value: boolean): void;
1052
+ setError(value: string, options?: {
1053
+ allowCheckRetry?: boolean;
1054
+ }): void;
1055
+ destroy(): void;
1056
+ };
1057
+ ```
1058
+
1059
+ Referenced public types and APIs: [`UpdatePanelState`](#updatepanelstate).
1060
+
1061
+ Related gallery: [updates](https://minifish-org.github.io/pith-ui/?item=updates).
1062
+
1063
+ ### CompletionNoticeDisplay
1064
+
1065
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/files/systems.ts#L113)
1066
+
1067
+ ```ts
1068
+ export interface CompletionNoticeDisplay {
1069
+ id: string;
1070
+ runID: string;
1071
+ title: string;
1072
+ workspace: string;
1073
+ }
1074
+ ```
1075
+
1076
+ Related gallery: [completion-notices](https://minifish-org.github.io/pith-ui/?item=completion-notices).
1077
+
1078
+ ### CostLedgerState
1079
+
1080
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/files/systems.ts#L20)
1081
+
1082
+ ```ts
1083
+ export interface CostLedgerState {
1084
+ unknownRequests: number;
1085
+ requests: readonly CostRequestDisplay[] | null;
1086
+ }
1087
+ ```
1088
+
1089
+ Referenced public types and APIs: [`CostRequestDisplay`](#costrequestdisplay).
1090
+
1091
+ ### CostRequestDisplay
1092
+
1093
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/files/systems.ts#L15)
1094
+
1095
+ ```ts
1096
+ export interface CostRequestDisplay {
1097
+ id: string;
1098
+ purpose: string;
1099
+ status: string;
1100
+ provider: string;
1101
+ providerName?: string;
1102
+ model: string;
1103
+ modelName?: string;
1104
+ time: string;
1105
+ source: string;
1106
+ price: unknown;
1107
+ known: boolean;
1108
+ usage: {
1109
+ input: number;
1110
+ output: number;
1111
+ cacheRead: number;
1112
+ cacheWrite: number;
1113
+ reasoning?: number;
1114
+ cost: {
1115
+ total: number;
1116
+ };
1117
+ };
1118
+ }
1119
+ ```
1120
+
1121
+ ### CostSummaryDisplay
1122
+
1123
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/files/systems.ts#L6)
1124
+
1125
+ ```ts
1126
+ export interface CostSummaryDisplay {
1127
+ unavailable?: boolean;
1128
+ requestCount: number;
1129
+ unknownRequests: number;
1130
+ runRequests: number;
1131
+ runUnknownRequests: number;
1132
+ total: number;
1133
+ runTotal: number;
1134
+ }
1135
+ ```
1136
+
1137
+ ### formatCost
1138
+
1139
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/files/systems.ts#L7)
1140
+
1141
+ ```ts
1142
+ export declare function formatCost(cost: CostSummaryDisplay | undefined, latestTask?: boolean): string;
1143
+ ```
1144
+
1145
+ Referenced public types and APIs: [`CostSummaryDisplay`](#costsummarydisplay).
1146
+
1147
+ ### historyStatusMarkup
1148
+
1149
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/files/systems.ts#L114)
1150
+
1151
+ ```ts
1152
+ export declare function historyStatusMarkup(status: 'approval' | 'running' | 'unread' | 'idle'): string;
1153
+ ```
1154
+
1155
+ Related gallery: [completion-notices](https://minifish-org.github.io/pith-ui/?item=completion-notices).
1156
+
1157
+ ### UpdatePanelState
1158
+
1159
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/files/systems.ts#L79)
1160
+
1161
+ ```ts
1162
+ export interface UpdatePanelState {
1163
+ version: string;
1164
+ enabled: boolean;
1165
+ phase: string;
1166
+ availableVersion: string;
1167
+ progress: number;
1168
+ message: string;
1169
+ }
1170
+ ```
1171
+
1172
+ ## src/forms/actions.ts
1173
+
1174
+ ### createProviderActions
1175
+
1176
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/forms/actions.ts#L16)
1177
+
1178
+ ```ts
1179
+ export declare function createProviderActions(state: ProviderActionsState, options?: {
1180
+ onAction?: (action: string, target: DOMStringMap) => void;
1181
+ }): UIBlock<ProviderActionsState>;
1182
+ ```
1183
+
1184
+ Referenced public types and APIs: [`ProviderActionsState`](#provideractionsstate), [`UIBlock`](#uiblock).
1185
+
1186
+ Related gallery: [provider-resource-actions](https://minifish-org.github.io/pith-ui/?item=provider-resource-actions).
1187
+
1188
+ ### createResourceActions
1189
+
1190
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/forms/actions.ts#L17)
1191
+
1192
+ ```ts
1193
+ export declare function createResourceActions(state: ResourceActionsState, options?: {
1194
+ onAction?: (action: string, target: DOMStringMap) => void;
1195
+ }): UIBlock<ResourceActionsState>;
1196
+ ```
1197
+
1198
+ Referenced public types and APIs: [`ResourceActionsState`](#resourceactionsstate), [`UIBlock`](#uiblock).
1199
+
1200
+ Related gallery: [provider-resource-actions](https://minifish-org.github.io/pith-ui/?item=provider-resource-actions), [resources-panel](https://minifish-org.github.io/pith-ui/?item=resources-panel).
1201
+
1202
+ ### providerActionsMarkup
1203
+
1204
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/forms/actions.ts#L5)
1205
+
1206
+ ```ts
1207
+ export declare function providerActionsMarkup(provider: ProviderActionsState): string;
1208
+ ```
1209
+
1210
+ Referenced public types and APIs: [`ProviderActionsState`](#provideractionsstate).
1211
+
1212
+ ### ProviderActionsState
1213
+
1214
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/forms/actions.ts#L3)
1215
+
1216
+ ```ts
1217
+ export interface ProviderActionsState {
1218
+ id: string;
1219
+ oauth: boolean;
1220
+ signedIn: boolean;
1221
+ custom: boolean;
1222
+ }
1223
+ ```
1224
+
1225
+ ### resourceActionsMarkup
1226
+
1227
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/forms/actions.ts#L6)
1228
+
1229
+ ```ts
1230
+ export declare function resourceActionsMarkup(kind: string, resource: {
1231
+ name: string;
1232
+ path: string;
1233
+ }, workspaceId: string): string;
1234
+ ```
1235
+
1236
+ ### ResourceActionsState
1237
+
1238
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/forms/actions.ts#L4)
1239
+
1240
+ ```ts
1241
+ export interface ResourceActionsState {
1242
+ kind: string;
1243
+ resource: {
1244
+ name: string;
1245
+ path: string;
1246
+ };
1247
+ workspaceId: string;
1248
+ }
1249
+ ```
1250
+
1251
+ ## src/forms/custom-connection.ts
1252
+
1253
+ ### createCustomConnectionEditor
1254
+
1255
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/forms/custom-connection.ts#L26)
1256
+
1257
+ ```ts
1258
+ export declare function createCustomConnectionEditor(state: CustomConnectionState, options?: {
1259
+ idPrefix?: string;
1260
+ }): UIBlock<CustomConnectionState> & {
1261
+ read(): CustomConnectionDraft;
1262
+ readonly form: HTMLFormElement;
1263
+ };
1264
+ ```
1265
+
1266
+ Referenced public types and APIs: [`CustomConnectionDraft`](#customconnectiondraft), [`CustomConnectionState`](#customconnectionstate), [`UIBlock`](#uiblock).
1267
+
1268
+ Related gallery: [custom-connection](https://minifish-org.github.io/pith-ui/?item=custom-connection).
1269
+
1270
+ ### createCustomModelRow
1271
+
1272
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/forms/custom-connection.ts#L11)
1273
+
1274
+ ```ts
1275
+ export declare function createCustomModelRow(model: CustomModelRowState, index?: number): UIBlock<CustomModelRowState> & {
1276
+ read(): CustomModelDraft;
1277
+ reset(model: CustomModelValue): void;
1278
+ };
1279
+ ```
1280
+
1281
+ Referenced public types and APIs: [`CustomModelDraft`](#custommodeldraft), [`CustomModelRowState`](#custommodelrowstate), [`CustomModelValue`](#custommodelvalue), [`UIBlock`](#uiblock).
1282
+
1283
+ Related gallery: [custom-connection](https://minifish-org.github.io/pith-ui/?item=custom-connection), [provider-resource-actions](https://minifish-org.github.io/pith-ui/?item=provider-resource-actions), [settings-panel](https://minifish-org.github.io/pith-ui/?item=settings-panel).
1284
+
1285
+ ### CustomConnectionDraft
1286
+
1287
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/forms/custom-connection.ts#L7)
1288
+
1289
+ ```ts
1290
+ export interface CustomConnectionDraft {
1291
+ name: string;
1292
+ baseUrl: string;
1293
+ api: string;
1294
+ apiKey: string;
1295
+ models: CustomModelDraft[];
1296
+ }
1297
+ ```
1298
+
1299
+ Referenced public types and APIs: [`CustomModelDraft`](#custommodeldraft).
1300
+
1301
+ ### CustomConnectionState
1302
+
1303
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/forms/custom-connection.ts#L5)
1304
+
1305
+ ```ts
1306
+ export interface CustomConnectionState {
1307
+ name: string;
1308
+ baseUrl: string;
1309
+ api: string;
1310
+ editing: boolean;
1311
+ models: readonly CustomModelValue[];
1312
+ error?: string;
1313
+ disabled?: boolean;
1314
+ }
1315
+ ```
1316
+
1317
+ Referenced public types and APIs: [`CustomModelValue`](#custommodelvalue).
1318
+
1319
+ ### CustomModelDraft
1320
+
1321
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/forms/custom-connection.ts#L6)
1322
+
1323
+ ```ts
1324
+ export interface CustomModelDraft {
1325
+ sourceIndex: number;
1326
+ id: string;
1327
+ name: string;
1328
+ contextWindow: number;
1329
+ maxTokens: number;
1330
+ reasoning: boolean;
1331
+ images: boolean;
1332
+ prices: {
1333
+ input: string;
1334
+ output: string;
1335
+ cacheRead: string;
1336
+ cacheWrite: string;
1337
+ };
1338
+ }
1339
+ ```
1340
+
1341
+ ### CustomModelRowState
1342
+
1343
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/forms/custom-connection.ts#L10)
1344
+
1345
+ ```ts
1346
+ export interface CustomModelRowState extends CustomModelValue {
1347
+ disabled?: boolean;
1348
+ error?: string;
1349
+ }
1350
+ ```
1351
+
1352
+ Referenced public types and APIs: [`CustomModelValue`](#custommodelvalue).
1353
+
1354
+ ### CustomModelValue
1355
+
1356
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/forms/custom-connection.ts#L4)
1357
+
1358
+ ```ts
1359
+ export interface CustomModelValue {
1360
+ id: string;
1361
+ name?: string;
1362
+ contextWindow?: number;
1363
+ maxTokens?: number;
1364
+ reasoning?: boolean;
1365
+ input?: readonly string[];
1366
+ cost?: {
1367
+ input: number;
1368
+ output: number;
1369
+ cacheRead: number;
1370
+ cacheWrite: number;
1371
+ };
1372
+ }
1373
+ ```
1374
+
1375
+ ## src/forms/dialog-frame.ts
1376
+
1377
+ ### createFeatureDialogFrame
1378
+
1379
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/forms/dialog-frame.ts#L8)
1380
+
1381
+ ```ts
1382
+ export declare function createFeatureDialogFrame(options?: FeatureDialogOptions): UIBlock<FeatureDialogState> & {
1383
+ open(state: FeatureDialogState): void;
1384
+ close(): void;
1385
+ fail(message: string): void;
1386
+ };
1387
+ ```
1388
+
1389
+ Referenced public types and APIs: [`FeatureDialogOptions`](#featuredialogoptions), [`FeatureDialogState`](#featuredialogstate), [`UIBlock`](#uiblock).
1390
+
1391
+ Related gallery: [feature-dialog](https://minifish-org.github.io/pith-ui/?item=feature-dialog).
1392
+
1393
+ ### createFeatureStatus
1394
+
1395
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/forms/dialog-frame.ts#L38)
1396
+
1397
+ ```ts
1398
+ export declare function createFeatureStatus(state: {
1399
+ message: string;
1400
+ error?: boolean;
1401
+ }): UIBlock<{
1402
+ message: string;
1403
+ error?: boolean;
1404
+ }>;
1405
+ ```
1406
+
1407
+ Referenced public types and APIs: [`UIBlock`](#uiblock).
1408
+
1409
+ Related gallery: [feature-dialog](https://minifish-org.github.io/pith-ui/?item=feature-dialog).
1410
+
1411
+ ### createSDKDialogElements
1412
+
1413
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/forms/dialog-frame.ts#L43)
1414
+
1415
+ ```ts
1416
+ export declare function createSDKDialogElements(options?: {
1417
+ idPrefix?: string;
1418
+ }): {
1419
+ dialog: HTMLDialogElement;
1420
+ content: HTMLElement;
1421
+ oauthDialog: HTMLDialogElement;
1422
+ oauthContent: HTMLElement;
1423
+ destroy(): void;
1424
+ };
1425
+ ```
1426
+
1427
+ Related gallery: [feature-dialog](https://minifish-org.github.io/pith-ui/?item=feature-dialog).
1428
+
1429
+ ### DialogContent
1430
+
1431
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/forms/dialog-frame.ts#L5)
1432
+
1433
+ ```ts
1434
+ export interface DialogContent {
1435
+ element: HTMLElement;
1436
+ destroy(): void;
1437
+ }
1438
+ ```
1439
+
1440
+ ### FeatureDialogOptions
1441
+
1442
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/forms/dialog-frame.ts#L7)
1443
+
1444
+ ```ts
1445
+ export interface FeatureDialogOptions {
1446
+ dialog?: HTMLDialogElement;
1447
+ content?: HTMLElement;
1448
+ dialogId?: string;
1449
+ titleId?: string;
1450
+ errorId?: string;
1451
+ eyebrow?: string;
1452
+ }
1453
+ ```
1454
+
1455
+ ### FeatureDialogState
1456
+
1457
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/forms/dialog-frame.ts#L6)
1458
+
1459
+ ```ts
1460
+ export interface FeatureDialogState {
1461
+ title: string;
1462
+ body: Node | DialogContent;
1463
+ }
1464
+ ```
1465
+
1466
+ Referenced public types and APIs: [`DialogContent`](#dialogcontent).
1467
+
1468
+ ## src/forms/history.ts
1469
+
1470
+ ### createBranchHistory
1471
+
1472
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/forms/history.ts#L5)
1473
+
1474
+ ```ts
1475
+ export declare function createBranchHistory(state: BranchHistoryState, options?: {
1476
+ onContinue?: (id: string) => void | Promise<void>;
1477
+ }): UIBlock<BranchHistoryState>;
1478
+ ```
1479
+
1480
+ Referenced public types and APIs: [`BranchHistoryState`](#branchhistorystate), [`UIBlock`](#uiblock).
1481
+
1482
+ Related gallery: [branch-history](https://minifish-org.github.io/pith-ui/?item=branch-history).
1483
+
1484
+ ### BranchHistoryNode
1485
+
1486
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/forms/history.ts#L3)
1487
+
1488
+ ```ts
1489
+ export interface BranchHistoryNode {
1490
+ id: string;
1491
+ role: string;
1492
+ text: string;
1493
+ active: boolean;
1494
+ }
1495
+ ```
1496
+
1497
+ ### BranchHistoryState
1498
+
1499
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/forms/history.ts#L4)
1500
+
1501
+ ```ts
1502
+ export interface BranchHistoryState {
1503
+ nodes: readonly BranchHistoryNode[] | null;
1504
+ error?: string;
1505
+ loading?: boolean;
1506
+ }
1507
+ ```
1508
+
1509
+ Referenced public types and APIs: [`BranchHistoryNode`](#branchhistorynode).
1510
+
1511
+ ## src/forms/model-editor.ts
1512
+
1513
+ ### createModelEditor
1514
+
1515
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/forms/model-editor.ts#L9)
1516
+
1517
+ ```ts
1518
+ export declare function createModelEditor(initial: ModelEditorState, options?: {
1519
+ prefix?: string;
1520
+ element?: HTMLElement;
1521
+ onChange?: (selection: ModelSelection) => void;
1522
+ }): UIBlock<ModelEditorState> & {
1523
+ read(): ModelSelection;
1524
+ };
1525
+ ```
1526
+
1527
+ Referenced public types and APIs: [`ModelEditorState`](#modeleditorstate), [`ModelSelection`](#modelselection), [`UIBlock`](#uiblock).
1528
+
1529
+ Related gallery: [model-picker](https://minifish-org.github.io/pith-ui/?item=model-picker).
1530
+
1531
+ ### ModelEditorState
1532
+
1533
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/forms/model-editor.ts#L6)
1534
+
1535
+ ```ts
1536
+ export interface ModelEditorState {
1537
+ providers: readonly ModelProviderOption[] | null;
1538
+ models: readonly ModelOption[] | null;
1539
+ selection: ModelSelection;
1540
+ }
1541
+ ```
1542
+
1543
+ Referenced public types and APIs: [`ModelOption`](#modeloption), [`ModelProviderOption`](#modelprovideroption), [`ModelSelection`](#modelselection).
1544
+
1545
+ ### ModelOption
1546
+
1547
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/forms/model-editor.ts#L5)
1548
+
1549
+ ```ts
1550
+ export interface ModelOption {
1551
+ id: string;
1552
+ name: string;
1553
+ provider: string;
1554
+ thinkingLevels?: readonly string[] | null;
1555
+ supportsImages: boolean;
1556
+ contextWindow: number;
1557
+ maxTokens: number;
1558
+ }
1559
+ ```
1560
+
1561
+ ### ModelProviderOption
1562
+
1563
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/forms/model-editor.ts#L4)
1564
+
1565
+ ```ts
1566
+ export interface ModelProviderOption {
1567
+ id: string;
1568
+ name: string;
1569
+ model?: string;
1570
+ thinkingLevel?: string;
1571
+ }
1572
+ ```
1573
+
1574
+ ### ModelSelection
1575
+
1576
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/forms/model-editor.ts#L7)
1577
+
1578
+ ```ts
1579
+ export interface ModelSelection {
1580
+ provider: string;
1581
+ model: string;
1582
+ thinkingLevel: string;
1583
+ }
1584
+ ```
1585
+
1586
+ ### thinkingLabel
1587
+
1588
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/forms/model-editor.ts#L8)
1589
+
1590
+ ```ts
1591
+ export declare function thinkingLabel(level: string): string;
1592
+ ```
1593
+
1594
+ ## src/forms/panels.ts
1595
+
1596
+ ### createMCPConnectionList
1597
+
1598
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/forms/panels.ts#L130)
1599
+
1600
+ ```ts
1601
+ export declare function createMCPConnectionList(initial: MCPConnectionListState): UIBlock<MCPConnectionListState>;
1602
+ ```
1603
+
1604
+ Referenced public types and APIs: [`MCPConnectionListState`](#mcpconnectionliststate), [`UIBlock`](#uiblock).
1605
+
1606
+ Related gallery: [mcp-connections](https://minifish-org.github.io/pith-ui/?item=mcp-connections).
1607
+
1608
+ ### createMCPConnectionsPanel
1609
+
1610
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/forms/panels.ts#L95)
1611
+
1612
+ ```ts
1613
+ export declare function createMCPConnectionsPanel(state?: FormFeedback, options?: FormOptions): MCPConnectionsPanel;
1614
+ ```
1615
+
1616
+ Referenced public types and APIs: [`FormFeedback`](#formfeedback), [`FormOptions`](#formoptions), [`MCPConnectionsPanel`](#mcpconnectionspanel).
1617
+
1618
+ Related gallery: [mcp-connections](https://minifish-org.github.io/pith-ui/?item=mcp-connections).
1619
+
1620
+ ### createModelPicker
1621
+
1622
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/forms/panels.ts#L121)
1623
+
1624
+ ```ts
1625
+ export declare function createModelPicker(state?: FormFeedback, options?: FormOptions): FormDOMBlock<FormFeedback>;
1626
+ ```
1627
+
1628
+ Referenced public types and APIs: [`FormDOMBlock`](#formdomblock), [`FormFeedback`](#formfeedback), [`FormOptions`](#formoptions).
1629
+
1630
+ Related gallery: [model-picker](https://minifish-org.github.io/pith-ui/?item=model-picker).
1631
+
1632
+ ### createSettingsPanel
1633
+
1634
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/forms/panels.ts#L37)
1635
+
1636
+ ```ts
1637
+ export declare function createSettingsPanel(state: SettingsPanelState, options?: FormOptions): FormDOMBlock<SettingsPanelState>;
1638
+ ```
1639
+
1640
+ Referenced public types and APIs: [`FormDOMBlock`](#formdomblock), [`FormOptions`](#formoptions), [`SettingsPanelState`](#settingspanelstate).
1641
+
1642
+ Related gallery: [settings-panel](https://minifish-org.github.io/pith-ui/?item=settings-panel).
1643
+
1644
+ ### FormDOMBlock
1645
+
1646
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/forms/panels.ts#L6)
1647
+
1648
+ ```ts
1649
+ export interface FormDOMBlock<State extends FormFeedback> extends UIBlock<State> {
1650
+ field<T extends HTMLElement = HTMLElement>(id: string): T;
1651
+ id(localId: string): string;
1652
+ }
1653
+ ```
1654
+
1655
+ Referenced public types and APIs: [`FormFeedback`](#formfeedback), [`UIBlock`](#uiblock).
1656
+
1657
+ ### FormFeedback
1658
+
1659
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/forms/panels.ts#L5)
1660
+
1661
+ ```ts
1662
+ export interface FormFeedback {
1663
+ error?: string;
1664
+ disabled?: boolean;
1665
+ }
1666
+ ```
1667
+
1668
+ ### FormOptions
1669
+
1670
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/forms/panels.ts#L36)
1671
+
1672
+ ```ts
1673
+ export interface FormOptions {
1674
+ idPrefix?: string;
1675
+ }
1676
+ ```
1677
+
1678
+ ### MCPConnectionItem
1679
+
1680
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/forms/panels.ts#L124)
1681
+
1682
+ ```ts
1683
+ export interface MCPConnectionItem {
1684
+ name: string;
1685
+ type: string;
1686
+ url?: string;
1687
+ command?: string;
1688
+ args?: readonly string[];
1689
+ enabled: boolean;
1690
+ hasBearerToken?: boolean;
1691
+ status?: string;
1692
+ statusLabel: string;
1693
+ envKeys?: readonly string[];
1694
+ error?: string;
1695
+ oauth?: boolean;
1696
+ signedIn?: boolean;
1697
+ }
1698
+ ```
1699
+
1700
+ ### MCPConnectionListState
1701
+
1702
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/forms/panels.ts#L128)
1703
+
1704
+ ```ts
1705
+ export interface MCPConnectionListState extends FormFeedback {
1706
+ entries: readonly MCPConnectionItem[];
1707
+ }
1708
+ ```
1709
+
1710
+ Referenced public types and APIs: [`FormFeedback`](#formfeedback), [`MCPConnectionItem`](#mcpconnectionitem).
1711
+
1712
+ ### MCPConnectionsPanel
1713
+
1714
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/forms/panels.ts#L94)
1715
+
1716
+ ```ts
1717
+ export interface MCPConnectionsPanel extends FormDOMBlock<FormFeedback> {
1718
+ renderType(): void;
1719
+ edit(value?: MCPEditorValue): void;
1720
+ }
1721
+ ```
1722
+
1723
+ Referenced public types and APIs: [`FormDOMBlock`](#formdomblock), [`FormFeedback`](#formfeedback), [`MCPEditorValue`](#mcpeditorvalue).
1724
+
1725
+ ### MCPEditorValue
1726
+
1727
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/forms/panels.ts#L93)
1728
+
1729
+ ```ts
1730
+ export interface MCPEditorValue {
1731
+ name: string;
1732
+ type: string;
1733
+ url?: string;
1734
+ oauth?: boolean;
1735
+ oauthClientId?: string;
1736
+ oauthScope?: string;
1737
+ command?: string;
1738
+ args?: readonly string[];
1739
+ enabled?: boolean;
1740
+ hasBearerToken?: boolean;
1741
+ envKeys?: readonly string[];
1742
+ }
1743
+ ```
1744
+
1745
+ ### modelEditorMarkup
1746
+
1747
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/forms/panels.ts#L120)
1748
+
1749
+ ```ts
1750
+ export declare function modelEditorMarkup(prefix: string): string;
1751
+ ```
1752
+
1753
+ ### SettingsPanelState
1754
+
1755
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/forms/panels.ts#L35)
1756
+
1757
+ ```ts
1758
+ export interface SettingsPanelState extends FormFeedback {
1759
+ baseUrl: string;
1760
+ hasApiKey: boolean;
1761
+ }
1762
+ ```
1763
+
1764
+ Referenced public types and APIs: [`FormFeedback`](#formfeedback).
1765
+
1766
+ ## src/forms/provider-login.ts
1767
+
1768
+ ### createProviderLoginPanel
1769
+
1770
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/forms/provider-login.ts#L5)
1771
+
1772
+ ```ts
1773
+ export declare function createProviderLoginPanel(initial: ProviderLoginState, options?: {
1774
+ idPrefix?: string;
1775
+ onAnswer?: (answer: string) => void | ActionResult | Promise<void | ActionResult>;
1776
+ onCancel?: () => void;
1777
+ onClose?: () => void;
1778
+ }): UIBlock<ProviderLoginState>;
1779
+ ```
1780
+
1781
+ Referenced public types and APIs: [`ActionResult`](#actionresult), [`ProviderLoginState`](#providerloginstate), [`UIBlock`](#uiblock).
1782
+
1783
+ Related gallery: [provider-login](https://minifish-org.github.io/pith-ui/?item=provider-login).
1784
+
1785
+ ### ProviderLoginState
1786
+
1787
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/forms/provider-login.ts#L4)
1788
+
1789
+ ```ts
1790
+ export interface ProviderLoginState {
1791
+ phase: string;
1792
+ message: string;
1793
+ url?: string;
1794
+ code?: string;
1795
+ prompt?: string;
1796
+ promptType?: string;
1797
+ options?: readonly {
1798
+ id: string;
1799
+ label: string;
1800
+ }[] | null;
1801
+ error?: string;
1802
+ disabled?: boolean;
1803
+ }
1804
+ ```
1805
+
1806
+ ## src/forms/resource-editor.ts
1807
+
1808
+ ### createResourceEditor
1809
+
1810
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/forms/resource-editor.ts#L5)
1811
+
1812
+ ```ts
1813
+ export declare function createResourceEditor(state: ResourceEditorState, options?: {
1814
+ idPrefix?: string;
1815
+ }): UIBlock<ResourceEditorState> & {
1816
+ read(): {
1817
+ name: string;
1818
+ content: string;
1819
+ };
1820
+ readonly form: HTMLFormElement;
1821
+ readonly removeButton: HTMLButtonElement | null;
1822
+ };
1823
+ ```
1824
+
1825
+ Referenced public types and APIs: [`ResourceEditorState`](#resourceeditorstate), [`UIBlock`](#uiblock).
1826
+
1827
+ Related gallery: [resource-editor](https://minifish-org.github.io/pith-ui/?item=resource-editor).
1828
+
1829
+ ### ResourceEditorState
1830
+
1831
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/forms/resource-editor.ts#L4)
1832
+
1833
+ ```ts
1834
+ export interface ResourceEditorState {
1835
+ workspaceId: string;
1836
+ workspacePath: string;
1837
+ path?: string;
1838
+ kind: string;
1839
+ content: string;
1840
+ editable: boolean;
1841
+ workspaceBusy: boolean;
1842
+ error?: string;
1843
+ disabled?: boolean;
1844
+ }
1845
+ ```
1846
+
1847
+ ## src/navigation/context-menu.ts
1848
+
1849
+ ### createContextMenu
1850
+
1851
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/navigation/context-menu.ts#L7)
1852
+
1853
+ ```ts
1854
+ export declare function createContextMenu(options?: {
1855
+ element?: HTMLElement;
1856
+ onDismiss?: (restoreFocus: boolean) => void;
1857
+ onAction?: (item: ContextMenuItem) => void;
1858
+ }): UIBlock<ContextMenuState> & {
1859
+ open(trigger: HTMLElement, state: ContextMenuState): void;
1860
+ close(restoreFocus?: boolean): void;
1861
+ };
1862
+ ```
1863
+
1864
+ Referenced public types and APIs: [`ContextMenuItem`](#contextmenuitem), [`ContextMenuState`](#contextmenustate), [`UIBlock`](#uiblock).
1865
+
1866
+ Related gallery: [context-menu](https://minifish-org.github.io/pith-ui/?item=context-menu).
1867
+
1868
+ ### ContextMenuItem
1869
+
1870
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/navigation/context-menu.ts#L2)
1871
+
1872
+ ```ts
1873
+ export interface ContextMenuItem {
1874
+ label: string;
1875
+ action?: string;
1876
+ sdkAction?: string;
1877
+ danger?: boolean;
1878
+ disabled?: boolean;
1879
+ idle?: {
1880
+ conversationId?: string;
1881
+ workspaceId?: string;
1882
+ };
1883
+ }
1884
+ ```
1885
+
1886
+ ### ContextMenuState
1887
+
1888
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/navigation/context-menu.ts#L6)
1889
+
1890
+ ```ts
1891
+ export interface ContextMenuState {
1892
+ label: string;
1893
+ items: readonly ContextMenuItem[];
1894
+ }
1895
+ ```
1896
+
1897
+ Referenced public types and APIs: [`ContextMenuItem`](#contextmenuitem).
1898
+
1899
+ ## src/navigation/navigation.ts
1900
+
1901
+ ### createRenameConversation
1902
+
1903
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/navigation/navigation.ts#L63)
1904
+
1905
+ ```ts
1906
+ export declare function createRenameConversation(initial: RenameConversationState, options?: {
1907
+ idPrefix?: string;
1908
+ }): UIBlock<RenameConversationState> & {
1909
+ readonly input: HTMLInputElement;
1910
+ readonly form: HTMLFormElement;
1911
+ };
1912
+ ```
1913
+
1914
+ Referenced public types and APIs: [`RenameConversationState`](#renameconversationstate), [`UIBlock`](#uiblock).
1915
+
1916
+ Related gallery: [rename-conversation](https://minifish-org.github.io/pith-ui/?item=rename-conversation).
1917
+
1918
+ ### createWorkspaceNavigation
1919
+
1920
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/navigation/navigation.ts#L9)
1921
+
1922
+ ```ts
1923
+ export declare function createWorkspaceNavigation(initial: WorkspaceNavigationState, options?: {
1924
+ element?: HTMLElement;
1925
+ idPrefix?: string;
1926
+ onToggle?: (id: string) => void;
1927
+ onSelect?: (id: string) => void;
1928
+ }): UIBlock<WorkspaceNavigationState>;
1929
+ ```
1930
+
1931
+ Referenced public types and APIs: [`UIBlock`](#uiblock), [`WorkspaceNavigationState`](#workspacenavigationstate).
1932
+
1933
+ Related gallery: [workspace-navigation](https://minifish-org.github.io/pith-ui/?item=workspace-navigation).
1934
+
1935
+ ### createWorkspacePicker
1936
+
1937
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/navigation/navigation.ts#L70)
1938
+
1939
+ ```ts
1940
+ export declare function createWorkspacePicker(initial: WorkspacePickerState, options?: {
1941
+ idPrefix?: string;
1942
+ }): UIBlock<WorkspacePickerState> & {
1943
+ readonly input: HTMLInputElement;
1944
+ readonly form: HTMLFormElement;
1945
+ readonly pickButton: HTMLButtonElement;
1946
+ };
1947
+ ```
1948
+
1949
+ Referenced public types and APIs: [`UIBlock`](#uiblock), [`WorkspacePickerState`](#workspacepickerstate).
1950
+
1951
+ Related gallery: [workspace-picker](https://minifish-org.github.io/pith-ui/?item=workspace-picker).
1952
+
1953
+ ### NavigationConversation
1954
+
1955
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/navigation/navigation.ts#L4)
1956
+
1957
+ ```ts
1958
+ export interface NavigationConversation {
1959
+ id: string;
1960
+ title?: string;
1961
+ active: boolean;
1962
+ menuOpen?: boolean;
1963
+ status?: Node | null;
1964
+ }
1965
+ ```
1966
+
1967
+ ### NavigationWorkspace
1968
+
1969
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/navigation/navigation.ts#L5)
1970
+
1971
+ ```ts
1972
+ export interface NavigationWorkspace {
1973
+ id: string;
1974
+ name: string;
1975
+ path: string;
1976
+ expanded: boolean;
1977
+ selected: boolean;
1978
+ menuOpen?: boolean;
1979
+ children: readonly NavigationConversation[];
1980
+ }
1981
+ ```
1982
+
1983
+ Referenced public types and APIs: [`NavigationConversation`](#navigationconversation).
1984
+
1985
+ ### RenameConversationState
1986
+
1987
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/navigation/navigation.ts#L62)
1988
+
1989
+ ```ts
1990
+ export interface RenameConversationState {
1991
+ id: string;
1992
+ title: string;
1993
+ error?: string;
1994
+ disabled?: boolean;
1995
+ }
1996
+ ```
1997
+
1998
+ ### WorkspaceNavigationState
1999
+
2000
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/navigation/navigation.ts#L6)
2001
+
2002
+ ```ts
2003
+ export interface WorkspaceNavigationState {
2004
+ groups: readonly NavigationWorkspace[];
2005
+ empty: 'workspaces' | 'search' | null;
2006
+ disabled?: boolean;
2007
+ }
2008
+ ```
2009
+
2010
+ Referenced public types and APIs: [`NavigationWorkspace`](#navigationworkspace).
2011
+
2012
+ ### WorkspacePickerState
2013
+
2014
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/navigation/navigation.ts#L69)
2015
+
2016
+ ```ts
2017
+ export interface WorkspacePickerState {
2018
+ workspaces: readonly {
2019
+ id: string;
2020
+ name: string;
2021
+ path: string;
2022
+ }[];
2023
+ error?: string;
2024
+ disabled?: boolean;
2025
+ }
2026
+ ```
2027
+
2028
+ ## src/primitives.ts
2029
+
2030
+ ### createActions
2031
+
2032
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L346)
2033
+
2034
+ ```ts
2035
+ export declare function createActions(options?: ActionsState & {
2036
+ children?: readonly Node[];
2037
+ }): UIBlock<ActionsState>;
2038
+ ```
2039
+
2040
+ Referenced public types and APIs: [`ActionsState`](#actionsstate), [`UIBlock`](#uiblock).
2041
+
2042
+ Related gallery: [actions](https://minifish-org.github.io/pith-ui/?item=actions).
2043
+
2044
+ ### createButton
2045
+
2046
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L21)
2047
+
2048
+ ```ts
2049
+ export declare function createButton(options: ButtonOptions): ButtonBlock;
2050
+ ```
2051
+
2052
+ Referenced public types and APIs: [`ButtonBlock`](#buttonblock), [`ButtonOptions`](#buttonoptions).
2053
+
2054
+ Related gallery: [actions](https://minifish-org.github.io/pith-ui/?item=actions), [button](https://minifish-org.github.io/pith-ui/?item=button), [confirmation](https://minifish-org.github.io/pith-ui/?item=confirmation), [context-menu](https://minifish-org.github.io/pith-ui/?item=context-menu), [conversation-reader](https://minifish-org.github.io/pith-ui/?item=conversation-reader), [copy-feedback](https://minifish-org.github.io/pith-ui/?item=copy-feedback), [dialog](https://minifish-org.github.io/pith-ui/?item=dialog), [drop-feedback](https://minifish-org.github.io/pith-ui/?item=drop-feedback), [feature-dialog](https://minifish-org.github.io/pith-ui/?item=feature-dialog), [foundation-colors](https://minifish-org.github.io/pith-ui/?item=foundation-colors), [foundation-focus](https://minifish-org.github.io/pith-ui/?item=foundation-focus), [foundation-motion](https://minifish-org.github.io/pith-ui/?item=foundation-motion), [foundation-sizing](https://minifish-org.github.io/pith-ui/?item=foundation-sizing), [foundation-spacing](https://minifish-org.github.io/pith-ui/?item=foundation-spacing), [image-viewer](https://minifish-org.github.io/pith-ui/?item=image-viewer), [list-row](https://minifish-org.github.io/pith-ui/?item=list-row), [resources-panel](https://minifish-org.github.io/pith-ui/?item=resources-panel), [runtime-panel](https://minifish-org.github.io/pith-ui/?item=runtime-panel), [text-edit-dialog](https://minifish-org.github.io/pith-ui/?item=text-edit-dialog), [toolbar](https://minifish-org.github.io/pith-ui/?item=toolbar).
2055
+
2056
+ ### createCheckbox
2057
+
2058
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L294)
2059
+
2060
+ ```ts
2061
+ export declare function createCheckbox(options: CheckboxState & {
2062
+ checked?: boolean;
2063
+ onChange?: (value: boolean) => void;
2064
+ }): CheckboxBlock;
2065
+ ```
2066
+
2067
+ Referenced public types and APIs: [`CheckboxBlock`](#checkboxblock), [`CheckboxState`](#checkboxstate).
2068
+
2069
+ Related gallery: [checkbox](https://minifish-org.github.io/pith-ui/?item=checkbox), [foundation-focus](https://minifish-org.github.io/pith-ui/?item=foundation-focus), [foundation-motion](https://minifish-org.github.io/pith-ui/?item=foundation-motion).
2070
+
2071
+ ### createCollectionState
2072
+
2073
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L382)
2074
+
2075
+ ```ts
2076
+ export declare function createCollectionState(options: CollectionState & {
2077
+ content?: Node;
2078
+ onRetry?: UIAction;
2079
+ }): UIBlock<CollectionState>;
2080
+ ```
2081
+
2082
+ Referenced public types and APIs: [`CollectionState`](#collectionstate), [`UIAction`](#uiaction), [`UIBlock`](#uiblock).
2083
+
2084
+ Related gallery: [collection-state](https://minifish-org.github.io/pith-ui/?item=collection-state).
2085
+
2086
+ ### createConfirmDialog
2087
+
2088
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L513)
2089
+
2090
+ ```ts
2091
+ export declare function createConfirmDialog(options: ConfirmState & {
2092
+ dialog?: HTMLDialogElement;
2093
+ ids?: {
2094
+ form?: string;
2095
+ error?: string;
2096
+ title?: string;
2097
+ cancel?: string;
2098
+ };
2099
+ unavailable?: () => boolean;
2100
+ onConfirm: () => Promise<ActionResult> | ActionResult;
2101
+ onClose?: () => void;
2102
+ }): ConfirmBlock;
2103
+ ```
2104
+
2105
+ Referenced public types and APIs: [`ActionResult`](#actionresult), [`ConfirmBlock`](#confirmblock), [`ConfirmState`](#confirmstate).
2106
+
2107
+ Related gallery: [confirmation](https://minifish-org.github.io/pith-ui/?item=confirmation).
2108
+
2109
+ ### createDialog
2110
+
2111
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L404)
2112
+
2113
+ ```ts
2114
+ export declare function createDialog(options: DialogOptions): DialogBlock;
2115
+ ```
2116
+
2117
+ Referenced public types and APIs: [`DialogBlock`](#dialogblock), [`DialogOptions`](#dialogoptions).
2118
+
2119
+ Related gallery: [dialog](https://minifish-org.github.io/pith-ui/?item=dialog).
2120
+
2121
+ ### createDisclosure
2122
+
2123
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L353)
2124
+
2125
+ ```ts
2126
+ export declare function createDisclosure(options: DisclosureState & {
2127
+ content: Node;
2128
+ open?: boolean;
2129
+ onToggle?: (open: boolean) => void;
2130
+ }): DisclosureBlock;
2131
+ ```
2132
+
2133
+ Referenced public types and APIs: [`DisclosureBlock`](#disclosureblock), [`DisclosureState`](#disclosurestate).
2134
+
2135
+ Related gallery: [disclosure](https://minifish-org.github.io/pith-ui/?item=disclosure).
2136
+
2137
+ ### createDivider
2138
+
2139
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L100)
2140
+
2141
+ ```ts
2142
+ export declare function createDivider(state?: {
2143
+ label?: string;
2144
+ }): UIBlock<{
2145
+ label?: string;
2146
+ }>;
2147
+ ```
2148
+
2149
+ Referenced public types and APIs: [`UIBlock`](#uiblock).
2150
+
2151
+ Related gallery: [divider](https://minifish-org.github.io/pith-ui/?item=divider).
2152
+
2153
+ ### createField
2154
+
2155
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L146)
2156
+
2157
+ ```ts
2158
+ export declare function createField(options: FieldState & {
2159
+ control: FieldBlock['control'];
2160
+ }): FieldBlock;
2161
+ ```
2162
+
2163
+ Referenced public types and APIs: [`FieldBlock`](#fieldblock), [`FieldState`](#fieldstate).
2164
+
2165
+ Related gallery: [number-input](https://minifish-org.github.io/pith-ui/?item=number-input), [search-input](https://minifish-org.github.io/pith-ui/?item=search-input), [secret-input](https://minifish-org.github.io/pith-ui/?item=secret-input), [text-area](https://minifish-org.github.io/pith-ui/?item=text-area), [text-input](https://minifish-org.github.io/pith-ui/?item=text-input).
2166
+
2167
+ ### createFormSection
2168
+
2169
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L338)
2170
+
2171
+ ```ts
2172
+ export declare function createFormSection(options: FormSectionState & {
2173
+ content?: Node;
2174
+ }): UIBlock<FormSectionState>;
2175
+ ```
2176
+
2177
+ Referenced public types and APIs: [`FormSectionState`](#formsectionstate), [`UIBlock`](#uiblock).
2178
+
2179
+ Related gallery: [form-section](https://minifish-org.github.io/pith-ui/?item=form-section).
2180
+
2181
+ ### createIcon
2182
+
2183
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L89)
2184
+
2185
+ ```ts
2186
+ export declare function createIcon(state: IconState): UIBlock<IconState>;
2187
+ ```
2188
+
2189
+ Referenced public types and APIs: [`IconState`](#iconstate), [`UIBlock`](#uiblock).
2190
+
2191
+ Related gallery: [foundation-sizing](https://minifish-org.github.io/pith-ui/?item=foundation-sizing), [icons](https://minifish-org.github.io/pith-ui/?item=icons).
2192
+
2193
+ ### createIconButton
2194
+
2195
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L67)
2196
+
2197
+ ```ts
2198
+ export declare function createIconButton(options: ButtonOptions & {
2199
+ icon: string;
2200
+ }): ButtonBlock;
2201
+ ```
2202
+
2203
+ Referenced public types and APIs: [`ButtonBlock`](#buttonblock), [`ButtonOptions`](#buttonoptions).
2204
+
2205
+ Related gallery: [icon-button](https://minifish-org.github.io/pith-ui/?item=icon-button), [toolbar](https://minifish-org.github.io/pith-ui/?item=toolbar).
2206
+
2207
+ ### createKeyValue
2208
+
2209
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L107)
2210
+
2211
+ ```ts
2212
+ export declare function createKeyValue(options: KeyValueState): UIBlock<KeyValueState>;
2213
+ ```
2214
+
2215
+ Referenced public types and APIs: [`KeyValueState`](#keyvaluestate), [`UIBlock`](#uiblock).
2216
+
2217
+ Related gallery: [foundation-motion](https://minifish-org.github.io/pith-ui/?item=foundation-motion), [key-value](https://minifish-org.github.io/pith-ui/?item=key-value).
2218
+
2219
+ ### createListRow
2220
+
2221
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L367)
2222
+
2223
+ ```ts
2224
+ export declare function createListRow(options: ListRowState & {
2225
+ actions?: Node;
2226
+ }): UIBlock<ListRowState>;
2227
+ ```
2228
+
2229
+ Referenced public types and APIs: [`ListRowState`](#listrowstate), [`UIBlock`](#uiblock).
2230
+
2231
+ Related gallery: [collection-state](https://minifish-org.github.io/pith-ui/?item=collection-state), [list-row](https://minifish-org.github.io/pith-ui/?item=list-row).
2232
+
2233
+ ### createMenu
2234
+
2235
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L585)
2236
+
2237
+ ```ts
2238
+ export declare function createMenu(options: MenuState): PopoverBlock & UIBlock<MenuState>;
2239
+ ```
2240
+
2241
+ Referenced public types and APIs: [`MenuState`](#menustate), [`PopoverBlock`](#popoverblock), [`UIBlock`](#uiblock).
2242
+
2243
+ Related gallery: [menu](https://minifish-org.github.io/pith-ui/?item=menu).
2244
+
2245
+ ### createNotice
2246
+
2247
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L310)
2248
+
2249
+ ```ts
2250
+ export declare function createNotice(state: NoticeState): UIBlock<NoticeState>;
2251
+ ```
2252
+
2253
+ Referenced public types and APIs: [`NoticeState`](#noticestate), [`UIBlock`](#uiblock).
2254
+
2255
+ Related gallery: [notice](https://minifish-org.github.io/pith-ui/?item=notice).
2256
+
2257
+ ### createNumberInput
2258
+
2259
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L225)
2260
+
2261
+ ```ts
2262
+ export declare const createNumberInput: (options: InputOptions) => InputBlock;
2263
+ ```
2264
+
2265
+ Referenced public types and APIs: [`InputBlock`](#inputblock), [`InputOptions`](#inputoptions).
2266
+
2267
+ Related gallery: [number-input](https://minifish-org.github.io/pith-ui/?item=number-input).
2268
+
2269
+ ### createPopover
2270
+
2271
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L560)
2272
+
2273
+ ```ts
2274
+ export declare function createPopover(options: PopoverState & {
2275
+ content: Node;
2276
+ onToggle?: (open: boolean) => void;
2277
+ }): PopoverBlock;
2278
+ ```
2279
+
2280
+ Referenced public types and APIs: [`PopoverBlock`](#popoverblock), [`PopoverState`](#popoverstate).
2281
+
2282
+ Related gallery: [popover](https://minifish-org.github.io/pith-ui/?item=popover).
2283
+
2284
+ ### createProgress
2285
+
2286
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L327)
2287
+
2288
+ ```ts
2289
+ export declare function createProgress(state: ProgressState): UIBlock<ProgressState>;
2290
+ ```
2291
+
2292
+ Referenced public types and APIs: [`ProgressState`](#progressstate), [`UIBlock`](#uiblock).
2293
+
2294
+ Related gallery: [progress](https://minifish-org.github.io/pith-ui/?item=progress).
2295
+
2296
+ ### createScrollArea
2297
+
2298
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L129)
2299
+
2300
+ ```ts
2301
+ export declare function createScrollArea(options: ScrollAreaState & {
2302
+ content: Node;
2303
+ }): UIBlock<ScrollAreaState>;
2304
+ ```
2305
+
2306
+ Referenced public types and APIs: [`ScrollAreaState`](#scrollareastate), [`UIBlock`](#uiblock).
2307
+
2308
+ Related gallery: [scroll-area](https://minifish-org.github.io/pith-ui/?item=scroll-area).
2309
+
2310
+ ### createSearchInput
2311
+
2312
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L224)
2313
+
2314
+ ```ts
2315
+ export declare const createSearchInput: (options: InputOptions) => InputBlock;
2316
+ ```
2317
+
2318
+ Referenced public types and APIs: [`InputBlock`](#inputblock), [`InputOptions`](#inputoptions).
2319
+
2320
+ Related gallery: [search-input](https://minifish-org.github.io/pith-ui/?item=search-input).
2321
+
2322
+ ### createSecretInput
2323
+
2324
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L228)
2325
+
2326
+ ```ts
2327
+ export declare function createSecretInput(options: InputOptions): InputBlock;
2328
+ ```
2329
+
2330
+ Referenced public types and APIs: [`InputBlock`](#inputblock), [`InputOptions`](#inputoptions).
2331
+
2332
+ Related gallery: [secret-input](https://minifish-org.github.io/pith-ui/?item=secret-input).
2333
+
2334
+ ### createSelect
2335
+
2336
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L256)
2337
+
2338
+ ```ts
2339
+ export declare function createSelect(options: SelectOptions): SelectBlock;
2340
+ ```
2341
+
2342
+ Referenced public types and APIs: [`SelectBlock`](#selectblock), [`SelectOptions`](#selectoptions).
2343
+
2344
+ Related gallery: [foundation-sizing](https://minifish-org.github.io/pith-ui/?item=foundation-sizing), [foundation-spacing](https://minifish-org.github.io/pith-ui/?item=foundation-spacing), [select](https://minifish-org.github.io/pith-ui/?item=select).
2345
+
2346
+ ### createStatus
2347
+
2348
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L321)
2349
+
2350
+ ```ts
2351
+ export declare function createStatus(state: StatusState): UIBlock<StatusState>;
2352
+ ```
2353
+
2354
+ Referenced public types and APIs: [`StatusState`](#statusstate), [`UIBlock`](#uiblock).
2355
+
2356
+ Related gallery: [status](https://minifish-org.github.io/pith-ui/?item=status).
2357
+
2358
+ ### createTextAction
2359
+
2360
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L80)
2361
+
2362
+ ```ts
2363
+ export declare function createTextAction(options: ButtonOptions): ButtonBlock;
2364
+ ```
2365
+
2366
+ Referenced public types and APIs: [`ButtonBlock`](#buttonblock), [`ButtonOptions`](#buttonoptions).
2367
+
2368
+ Related gallery: [text-action](https://minifish-org.github.io/pith-ui/?item=text-action).
2369
+
2370
+ ### createTextArea
2371
+
2372
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L226)
2373
+
2374
+ ```ts
2375
+ export declare const createTextArea: (options: InputOptions) => InputBlock;
2376
+ ```
2377
+
2378
+ Referenced public types and APIs: [`InputBlock`](#inputblock), [`InputOptions`](#inputoptions).
2379
+
2380
+ Related gallery: [foundation-typography](https://minifish-org.github.io/pith-ui/?item=foundation-typography), [text-area](https://minifish-org.github.io/pith-ui/?item=text-area).
2381
+
2382
+ ### createTextEditDialog
2383
+
2384
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L462)
2385
+
2386
+ ```ts
2387
+ export declare function createTextEditDialog(options?: TextEditOptions): TextEditBlock;
2388
+ ```
2389
+
2390
+ Referenced public types and APIs: [`TextEditBlock`](#texteditblock), [`TextEditOptions`](#texteditoptions).
2391
+
2392
+ Related gallery: [pending-messages](https://minifish-org.github.io/pith-ui/?item=pending-messages), [text-edit-dialog](https://minifish-org.github.io/pith-ui/?item=text-edit-dialog).
2393
+
2394
+ ### createTextInput
2395
+
2396
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L223)
2397
+
2398
+ ```ts
2399
+ export declare const createTextInput: (options: InputOptions) => InputBlock;
2400
+ ```
2401
+
2402
+ Referenced public types and APIs: [`InputBlock`](#inputblock), [`InputOptions`](#inputoptions).
2403
+
2404
+ Related gallery: [form-section](https://minifish-org.github.io/pith-ui/?item=form-section), [foundation-focus](https://minifish-org.github.io/pith-ui/?item=foundation-focus), [foundation-sizing](https://minifish-org.github.io/pith-ui/?item=foundation-sizing), [popover](https://minifish-org.github.io/pith-ui/?item=popover), [text-input](https://minifish-org.github.io/pith-ui/?item=text-input).
2405
+
2406
+ ### createToolbar
2407
+
2408
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L122)
2409
+
2410
+ ```ts
2411
+ export declare function createToolbar(options: ToolbarState & {
2412
+ children?: readonly Node[];
2413
+ }): UIBlock<ToolbarState>;
2414
+ ```
2415
+
2416
+ Referenced public types and APIs: [`ToolbarState`](#toolbarstate), [`UIBlock`](#uiblock).
2417
+
2418
+ Related gallery: [button](https://minifish-org.github.io/pith-ui/?item=button), [foundation-motion](https://minifish-org.github.io/pith-ui/?item=foundation-motion), [foundation-spacing](https://minifish-org.github.io/pith-ui/?item=foundation-spacing), [icon-button](https://minifish-org.github.io/pith-ui/?item=icon-button), [icons](https://minifish-org.github.io/pith-ui/?item=icons), [toolbar](https://minifish-org.github.io/pith-ui/?item=toolbar).
2419
+
2420
+ ### ActionsState
2421
+
2422
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L345)
2423
+
2424
+ ```ts
2425
+ export interface ActionsState {
2426
+ align?: 'start' | 'end' | 'between';
2427
+ }
2428
+ ```
2429
+
2430
+ ### ButtonBlock
2431
+
2432
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L19)
2433
+
2434
+ ```ts
2435
+ export interface ButtonBlock extends UIBlock<ButtonState> {
2436
+ readonly element: HTMLButtonElement;
2437
+ }
2438
+ ```
2439
+
2440
+ Referenced public types and APIs: [`ButtonState`](#buttonstate), [`UIBlock`](#uiblock).
2441
+
2442
+ ### ButtonOptions
2443
+
2444
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L14)
2445
+
2446
+ ```ts
2447
+ export interface ButtonOptions extends ButtonState {
2448
+ type?: 'button' | 'submit' | 'reset';
2449
+ onAction?: UIAction;
2450
+ onError?: (message: string) => void;
2451
+ }
2452
+ ```
2453
+
2454
+ Referenced public types and APIs: [`ButtonState`](#buttonstate), [`UIAction`](#uiaction).
2455
+
2456
+ ### ButtonState
2457
+
2458
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L5)
2459
+
2460
+ ```ts
2461
+ export interface ButtonState {
2462
+ label: string;
2463
+ intent?: Intent;
2464
+ density?: Density;
2465
+ disabled?: boolean;
2466
+ pending?: boolean;
2467
+ icon?: string;
2468
+ title?: string;
2469
+ }
2470
+ ```
2471
+
2472
+ Referenced public types and APIs: [`Density`](#density), [`Intent`](#intent).
2473
+
2474
+ ### CheckboxBlock
2475
+
2476
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L288)
2477
+
2478
+ ```ts
2479
+ export interface CheckboxBlock extends UIBlock<CheckboxState> {
2480
+ readonly control: HTMLInputElement;
2481
+ getValue(): boolean;
2482
+ reset(value: boolean): void;
2483
+ focus(): void;
2484
+ }
2485
+ ```
2486
+
2487
+ Referenced public types and APIs: [`CheckboxState`](#checkboxstate), [`UIBlock`](#uiblock).
2488
+
2489
+ ### CheckboxState
2490
+
2491
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L287)
2492
+
2493
+ ```ts
2494
+ export interface CheckboxState {
2495
+ label: string;
2496
+ description?: string;
2497
+ disabled?: boolean;
2498
+ }
2499
+ ```
2500
+
2501
+ ### CollectionState
2502
+
2503
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L381)
2504
+
2505
+ ```ts
2506
+ export interface CollectionState {
2507
+ status: 'ready' | 'loading' | 'empty' | 'error';
2508
+ message?: string;
2509
+ retryLabel?: string;
2510
+ }
2511
+ ```
2512
+
2513
+ ### ConfirmBlock
2514
+
2515
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L512)
2516
+
2517
+ ```ts
2518
+ export interface ConfirmBlock extends UIBlock<ConfirmState> {
2519
+ readonly element: HTMLDialogElement;
2520
+ readonly confirmButton: HTMLButtonElement;
2521
+ readonly cancelButton: HTMLButtonElement;
2522
+ open(state?: ConfirmState): void;
2523
+ close(): void;
2524
+ }
2525
+ ```
2526
+
2527
+ Referenced public types and APIs: [`ConfirmState`](#confirmstate), [`UIBlock`](#uiblock).
2528
+
2529
+ ### ConfirmState
2530
+
2531
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L511)
2532
+
2533
+ ```ts
2534
+ export interface ConfirmState extends DialogState {
2535
+ message?: string | Node;
2536
+ hint?: string;
2537
+ error?: string;
2538
+ disabled?: boolean;
2539
+ pending?: boolean;
2540
+ confirmLabel?: string;
2541
+ }
2542
+ ```
2543
+
2544
+ Referenced public types and APIs: [`DialogState`](#dialogstate).
2545
+
2546
+ ### DialogBlock
2547
+
2548
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L398)
2549
+
2550
+ ```ts
2551
+ export interface DialogBlock extends UIBlock<DialogState> {
2552
+ readonly element: HTMLDialogElement;
2553
+ readonly body: HTMLElement;
2554
+ open(): void;
2555
+ close(): void;
2556
+ }
2557
+ ```
2558
+
2559
+ Referenced public types and APIs: [`DialogState`](#dialogstate), [`UIBlock`](#uiblock).
2560
+
2561
+ ### DialogOptions
2562
+
2563
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L397)
2564
+
2565
+ ```ts
2566
+ export interface DialogOptions extends DialogState {
2567
+ dialog?: HTMLDialogElement;
2568
+ content?: Node;
2569
+ actions?: Node;
2570
+ closeOnBackdrop?: boolean;
2571
+ onClose?: () => void;
2572
+ }
2573
+ ```
2574
+
2575
+ Referenced public types and APIs: [`DialogState`](#dialogstate).
2576
+
2577
+ ### DialogState
2578
+
2579
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L396)
2580
+
2581
+ ```ts
2582
+ export interface DialogState {
2583
+ title: string;
2584
+ description?: string;
2585
+ eyebrow?: string;
2586
+ closeDisabled?: boolean;
2587
+ }
2588
+ ```
2589
+
2590
+ ### DisclosureBlock
2591
+
2592
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L352)
2593
+
2594
+ ```ts
2595
+ export interface DisclosureBlock extends UIBlock<DisclosureState> {
2596
+ setOpen(open: boolean): void;
2597
+ isOpen(): boolean;
2598
+ }
2599
+ ```
2600
+
2601
+ Referenced public types and APIs: [`DisclosureState`](#disclosurestate), [`UIBlock`](#uiblock).
2602
+
2603
+ ### DisclosureState
2604
+
2605
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L351)
2606
+
2607
+ ```ts
2608
+ export interface DisclosureState {
2609
+ title: string;
2610
+ description?: string;
2611
+ disabled?: boolean;
2612
+ }
2613
+ ```
2614
+
2615
+ ### FieldBlock
2616
+
2617
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L142)
2618
+
2619
+ ```ts
2620
+ export interface FieldBlock extends UIBlock<FieldState> {
2621
+ readonly control: HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement;
2622
+ }
2623
+ ```
2624
+
2625
+ Referenced public types and APIs: [`FieldState`](#fieldstate), [`UIBlock`](#uiblock).
2626
+
2627
+ ### FieldState
2628
+
2629
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L135)
2630
+
2631
+ ```ts
2632
+ export interface FieldState {
2633
+ label: string;
2634
+ description?: string;
2635
+ error?: string;
2636
+ required?: boolean;
2637
+ disabled?: boolean;
2638
+ }
2639
+ ```
2640
+
2641
+ ### FormSectionState
2642
+
2643
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L337)
2644
+
2645
+ ```ts
2646
+ export interface FormSectionState {
2647
+ title: string;
2648
+ description?: string;
2649
+ }
2650
+ ```
2651
+
2652
+ ### IconState
2653
+
2654
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L88)
2655
+
2656
+ ```ts
2657
+ export interface IconState {
2658
+ name: string;
2659
+ label?: string;
2660
+ size?: 'small' | 'normal';
2661
+ }
2662
+ ```
2663
+
2664
+ ### InputBlock
2665
+
2666
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L191)
2667
+
2668
+ ```ts
2669
+ export interface InputBlock extends UIBlock<InputState> {
2670
+ readonly control: HTMLInputElement | HTMLTextAreaElement;
2671
+ getValue(): string;
2672
+ reset(value: string): void;
2673
+ focus(): void;
2674
+ }
2675
+ ```
2676
+
2677
+ Referenced public types and APIs: [`InputState`](#inputstate), [`UIBlock`](#uiblock).
2678
+
2679
+ ### InputOptions
2680
+
2681
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L182)
2682
+
2683
+ ```ts
2684
+ export interface InputOptions extends InputState {
2685
+ value?: string;
2686
+ onInput?: (value: string, event: Event) => void;
2687
+ onChange?: (value: string, event: Event) => void;
2688
+ autocomplete?: string;
2689
+ min?: number;
2690
+ max?: number;
2691
+ step?: number | 'any';
2692
+ }
2693
+ ```
2694
+
2695
+ Referenced public types and APIs: [`InputState`](#inputstate).
2696
+
2697
+ ### InputState
2698
+
2699
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L177)
2700
+
2701
+ ```ts
2702
+ export interface InputState extends FieldState {
2703
+ placeholder?: string;
2704
+ readOnly?: boolean;
2705
+ density?: Density;
2706
+ }
2707
+ ```
2708
+
2709
+ Referenced public types and APIs: [`Density`](#density), [`FieldState`](#fieldstate).
2710
+
2711
+ ### KeyValueState
2712
+
2713
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L106)
2714
+
2715
+ ```ts
2716
+ export interface KeyValueState {
2717
+ items: readonly {
2718
+ key: string;
2719
+ label: string;
2720
+ value: string;
2721
+ }[];
2722
+ }
2723
+ ```
2724
+
2725
+ ### ListRowState
2726
+
2727
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L366)
2728
+
2729
+ ```ts
2730
+ export interface ListRowState {
2731
+ title: string;
2732
+ description?: string;
2733
+ meta?: string;
2734
+ selected?: boolean;
2735
+ icon?: string;
2736
+ }
2737
+ ```
2738
+
2739
+ ### MenuItem
2740
+
2741
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L583)
2742
+
2743
+ ```ts
2744
+ export interface MenuItem {
2745
+ id: string;
2746
+ label: string;
2747
+ disabled?: boolean;
2748
+ intent?: Intent;
2749
+ checked?: boolean;
2750
+ onAction: UIAction;
2751
+ }
2752
+ ```
2753
+
2754
+ Referenced public types and APIs: [`Intent`](#intent), [`UIAction`](#uiaction).
2755
+
2756
+ ### MenuState
2757
+
2758
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L584)
2759
+
2760
+ ```ts
2761
+ export interface MenuState extends PopoverState {
2762
+ items: readonly MenuItem[];
2763
+ }
2764
+ ```
2765
+
2766
+ Referenced public types and APIs: [`MenuItem`](#menuitem), [`PopoverState`](#popoverstate).
2767
+
2768
+ ### NoticeState
2769
+
2770
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L309)
2771
+
2772
+ ```ts
2773
+ export interface NoticeState {
2774
+ message: string;
2775
+ tone?: 'info' | 'success' | 'warning' | 'error';
2776
+ }
2777
+ ```
2778
+
2779
+ ### PopoverBlock
2780
+
2781
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L553)
2782
+
2783
+ ```ts
2784
+ export interface PopoverBlock extends UIBlock<PopoverState> {
2785
+ readonly trigger: HTMLButtonElement;
2786
+ readonly panel: HTMLElement;
2787
+ open(): void;
2788
+ close(): void;
2789
+ isOpen(): boolean;
2790
+ }
2791
+ ```
2792
+
2793
+ Referenced public types and APIs: [`PopoverState`](#popoverstate), [`UIBlock`](#uiblock).
2794
+
2795
+ ### PopoverState
2796
+
2797
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L552)
2798
+
2799
+ ```ts
2800
+ export interface PopoverState {
2801
+ label: string;
2802
+ disabled?: boolean;
2803
+ }
2804
+ ```
2805
+
2806
+ ### ProgressState
2807
+
2808
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L326)
2809
+
2810
+ ```ts
2811
+ export interface ProgressState {
2812
+ label: string;
2813
+ value?: number;
2814
+ max?: number;
2815
+ }
2816
+ ```
2817
+
2818
+ ### ScrollAreaState
2819
+
2820
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L128)
2821
+
2822
+ ```ts
2823
+ export interface ScrollAreaState {
2824
+ label: string;
2825
+ size?: 'small' | 'medium' | 'fill';
2826
+ }
2827
+ ```
2828
+
2829
+ ### SelectBlock
2830
+
2831
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L250)
2832
+
2833
+ ```ts
2834
+ export interface SelectBlock extends UIBlock<SelectState> {
2835
+ readonly control: HTMLSelectElement;
2836
+ getValue(): string;
2837
+ reset(value: string): void;
2838
+ focus(): void;
2839
+ }
2840
+ ```
2841
+
2842
+ Referenced public types and APIs: [`SelectState`](#selectstate), [`UIBlock`](#uiblock).
2843
+
2844
+ ### SelectOption
2845
+
2846
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L247)
2847
+
2848
+ ```ts
2849
+ export interface SelectOption {
2850
+ value: string;
2851
+ label: string;
2852
+ disabled?: boolean;
2853
+ }
2854
+ ```
2855
+
2856
+ ### SelectOptions
2857
+
2858
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L249)
2859
+
2860
+ ```ts
2861
+ export interface SelectOptions extends SelectState {
2862
+ value?: string;
2863
+ onChange?: (value: string) => void;
2864
+ multiple?: boolean;
2865
+ size?: number;
2866
+ }
2867
+ ```
2868
+
2869
+ Referenced public types and APIs: [`SelectState`](#selectstate).
2870
+
2871
+ ### SelectState
2872
+
2873
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L248)
2874
+
2875
+ ```ts
2876
+ export interface SelectState extends FieldState {
2877
+ options: readonly SelectOption[];
2878
+ density?: Density;
2879
+ }
2880
+ ```
2881
+
2882
+ Referenced public types and APIs: [`Density`](#density), [`FieldState`](#fieldstate), [`SelectOption`](#selectoption).
2883
+
2884
+ ### StatusState
2885
+
2886
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L320)
2887
+
2888
+ ```ts
2889
+ export interface StatusState {
2890
+ label: string;
2891
+ tone?: 'neutral' | 'success' | 'warning' | 'error';
2892
+ }
2893
+ ```
2894
+
2895
+ ### TextEditBlock
2896
+
2897
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L453)
2898
+
2899
+ ```ts
2900
+ export interface TextEditBlock extends Omit<UIBlock<TextEditState>, 'element'> {
2901
+ readonly element: HTMLDialogElement;
2902
+ readonly control: HTMLTextAreaElement;
2903
+ readonly submitButton: HTMLButtonElement;
2904
+ open(input: TextEditInput): void;
2905
+ close(): void;
2906
+ getValue(): string;
2907
+ focus(): void;
2908
+ }
2909
+ ```
2910
+
2911
+ Referenced public types and APIs: [`TextEditInput`](#texteditinput), [`TextEditState`](#texteditstate), [`UIBlock`](#uiblock).
2912
+
2913
+ ### TextEditInput
2914
+
2915
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L444)
2916
+
2917
+ ```ts
2918
+ export interface TextEditInput {
2919
+ value: string;
2920
+ title?: string;
2921
+ description?: string;
2922
+ note?: string;
2923
+ }
2924
+ ```
2925
+
2926
+ ### TextEditOptions
2927
+
2928
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L445)
2929
+
2930
+ ```ts
2931
+ export interface TextEditOptions extends Partial<TextEditState> {
2932
+ dialog?: HTMLDialogElement;
2933
+ ids?: {
2934
+ form?: string;
2935
+ control?: string;
2936
+ submit?: string;
2937
+ error?: string;
2938
+ title?: string;
2939
+ cancel?: string;
2940
+ };
2941
+ label?: string;
2942
+ onInput?: (value: string) => void;
2943
+ onSubmit?: (text: string) => Promise<ActionResult> | ActionResult;
2944
+ onClose?: () => void;
2945
+ }
2946
+ ```
2947
+
2948
+ Referenced public types and APIs: [`ActionResult`](#actionresult), [`TextEditState`](#texteditstate).
2949
+
2950
+ ### TextEditState
2951
+
2952
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L443)
2953
+
2954
+ ```ts
2955
+ export interface TextEditState extends DialogState {
2956
+ error?: string;
2957
+ disabled?: boolean;
2958
+ pending?: boolean;
2959
+ inputDisabled?: boolean;
2960
+ note?: string;
2961
+ submitLabel?: string;
2962
+ }
2963
+ ```
2964
+
2965
+ Referenced public types and APIs: [`DialogState`](#dialogstate).
2966
+
2967
+ ### ToolbarState
2968
+
2969
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/primitives.ts#L121)
2970
+
2971
+ ```ts
2972
+ export interface ToolbarState {
2973
+ label: string;
2974
+ density?: Density;
2975
+ }
2976
+ ```
2977
+
2978
+ Referenced public types and APIs: [`Density`](#density).
2979
+
2980
+ ## src/tasks/approval.ts
2981
+
2982
+ ### createApprovalPanel
2983
+
2984
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/tasks/approval.ts#L7)
2985
+
2986
+ ```ts
2987
+ export declare function createApprovalPanel(initial: ApprovalPanelState, options?: {
2988
+ element?: HTMLElement;
2989
+ idPrefix?: string;
2990
+ onAction?: (id: string, action: 'deny' | 'always' | 'allow') => void;
2991
+ }): UIBlock<ApprovalPanelState>;
2992
+ ```
2993
+
2994
+ Referenced public types and APIs: [`ApprovalPanelState`](#approvalpanelstate), [`UIBlock`](#uiblock).
2995
+
2996
+ Related gallery: [approval-panel](https://minifish-org.github.io/pith-ui/?item=approval-panel).
2997
+
2998
+ ### ApprovalPanelState
2999
+
3000
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/tasks/approval.ts#L6)
3001
+
3002
+ ```ts
3003
+ export interface ApprovalPanelState {
3004
+ approval: ApprovalView | null;
3005
+ disabled?: boolean;
3006
+ }
3007
+ ```
3008
+
3009
+ Referenced public types and APIs: [`ApprovalView`](#approvalview).
3010
+
3011
+ ### ApprovalView
3012
+
3013
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/tasks/approval.ts#L5)
3014
+
3015
+ ```ts
3016
+ export interface ApprovalView {
3017
+ id: string;
3018
+ toolName: string;
3019
+ warning?: string;
3020
+ canAlwaysAllow: boolean;
3021
+ argsText: string;
3022
+ preview?: {
3023
+ kind: string;
3024
+ path: string;
3025
+ error?: string;
3026
+ diff?: string;
3027
+ truncated?: boolean;
3028
+ };
3029
+ }
3030
+ ```
3031
+
3032
+ ## src/tasks/permission.ts
3033
+
3034
+ ### createFullAccessConfirmation
3035
+
3036
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/tasks/permission.ts#L5)
3037
+
3038
+ ```ts
3039
+ export declare function createFullAccessConfirmation(initial: FullAccessState, options?: {
3040
+ idPrefix?: string;
3041
+ }): UIBlock<FullAccessState> & {
3042
+ readonly confirmButton: HTMLButtonElement;
3043
+ };
3044
+ ```
3045
+
3046
+ Referenced public types and APIs: [`FullAccessState`](#fullaccessstate), [`UIBlock`](#uiblock).
3047
+
3048
+ Related gallery: [full-access-confirmation](https://minifish-org.github.io/pith-ui/?item=full-access-confirmation).
3049
+
3050
+ ### createPermissionControl
3051
+
3052
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/tasks/permission.ts#L19)
3053
+
3054
+ ```ts
3055
+ export declare function createPermissionControl(initial: PermissionControlState, options?: {
3056
+ element?: HTMLElement;
3057
+ descriptionElement?: HTMLElement;
3058
+ onChange?: (value: string) => void;
3059
+ }): UIBlock<PermissionControlState>;
3060
+ ```
3061
+
3062
+ Referenced public types and APIs: [`PermissionControlState`](#permissioncontrolstate), [`UIBlock`](#uiblock).
3063
+
3064
+ Related gallery: [permission-control](https://minifish-org.github.io/pith-ui/?item=permission-control).
3065
+
3066
+ ### createTaskFailure
3067
+
3068
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/tasks/permission.ts#L12)
3069
+
3070
+ ```ts
3071
+ export declare function createTaskFailure(initial: TaskFailureState, options?: {
3072
+ element?: HTMLElement;
3073
+ onContinue?: () => void;
3074
+ onSettings?: () => void;
3075
+ onDiagnostics?: () => void;
3076
+ }): UIBlock<TaskFailureState>;
3077
+ ```
3078
+
3079
+ Referenced public types and APIs: [`TaskFailureState`](#taskfailurestate), [`UIBlock`](#uiblock).
3080
+
3081
+ Related gallery: [task-failure](https://minifish-org.github.io/pith-ui/?item=task-failure).
3082
+
3083
+ ### FullAccessState
3084
+
3085
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/tasks/permission.ts#L4)
3086
+
3087
+ ```ts
3088
+ export interface FullAccessState {
3089
+ title?: string;
3090
+ error?: string;
3091
+ disabled?: boolean;
3092
+ }
3093
+ ```
3094
+
3095
+ ### PermissionControlState
3096
+
3097
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/tasks/permission.ts#L18)
3098
+
3099
+ ```ts
3100
+ export interface PermissionControlState {
3101
+ mode: string;
3102
+ description: string;
3103
+ disabled?: boolean;
3104
+ }
3105
+ ```
3106
+
3107
+ ### TaskFailureState
3108
+
3109
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/tasks/permission.ts#L11)
3110
+
3111
+ ```ts
3112
+ export interface TaskFailureState {
3113
+ visible: boolean;
3114
+ message: string;
3115
+ advice: string;
3116
+ canContinue: boolean;
3117
+ workspaceId?: string;
3118
+ }
3119
+ ```
3120
+
3121
+ ## src/tasks/runtime.ts
3122
+
3123
+ ### createRuntimePanel
3124
+
3125
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/tasks/runtime.ts#L5)
3126
+
3127
+ ```ts
3128
+ export declare function createRuntimePanel(initial: RuntimePanelState, options?: {
3129
+ element?: HTMLElement;
3130
+ idPrefix?: string;
3131
+ costs?: Node;
3132
+ }): UIBlock<RuntimePanelState> & {
3133
+ updateTiming(value: {
3134
+ summary: string;
3135
+ duration: string;
3136
+ speed: string;
3137
+ }): void;
3138
+ };
3139
+ ```
3140
+
3141
+ Referenced public types and APIs: [`RuntimePanelState`](#runtimepanelstate), [`UIBlock`](#uiblock).
3142
+
3143
+ Related gallery: [runtime-panel](https://minifish-org.github.io/pith-ui/?item=runtime-panel).
3144
+
3145
+ ### RuntimePanelState
3146
+
3147
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/tasks/runtime.ts#L4)
3148
+
3149
+ ```ts
3150
+ export interface RuntimePanelState {
3151
+ visible: boolean;
3152
+ summary: string;
3153
+ duration: string;
3154
+ speed: string;
3155
+ provider?: string;
3156
+ thinkingLevel?: string;
3157
+ inputTokens: string;
3158
+ outputTokens: string;
3159
+ cacheRead: string;
3160
+ cacheWrite: string;
3161
+ contextTokens: string;
3162
+ contextWindow: string;
3163
+ compactions: string;
3164
+ toolFailures: string;
3165
+ recordedCost: string;
3166
+ latestCost: string;
3167
+ }
3168
+ ```
3169
+
3170
+ ## src/theme.ts
3171
+
3172
+ ### Appearance
3173
+
3174
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/theme.ts#L1)
3175
+
3176
+ ```ts
3177
+ export type Appearance = 'light' | 'dark' | 'system';
3178
+ ```
3179
+
3180
+ ### setAppearance
3181
+
3182
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/theme.ts#L3)
3183
+
3184
+ ```ts
3185
+ /** Scope tokens and styles to an explicit application or preview root. */
3186
+ export declare function setAppearance(root: HTMLElement, appearance?: Appearance): void;
3187
+ ```
3188
+
3189
+ Referenced public types and APIs: [`Appearance`](#appearance).
3190
+
3191
+ Related gallery: [foundation-colors](https://minifish-org.github.io/pith-ui/?item=foundation-colors), [foundation-surfaces](https://minifish-org.github.io/pith-ui/?item=foundation-surfaces).
3192
+
3193
+ ## src/workspace.ts
3194
+
3195
+ ### createComposerView
3196
+
3197
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/workspace.ts#L14)
3198
+
3199
+ ```ts
3200
+ export declare function createComposerView(options?: ComposerViewOptions): {
3201
+ element: HTMLFormElement;
3202
+ input: HTMLTextAreaElement;
3203
+ update: (state: ComposerViewState) => void;
3204
+ getValue: () => string;
3205
+ reset(value: string): void;
3206
+ focus: () => void;
3207
+ resize: () => void;
3208
+ destroy(): void;
3209
+ };
3210
+ ```
3211
+
3212
+ Referenced public types and APIs: [`ComposerViewOptions`](#composerviewoptions), [`ComposerViewState`](#composerviewstate).
3213
+
3214
+ Related gallery: [composer](https://minifish-org.github.io/pith-ui/?item=composer), [drop-feedback](https://minifish-org.github.io/pith-ui/?item=drop-feedback).
3215
+
3216
+ ### createWorkspaceShell
3217
+
3218
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/workspace.ts#L67)
3219
+
3220
+ ```ts
3221
+ export declare function createWorkspaceShell(options: WorkspaceShellOptions): UIBlock<WorkspaceShellState> & {
3222
+ composer: ReturnType<typeof createComposerView>;
3223
+ part<T extends HTMLElement = HTMLElement>(name: string): T;
3224
+ };
3225
+ ```
3226
+
3227
+ Referenced public types and APIs: [`UIBlock`](#uiblock), [`WorkspaceShellOptions`](#workspaceshelloptions), [`WorkspaceShellState`](#workspaceshellstate), [`createComposerView`](#createcomposerview).
3228
+
3229
+ Related gallery: [workspace-chat](https://minifish-org.github.io/pith-ui/?item=workspace-chat).
3230
+
3231
+ ### ComposerViewOptions
3232
+
3233
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/workspace.ts#L5)
3234
+
3235
+ ```ts
3236
+ export interface ComposerViewOptions {
3237
+ prefix?: string;
3238
+ onSubmit?: (text: string) => void | ActionResult | Promise<void | ActionResult>;
3239
+ onStop?: () => void | ActionResult | Promise<void | ActionResult>;
3240
+ onInput?: (text: string) => void;
3241
+ }
3242
+ ```
3243
+
3244
+ Referenced public types and APIs: [`ActionResult`](#actionresult).
3245
+
3246
+ ### ComposerViewState
3247
+
3248
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/workspace.ts#L4)
3249
+
3250
+ ```ts
3251
+ export interface ComposerViewState {
3252
+ placeholder?: string;
3253
+ disabled?: boolean;
3254
+ readOnly?: boolean;
3255
+ action?: 'send' | 'queue' | 'stop';
3256
+ actionDisabled?: boolean;
3257
+ }
3258
+ ```
3259
+
3260
+ ### WorkspaceShellOptions
3261
+
3262
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/workspace.ts#L65)
3263
+
3264
+ ```ts
3265
+ export interface WorkspaceShellOptions {
3266
+ brand: Node;
3267
+ prefix?: string;
3268
+ }
3269
+ ```
3270
+
3271
+ ### WorkspaceShellState
3272
+
3273
+ [Source](https://github.com/minifish-org/pith-ui/blob/main/src/workspace.ts#L66)
3274
+
3275
+ ```ts
3276
+ export interface WorkspaceShellState {
3277
+ workspace?: string;
3278
+ conversation?: string;
3279
+ reconnecting?: boolean;
3280
+ }
3281
+ ```