@sableui/react 0.17.0 → 0.19.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 (154) hide show
  1. package/AGENTS.md +10 -3
  2. package/CHANGELOG.md +235 -0
  3. package/README.md +11 -4
  4. package/bin/sable.mjs +266 -30
  5. package/dist/{_contract-CDa9-NdB.d.ts → _contract-DlklV0Im.d.ts} +2 -2
  6. package/dist/activity-DT8VK9fx.d.ts +25 -0
  7. package/dist/adapters/github.d.ts +41 -0
  8. package/dist/adapters/github.js +24 -0
  9. package/dist/blocks/index.d.ts +1 -1
  10. package/dist/components/activity-heatmap/activity-heatmap.js +420 -0
  11. package/dist/components/activity-heatmap/activity-heatmap.meta.js +142 -0
  12. package/dist/components/activity-heatmap/index.js +9 -0
  13. package/dist/components/avatar/avatar.js +16 -7
  14. package/dist/components/avatar/avatar.meta.js +43 -10
  15. package/dist/components/avatar/avatar.variants.js +26 -2
  16. package/dist/components/code-block/code-block.js +5 -3
  17. package/dist/components/code-block/code-block.meta.js +6 -0
  18. package/dist/components/collapsible/collapsible.js +6 -5
  19. package/dist/components/collapsible/collapsible.meta.js +14 -5
  20. package/dist/components/data-table/data-table.js +132 -45
  21. package/dist/components/data-table/data-table.meta.js +63 -4
  22. package/dist/components/date-picker/date-picker.js +13 -6
  23. package/dist/components/date-picker/date-picker.meta.js +22 -0
  24. package/dist/components/dialog/dialog.js +25 -5
  25. package/dist/components/dialog/dialog.meta.js +26 -5
  26. package/dist/components/media-image/media-image.js +3 -1
  27. package/dist/components/media-image/media-image.meta.js +15 -1
  28. package/dist/components/media-tile/media-tile.js +13 -1
  29. package/dist/components/media-tile/media-tile.meta.js +10 -0
  30. package/dist/components/menu/menu.js +2 -0
  31. package/dist/components/menu/menu.meta.js +2 -2
  32. package/dist/components/page-header/page-header.js +9 -4
  33. package/dist/components/page-header/page-header.meta.js +26 -1
  34. package/dist/components/panel-group/panel-group.js +17 -1
  35. package/dist/components/panel-group/panel-group.meta.js +43 -3
  36. package/dist/components/pill/pill.meta.js +15 -6
  37. package/dist/components/pill/pill.variants.js +1 -0
  38. package/dist/components/search-input/search-input.js +30 -5
  39. package/dist/components/search-input/search-input.meta.js +29 -4
  40. package/dist/components/section-header/section-header.js +27 -17
  41. package/dist/components/section-header/section-header.meta.js +27 -5
  42. package/dist/components/sheet/sheet.js +15 -3
  43. package/dist/components/sheet/sheet.meta.js +2 -2
  44. package/dist/components/side-nav/side-nav.variants.js +8 -3
  45. package/dist/components/sidebar/index.js +4 -0
  46. package/dist/components/sidebar/sidebar.js +90 -11
  47. package/dist/components/sidebar/sidebar.meta.js +38 -4
  48. package/dist/components/table/table.js +7 -3
  49. package/dist/components/tabs/tabs.js +10 -2
  50. package/dist/components/tabs/tabs.meta.js +4 -0
  51. package/dist/components/workspace/workspace.js +13 -3
  52. package/dist/components/workspace/workspace.meta.js +109 -1
  53. package/dist/file-hashes.json +94 -80
  54. package/dist/foundations/typography.js +13 -0
  55. package/dist/icon/Icon.js +21 -2
  56. package/dist/icon/index.d.ts +36 -1
  57. package/dist/icon/index.js +5 -0
  58. package/dist/icon/names.js +240 -0
  59. package/dist/icon-sets/reicon.js +41 -1
  60. package/dist/index.d.ts +540 -75
  61. package/dist/index.js +18 -1
  62. package/dist/layout/AspectBox.js +2 -5
  63. package/dist/layout/Bleed.js +10 -6
  64. package/dist/layout/Center.js +11 -3
  65. package/dist/layout/Columns.js +6 -3
  66. package/dist/layout/Grid.js +14 -6
  67. package/dist/layout/GridOverlay.js +7 -7
  68. package/dist/layout/Region.js +18 -3
  69. package/dist/layout/Row.js +27 -20
  70. package/dist/layout/Spacer.js +13 -2
  71. package/dist/layout/SplitPane.js +1 -1
  72. package/dist/layout/Stack.js +25 -18
  73. package/dist/layout/index.d.ts +57 -6
  74. package/dist/lib/chart/activity.js +32 -0
  75. package/dist/lib/chart/calendar.js +67 -0
  76. package/dist/lib/chart/chart-tooltip.js +2 -2
  77. package/dist/lib/chart/heat.js +55 -0
  78. package/dist/lib/cn.js +1 -0
  79. package/dist/lib/focus-return.js +53 -0
  80. package/dist/lib/taxonomy.js +1 -0
  81. package/dist/lib/use-media-query.js +41 -0
  82. package/dist/{meta-DX5r5wQL.d.ts → meta-Dfm9AExe.d.ts} +6 -0
  83. package/dist/patterns/dashboard-page.js +23 -17
  84. package/dist/patterns/index.d.ts +7 -2
  85. package/dist/patterns/index.js +5 -1
  86. package/dist/patterns/tracker-page.js +392 -0
  87. package/dist/patterns/tracker-page.meta.js +40 -0
  88. package/dist/presets/index.d.ts +1 -1
  89. package/dist/styles.css +301 -188
  90. package/dist/{theme-provider-BydfM5Z0.d.ts → theme-provider-BUBealk_.d.ts} +1 -1
  91. package/dist/themes/_contract.js +9 -1
  92. package/dist/themes/atelier/index.d.ts +1 -1
  93. package/dist/themes/ember/index.d.ts +1 -1
  94. package/dist/themes/index.d.ts +2 -2
  95. package/dist/themes/meridian/index.d.ts +1 -1
  96. package/dist/themes/poppy/index.d.ts +1 -1
  97. package/dist/themes/prism/index.d.ts +1 -1
  98. package/dist/themes/sable/index.d.ts +1 -1
  99. package/dist/themes/verdant/index.d.ts +1 -1
  100. package/llms/components/activity-heatmap.md +133 -0
  101. package/llms/components/avatar.md +32 -9
  102. package/llms/components/code-block.md +1 -0
  103. package/llms/components/collapsible.md +12 -4
  104. package/llms/components/data-table.md +40 -3
  105. package/llms/components/date-picker.md +15 -1
  106. package/llms/components/dialog.md +34 -3
  107. package/llms/components/media-image.md +12 -0
  108. package/llms/components/media-tile.md +21 -0
  109. package/llms/components/menu.md +1 -1
  110. package/llms/components/page-header.md +16 -1
  111. package/llms/components/panel-group.md +34 -2
  112. package/llms/components/pill.md +24 -5
  113. package/llms/components/search-input.md +37 -4
  114. package/llms/components/section-header.md +28 -4
  115. package/llms/components/sheet.md +2 -2
  116. package/llms/components/sidebar.md +17 -4
  117. package/llms/components/tabs.md +1 -0
  118. package/llms/components/workspace.md +81 -1
  119. package/llms/foundations/typography.md +4 -1
  120. package/llms/layout/aspect-box.md +1 -1
  121. package/llms/layout/bleed.md +1 -1
  122. package/llms/layout/center.md +1 -1
  123. package/llms/layout/columns.md +1 -1
  124. package/llms/layout/grid.md +1 -1
  125. package/llms/layout/region.md +1 -1
  126. package/llms/layout/row.md +9 -1
  127. package/llms/layout/spacer.md +1 -1
  128. package/llms/layout/split-pane.md +1 -1
  129. package/llms/layout/stack.md +1 -1
  130. package/llms/patterns/dashboard-page.md +18 -15
  131. package/llms/patterns/tracker-page.md +450 -0
  132. package/llms/reference/token-intent.md +3 -1
  133. package/llms/reference/utilities.md +4 -1
  134. package/llms/tasks/auditing-an-app.md +35 -1
  135. package/llms/tasks/building-a-page.md +3 -2
  136. package/llms/tasks/building-a-tool.md +101 -5
  137. package/llms/tasks/building-with-sable.md +11 -3
  138. package/llms/tasks/creating-a-preset.md +9 -0
  139. package/llms/tasks/getting-started.md +10 -3
  140. package/llms/tasks/using-presets.md +1 -2
  141. package/llms-full.txt +1215 -89
  142. package/llms.txt +11 -9
  143. package/package.json +7 -1
  144. package/registry.json +1021 -70
  145. package/scripts/adoption.mjs +252 -0
  146. package/scripts/agent-setup.mjs +110 -18
  147. package/scripts/app-css.mjs +129 -0
  148. package/scripts/grade.mjs +178 -2
  149. package/scripts/lint-rules.mjs +126 -0
  150. package/scripts/wiring.mjs +2 -1
  151. package/skills/entry/SKILL.md +1 -1
  152. package/skills/sable/SKILL.md +64 -6
  153. package/skills/sable/agents/openai.yaml +1 -1
  154. package/targets/ios.json +9 -0
