@tacoshell/shell 0.0.0-stage → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/LICENSE +28 -0
  2. package/README.md +6 -2
  3. package/package.json +40 -4
  4. package/src/background.ts +41 -0
  5. package/src/core/bus.ts +210 -0
  6. package/src/core/cards.ts +33 -0
  7. package/src/core/contrib.ts +70 -0
  8. package/src/core/cron.ts +63 -0
  9. package/src/core/cronfriendly.ts +70 -0
  10. package/src/core/csv.ts +36 -0
  11. package/src/core/csvfeature.ts +57 -0
  12. package/src/core/datasets.ts +367 -0
  13. package/src/core/domshot.ts +81 -0
  14. package/src/core/guards.ts +36 -0
  15. package/src/core/hosts.ts +15 -0
  16. package/src/core/hotkeys.ts +44 -0
  17. package/src/core/indicators.ts +62 -0
  18. package/src/core/jobs.ts +37 -0
  19. package/src/core/localdata.ts +88 -0
  20. package/src/core/log.ts +91 -0
  21. package/src/core/markdown.ts +57 -0
  22. package/src/core/nav.ts +105 -0
  23. package/src/core/notifyrules.ts +31 -0
  24. package/src/core/page.ts +91 -0
  25. package/src/core/prefs.ts +119 -0
  26. package/src/core/router.ts +78 -0
  27. package/src/core/search.ts +65 -0
  28. package/src/core/services.ts +178 -0
  29. package/src/core/sessions.ts +93 -0
  30. package/src/core/startpage.ts +28 -0
  31. package/src/core/storage.ts +54 -0
  32. package/src/core/systemtools.ts +85 -0
  33. package/src/core/tabfit.ts +30 -0
  34. package/src/core/templates.ts +48 -0
  35. package/src/core/text.ts +6 -0
  36. package/src/core/toasts.ts +13 -0
  37. package/src/core/vault.ts +208 -0
  38. package/src/env.d.ts +2 -0
  39. package/src/index.ts +58 -0
  40. package/src/styles.css +391 -0
  41. package/src/types.ts +133 -0
  42. package/src/ui/ActionModal.tsx +22 -0
  43. package/src/ui/App.tsx +241 -0
  44. package/src/ui/ClearableInput.tsx +23 -0
  45. package/src/ui/CsvFeature.tsx +151 -0
  46. package/src/ui/Icon.tsx +8 -0
  47. package/src/ui/ItemFeature.tsx +39 -0
  48. package/src/ui/Markdown.tsx +24 -0
  49. package/src/ui/Rail.tsx +135 -0
  50. package/src/ui/RelatedMenu.tsx +57 -0
  51. package/src/ui/Search.tsx +111 -0
  52. package/src/ui/Sessions.tsx +76 -0
  53. package/src/ui/SidePanel.tsx +150 -0
  54. package/src/ui/TabBar.tsx +56 -0
  55. package/src/ui/ViewHost.tsx +142 -0
  56. package/src/ui/hooks.ts +28 -0
  57. package/src/ui/settings/Datasets.tsx +172 -0
  58. package/src/ui/settings/ReleaseNotes.tsx +96 -0
  59. package/src/ui/settings/ScheduleEditor.tsx +57 -0
  60. package/src/ui/settings/Settings.tsx +339 -0
  61. package/src/ui/settings/SettingsTabs.tsx +63 -0
  62. package/src/ui/settings/Templates.tsx +52 -0
  63. package/src/ui/useContrib.ts +36 -0
