termcast 1.3.9 → 1.3.10

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 (228) hide show
  1. package/dist/action-utils.js +1 -1
  2. package/dist/action-utils.js.map +1 -1
  3. package/dist/apis/ai.js +1 -1
  4. package/dist/apis/ai.js.map +1 -1
  5. package/dist/apis/clipboard.js +2 -2
  6. package/dist/apis/clipboard.js.map +1 -1
  7. package/dist/apis/hud.d.ts +2 -2
  8. package/dist/apis/hud.d.ts.map +1 -1
  9. package/dist/apis/hud.js +5 -5
  10. package/dist/apis/hud.js.map +1 -1
  11. package/dist/apis/oauth.d.ts +1 -1
  12. package/dist/apis/oauth.d.ts.map +1 -1
  13. package/dist/apis/oauth.js +8 -8
  14. package/dist/apis/oauth.js.map +1 -1
  15. package/dist/apis/preferences.js +4 -4
  16. package/dist/apis/preferences.js.map +1 -1
  17. package/dist/apis/toast.js +3 -3
  18. package/dist/apis/toast.js.map +1 -1
  19. package/dist/build.js +6 -6
  20. package/dist/build.js.map +1 -1
  21. package/dist/cli.js +2 -2
  22. package/dist/cli.js.map +1 -1
  23. package/dist/components/actions.d.ts +1 -1
  24. package/dist/components/actions.d.ts.map +1 -1
  25. package/dist/components/actions.js +7 -7
  26. package/dist/components/actions.js.map +1 -1
  27. package/dist/components/alert.js +4 -4
  28. package/dist/components/alert.js.map +1 -1
  29. package/dist/components/detail.d.ts +2 -2
  30. package/dist/components/detail.d.ts.map +1 -1
  31. package/dist/components/detail.js +5 -5
  32. package/dist/components/detail.js.map +1 -1
  33. package/dist/components/dropdown.d.ts +1 -1
  34. package/dist/components/dropdown.d.ts.map +1 -1
  35. package/dist/components/dropdown.js +4 -4
  36. package/dist/components/dropdown.js.map +1 -1
  37. package/dist/components/extension-preferences.js +5 -5
  38. package/dist/components/extension-preferences.js.map +1 -1
  39. package/dist/components/form/checkbox.js +2 -2
  40. package/dist/components/form/checkbox.js.map +1 -1
  41. package/dist/components/form/date-picker.js +3 -3
  42. package/dist/components/form/date-picker.js.map +1 -1
  43. package/dist/components/form/description.js +1 -1
  44. package/dist/components/form/description.js.map +1 -1
  45. package/dist/components/form/dropdown.js +4 -4
  46. package/dist/components/form/dropdown.js.map +1 -1
  47. package/dist/components/form/file-autocomplete.js +2 -2
  48. package/dist/components/form/file-autocomplete.js.map +1 -1
  49. package/dist/components/form/file-picker.js +2 -2
  50. package/dist/components/form/file-picker.js.map +1 -1
  51. package/dist/components/form/form-end.js +1 -1
  52. package/dist/components/form/form-end.js.map +1 -1
  53. package/dist/components/form/index.js +5 -5
  54. package/dist/components/form/index.js.map +1 -1
  55. package/dist/components/form/password-field.js +1 -1
  56. package/dist/components/form/password-field.js.map +1 -1
  57. package/dist/components/form/separator.js +1 -1
  58. package/dist/components/form/separator.js.map +1 -1
  59. package/dist/components/form/tagpicker.d.ts +1 -1
  60. package/dist/components/form/tagpicker.d.ts.map +1 -1
  61. package/dist/components/form/text-area.js +1 -1
  62. package/dist/components/form/text-area.js.map +1 -1
  63. package/dist/components/form/text-field.js +1 -1
  64. package/dist/components/form/text-field.js.map +1 -1
  65. package/dist/components/form/with-left-border.js +1 -1
  66. package/dist/components/form/with-left-border.js.map +1 -1
  67. package/dist/components/image.js +1 -1
  68. package/dist/components/image.js.map +1 -1
  69. package/dist/components/list.d.ts +1 -1
  70. package/dist/components/list.d.ts.map +1 -1
  71. package/dist/components/list.js +7 -7
  72. package/dist/components/list.js.map +1 -1
  73. package/dist/components/loading-bar.js +1 -1
  74. package/dist/components/loading-bar.js.map +1 -1
  75. package/dist/components/menubar-extra.d.ts +1 -1
  76. package/dist/components/menubar-extra.d.ts.map +1 -1
  77. package/dist/components/menubar-extra.js +2 -2
  78. package/dist/components/menubar-extra.js.map +1 -1
  79. package/dist/e2e-node.d.ts +2 -0
  80. package/dist/e2e-node.d.ts.map +1 -1
  81. package/dist/e2e-node.js +14 -0
  82. package/dist/e2e-node.js.map +1 -1
  83. package/dist/examples/action-show-in-finder.js +2 -2
  84. package/dist/examples/action-show-in-finder.js.map +1 -1
  85. package/dist/examples/environment-test.js +3 -3
  86. package/dist/examples/environment-test.js.map +1 -1
  87. package/dist/examples/error-boundary.js +4 -4
  88. package/dist/examples/error-boundary.js.map +1 -1
  89. package/dist/examples/form-basic.js +4 -4
  90. package/dist/examples/form-basic.js.map +1 -1
  91. package/dist/examples/form-basic.vitest.js +103 -103
  92. package/dist/examples/form-basic.vitest.js.map +1 -1
  93. package/dist/examples/form-dropdown.js +2 -2
  94. package/dist/examples/form-dropdown.js.map +1 -1
  95. package/dist/examples/form-dropdown.vitest.js +1 -1
  96. package/dist/examples/form-dropdown.vitest.js.map +1 -1
  97. package/dist/examples/form-tagpicker.js +2 -2
  98. package/dist/examples/form-tagpicker.js.map +1 -1
  99. package/dist/examples/form-tagpicker.vitest.js +1 -1
  100. package/dist/examples/form-tagpicker.vitest.js.map +1 -1
  101. package/dist/examples/internal/descendants-filtering.js +2 -2
  102. package/dist/examples/internal/descendants-filtering.js.map +1 -1
  103. package/dist/examples/internal/descendants.js +3 -3
  104. package/dist/examples/internal/descendants.js.map +1 -1
  105. package/dist/examples/internal/scrollbox-demo.js +1 -1
  106. package/dist/examples/internal/scrollbox-demo.js.map +1 -1
  107. package/dist/examples/internal/simple-dialog.js +6 -6
  108. package/dist/examples/internal/simple-dialog.js.map +1 -1
  109. package/dist/examples/internal/simple-scrollbox.d.ts +2 -0
  110. package/dist/examples/internal/simple-scrollbox.d.ts.map +1 -0
  111. package/dist/examples/internal/simple-scrollbox.js +26 -0
  112. package/dist/examples/internal/simple-scrollbox.js.map +1 -0
  113. package/dist/examples/internal/simple-scrollbox.vitest.d.ts +2 -0
  114. package/dist/examples/internal/simple-scrollbox.vitest.d.ts.map +1 -0
  115. package/dist/examples/internal/simple-scrollbox.vitest.js +88 -0
  116. package/dist/examples/internal/simple-scrollbox.vitest.js.map +1 -0
  117. package/dist/examples/list-dropdown-default.js +2 -2
  118. package/dist/examples/list-dropdown-default.js.map +1 -1
  119. package/dist/examples/list-dropdown-default.vitest.js +1 -1
  120. package/dist/examples/list-dropdown-default.vitest.js.map +1 -1
  121. package/dist/examples/list-fetch-data.js +2 -2
  122. package/dist/examples/list-fetch-data.js.map +1 -1
  123. package/dist/examples/list-fetch-data.vitest.js +1 -1
  124. package/dist/examples/list-fetch-data.vitest.js.map +1 -1
  125. package/dist/examples/list-with-detail.js +1 -1
  126. package/dist/examples/list-with-detail.js.map +1 -1
  127. package/dist/examples/list-with-detail.vitest.js +1 -1
  128. package/dist/examples/list-with-detail.vitest.js.map +1 -1
  129. package/dist/examples/list-with-dropdown.js +1 -1
  130. package/dist/examples/list-with-dropdown.js.map +1 -1
  131. package/dist/examples/list-with-dropdown.vitest.js +1 -1
  132. package/dist/examples/list-with-dropdown.vitest.js.map +1 -1
  133. package/dist/examples/list-with-sections.js +3 -3
  134. package/dist/examples/list-with-sections.js.map +1 -1
  135. package/dist/examples/list-with-sections.vitest.js +1 -1
  136. package/dist/examples/list-with-sections.vitest.js.map +1 -1
  137. package/dist/examples/miscellaneous.js +13 -13
  138. package/dist/examples/miscellaneous.js.map +1 -1
  139. package/dist/examples/nested-navigation.js +5 -5
  140. package/dist/examples/nested-navigation.js.map +1 -1
  141. package/dist/examples/preferences-test.js +3 -3
  142. package/dist/examples/preferences-test.js.map +1 -1
  143. package/dist/examples/simple-dropdown.js +3 -3
  144. package/dist/examples/simple-dropdown.js.map +1 -1
  145. package/dist/examples/simple-file-picker.js +2 -2
  146. package/dist/examples/simple-file-picker.js.map +1 -1
  147. package/dist/examples/simple-file-picker.vitest.js +26 -26
  148. package/dist/examples/simple-file-picker.vitest.js.map +1 -1
  149. package/dist/examples/simple-grid.js +1 -1
  150. package/dist/examples/simple-grid.js.map +1 -1
  151. package/dist/examples/simple-grid.vitest.js +1 -1
  152. package/dist/examples/simple-grid.vitest.js.map +1 -1
  153. package/dist/examples/simple-hud.js +3 -3
  154. package/dist/examples/simple-hud.js.map +1 -1
  155. package/dist/examples/simple-list-search.js +20 -4
  156. package/dist/examples/simple-list-search.js.map +1 -1
  157. package/dist/examples/simple-list.js +3 -3
  158. package/dist/examples/simple-list.js.map +1 -1
  159. package/dist/examples/simple-navigation.js +5 -5
  160. package/dist/examples/simple-navigation.js.map +1 -1
  161. package/dist/examples/simple-navigation.vitest.js +1 -1
  162. package/dist/examples/simple-navigation.vitest.js.map +1 -1
  163. package/dist/examples/store.vitest.js +1 -5
  164. package/dist/examples/store.vitest.js.map +1 -1
  165. package/dist/examples/tanstack-demo.js +2 -2
  166. package/dist/examples/tanstack-demo.js.map +1 -1
  167. package/dist/examples/use-promise-demo.js +2 -2
  168. package/dist/examples/use-promise-demo.js.map +1 -1
  169. package/dist/extensions/dev.js +7 -7
  170. package/dist/extensions/dev.js.map +1 -1
  171. package/dist/extensions/home.js +8 -8
  172. package/dist/extensions/home.js.map +1 -1
  173. package/dist/extensions/store.js +2 -2
  174. package/dist/extensions/store.js.map +1 -1
  175. package/dist/globals.js +1 -1
  176. package/dist/globals.js.map +1 -1
  177. package/dist/hooks/index.d.ts +1 -1
  178. package/dist/hooks/index.d.ts.map +1 -1
  179. package/dist/hooks/index.js +1 -1
  180. package/dist/hooks/index.js.map +1 -1
  181. package/dist/hooks/use-action-panel.js +1 -1
  182. package/dist/hooks/use-action-panel.js.map +1 -1
  183. package/dist/hooks/use-unstable-ai.js +1 -1
  184. package/dist/hooks/use-unstable-ai.js.map +1 -1
  185. package/dist/index.d.ts +55 -55
  186. package/dist/index.d.ts.map +1 -1
  187. package/dist/index.js +38 -38
  188. package/dist/index.js.map +1 -1
  189. package/dist/internal/dialog.d.ts +3 -3
  190. package/dist/internal/dialog.d.ts.map +1 -1
  191. package/dist/internal/dialog.js +3 -3
  192. package/dist/internal/dialog.js.map +1 -1
  193. package/dist/internal/error-handler.js +2 -2
  194. package/dist/internal/error-handler.js.map +1 -1
  195. package/dist/internal/focus-context.d.ts +1 -1
  196. package/dist/internal/focus-context.d.ts.map +1 -1
  197. package/dist/internal/navigation.d.ts +1 -1
  198. package/dist/internal/navigation.d.ts.map +1 -1
  199. package/dist/internal/navigation.js +2 -2
  200. package/dist/internal/navigation.js.map +1 -1
  201. package/dist/internal/providers.d.ts +2 -2
  202. package/dist/internal/providers.d.ts.map +1 -1
  203. package/dist/internal/providers.js +9 -9
  204. package/dist/internal/providers.js.map +1 -1
  205. package/dist/internal/scrollbox.d.ts +11 -0
  206. package/dist/internal/scrollbox.d.ts.map +1 -0
  207. package/dist/internal/scrollbox.js +28 -0
  208. package/dist/internal/scrollbox.js.map +1 -0
  209. package/dist/preload.js +1 -1
  210. package/dist/preload.js.map +1 -1
  211. package/dist/utils.js +2 -2
  212. package/dist/utils.js.map +1 -1
  213. package/package.json +4 -2
  214. package/src/e2e-node.tsx +16 -0
  215. package/src/examples/form-basic.vitest.tsx +102 -102
  216. package/src/examples/internal/simple-scrollbox.tsx +55 -0
  217. package/src/examples/internal/simple-scrollbox.vitest.tsx +94 -0
  218. package/src/examples/nested-navigation.tsx +3 -3
  219. package/src/examples/simple-file-picker.vitest.tsx +25 -25
  220. package/src/examples/simple-list-search.tsx +41 -0
  221. package/src/examples/simple-navigation.tsx +3 -3
  222. package/src/examples/store.vitest.tsx +0 -4
  223. package/src/extensions/dev.tsx +2 -2
  224. package/src/extensions/home.tsx +3 -3
  225. package/src/index.tsx +6 -25
  226. package/src/internal/providers.tsx +1 -1
  227. package/src/internal/scrollbox.tsx +53 -0
  228. package/src/utils.tsx +2 -2