@@ -0,0 +1,240 @@
1
+ // src/icon/names.ts
2
+ var ICON_NAMES = [
3
+ "heart",
4
+ "comment",
5
+ "share",
6
+ "gem",
7
+ "image-stack",
8
+ "home",
9
+ "bell",
10
+ "gear",
11
+ "user",
12
+ "search",
13
+ "plus",
14
+ "minus",
15
+ "check",
16
+ "xmark",
17
+ "chevron-down",
18
+ "chevron-up",
19
+ "chevron-left",
20
+ "chevron-right",
21
+ "arrow-up",
22
+ "arrow-up-right",
23
+ "expand",
24
+ "eye",
25
+ "eye-off",
26
+ "external",
27
+ "spinner",
28
+ "ellipsis",
29
+ "info",
30
+ "warning",
31
+ "circle-check",
32
+ "calendar",
33
+ "copy",
34
+ "file",
35
+ "folder",
36
+ "sun",
37
+ "moon",
38
+ "desktop",
39
+ "lock",
40
+ "list",
41
+ "bars",
42
+ "grid",
43
+ "layout",
44
+ "book",
45
+ "component",
46
+ "sparkles",
47
+ "play",
48
+ "pause",
49
+ "next",
50
+ "previous",
51
+ "arrow-down",
52
+ "arrow-left",
53
+ "arrow-right",
54
+ "clock",
55
+ "send",
56
+ "trash",
57
+ "edit",
58
+ "download",
59
+ "upload",
60
+ "link",
61
+ "inbox",
62
+ "mail",
63
+ "logout",
64
+ "star",
65
+ "refresh",
66
+ "filter",
67
+ "bold",
68
+ "italic",
69
+ "eyedropper",
70
+ "stop",
71
+ "key",
72
+ "wallet",
73
+ "thumbs-up",
74
+ "thumbs-down",
75
+ "shuffle",
76
+ "repeat",
77
+ "repeat-one",
78
+ "volume",
79
+ "volume-low",
80
+ "volume-off",
81
+ "queue",
82
+ "music",
83
+ "tag",
84
+ "paperclip",
85
+ "chart",
86
+ "flag",
87
+ "at-sign",
88
+ "replay",
89
+ "motion",
90
+ "emoji",
91
+ "briefcase",
92
+ "layers",
93
+ "microphone",
94
+ "video",
95
+ "broadcast",
96
+ "newspaper",
97
+ "palette",
98
+ "gamepad",
99
+ // Work-tracking chrome: a team list, a backlog, a board view, display
100
+ // options, help and a collapsible sidebar. Added when an issue tracker
101
+ // asked for users/archive/columns/sliders/help/menu, got nothing back,
102
+ // and showed one glyph for Inbox and Backlog.
103
+ "users",
104
+ "archive",
105
+ "kanban",
106
+ "sliders",
107
+ "help",
108
+ "sidebar",
109
+ // A control that opens a menu of choices above or below it: an account
110
+ // row at the foot of a rail, a workspace switcher.
111
+ "chevron-up-down"
112
+ ];
113
+ var ICON_ALIASES = {
114
+ // Lucide
115
+ "chevrons-up-down": "chevron-up-down",
116
+ "check-circle": "circle-check",
117
+ "check-circle-2": "circle-check",
118
+ "circle-check-big": "circle-check",
119
+ settings: "gear",
120
+ "settings-2": "sliders",
121
+ cog: "gear",
122
+ x: "xmark",
123
+ close: "xmark",
124
+ "x-circle": "xmark",
125
+ "more-horizontal": "ellipsis",
126
+ "more-vertical": "ellipsis",
127
+ more: "ellipsis",
128
+ "dots-horizontal": "ellipsis",
129
+ "ellipsis-horizontal": "ellipsis",
130
+ "message-square": "comment",
131
+ "message-circle": "comment",
132
+ message: "comment",
133
+ messages: "comment",
134
+ chat: "comment",
135
+ menu: "bars",
136
+ hamburger: "bars",
137
+ "help-circle": "help",
138
+ "circle-help": "help",
139
+ question: "help",
140
+ "circle-question": "help",
141
+ "alert-triangle": "warning",
142
+ "triangle-alert": "warning",
143
+ "info-circle": "info",
144
+ "circle-info": "info",
145
+ "external-link": "external",
146
+ loader: "spinner",
147
+ "loader-2": "spinner",
148
+ "loader-circle": "spinner",
149
+ "log-out": "logout",
150
+ "sign-out": "logout",
151
+ monitor: "desktop",
152
+ laptop: "desktop",
153
+ "layout-grid": "grid",
154
+ "layout-dashboard": "layout",
155
+ "file-text": "file",
156
+ document: "file",
157
+ "rotate-cw": "refresh",
158
+ "rotate-ccw": "refresh",
159
+ "refresh-cw": "refresh",
160
+ "refresh-ccw": "refresh",
161
+ funnel: "filter",
162
+ "user-circle": "user",
163
+ "circle-user": "user",
164
+ person: "user",
165
+ people: "users",
166
+ team: "users",
167
+ "user-group": "users",
168
+ "users-round": "users",
169
+ box: "archive",
170
+ "archive-box": "archive",
171
+ columns: "kanban",
172
+ "columns-3": "kanban",
173
+ board: "kanban",
174
+ "square-kanban": "kanban",
175
+ "sliders-horizontal": "sliders",
176
+ "sliders-vertical": "sliders",
177
+ adjustments: "sliders",
178
+ "panel-left": "sidebar",
179
+ "sidebar-left": "sidebar",
180
+ "calendar-days": "calendar",
181
+ house: "home",
182
+ pencil: "edit",
183
+ "edit-2": "edit",
184
+ "edit-3": "edit",
185
+ "square-pen": "edit",
186
+ "trash-2": "trash",
187
+ delete: "trash",
188
+ envelope: "mail",
189
+ "arrow-path": "refresh",
190
+ "eye-slash": "eye-off",
191
+ "lock-closed": "lock",
192
+ "paper-airplane": "send",
193
+ "paper-clip": "paperclip",
194
+ "arrow-down-tray": "download",
195
+ "arrow-up-tray": "upload",
196
+ "magnifying-glass": "search",
197
+ "cog-6-tooth": "gear",
198
+ "bars-3": "bars",
199
+ "chat-bubble-left": "comment",
200
+ "exclamation-triangle": "warning",
201
+ "information-circle": "info",
202
+ "question-mark-circle": "help",
203
+ "adjustments-horizontal": "sliders",
204
+ "squares-2x2": "grid",
205
+ "view-columns": "kanban",
206
+ "arrow-top-right-on-square": "external",
207
+ "computer-desktop": "desktop",
208
+ "x-mark": "xmark",
209
+ "document-text": "file"
210
+ };
211
+ function resolveIconAlias(name) {
212
+ const target = ICON_ALIASES[name];
213
+ return target && target !== name ? target : void 0;
214
+ }
215
+ function distance(a, b) {
216
+ const row = Array.from({ length: b.length + 1 }, (_, i) => i);
217
+ for (let i = 1; i <= a.length; i++) {
218
+ let previous = row[0];
219
+ row[0] = i;
220
+ for (let j = 1; j <= b.length; j++) {
221
+ const current = row[j];
222
+ row[j] = Math.min(row[j] + 1, row[j - 1] + 1, previous + (a[i - 1] === b[j - 1] ? 0 : 1));
223
+ previous = current;
224
+ }
225
+ }
226
+ return row[b.length];
227
+ }
228
+ function nearestIconNames(name, limit = 3) {
229
+ const parts = new Set(name.toLowerCase().split(/[-_\s]+/).filter(Boolean));
230
+ return [...ICON_NAMES].map((candidate) => {
231
+ const shared = candidate.split("-").some((part) => parts.has(part));
232
+ return { candidate, score: distance(name.toLowerCase(), candidate) - (shared ? 3 : 0) };
233
+ }).sort((a, b) => a.score - b.score).slice(0, limit).map(({ candidate }) => candidate);
234
+ }
235
+ export {
236
+ ICON_ALIASES,
237
+ ICON_NAMES,
238
+ nearestIconNames,
239
+ resolveIconAlias
240
+ };
@@ -21,6 +21,7 @@ import { ChevronRight } from "reicon-react/icons/ChevronRight";
21
21
  import { ArrowUp } from "reicon-react/icons/ArrowUp";