package/src/styles.css ADDED
@@ -0,0 +1,391 @@
1
+ /* Framework default theme (ADR-022): every value is a token a Theme component can override in its tokens.css. Palette after CommunityOS (ADR-013). */
2
+ :root {
3
+ --taco-bg: #1e1f22; --taco-surface: #26272b; --taco-surface-2: #2f3035; --taco-surface-3: #383940; --taco-border: #3a3b41;
4
+ --taco-text: #e7e7ea; --taco-text-muted: #9b9ca3; --taco-text-faint: #6c6d74;
5
+ --taco-accent: #f0533f; --taco-primary: #006bff; --taco-primary-hover: #2a85ff;
6
+ --taco-success: #2fbf71; --taco-warning: #d9a03f; --taco-danger: #e5484d; --taco-info: #2f7df6;
7
+ --taco-log-trace: #6c6d74; --taco-log-debug: #8a8b92; --taco-log-info: #9b9ca3; --taco-log-warn: #d9b43f; --taco-log-error: #f0801f; --taco-log-fatal: #e5484d;
8
+ --taco-radius-sm: 6px; --taco-radius-md: 8px; --taco-radius-lg: 12px;
9
+ --taco-font: "DM Sans", system-ui, sans-serif; --taco-font-mono: "JetBrains Mono", ui-monospace, monospace;
10
+ --taco-header-size: 22px; --taco-helper-text-color: var(--taco-text-muted); --taco-description-size: 13px;
11
+ --taco-field-height: 34px; --taco-rail-width: 248px;
12
+ color-scheme: dark;
13
+ }
14
+ /* Light theme (from CommunityOS v2's tokens.css). :where() keeps its specificity equal to :root, so an app Theme's tokens (theme.css, loaded later)
15
+ still win in both modes; a theme can add its own :root[data-theme="light"] block for light-only values. */
16
+ :root:where([data-theme="light"]) {
17
+ --taco-bg: #ffffff; --taco-surface: #f6f8fa; --taco-surface-2: #eef1f4; --taco-surface-3: #e2e7ec; --taco-border: #d0d7de;
18
+ --taco-text: #1f2328; --taco-text-muted: #59636e; --taco-text-faint: #818b98;
19
+ --taco-primary: #1a6fdb; --taco-primary-hover: #1559b3;
20
+ --taco-success: #1a7f37; --taco-warning: #9a6700; --taco-danger: #cf222e; --taco-info: #1a6fdb;
21
+ --taco-log-trace: #818b98; --taco-log-debug: #6e7781; --taco-log-info: #59636e; --taco-log-warn: #bf8700; --taco-log-error: #d4580a; --taco-log-fatal: #cf222e;
22
+ color-scheme: light;
23
+ }
24
+ * { box-sizing: border-box; }
25
+ html, body, #root { height: 100%; margin: 0; }
26
+ body { font: 14px/1.45 var(--taco-font); background: var(--taco-bg); color: var(--taco-text); }
27
+ a { color: var(--taco-primary-hover); text-decoration: none; }
28
+ a:hover { text-decoration: underline; }
29
+ code, pre, kbd { font-family: var(--taco-font-mono); font-size: 12px; }
30
+ h1 { font-size: var(--taco-header-size); font-weight: 600; margin: 0 0 8px; }
31
+ h2 { font-size: 15px; margin: 18px 0 8px; }
32
+ .muted { color: var(--taco-helper-text-color); }
33
+ .small { font-size: 12px; }
34
+ .error { color: var(--taco-danger); }
35
+
36
+ button { height: var(--taco-field-height); padding: 0 12px; border-radius: var(--taco-radius-sm); border: 1px solid var(--taco-border); background: var(--taco-surface-2); color: var(--taco-text); font: 500 13px var(--taco-font); cursor: pointer; }
37
+ button:hover:not(:disabled) { background: var(--taco-surface-3); }
38
+ button:disabled { opacity: .4; cursor: default; }
39
+ button.primary { background: var(--taco-primary); border-color: var(--taco-primary); color: #fff; }
40
+ button.primary:hover:not(:disabled) { background: var(--taco-primary-hover); }
41
+ input, select { height: var(--taco-field-height); padding: 0 10px; border-radius: var(--taco-radius-sm); border: 1px solid var(--taco-border); background: var(--taco-surface-2); color: var(--taco-text); font: inherit; }
42
+ input[type=checkbox] { height: auto; }
43
+ input:focus, select:focus, button:focus-visible { outline: 2px solid var(--taco-primary); outline-offset: 1px; }
44
+
45
+ .app { display: flex; flex-direction: column; height: 100%; }
46
+ .top { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 0 16px; border-top: 4px solid var(--taco-accent); background: var(--taco-surface); border-bottom: 1px solid var(--taco-border); }
47
+ .app-name { font-size: 16px; }
48
+ .sections { display: flex; align-self: stretch; gap: 4px; margin-left: 16px; }
49
+ /* Underlined selector: the current section is bold with a bar along the bottom of the header. */
50
+ .sections a { display: flex; align-items: center; padding: 0 14px; margin-bottom: -1px; border-bottom: 3px solid transparent; color: var(--taco-text-muted); font-weight: 500; }
51
+ .sections a:hover { color: var(--taco-text); text-decoration: none; }
52
+ .sections a.on { border-bottom-color: var(--taco-primary); color: var(--taco-text); font-weight: 700; }
53
+ .top-right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
54
+ .pill { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600; border: 1px solid var(--taco-border); color: var(--taco-text-muted); vertical-align: middle; }
55
+ .pill.ok { border-color: var(--taco-success); color: var(--taco-success); }
56
+ .pill.warn { border-color: var(--taco-warning); color: var(--taco-warning); }
57
+ .pill.bad { background: var(--taco-danger); border-color: var(--taco-danger); color: #fff; }
58
+
59
+ .layout { flex: 1; display: flex; min-height: 0; }
60
+ .rail { width: var(--taco-rail-width); flex: none; overflow: auto; padding: 12px 10px; background: var(--taco-surface); border-right: 1px solid var(--taco-border); }
61
+ .rail-label { margin: 14px 8px 4px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--taco-text-faint); }
62
+ .rail-link { display: block; padding: 5px 10px; border-radius: var(--taco-radius-sm); color: var(--taco-text); }
63
+ .rail-link:hover { background: var(--taco-surface-2); text-decoration: none; }
64
+ .rail-link.active { background: var(--taco-primary); color: #fff; }
65
+ .rail-group-head { width: 100%; text-align: left; height: 28px; border: 0; background: none; color: var(--taco-accent); font-weight: 600; padding: 0 8px; }
66
+ .rail-group .rail-link { padding-left: 22px; }
67
+ .rail-filter { width: 100%; margin: 12px 0 4px; }
68
+ .rail-filter input { width: 100%; }
69
+ .content { flex: 1; min-width: 0; overflow: auto; }
70
+ .page { padding: 8px 24px 32px; max-width: 1100px; }
71
+ .crumbs { margin: 4px 0; font-size: 12px; color: var(--taco-text-muted); }
72
+
73
+ .subbar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 8px; padding: 6px 16px; background: var(--taco-bg); border-bottom: 1px solid var(--taco-border); min-height: 44px; }
74
+ .subbar-tabs { display: flex; gap: 4px; flex: 1; }
75
+ .tab { padding: 5px 12px; border-radius: var(--taco-radius-sm); color: var(--taco-text-muted); }
76
+ .tab.active { background: var(--taco-surface-2); color: var(--taco-text); }
77
+ .subbar-actions { display: flex; gap: 6px; }
78
+ .bar-btn { height: 28px; padding: 0 10px; font-size: 12px; }
79
+ .bar-btn.on { border-color: var(--taco-primary); }
80
+ /* ADR-027: the Log button shows the highest severity since the log was last viewed. */
81
+ .bar-btn.sev-info { background: var(--taco-log-info); color: #111; }
82
+ .bar-btn.sev-warn { background: var(--taco-log-warn); color: #111; }
83
+ .bar-btn.sev-error { background: var(--taco-log-error); color: #111; }
84
+ .bar-btn.sev-fatal { background: var(--taco-log-fatal); color: #fff; }
85
+
86
+ .side { position: relative; flex: none; display: flex; flex-direction: column; border-left: 1px solid var(--taco-border); background: var(--taco-surface); min-width: 240px; max-width: 800px; }
87
+ .side-grip { position: absolute; left: -3px; top: 0; bottom: 0; width: 6px; cursor: col-resize; }
88
+ .panel-head { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--taco-border); }
89
+ .panel-head strong { margin-right: auto; }
90
+ .help-body { padding: 4px 16px; overflow: auto; }
91
+ .log-list { list-style: none; margin: 0; padding: 0 12px; overflow: auto; font-size: 12px; }
92
+ .log-list li { padding: 6px 0; border-bottom: 1px solid var(--taco-border); }
93
+ .log-head { display: flex; align-items: baseline; gap: 8px; }
94
+ .log-list time { flex: none; font-family: var(--taco-font-mono); color: var(--taco-text-faint); }
95
+ .log-list .src { margin-left: auto; color: var(--taco-text-faint); text-align: right; }
96
+ .log-list .lvl { margin-right: 0; }
97
+ /* The message is a block on its own line, indented under the level. */
98
+ .log-list .msg { margin: 3px 0 0 12px; padding-left: 8px; border-left: 2px solid var(--taco-border); white-space: pre-wrap; overflow-wrap: anywhere; }
99
+ .log-list .data { margin: 4px 0 0 12px; padding: 6px; background: var(--taco-surface-2); border-radius: var(--taco-radius-sm); white-space: pre-wrap; max-height: 160px; overflow: auto; }
100
+ .lvl { font-weight: 700; text-transform: uppercase; font-size: 11px; margin-right: 6px; }
101
+ .lvl-trace { color: var(--taco-log-trace); } .lvl-debug { color: var(--taco-log-debug); } .lvl-info { color: var(--taco-log-info); }
102
+ .lvl-warn { color: var(--taco-log-warn); } .lvl-error { color: var(--taco-log-error); } .lvl-fatal { color: var(--taco-log-fatal); }
103
+ .tag { font-size: 11px; color: var(--taco-primary-hover); margin-right: 6px; }
104
+ .filter, .favmenu { position: relative; }
105
+ .filter-menu, .favmenu-list { position: absolute; right: 0; top: 32px; z-index: 5; min-width: 200px; display: grid; gap: 4px; padding: 10px; background: var(--taco-surface-2); border: 1px solid var(--taco-border); border-radius: var(--taco-radius-md); }
106
+ .favmenu-list { right: auto; left: 0; min-width: 240px; }
107
+ .filter-row { display: flex; gap: 6px; }
108
+ .filter-row button { flex: 1; }
109
+ .filter-row button { height: 26px; font-size: 12px; }
110
+ .filter-menu .sep { border-top: 1px solid var(--taco-border); padding-top: 6px; }
111
+ .favmenu-row { display: flex; align-items: center; gap: 4px; }
112
+ .favmenu-row a { flex: 1; }
113
+ .favmenu-row button { height: 24px; padding: 0 6px; }
114
+
115
+ .card { background: var(--taco-surface); border: 1px solid var(--taco-border); border-radius: var(--taco-radius-lg); padding: 14px 18px; margin: 12px 0; }
116
+ .card.danger { border-color: var(--taco-danger); }
117
+ .card h2 { margin-top: 0; }
118
+ .tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
119
+ .tile { position: relative; display: grid; gap: 4px; padding: 14px 16px; background: var(--taco-surface); border: 1px solid var(--taco-border); border-radius: var(--taco-radius-lg); color: var(--taco-text); }
120
+ .tile:hover { border-color: var(--taco-primary); text-decoration: none; }
121
+ .tile .pill { justify-self: start; }
122
+ .unstar { position: absolute; top: 8px; right: 8px; height: 24px; padding: 0 6px; background: none; border: 0; color: var(--taco-warning); }
123
+ .form-row { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
124
+ .form-row label { width: 180px; color: var(--taco-text-muted); }
125
+ .form-row input:not([type=checkbox]) { flex: 1; max-width: 420px; }
126
+ .segmented { display: inline-flex; border: 1px solid var(--taco-border); border-radius: 999px; overflow: hidden; }
127
+ .segmented button { border: 0; border-radius: 0; height: 30px; }
128
+ .segmented button.on { background: var(--taco-primary); color: #fff; }
129
+ .actions { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
130
+ .copy { user-select: all; padding: 4px 8px; background: var(--taco-surface-2); border-radius: var(--taco-radius-sm); }
131
+ .keys td { padding: 3px 12px 3px 0; }
132
+ kbd { padding: 1px 6px; border: 1px solid var(--taco-border); border-radius: 4px; background: var(--taco-surface-2); }
133
+ .md pre { padding: 10px; background: var(--taco-surface-2); border-radius: var(--taco-radius-md); overflow: auto; }
134
+ .md p, .md li { color: var(--taco-text); }
135
+
136
+ .backdrop { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; background: rgba(0, 0, 0, .6); }
137
+ .modal { position: relative; width: min(520px, 92vw); padding: 20px 22px; background: var(--taco-surface); border: 1px solid var(--taco-border); border-radius: var(--taco-radius-lg); }
138
+ .modal input { width: 100%; }
139
+ .modal .actions { justify-content: flex-end; }
140
+ .close { position: absolute; top: 10px; right: 10px; height: 28px; width: 28px; padding: 0; background: none; border: 0; font-size: 18px; color: var(--taco-text-muted); }
141
+ .toasts { position: fixed; right: 16px; bottom: 16px; z-index: 20; display: grid; gap: 8px; width: 340px; }
142
+ .toast { padding: 10px 14px; border-radius: var(--taco-radius-md); background: var(--taco-surface-3); border: 1px solid var(--taco-border); cursor: pointer; }
143
+ .toast.error { border-color: var(--taco-danger); }
144
+ .menu-item { text-align: left; height: 30px; background: none; border: 0; }
145
+ .menu-item:hover { background: var(--taco-surface-3); }
146
+ .slot { display: grid; gap: 12px; }
147
+ /* Copy Chart pick mode (ADR-054) */
148
+ .taco-pick-frame { position: fixed; z-index: 9998; pointer-events: none; display: none; border: 2px solid var(--taco-primary); background: color-mix(in srgb, var(--taco-primary) 12%, transparent); border-radius: 6px; }
149
+ .taco-pick-banner { position: fixed; z-index: 9999; top: 12px; left: 50%; transform: translateX(-50%); padding: 6px 16px; border-radius: 999px; font-size: 13px; background: var(--taco-surface-3); color: var(--taco-text); border: 1px solid var(--taco-primary); box-shadow: 0 4px 14px rgba(0, 0, 0, .4); }
150
+ .bar-btn i { margin-right: 4px; }
151
+ .bar-btn.icon-only i { margin-right: 0; }
152
+ .fav-on i { color: var(--taco-warning); }
153
+ .top .version { margin-left: 4px; }
154
+ .menu-item i { width: 18px; margin-right: 6px; }
155
+ button.danger { border-color: var(--taco-danger); color: var(--taco-danger); }
156
+ button.danger:hover:not(:disabled) { background: var(--taco-danger); color: #fff; }
157
+ .rail-icon { width: 18px; margin-right: 8px; opacity: .8; }
158
+ .hotkey-rec { width: 200px; }
159
+ .card h3 { font-size: 13px; margin: 16px 0 6px; }
160
+ .dataset-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
161
+ .dataset-stats { text-align: right; }
162
+ .grid-wrap { overflow: auto; margin-top: 10px; }
163
+ table.grid { border-collapse: collapse; margin-top: 10px; font-size: 12px; }
164
+ table.grid th { position: sticky; top: 0; background: var(--taco-surface-2); text-align: left; }
165
+ table.grid th, table.grid td { padding: 5px 10px; border-bottom: 1px solid var(--taco-border); white-space: nowrap; }
166
+ label.inline { display: inline-flex; align-items: center; gap: 6px; color: var(--taco-text-muted); }
167
+
168
+ /* Header: vault state, search (⌘K), arrow-key selection in the rail */
169
+ /* Header status colors: success (green), warning (yellow), danger (red) */
170
+ .bar-btn.st-ok { background: color-mix(in srgb, var(--taco-success) 18%, transparent); border-color: var(--taco-success); color: var(--taco-success); }
171
+ .bar-btn.st-ok:hover:not(:disabled) { background: color-mix(in srgb, var(--taco-success) 30%, transparent); }
172
+ .bar-btn.st-warn { background: color-mix(in srgb, var(--taco-warning) 20%, transparent); border-color: var(--taco-warning); color: var(--taco-warning); }
173
+ .bar-btn.st-warn:hover:not(:disabled) { background: color-mix(in srgb, var(--taco-warning) 32%, transparent); }
174
+ .bar-btn.st-bad { background: color-mix(in srgb, var(--taco-danger) 18%, transparent); border-color: var(--taco-danger); color: var(--taco-danger); }
175
+ .bar-btn.st-bad:hover:not(:disabled) { background: color-mix(in srgb, var(--taco-danger) 30%, transparent); }
176
+ .top .bar-btn:disabled { opacity: .7; }
177
+ .top .bar-btn { height: 32px; }
178
+ .top .bar-btn.icon-only { width: 34px; padding: 0; }
179
+ .search { position: relative; flex: 1; max-width: 460px; margin-left: 16px; }
180
+ .search-input { width: 100%; height: 34px; padding-left: 34px; border-radius: 999px; }
181
+ .search-icon { position: absolute; left: 13px; top: 11px; font-size: 13px; color: var(--taco-text-muted); pointer-events: none; }
182
+ .search-panel { position: absolute; left: 0; right: 0; top: 40px; z-index: 8; display: grid; gap: 6px; padding: 10px; background: var(--taco-surface-2); border: 1px solid var(--taco-border); border-radius: var(--taco-radius-md); box-shadow: 0 8px 24px rgba(0, 0, 0, .35); }
183
+ .search-panel p { margin: 0; }
184
+ .search-head { display: flex; align-items: center; gap: 8px; color: var(--taco-text-muted); font-size: 12px; }
185
+ .search-head .pill { margin-left: auto; }
186
+ .search-back { height: 24px; width: 26px; padding: 0; }
187
+ .search-row { display: flex; align-items: center; gap: 6px; width: 100%; height: auto; min-height: 34px; padding: 6px 10px; text-align: left; background: none; border-color: transparent; }
188
+ .search-row .pill { margin-left: auto; }
189
+ .search-row.sel, .search-tile.sel, .search-row:hover, .search-tile:hover { background: var(--taco-surface-3); border-color: var(--taco-primary); }
190
+ .search-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
191
+ .search-tile { display: grid; justify-items: start; gap: 2px; height: auto; padding: 10px 12px; text-align: left; border-radius: var(--taco-radius-md); }
192
+ .search-tile i, .search-tile > span:first-child { color: var(--taco-primary-hover); }
193
+ .rail-link.kbd-sel { background: var(--taco-surface-3); outline: 2px solid var(--taco-primary); outline-offset: -2px; }
194
+ .rail-link.kbd-sel.active { background: var(--taco-primary); }
195
+
196
+ /* Datasets schedule */
197
+ .schedule-line { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin: 8px 0 0; }
198
+ .sched-ok { color: var(--taco-success); } .sched-warn { color: var(--taco-warning); }
199
+ button.link { height: auto; padding: 0; border: 0; background: none; color: var(--taco-primary-hover); font-size: inherit; }
200
+ button.link:hover:not(:disabled) { background: none; text-decoration: underline; }
201
+ .modal.schedule { width: min(560px, 94vw); }
202
+ .modal.schedule .form-row label { width: 120px; }
203
+ .modal.schedule select, .modal.schedule input:not([type=checkbox]) { flex: 0 1 260px; }
204
+ .days { display: flex; flex-wrap: wrap; gap: 10px; }
205
+ .mono { font-family: var(--taco-font-mono); }
206
+
207
+ /* Feature icons (rail, 3rd-level bar, top nav, tiles): a Font Awesome glyph or a bundled image, drawn at the text size */
208
+ .nav-icon { margin-right: 8px; opacity: .85; }
209
+ .nav-img { width: 16px; height: 16px; vertical-align: -3px; object-fit: contain; }
210
+ .tab .nav-icon { margin-right: 6px; }
211
+ .sections a .nav-icon { margin-right: 6px; }
212
+
213
+ /* Sessions (header) */
214
+ .sessions { position: relative; }
215
+ .sessions-list { position: absolute; right: 0; top: 38px; z-index: 8; min-width: 300px; display: grid; gap: 2px; padding: 10px; background: var(--taco-surface-2); border: 1px solid var(--taco-border); border-radius: var(--taco-radius-md); box-shadow: 0 8px 24px rgba(0, 0, 0, .35); }
216
+ .sessions-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
217
+ .session-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: var(--taco-radius-sm); color: var(--taco-text); }
218
+ .session-row:hover { background: var(--taco-surface-3); text-decoration: none; }
219
+ .session-name { flex: 1; }
220
+ .sess-ok { color: var(--taco-success); } .sess-warn { color: var(--taco-warning); } .sess-bad { color: var(--taco-danger); }
221
+ .session-row .nav-icon { margin-right: 0; }
222
+
223
+ /* Templates, release notes */
224
+ details.template > summary { cursor: pointer; display: flex; gap: 8px; align-items: center; }
225
+ .template textarea { width: 100%; font: 13px var(--taco-font-mono); padding: 8px; border-radius: var(--taco-radius-sm); border: 1px solid var(--taco-border); background: var(--taco-surface-2); color: var(--taco-text); }
226
+ code.token { margin-right: 6px; }
227
+ .release-notes h3, .release-notes h2 { margin: 18px 0 4px; }
228
+ .release-notes h2:first-child, .release-notes h3:first-child { margin-top: 0; }
229
+
230
+ /* Filter boxes with a × on the right (Activity Log, rail, header search) */
231
+ .clearable { position: relative; display: flex; align-items: center; min-width: 0; }
232
+ .clearable input { width: 100%; padding-right: 30px; }
233
+ .clear-x { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; height: 22px; width: 22px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--taco-text-muted); font-size: 13px; }
234
+ .clear-x:hover:not(:disabled) { background: var(--taco-surface-3); color: var(--taco-text); }
235
+ .search .clear-x { right: 10px; }
236
+ .search-input { padding-right: 34px; }
237
+ .panel-head .log-filter { flex: 1; }
238
+ .panel-head .log-filter input { height: 30px; }
239
+
240
+ /* Dataset import confirmation */
241
+ .modal.import-confirm { width: min(720px, 94vw); max-height: 90vh; overflow: auto; }
242
+ .import-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
243
+ .import-confirm h3 { margin: 12px 0 4px; }
244
+ .import-confirm .keys td:first-child { white-space: nowrap; }
245
+
246
+ /* Cards (ADR-062): module sub-features shown under a page when its context has what they are wired to */
247
+ .cards-region { max-width: 1100px; margin: 0 24px 32px; padding-top: 12px; border-top: 1px solid var(--taco-border); }
248
+ .cards-title { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--taco-text-muted); }
249
+ .cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; align-items: start; }
250
+ .card-host { background: var(--taco-surface); border: 1px solid var(--taco-border); border-radius: var(--taco-radius-lg); overflow: hidden; }
251
+ .card-head { display: flex; align-items: center; gap: 8px; width: 100%; height: 38px; padding: 0 12px; border: 0; border-radius: 0; background: none; text-align: left; }
252
+ .card-head .muted { margin-left: auto; }
253
+ .card-chev { font-size: 11px; color: var(--taco-text-muted); width: 10px; }
254
+ .card-body { padding: 4px 14px 14px; }
255
+
256
+ /* 3rd-level bar: tabs anchored left with a 64 px gutter before the buttons; overflow goes to "More" */
257
+ .subbar-tabs { position: relative; display: flex; align-items: center; gap: 4px; flex: 1; min-width: 0; overflow: visible; }
258
+ .tabs-measure { position: absolute; left: 0; top: 0; display: flex; gap: 4px; visibility: hidden; pointer-events: none; white-space: nowrap; height: 0; overflow: hidden; }
259
+ .tab { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: var(--taco-radius-sm); border: 0; background: none; color: var(--taco-text-muted); font: 500 13px var(--taco-font); white-space: nowrap; cursor: pointer; }
260
+ .tab:hover { color: var(--taco-text); text-decoration: none; background: var(--taco-surface-2); }
261
+ .tab.active { background: var(--taco-surface-2); color: var(--taco-text); }
262
+ .tab .fa-chevron-down { margin-left: 6px; font-size: 10px; }
263
+ .tab-more { position: relative; }
264
+ .tab-more-menu { position: absolute; left: 0; top: 36px; z-index: 6; min-width: 200px; display: grid; gap: 2px; padding: 6px; background: var(--taco-surface-2); border: 1px solid var(--taco-border); border-radius: var(--taco-radius-md); box-shadow: 0 8px 24px rgba(0, 0, 0, .35); }
265
+ .menu-link { display: flex; align-items: center; padding: 6px 10px; border-radius: var(--taco-radius-sm); color: var(--taco-text); white-space: nowrap; }
266
+ .menu-link:hover { background: var(--taco-surface-3); text-decoration: none; }
267
+ .menu-link.active { background: var(--taco-primary); color: #fff; }
268
+ .subbar-actions { flex: none; align-items: center; }
269
+ .subbar-actions .bar-btn.icon-only { width: 32px; padding: 0; }
270
+
271
+ /* The framework writes the page title: "Level 2 · Level 3". A leading <h1> in a view's own body is hidden so older views don't repeat it. */
272
+ .page-title { display: flex; align-items: center; gap: 12px; margin: 0; padding: 16px 24px 4px; font-size: var(--taco-header-size); }
273
+ .page-title .nav-icon { width: 28px; height: 28px; margin: 0; font-size: 24px; opacity: 1; }
274
+ .view-body > .page > h1:first-child { display: none; }
275
+ .tab-more { max-width: 100%; min-width: 0; }
276
+ .tab-more > .tab { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
277
+
278
+ /* 3rd-level tabs: the selected one is underlined like the top-level nav (3 px primary bar on the bar's bottom edge, bold text, no pill) */
279
+ .subbar { padding: 0 16px; min-height: 46px; }
280
+ .subbar-tabs { align-self: stretch; align-items: stretch; }
281
+ .tab { height: auto; align-items: center; border-radius: 0; margin-bottom: -1px; border-bottom: 3px solid transparent; font-weight: 500; }
282
+ .tab:hover { background: none; color: var(--taco-text); }
283
+ .tab.active { background: none; color: var(--taco-text); font-weight: 700; border-bottom-color: var(--taco-primary); }
284
+ .tab-more { display: flex; align-self: stretch; }
285
+ .tab-more > .tab { height: 100%; }
286
+ .tab-more-menu { top: 100%; margin-top: 2px; }
287
+ .tabs-measure .tab { font-weight: 700; } /* measure at the bold width so the selected tab never overflows */
288
+ .subbar-actions { padding: 6px 0; }
289
+
290
+ /* ── Dataset refresh indicator (header): pulses between the selected color and disabled gray while a refresh runs ── */
291
+ .refresh-indicator { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 32px; font-size: 16px; animation: taco-refresh-pulse 1.4s ease-in-out infinite; }
292
+ @keyframes taco-refresh-pulse { 0%, 100% { color: var(--taco-primary); } 50% { color: var(--taco-text-faint); } }
293
+ @media (prefers-reduced-motion: reduce) { .refresh-indicator { animation-duration: 3s; } }
294
+
295
+ /* ── Indicator bubbles: 16 foreground/background pairs a theme can override; unspecified indicators pick one by a stable hash ── */
296
+ :root {
297
+ --taco-ind-1-bg: #e8c23a; --taco-ind-1-fg: #1b1b1b; --taco-ind-2-bg: #c4552a; --taco-ind-2-fg: #ffffff;
298
+ --taco-ind-3-bg: #c23b3b; --taco-ind-3-fg: #ffffff; --taco-ind-4-bg: #7b3fd1; --taco-ind-4-fg: #ffffff;
299
+ --taco-ind-5-bg: #3fb8c4; --taco-ind-5-fg: #0b1f22; --taco-ind-6-bg: #2f55d4; --taco-ind-6-fg: #ffffff;
300
+ --taco-ind-7-bg: #2fbf71; --taco-ind-7-fg: #08210f; --taco-ind-8-bg: #e86aa6; --taco-ind-8-fg: #2a0a1a;
301
+ --taco-ind-9-bg: #f0801f; --taco-ind-9-fg: #1f1000; --taco-ind-10-bg: #5b6b7b; --taco-ind-10-fg: #ffffff;
302
+ --taco-ind-11-bg: #9be15d; --taco-ind-11-fg: #14260a; --taco-ind-12-bg: #1f7a6d; --taco-ind-12-fg: #e8fffb;
303
+ --taco-ind-13-bg: #b8a4f5; --taco-ind-13-fg: #1c1240; --taco-ind-14-bg: #8a2b52; --taco-ind-14-fg: #ffe6f1;
304
+ --taco-ind-15-bg: #f5d9a0; --taco-ind-15-fg: #3a2606; --taco-ind-16-bg: #223a6b; --taco-ind-16-fg: #dbe7ff;
305
+ }
306
+ .rail-link { display: flex; align-items: center; gap: 6px; }
307
+ .rail-link .rail-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
308
+ .rail-group-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
309
+ /* A Featured feature with several views: toggle + link on one row, its views (3rd level) indented beneath */
310
+ .rail-parent { padding: 0 10px 0 2px; }
311
+ .rail-parent:hover { background: var(--taco-surface-2); }
312
+ .rail-parent.active { background: var(--taco-primary); color: #fff; }
313
+ .rail-parent-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; padding: 5px 0; color: inherit; }
314
+ .rail-parent-link:hover { text-decoration: none; }
315
+ .rail-toggle { flex: none; width: 20px; height: 24px; padding: 0; border: 0; background: none; color: inherit; font-size: 11px; }
316
+ .rail-toggle:hover:not(:disabled) { background: none; color: var(--taco-accent); }
317
+ .rail-child { padding-left: 30px; }
318
+ .bubbles { display: inline-flex; gap: 4px; flex: none; }
319
+ .bubble { min-width: 22px; height: 22px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; border-radius: 11px; font-size: 11px; font-weight: 700; line-height: 1; letter-spacing: 0; text-transform: none; }
320
+ .bubble.more { background: var(--taco-surface-3); color: var(--taco-text-muted); }
321
+
322
+ /* ── Feature types ── */
323
+ /* Framework-rendered features supply their own gutters (a GENERAL view gets them from its own .page): 24 px at the content edges. */
324
+ .item-layout { display: grid; grid-template-columns: minmax(0, 1fr) 400px; align-items: start; min-height: 100%; }
325
+ .item-layout.no-rail { grid-template-columns: minmax(0, 1fr); }
326
+ .item-main { min-width: 0; padding: 8px 16px 32px 24px; }
327
+ .item-layout.no-rail .item-main { padding-right: 24px; }
328
+ /* The rail is 400 px in all, padding included: 16 px on its left, 24 px on its right. */
329
+ .item-rail { box-sizing: border-box; width: 400px; padding: 8px 24px 32px 16px; display: grid; gap: 14px; align-content: start; min-width: 0; }
330
+ .item-rail > section { min-width: 0; }
331
+ .rail-title { margin: 0 0 6px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--taco-text-muted); }
332
+ .action-btn { display: flex; align-items: center; gap: 8px; width: 100%; margin-bottom: 4px; height: 30px; justify-content: flex-start; font-size: 12px; }
333
+ .action-btn i { width: 16px; text-align: center; }
334
+ .modal.action-modal { width: min(760px, 94vw); max-height: 90vh; overflow: auto; }
335
+ .modal .close { position: absolute; top: 8px; right: 10px; height: 28px; width: 28px; padding: 0; border: 0; background: none; font-size: 20px; }
336
+ .csv-feature { box-sizing: border-box; min-width: 0; padding: 8px 24px 32px; }
337
+ .csv-feature .csv-upload { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
338
+ .csv-table { max-height: 55vh; overflow: auto; }
339
+ .csv-table table { border-collapse: collapse; width: 100%; }
340
+ .csv-table th, .csv-table td { padding: 6px 10px; text-align: left; border-bottom: 1px solid var(--taco-border); position: relative; }
341
+ .csv-table thead th { position: sticky; top: 0; background: var(--taco-surface-2); z-index: 1; }
342
+ .csv-th { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
343
+ .csv-menu { left: 0; right: auto; top: 34px; max-height: 260px; overflow: auto; }
344
+ .csv-filter.on { border-color: var(--taco-primary); color: var(--taco-primary); }
345
+ .csv-status { width: 70px; text-align: center; }
346
+ .csv-table tr.row-ok td { background: color-mix(in srgb, var(--taco-success) 14%, transparent); }
347
+ .csv-table tr.row-warn td { background: color-mix(in srgb, var(--taco-warning) 18%, transparent); }
348
+ .csv-table tr.row-error td { background: color-mix(in srgb, var(--taco-danger) 18%, transparent); }
349
+ .csv-run { display: flex; align-items: center; gap: 12px; margin: 12px 0; }
350
+ .csv-run .spacer { flex: 1; }
351
+ .csv-progress { display: inline-flex; align-items: center; gap: 8px; }
352
+ .modal.csv-confirm { width: min(560px, 94vw); }
353
+ .callout.warn { padding: 10px 12px; margin: 10px 0; border-radius: var(--taco-radius-md); border: 1px solid var(--taco-warning); background: color-mix(in srgb, var(--taco-warning) 16%, transparent); }
354
+
355
+ /* ── Related entries with a button ── */
356
+ .related-row { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
357
+ .related-row .menu-item { flex: 1; min-width: 0; display: block; padding: 0 8px; line-height: 30px; color: var(--taco-text); text-align: left; border-radius: var(--taco-radius-sm); }
358
+ .related-row .menu-item:hover { text-decoration: none; }
359
+ .rel-btn { flex: none; height: 24px; padding: 0 10px; font-size: 11px; }
360
+ /* `button:where(.x)` has the specificity of the plain `button` rule (and sits after it), so the type beats the default button look, while any styleClass
361
+ (one class) beats the type, and styleInline beats everything. Hover keeps the type's color. */
362
+ button:where(.rel-btn-success), button:where(.rel-btn-success):hover:not(:disabled) { background: var(--taco-success); border-color: var(--taco-success); color: #fff; }
363
+ button:where(.rel-btn-error), button:where(.rel-btn-error):hover:not(:disabled) { background: var(--taco-danger); border-color: var(--taco-danger); color: #fff; }
364
+ button:where(.rel-btn-info), button:where(.rel-btn-info):hover:not(:disabled) { background: var(--taco-info); border-color: var(--taco-info); color: #fff; }
365
+ button:where(.rel-btn-warn), button:where(.rel-btn-warn):hover:not(:disabled) { background: var(--taco-warning); border-color: var(--taco-warning); color: #1b1b1b; }
366
+ button:where([class*="rel-btn-"]):hover:not(:disabled) { filter: brightness(1.12); }
367
+ /* An ACTION modal appears after a beat, so one that does its work and calls framework.close() right away is never seen. */
368
+ .backdrop:has(.action-modal) { animation: taco-reveal 0s linear .18s backwards; }
369
+ @keyframes taco-reveal { from { opacity: 0; pointer-events: none; } to { opacity: 1; } }
370
+
371
+ /* Service settings: required marker, field help, test result colors */
372
+ .form-row .req { color: var(--taco-danger); }
373
+ .field-help { flex-basis: 100%; }
374
+ .test-ok { color: var(--taco-success); } .test-warn { color: var(--taco-warning); } .test-error { color: var(--taco-danger); }
375
+
376
+ /* Tabs inside a page (Settings → Release Notes | SBOM) and the SBOM table */
377
+ .page-tabs { display: flex; gap: 4px; margin: 4px 0 14px; border-bottom: 1px solid var(--taco-border); }
378
+ .page-tabs a { padding: 8px 14px; margin-bottom: -1px; border-bottom: 3px solid transparent; color: var(--taco-text-muted); font-weight: 500; }
379
+ .page-tabs a:hover { text-decoration: none; color: var(--taco-text); }
380
+ .page-tabs a.on { color: var(--taco-text); border-bottom-color: var(--taco-primary); font-weight: 700; }
381
+ .button-link { display: inline-flex; align-items: center; gap: 8px; height: var(--taco-field-height); padding: 0 14px; border-radius: var(--taco-radius-sm); background: var(--taco-primary); color: #fff; font-weight: 600; }
382
+ .button-link:hover { text-decoration: none; background: var(--taco-primary-hover); }
383
+ .sbom-table { width: 100%; border-collapse: collapse; }
384
+ .sbom-table th, .sbom-table td { padding: 7px 10px; text-align: left; border-bottom: 1px solid var(--taco-border); vertical-align: top; }
385
+ .sbom-table th { position: sticky; top: 0; background: var(--taco-surface-2); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--taco-text-muted); }
386
+ .sbom-table code { word-break: break-all; }
387
+
388
+ .session-reauth { height: 22px; padding: 0 8px; font-size: 11px; margin-left: 6px; }
389
+
390
+ /* A Settings page's tab strip sits above its title, like a view's bar */
391
+ .settings-tabs { margin: 0; padding: 0 24px; }
package/src/types.ts ADDED
@@ -0,0 +1,133 @@
1
+ // The registry the CLI generates (`.taco/generated/registry.json`) and the shell reads. Keep in step with packages/cli/src/lib/build.ts.
2
+
3
+ export type AuthMode = 'session' | 'apikey' | 'basic' | 'oauth' | 'none';
4
+ export type Bucket = 'featured' | 'tools' | 'services';
5
+
6
+ /** Font Awesome classes, or a bundled image (a data: URI embedded by the CLI). */
7
+ export type RegistryIcon = { fa: string } | { img: string };
8
+
9
+ export interface FieldDecl {
10
+ key: string; label?: string; secret?: boolean; modes?: AuthMode[]; placeholder?: string; required?: boolean;
11
+ /** Non-secret fields only: used while the field is empty (e.g. a demo board id). Never for secrets. */
12
+ default?: string;
13
+ /** One line under the field. */
14
+ help?: string;
15
+ }
16
+ export interface TopicDecl { visibility?: 'public' | 'protected'; event?: boolean }
17
+
18
+ export interface RegistryService {
19
+ module: string;
20
+ name: string;
21
+ type: string;
22
+ label: string;
23
+ auth: AuthMode[];
24
+ hosts: string[];
25
+ fields?: FieldDecl[];
26
+ /** `{field}` placeholders are filled from the service's config (e.g. `https://{subdomain}.zendesk.com/oauth/authorizations/new`). */
27
+ oauth?: { authorizeUrl: string; tokenUrl: string; scopes?: string[] };
28
+ apiKey?: { header?: string; prefix?: string };
29
+ topics?: Record<string, TopicDecl>;
30
+ /** Present when the service opts in to header search (its implementation then has `resolve`). */
31
+ resolver?: { label: string; hint?: string };
32
+ icon?: RegistryIcon;
33
+ sessionRequirement?: 'required' | 'recommended' | 'optional';
34
+ howToText?: string;
35
+ }
36
+
37
+ export interface RegistryView {
38
+ module: string;
39
+ name: string;
40
+ label: string;
41
+ viewType: 'GENERAL' | 'CSV' | 'ITEM' | 'ITEMS' | 'ACTION' | string;
42
+ /** Shown in the left navigation and tabs. Default true, false for ACTION views. */
43
+ showInNavBars?: boolean;
44
+ /** Opted in to be asked for Related contributions (default false). */
45
+ related?: boolean;
46
+ /** ACTION views only: opted in to be asked for Actions contributions (default false). */
47
+ actions?: boolean;
48
+ /** A background job (`background` handler in the app entry) run while the app is open. */
49
+ background?: { everySeconds: number };
50
+ nav: { section?: 'home' | 'reports'; bucket: Bucket; group?: string; feature?: string };
51
+ helpText?: string;
52
+ /** Services this view needs (from its module's non-optional `uses`, or the view's own `requires`). */
53
+ requires: { type: string; name: string }[];
54
+ /** The context it accepts (ADR-052): `{ "slug": "string", "ticket": "number?" }`. */
55
+ context?: Record<string, string>;
56
+ /** Slots other modules can contribute panels to (ADR-053). */
57
+ slots?: Record<string, { label?: string }>;
58
+ /** System tools for the Tools menu (ADR-054): which ones, and which DIVs Copy Chart may pick (default: every div). */
59
+ tools?: { system?: string[]; selector?: string };
60
+ /** Tiles offered for a resolved search context of a service type; `map` renames context keys (view key → resolved key). */
61
+ quickActions?: QuickActionDecl[];
62
+ icon?: RegistryIcon;
63
+ /** Turn the 3rd-level bar's Favorite / Refresh buttons off for this view (both default to on). */
64
+ favorite?: boolean;
65
+ refresh?: boolean;
66
+ /** false = no cards on this view (default true). */
67
+ cards?: boolean;
68
+ }
69
+
70
+ export interface QuickActionDecl { service: string; label?: string; icon?: string; map?: Record<string, string> }
71
+
72
+ /** A panel one module contributes into another view's slot (ADR-053). */
73
+ export interface RegistryPanel {
74
+ module: string;
75
+ name: string;
76
+ label: string;
77
+ into: { module: string; view: string; slot: string };
78
+ requires: { type: string; name: string }[];
79
+ }
80
+
81
+ /** A tab a module adds to a core Settings page (ADR-072). */
82
+ export interface RegistrySettingsTab { module: string; name: string; label: string; into: string; icon?: RegistryIcon; order: number; requires: { type: string; name: string }[] }
83
+
84
+ /** A card (ADR-062): wired to page-context entries, shown on any view whose page context satisfies them. */
85
+ export interface RegistryCard { module: string; name: string; label: string; context: Record<string, string>; icon?: RegistryIcon; order: number; collapsed: boolean; requires: { type: string; name: string }[] }
86
+
87
+ /** A dataset (ADR-043). `schema` types: string · integer · number · boolean · date · timestamp · list · json. */
88
+ export interface RegistryDataset {
89
+ module: string;
90
+ name: string;
91
+ label: string;
92
+ kind: 'importOnly' | 'refreshable';
93
+ key?: string;
94
+ schema?: Record<string, string>;
95
+ instructionsText?: string;
96
+ /** Who may use the set / delete topics: only the dataset's own module (default), or any module. */
97
+ writes: 'module' | 'public';
98
+ /** The developer's default refresh schedule (refreshable only); the user's choice, saved in the dataset state, wins. */
99
+ schedule?: { cron: string };
100
+ /** Refreshable only: the routine may load just what changed. */
101
+ incremental?: boolean;
102
+ }
103
+
104
+ /** Developer-shipped text the user may reword in Settings → Templates; an edit may only use the declared tokens. */
105
+ export interface RegistryTemplate { module: string; name: string; label: string; description: string; tokens: string[]; value: string }
106
+
107
+ export interface RegistryNotification { module: string; id: string; label: string; description?: string; default: 'enabled' | 'disabled'; delivery: 'toast' | 'system' | 'both' }
108
+
109
+ export interface Registry {
110
+ app: { name: string; displayName: string; version: string; extensionId: string; framework: string };
111
+ modules: { id: string; version: string; origin: string }[];
112
+ services: RegistryService[];
113
+ views: RegistryView[];
114
+ datasets: RegistryDataset[];
115
+ notifications: RegistryNotification[];
116
+ templates?: RegistryTemplate[];
117
+ panels?: RegistryPanel[];
118
+ cards?: RegistryCard[];
119
+ settingsTabs?: RegistrySettingsTab[];
120
+ gettingStartedText?: string;
121
+ releaseNotesText?: string;
122
+ sectionIcons?: Partial<Record<'home' | 'reports' | 'settings', RegistryIcon>>;
123
+ settings: {
124
+ /** The developer's default start page ("auto" | "home" | "reports" | "<module>/<view>"); the user can override it (ADR-064). */
125
+ startPage?: string;
126
+ vault: { idleLockMinutes: number; minPassphraseLength: number; kdf: { iterations: number } };
127
+ activityLog: { visibleLevels: string[]; retentionEntries: number };
128
+ notifications: { defaultDelivery: string };
129
+ };
130
+ }
131
+
132
+ export const viewKey = (v: { module: string; name: string }) => `${v.module}/${v.name}`;
133
+ export const serviceKey = (s: { type: string; name: string }) => `${s.type}/${s.name}`;
@@ -0,0 +1,22 @@
1
+ import { useMemo } from 'react';
2
+ import type { Context } from '@tacoshell/sdk';
3
+ import { createFramework } from '../core/bus.ts';
4
+ import { createPage } from '../core/page.ts';
5
+ import type { RegistryView } from '../types.ts';
6
+ import { Icon } from './Icon.tsx';
7
+ import { ViewBody } from './ViewHost.tsx';
8
+
9
+ /** An ACTION feature, shown in a modal over the page that offered it. It gets its own page whose context is the contribution's plus `referrer`. */
10
+ export function ActionModal({ view, context, onClose }: { view: RegistryView; context: Context; onClose: () => void }) {
11
+ const page = useMemo(() => { const p = createPage(`${view.module}/${view.name}`, context); p.close = onClose; return p; }, [view, context]);
12
+ const framework = useMemo(() => createFramework(view.module, page), [view.module, page]);
13
+ return (
14
+ <div className="backdrop" onMouseDown={(e) => e.target === e.currentTarget && onClose()} onKeyDown={(e) => e.key === 'Escape' && onClose()}>
15
+ <div className="modal action-modal" role="dialog" aria-label={view.label} data-action={`${view.module}/${view.name}`}>
16
+ <button className="close" onClick={onClose} aria-label="Close">×</button>
17
+ <h2><Icon icon={view.icon} />{view.label}</h2>
18
+ <ViewBody view={view} page={page} framework={framework} />
19
+ </div>
20
+ </div>
21
+ );
22
+ }