@adea-ai/ui 0.84.0 → 0.85.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 (37) hide show
  1. package/README.md +79 -0
  2. package/dist/NOTICE +26 -0
  3. package/dist/components/composites/catalog-browser/catalog-browser-group.d.ts +20 -0
  4. package/dist/components/composites/catalog-browser/catalog-browser-group.d.ts.map +1 -0
  5. package/dist/components/composites/catalog-browser/catalog-browser-group.js +195 -0
  6. package/dist/components/composites/catalog-browser/catalog-browser-group.js.map +1 -0
  7. package/dist/components/composites/catalog-browser/catalog-browser.d.ts +3 -0
  8. package/dist/components/composites/catalog-browser/catalog-browser.d.ts.map +1 -0
  9. package/dist/components/composites/catalog-browser/catalog-browser.js +378 -0
  10. package/dist/components/composites/catalog-browser/catalog-browser.js.map +1 -0
  11. package/dist/components/composites/catalog-browser/catalog-detail.d.ts +21 -0
  12. package/dist/components/composites/catalog-browser/catalog-detail.d.ts.map +1 -0
  13. package/dist/components/composites/catalog-browser/catalog-detail.js +92 -0
  14. package/dist/components/composites/catalog-browser/catalog-detail.js.map +1 -0
  15. package/dist/components/composites/catalog-browser/catalog-types.d.ts +78 -0
  16. package/dist/components/composites/catalog-browser/catalog-types.d.ts.map +1 -0
  17. package/dist/components/composites/catalog-browser/index.d.ts +4 -0
  18. package/dist/components/composites/catalog-browser/index.d.ts.map +1 -0
  19. package/dist/components/composites/catalog-browser/index.js +3 -0
  20. package/dist/index.d.ts +1 -0
  21. package/dist/index.d.ts.map +1 -1
  22. package/dist/index.js +4 -2
  23. package/dist/r/catalog-browser.json +47 -0
  24. package/dist/r/registry.json +47 -0
  25. package/dist/r/src/components/composites/catalog-browser/catalog-browser-group.tsx +148 -0
  26. package/dist/r/src/components/composites/catalog-browser/catalog-browser.tsx +258 -0
  27. package/dist/r/src/components/composites/catalog-browser/catalog-detail.tsx +64 -0
  28. package/dist/r/src/components/composites/catalog-browser/catalog-types.ts +83 -0
  29. package/dist/r/src/components/composites/catalog-browser/index.ts +10 -0
  30. package/package.json +1 -1
  31. package/registry.json +47 -0
  32. package/src/components/composites/catalog-browser/catalog-browser-group.tsx +148 -0
  33. package/src/components/composites/catalog-browser/catalog-browser.tsx +258 -0
  34. package/src/components/composites/catalog-browser/catalog-detail.tsx +64 -0
  35. package/src/components/composites/catalog-browser/catalog-types.ts +83 -0
  36. package/src/components/composites/catalog-browser/index.ts +10 -0
  37. package/src/index.ts +1 -0
@@ -0,0 +1,83 @@
1
+ import type { JSX } from 'solid-js'
2
+
3
+ /** A host-owned catalog record reduced to the fields needed by the browser. */
4
+ export type CatalogBrowserEntry<Value> = Readonly<{
5
+ id: string
6
+ value: Value
7
+ name: string
8
+ description: string
9
+ category: string
10
+ publisher: string
11
+ installed: boolean
12
+ }>
13
+
14
+ /** One stable, host-ordered category in the browser. */
15
+ export type CatalogBrowserGroup<Value> = Readonly<{
16
+ id: string
17
+ label: string
18
+ entries: readonly CatalogBrowserEntry<Value>[]
19
+ }>
20
+
21
+ export type CatalogBrowserTab = Readonly<{
22
+ id: string
23
+ label: string
24
+ /** A host-rendered view, such as navigation settings, outside the catalog. */
25
+ kind?: 'catalog' | 'supplemental'
26
+ }>
27
+
28
+ export type CatalogBrowserNotice = Readonly<{
29
+ id: string
30
+ role: 'alert' | 'status'
31
+ message: string
32
+ }>
33
+
34
+ export type CatalogBrowserMessage = Readonly<{
35
+ title: string
36
+ description: string
37
+ role?: 'alert' | 'status'
38
+ }>
39
+
40
+ export type CatalogBrowserProps<Value> = Readonly<{
41
+ /** Optional layout hook for the host's containing surface. */
42
+ class?: string
43
+ /** Whether the containing host surface is open; closing it clears view-only state. */
44
+ open: boolean
45
+ tabs: readonly CatalogBrowserTab[]
46
+ tab: string
47
+ tabsLabel: string
48
+ onTabChange: (tab: string) => void
49
+ /** A host-owned view is rendered in the same tab frame without catalog assumptions. */
50
+ renderSupplementalView?: (tab: string) => JSX.Element | undefined
51
+ query: string
52
+ onQueryChange: (query: string) => void
53
+ searchLabel: string
54
+ searchPlaceholder: string
55
+ resultsRegionLabel: string
56
+ filterControl?: JSX.Element
57
+ resultCount: number
58
+ resultLabel: (count: number) => string
59
+ loadingLabel: string
60
+ status: 'loading' | 'ready' | 'error'
61
+ catalogError: CatalogBrowserMessage
62
+ catalogErrorAction?: JSX.Element
63
+ installError?: string
64
+ notices?: readonly CatalogBrowserNotice[]
65
+ emptyState: CatalogBrowserMessage
66
+ emptyStateAction?: JSX.Element
67
+ groups: readonly CatalogBrowserGroup<Value>[]
68
+ /** All selectable records, including records omitted by the current filter. */
69
+ entries: readonly CatalogBrowserEntry<Value>[]
70
+ selectedId: string | null
71
+ onSelect: (value: Value) => void
72
+ onBack: () => void
73
+ backLabel: string
74
+ detailRegionLabel: string
75
+ installedLabel: string
76
+ publishedByLabel: (publisher: string) => string
77
+ showMoreLabel: (entries: readonly CatalogBrowserEntry<Value>[], remainingCount: number) => string
78
+ showLessLabel: string
79
+ /** Temporarily disables catalog controls while a host menu owns interaction. */
80
+ interactionDisabled?: boolean
81
+ renderIcon: (value: Value) => JSX.Element
82
+ renderDetail: (value: Value) => JSX.Element
83
+ }>
@@ -0,0 +1,10 @@
1
+ export { CatalogBrowser } from './catalog-browser'
2
+ export { CatalogDetail, CatalogDetailSection } from './catalog-detail'
3
+ export type {
4
+ CatalogBrowserEntry,
5
+ CatalogBrowserGroup,
6
+ CatalogBrowserMessage,
7
+ CatalogBrowserNotice,
8
+ CatalogBrowserProps,
9
+ CatalogBrowserTab,
10
+ } from './catalog-types'
package/src/index.ts CHANGED
@@ -98,6 +98,7 @@ export * from './components/theme'
98
98
  /* --- Composites ---------------------------------------------------------- */
99
99
  export * from './components/composites/account-menu'
100
100
  export * from './components/composites/action-button'
101
+ export * from './components/composites/catalog-browser'
101
102
  export * from './components/composites/list-row'
102
103
  export * from './components/composites/settings'
103
104
  export * from './components/composites/stat'