22
22
  import { ArrowUpRight } from "reicon-react/icons/ArrowUpRight";
23
23
  import { ChevronUp } from "reicon-react/icons/ChevronUp";
24
+ import { ChevronExpandY } from "reicon-react/icons/ChevronExpandY";
24
25
  import { Comment } from "reicon-react/icons/Comment";
25
26
  import { Component2 } from "reicon-react/icons/Component2";
26
27
  import { Copy } from "reicon-react/icons/Copy";
@@ -87,6 +88,20 @@ import { VolumeLow2 } from "reicon-react/icons/VolumeLow2";
87
88
  import { VolumeCross } from "reicon-react/icons/VolumeCross";
88
89
  import { Playlist } from "reicon-react/icons/Playlist";
89
90
  import { MusicNote } from "reicon-react/icons/MusicNote";
91
+ import { Briefcase } from "reicon-react/icons/Briefcase";
92
+ import { Layers } from "reicon-react/icons/Layers";
93
+ import { Microphone } from "reicon-react/icons/Microphone";
94
+ import { Video } from "reicon-react/icons/Video";
95
+ import { SignalStream } from "reicon-react/icons/SignalStream";
96
+ import { Doc2 } from "reicon-react/icons/Doc2";
97
+ import { Palette2 } from "reicon-react/icons/Palette2";
98
+ import { Gamepad } from "reicon-react/icons/Gamepad";
99
+ import { Users } from "reicon-react/icons/Users";
100
+ import { Archive } from "reicon-react/icons/Archive";
101
+ import { Kanban } from "reicon-react/icons/Kanban";
102
+ import { Sliders } from "reicon-react/icons/Sliders";
103
+ import { HelpCircle } from "reicon-react/icons/HelpCircle";
104
+ import { SidebarLeft } from "reicon-react/icons/SidebarLeft";
90
105
  import { memo } from "react";