@@ -48,10 +48,6 @@ test('Store extension - searching for spiceblow shows Database', async () => {
48
48
  spiceblow
49
49
 
50
50
  ›Spiceblow - Sql Database Management Search, update, insert and delete rows in
51
- Spike Resolve incidents, check who is on-call, and add overrides from Raycast
52
- Image Modification Apply filters and transformations to various image formats
53
- Next Run Spin up a Next.js project from Raycast
54
- Donut Show an animation of a donut
55
51
 
56
52
 
57
53
  ↵ select ↑↓ navigate ^k actions"
@@ -5,7 +5,7 @@ import { render } from '@opentui/react'
5
5
  import { List, useStore } from 'termcast'
6
6
  import { Action, ActionPanel } from 'termcast'
7
7
  import { useNavigation } from 'termcast/src/internal/navigation'
8
- import { Providers } from 'termcast/src/internal/providers'
8
+ import { TermcastProvider } from 'termcast/src/internal/providers'
9
9
  import { showToast, Toast } from 'termcast/src/apis/toast'
10
10
  import { Icon } from 'termcast'
11
11
  import { getCommandsWithFiles, CommandWithFile } from '../package-json'
@@ -170,7 +170,7 @@ export async function startDevMode({
170
170
  const devElement = useStore((state) => state.devElement)
171
171
  const devRebuildCount = useStore((state) => state.devRebuildCount)
172
172
 
173
- return <Providers key={String(devRebuildCount)}>{devElement}</Providers>
173
+ return <TermcastProvider key={String(devRebuildCount)}>{devElement}</TermcastProvider>
174
174
  }
175
175
 
176
176
  await render(<App />)
@@ -4,7 +4,7 @@ import { render } from '@opentui/react'
4
4
  import { List, logger, useStore } from 'termcast'
5
5
  import { Action, ActionPanel } from 'termcast'
6
6
  import { useNavigation } from 'termcast/src/internal/navigation'
7
- import { Providers } from 'termcast/src/internal/providers'
7
+ import { TermcastProvider } from 'termcast/src/internal/providers'
8
8
  import { showToast, Toast } from 'termcast/src/apis/toast'
9
9
  import { Icon } from 'termcast'
10
10
  import { getStoredExtensions } from '../utils'
@@ -285,9 +285,9 @@ export async function runHomeCommand(): Promise<void> {
285
285
  logger.log(`preparing to render the home command component`)
286
286
 
287
287
  await render(
288
- <Providers>
288
+ <TermcastProvider>
289
289
  <Home />
290
- </Providers>,
290
+ </TermcastProvider>,
291
291
  )
292
292
  logger.log(`rendered home command component`)
293
293
  }
package/src/index.tsx CHANGED
@@ -95,11 +95,7 @@ export type {
95
95
  } from 'termcast/src/components/form/types'
96
96
 
97
97
  // Icons and Images
98
- export {
99
- Icon,
100
- getIconEmoji,
101
- IconComponent,
102
- } from 'termcast/src/components/icon'
98
+ export { Icon, getIconEmoji, IconComponent } from 'termcast/src/components/icon'
103
99
  export { Image, ImageMask } from 'termcast/src/components/image'
104
100
  export type {
105
101
  ImageProps,
@@ -138,29 +134,17 @@ export {
138
134
  } from 'termcast/src/internal/navigation'
139
135
 
140
136
  // Hooks
141
- export {
142
- useActionPanel,
143
- useId,
144
- useUnstableAI,
145
- } from 'termcast/src/hooks/index'
137
+ export { useActionPanel, useId, useUnstableAI } from 'termcast/src/hooks/index'
146
138
  export type { ActionPanelState } from 'termcast/src/hooks/index'
147
139
 
148
140
  // Focus Context
149
141
  export { InFocus, useIsInFocus } from 'termcast/src/internal/focus-context'
150
142
 
151
143
  // Dialog
152
- export {
153
- Dialog,
154
- DialogProvider,
155
- useDialog,
156
- } from 'termcast/src/internal/dialog'
144
+ export { Dialog, DialogProvider, useDialog } from 'termcast/src/internal/dialog'
157
145
 
158
146
  // Toast
159
- export {
160
- Toast,
161
- showToast,
162
- showFailureToast,
163
- } from 'termcast/src/apis/toast'
147
+ export { Toast, showToast, showFailureToast } from 'termcast/src/apis/toast'
164
148
 
165
149
  // Clipboard
166
150
  export {
@@ -199,10 +183,7 @@ export {
199
183
  getSelectedFinderItems,
200
184
  getSelectedText,
201
185
  } from 'termcast/src/apis/environment'
202
- export type {
203
- Environment,
204
- LaunchProps,
205
- } from 'termcast/src/apis/environment'
186
+ export type { Environment, LaunchProps } from 'termcast/src/apis/environment'
206
187
 
207
188
  export { LaunchType }
208
189
 
@@ -228,7 +209,7 @@ export { useStore } from 'termcast/src/state'
228
209
  export type { DialogPosition } from 'termcast/src/state'
229
210
 
230
211
  // Providers (for app setup)
231
- export { Providers } from 'termcast/src/internal/providers'
212
+ export { TermcastProvider } from 'termcast/src/internal/providers'
232
213
 
233
214
  // Helper function for rendering examples
234
215
  export { renderWithProviders } from 'termcast/src/utils'
@@ -406,7 +406,7 @@ function ErrorDisplay({
406
406
 
407
407
  const ErrorBoundary = ErrorBoundaryClass as any
408
408
 
409
- export function Providers(props: ProvidersProps): any {
409
+ export function TermcastProvider(props: ProvidersProps): any {
410
410
  return (
411
411
  <ErrorBoundary>
412
412
  <Suspense fallback={<LoadingFallback />}>
@@ -0,0 +1,53 @@
1
+ import React from 'react'
2
+
3
+ interface ScrollBoxProps {
4
+ children?: React.ReactNode
5
+ focused?: boolean
6
+ flexGrow?: number
7
+ flexShrink?: number
8
+ style?: any
9
+ }
10
+
11
+ export function ScrollBox({
12
+ children,
13
+ focused = false,
14
+ flexGrow,
15
+ flexShrink,
16
+ style,
17
+ ...props
18
+ }: ScrollBoxProps): any {
19
+ return (
20
+ <scrollbox
21
+ focused={focused}
22
+ flexGrow={flexGrow}
23
+ flexShrink={flexShrink}
24
+ style={{
25
+ rootOptions: {
26
+ backgroundColor: '#1a1b26',
27
+ ...(style?.rootOptions || {}),
28
+ },
29
+ viewportOptions: {
30
+ flexGrow: 1,
31
+ flexShrink: 1,
32
+ ...(style?.viewportOptions || {}),
33
+ },
34
+ contentOptions: {
35
+ flexShrink: 0,
36
+ ...(style?.contentOptions || {}),
37
+ },
38
+ scrollbarOptions: {
39
+ visible: true,
40
+ showArrows: true,
41
+ trackOptions: {
42
+ foregroundColor: '#7aa2f7',
43
+ backgroundColor: '#414868',
44
+ },
45
+ ...(style?.scrollbarOptions || {}),
46
+ },
47
+ }}
48
+ {...props}
49
+ >
50
+ {children}
51
+ </scrollbox>
52
+ )
53
+ }
package/src/utils.tsx CHANGED
@@ -1,6 +1,6 @@
1
1
  import React, { type ReactNode } from 'react'
2
2
  import { render } from '@opentui/react'
3
- import { Providers } from 'termcast/src/internal/providers'
3
+ import { TermcastProvider } from 'termcast/src/internal/providers'
4
4
  import path from 'node:path'
5
5
  import fs from 'node:fs'
6
6
  import os from 'node:os'
@@ -13,7 +13,7 @@ import {
13
13
  import { logger } from './logger'
14
14
 
15
15
  export function renderWithProviders(element: ReactNode): void {
16
- render(<Providers>{element}</Providers>)
16
+ render(<TermcastProvider>{element}</TermcastProvider>)
17
17
  }
18
18
 
19
19
  export type CommonProps = {