91
106
  import { jsx } from "react/jsx-runtime";
92
107
  var ICONS = {
@@ -107,6 +122,7 @@ var ICONS = {
107
122
  xmark: Xmark,
108
123
  "chevron-down": ChevronDown,
109
124
  "chevron-up": ChevronUp,
125
+ "chevron-up-down": ChevronExpandY,
110
126
  "arrow-up": ArrowUp,
111
127
  "arrow-up-right": ArrowUpRight,
112
128
  "chevron-left": ChevronLeft,
@@ -191,7 +207,31 @@ var ICONS = {
191
207
  replay: Restart,
192
208
  motion: PlaybackSpeed,
193
209
  // Added for the add-reaction pill under a chat bubble.
194
- emoji: EmojiHappy
210
+ emoji: EmojiHappy,
211
+ // Added when a portfolio imported reicon-react directly for its work,
212
+ // projects, audio, video, live, press, design and games sections.
213
+ // `broadcast` is the radiating-waves mark that reads as "live" (Reicon's
214
+ // `Station` tower is too detailed at text size); `newspaper` is Reicon's
215
+ // folded paper, its nearest press glyph; `palette` is the painter's palette,
216
+ // not Reicon's `Palette` (a swatch fan, which reads as colour picking).
217
+ briefcase: Briefcase,
218
+ layers: Layers,
219
+ microphone: Microphone,
220
+ video: Video,
221
+ broadcast: SignalStream,
222
+ newspaper: Doc2,
223
+ palette: Palette2,
224
+ gamepad: Gamepad,
225
+ // Added when an issue tracker had no glyph for its team list, backlog,
226
+ // board view, display options or help, aliased Backlog to `inbox` (two nav
227
+ // rows, one glyph) and Clients to `briefcase`. `sidebar` is the left-panel
228
+ // toggle a collapsible rail needs.
229
+ users: Users,
230
+ archive: Archive,
231
+ kanban: Kanban,
232
+ sliders: Sliders,
233
+ help: HelpCircle,
234
+ sidebar: SidebarLeft
195
235
  };
196
236
  var WEIGHTS = {
197
237
  regular: "Outline",