@hanzo/ui 8.28.0 → 8.29.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.
- package/dist/backends/gui/icon-picker.cjs +194 -0
- package/dist/backends/gui/icon-picker.d.ts +51 -0
- package/dist/backends/gui/icon-picker.d.ts.map +1 -0
- package/dist/backends/gui/icon-picker.js +155 -0
- package/dist/backends/gui/icon-picker.js.map +1 -0
- package/dist/backends/gui/icons.cjs +381 -0
- package/dist/backends/gui/icons.d.ts +53 -0
- package/dist/backends/gui/icons.d.ts.map +1 -0
- package/dist/backends/gui/icons.js +377 -0
- package/dist/backends/gui/icons.js.map +1 -0
- package/dist/backends/gui/index.cjs +13 -1
- package/dist/backends/gui/index.d.ts +2 -0
- package/dist/backends/gui/index.d.ts.map +1 -1
- package/dist/backends/gui/index.js +2 -0
- package/dist/backends/gui/index.js.map +1 -1
- package/dist/gallery/icons.cjs +19 -0
- package/dist/gallery/icons.d.ts +2 -0
- package/dist/gallery/icons.d.ts.map +1 -0
- package/dist/gallery/icons.js +17 -0
- package/dist/gallery/icons.js.map +1 -0
- package/dist/gallery/records.cjs +2 -1
- package/dist/gallery/records.d.ts.map +1 -1
- package/dist/gallery/records.js +2 -1
- package/dist/gallery/records.js.map +1 -1
- package/dist/gallery.html +2 -2
- package/dist/index.cjs +14 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/index.node.cjs +14 -2
- package/dist/index.node.js +3 -0
- package/dist/primitives/CONCEPTS.cjs +8 -0
- package/dist/primitives/CONCEPTS.d.ts +2 -0
- package/dist/primitives/CONCEPTS.d.ts.map +1 -0
- package/dist/primitives/CONCEPTS.js +5 -0
- package/dist/primitives/CONCEPTS.js.map +1 -0
- package/dist/primitives/FIELD_ICONS.cjs +8 -0
- package/dist/primitives/FIELD_ICONS.d.ts +2 -0
- package/dist/primitives/FIELD_ICONS.d.ts.map +1 -0
- package/dist/primitives/FIELD_ICONS.js +5 -0
- package/dist/primitives/FIELD_ICONS.js.map +1 -0
- package/dist/primitives/Glyph.cjs +8 -0
- package/dist/primitives/Glyph.d.ts +2 -0
- package/dist/primitives/Glyph.d.ts.map +1 -0
- package/dist/primitives/Glyph.js +5 -0
- package/dist/primitives/Glyph.js.map +1 -0
- package/dist/primitives/IconPicker.cjs +8 -0
- package/dist/primitives/IconPicker.d.ts +2 -0
- package/dist/primitives/IconPicker.d.ts.map +1 -0
- package/dist/primitives/IconPicker.js +5 -0
- package/dist/primitives/IconPicker.js.map +1 -0
- package/dist/primitives/TABLER.cjs +8 -0
- package/dist/primitives/TABLER.d.ts +2 -0
- package/dist/primitives/TABLER.d.ts.map +1 -0
- package/dist/primitives/TABLER.js +5 -0
- package/dist/primitives/TABLER.js.map +1 -0
- package/dist/primitives/iconWords.cjs +8 -0
- package/dist/primitives/iconWords.d.ts +2 -0
- package/dist/primitives/iconWords.d.ts.map +1 -0
- package/dist/primitives/iconWords.js +5 -0
- package/dist/primitives/iconWords.js.map +1 -0
- package/dist/primitives/loadIcons.cjs +8 -0
- package/dist/primitives/loadIcons.d.ts +2 -0
- package/dist/primitives/loadIcons.d.ts.map +1 -0
- package/dist/primitives/loadIcons.js +5 -0
- package/dist/primitives/loadIcons.js.map +1 -0
- package/dist/primitives/resolveIcon.cjs +8 -0
- package/dist/primitives/resolveIcon.d.ts +2 -0
- package/dist/primitives/resolveIcon.d.ts.map +1 -0
- package/dist/primitives/resolveIcon.js +5 -0
- package/dist/primitives/resolveIcon.js.map +1 -0
- package/dist/primitives/useIcons.cjs +8 -0
- package/dist/primitives/useIcons.d.ts +2 -0
- package/dist/primitives/useIcons.d.ts.map +1 -0
- package/dist/primitives/useIcons.js +5 -0
- package/dist/primitives/useIcons.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,381 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Icons are stored BY NAME — an object's, a view's, a navigation item's, a
|
|
4
|
+
* select option's — and the name Hanzo stores is a Lucide name. This module turns
|
|
5
|
+
* a stored name into one, whatever wrote it, and names the icon each record
|
|
6
|
+
* concept and field type is drawn with.
|
|
7
|
+
*
|
|
8
|
+
* Lucide is the one icon set (@hanzogui/lucide-icons-2); there is no second
|
|
9
|
+
* family beside it. A record imported from a product that stored Tabler names
|
|
10
|
+
* ("IconBuildingSkyscraper") keeps its icon through `TABLER`, then the same-name
|
|
11
|
+
* rule, then a per-kind fallback — the order reuse decided:
|
|
12
|
+
*
|
|
13
|
+
* 1. a Lucide name stands as it is;
|
|
14
|
+
* 2. a mapped Tabler name takes its pair (`TABLER`, by meaning, not spelling);
|
|
15
|
+
* 3. else "Icon" is stripped and the rest tried as a Lucide name, then with a
|
|
16
|
+
* trailing 2 or 3, then with a leading or trailing Circle/Square moved to
|
|
17
|
+
* the other end (Tabler's "CircleCheck" is Lucide's "CheckCircle");
|
|
18
|
+
* 4. else the kind's fallback: an object is a Box, a view a Table, an option
|
|
19
|
+
* nothing.
|
|
20
|
+
*
|
|
21
|
+
* Names and pairs only: the concept dictionary is twenty-ui's (MIT, NOTICE) and
|
|
22
|
+
* the pairs map its names onto Lucide's; no glyph of either set is copied. This
|
|
23
|
+
* module imports nothing, so naming a concept costs a string, and the icons are
|
|
24
|
+
* loaded only where one is drawn (`loadIcons` in icon-picker.tsx, one async
|
|
25
|
+
* chunk).
|
|
26
|
+
*/
|
|
27
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
+
exports.FIELD_ICONS = exports.CONCEPTS = exports.TABLER = void 0;
|
|
29
|
+
exports.resolveIcon = resolveIcon;
|
|
30
|
+
exports.iconWords = iconWords;
|
|
31
|
+
/** Twenty/Tabler names → the Lucide icon that means the same thing (153 pairs). */
|
|
32
|
+
exports.TABLER = {
|
|
33
|
+
Icon123: 'Hash',
|
|
34
|
+
IconAddressBook: 'BookUser',
|
|
35
|
+
IconAlertTriangle: 'AlertTriangle',
|
|
36
|
+
IconApi: 'Webhook',
|
|
37
|
+
IconAppWindow: 'AppWindow',
|
|
38
|
+
IconApps: 'LayoutGrid',
|
|
39
|
+
IconArchiveOff: 'ArchiveX',
|
|
40
|
+
IconArrowLeft: 'ArrowLeft',
|
|
41
|
+
IconArrowMerge: 'Merge',
|
|
42
|
+
IconArrowRight: 'ArrowRight',
|
|
43
|
+
IconArrowUpRight: 'ArrowUpRight',
|
|
44
|
+
IconArrowsSort: 'ArrowUpDown',
|
|
45
|
+
IconAt: 'AtSign',
|
|
46
|
+
IconAxisX: 'MoveHorizontal',
|
|
47
|
+
IconAxisY: 'MoveVertical',
|
|
48
|
+
IconBaselineDensitySmall: 'Rows3',
|
|
49
|
+
IconBell: 'Bell',
|
|
50
|
+
IconBlockquote: 'Quote',
|
|
51
|
+
IconBook: 'Book',
|
|
52
|
+
IconBox: 'Box',
|
|
53
|
+
IconBrandLinkedin: 'Linkedin',
|
|
54
|
+
IconBrandTypescript: 'FileCode',
|
|
55
|
+
IconBrandX: 'Twitter',
|
|
56
|
+
IconBuilding: 'Building',
|
|
57
|
+
IconBuildingSkyscraper: 'Building2',
|
|
58
|
+
IconCalendar: 'Calendar',
|
|
59
|
+
IconCalendarDue: 'CalendarClock',
|
|
60
|
+
IconCalendarEvent: 'CalendarDays',
|
|
61
|
+
IconCalendarMonth: 'Calendar',
|
|
62
|
+
IconCalendarRepeat: 'CalendarSync',
|
|
63
|
+
IconCalendarTime: 'CalendarClock',
|
|
64
|
+
IconCalendarWeek: 'CalendarRange',
|
|
65
|
+
IconCheck: 'Check',
|
|
66
|
+
IconCheckbox: 'CheckSquare',
|
|
67
|
+
IconChevronDown: 'ChevronDown',
|
|
68
|
+
IconChevronLeft: 'ChevronLeft',
|
|
69
|
+
IconChevronRight: 'ChevronRight',
|
|
70
|
+
IconChevronUp: 'ChevronUp',
|
|
71
|
+
IconClick: 'MousePointerClick',
|
|
72
|
+
IconClockPlay: 'Timer',
|
|
73
|
+
IconCode: 'Code',
|
|
74
|
+
IconCoins: 'Coins',
|
|
75
|
+
IconColorSwatch: 'Palette',
|
|
76
|
+
IconCommand: 'Command',
|
|
77
|
+
IconCompass: 'Compass',
|
|
78
|
+
IconCopy: 'Copy',
|
|
79
|
+
IconCpu: 'Cpu',
|
|
80
|
+
IconCreditCard: 'CreditCard',
|
|
81
|
+
IconCurrencyDollar: 'DollarSign',
|
|
82
|
+
IconDeviceFloppy: 'Save',
|
|
83
|
+
IconDots: 'MoreHorizontal',
|
|
84
|
+
IconDotsVertical: 'MoreVertical',
|
|
85
|
+
IconDownload: 'Download',
|
|
86
|
+
IconExternalLink: 'ExternalLink',
|
|
87
|
+
IconEye: 'Eye',
|
|
88
|
+
IconEyeOff: 'EyeOff',
|
|
89
|
+
IconFavorite: 'Heart',
|
|
90
|
+
IconFileExport: 'FileOutput',
|
|
91
|
+
IconFileImport: 'FileInput',
|
|
92
|
+
IconFiles: 'Files',
|
|
93
|
+
IconFilter: 'Filter',
|
|
94
|
+
IconFilterOff: 'FilterX',
|
|
95
|
+
IconForbid: 'Ban',
|
|
96
|
+
IconFrame: 'Frame',
|
|
97
|
+
IconGripVertical: 'GripVertical',
|
|
98
|
+
IconH1: 'Heading1',
|
|
99
|
+
IconH2: 'Heading2',
|
|
100
|
+
IconH3: 'Heading3',
|
|
101
|
+
IconHandMove: 'Hand',
|
|
102
|
+
IconHeart: 'Heart',
|
|
103
|
+
IconHeartOff: 'HeartOff',
|
|
104
|
+
IconHierarchy: 'Network',
|
|
105
|
+
IconHistory: 'History',
|
|
106
|
+
IconId: 'IdCard',
|
|
107
|
+
IconInfoCircle: 'Info',
|
|
108
|
+
IconJson: 'Braces',
|
|
109
|
+
IconKey: 'Key',
|
|
110
|
+
IconLayoutDashboard: 'LayoutDashboard',
|
|
111
|
+
IconLayoutGridAdd: 'LayoutGrid',
|
|
112
|
+
IconLayoutKanban: 'Kanban',
|
|
113
|
+
IconLayoutList: 'LayoutList',
|
|
114
|
+
IconLayoutSidebar: 'PanelLeft',
|
|
115
|
+
IconLayoutSidebarLeftCollapse: 'PanelLeftClose',
|
|
116
|
+
IconLayoutSidebarLeftExpand: 'PanelLeft',
|
|
117
|
+
IconLayoutSidebarRight: 'PanelRight',
|
|
118
|
+
IconLego: 'Bot',
|
|
119
|
+
IconLifebuoy: 'LifeBuoy',
|
|
120
|
+
IconLink: 'Link',
|
|
121
|
+
IconListDetails: 'ListChecks',
|
|
122
|
+
IconListNumbers: 'ListOrdered',
|
|
123
|
+
IconListSearch: 'ListFilter',
|
|
124
|
+
IconLock: 'Lock',
|
|
125
|
+
IconLogout: 'LogOut',
|
|
126
|
+
IconMail: 'Mail',
|
|
127
|
+
IconMailCog: 'MailCheck',
|
|
128
|
+
IconMap: 'Map',
|
|
129
|
+
IconMaximize: 'Maximize',
|
|
130
|
+
IconMessage: 'MessageSquare',
|
|
131
|
+
IconMicrophone: 'Mic',
|
|
132
|
+
IconMoodSmile: 'Smile',
|
|
133
|
+
IconNotes: 'StickyNote',
|
|
134
|
+
IconNumber: 'Hash',
|
|
135
|
+
IconPaperclip: 'Paperclip',
|
|
136
|
+
IconPencil: 'Pencil',
|
|
137
|
+
IconPerspective: 'PanelsTopLeft',
|
|
138
|
+
IconPhone: 'Phone',
|
|
139
|
+
IconPhoto: 'Image',
|
|
140
|
+
IconPinned: 'Pin',
|
|
141
|
+
IconPinnedOff: 'PinOff',
|
|
142
|
+
IconPlayerPause: 'Pause',
|
|
143
|
+
IconPlayerPlay: 'Play',
|
|
144
|
+
IconPlug: 'Plug',
|
|
145
|
+
IconPlus: 'Plus',
|
|
146
|
+
IconProgressCheck: 'CircleCheck',
|
|
147
|
+
IconPrompt: 'SquareTerminal',
|
|
148
|
+
IconRefresh: 'RefreshCw',
|
|
149
|
+
IconRefreshDot: 'RefreshCcwDot',
|
|
150
|
+
IconRelationOneToMany: 'Network',
|
|
151
|
+
IconReload: 'RotateCw',
|
|
152
|
+
IconRestore: 'RotateCcw',
|
|
153
|
+
IconRobot: 'Bot',
|
|
154
|
+
IconSearch: 'Search',
|
|
155
|
+
IconServer: 'Server',
|
|
156
|
+
IconSettings: 'Settings',
|
|
157
|
+
IconSettingsAutomation: 'Workflow',
|
|
158
|
+
IconShoppingBag: 'ShoppingBag',
|
|
159
|
+
IconSortAscending: 'ArrowUpNarrowWide',
|
|
160
|
+
IconSortDescending: 'ArrowDownWideNarrow',
|
|
161
|
+
IconSparkles: 'Sparkles',
|
|
162
|
+
IconSpy: 'VenetianMask',
|
|
163
|
+
IconStar: 'Star',
|
|
164
|
+
IconStatusChange: 'ArrowRightLeft',
|
|
165
|
+
IconSum: 'Sigma',
|
|
166
|
+
IconTable: 'Table',
|
|
167
|
+
IconTag: 'Tag',
|
|
168
|
+
IconTags: 'Tags',
|
|
169
|
+
IconTargetArrow: 'Target',
|
|
170
|
+
IconTerminal: 'Terminal',
|
|
171
|
+
IconTextSize: 'Type',
|
|
172
|
+
IconTimelineEvent: 'GitCommit',
|
|
173
|
+
IconToggleLeft: 'ToggleLeft',
|
|
174
|
+
IconTool: 'Wrench',
|
|
175
|
+
IconTransform: 'Shuffle',
|
|
176
|
+
IconTrash: 'Trash',
|
|
177
|
+
IconUpload: 'Upload',
|
|
178
|
+
IconUser: 'User',
|
|
179
|
+
IconUserCircle: 'CircleUser',
|
|
180
|
+
IconUsers: 'Users',
|
|
181
|
+
IconVersions: 'Layers',
|
|
182
|
+
IconWebhook: 'Webhook',
|
|
183
|
+
IconWorld: 'Globe',
|
|
184
|
+
IconX: 'X',
|
|
185
|
+
IconZzz: 'BellOff',
|
|
186
|
+
};
|
|
187
|
+
/** The CRM's concepts and the one Lucide icon each is drawn with. */
|
|
188
|
+
exports.CONCEPTS = [
|
|
189
|
+
{ group: 'Object', concept: 'Person', icon: 'User' },
|
|
190
|
+
{ group: 'Object', concept: 'Company', icon: 'Building2' },
|
|
191
|
+
{ group: 'Object', concept: 'Opportunity', icon: 'Target' },
|
|
192
|
+
{ group: 'Object', concept: 'Task', icon: 'CheckSquare' },
|
|
193
|
+
{ group: 'Object', concept: 'Note', icon: 'StickyNote' },
|
|
194
|
+
{ group: 'Object', concept: 'Workspace member', icon: 'CircleUser' },
|
|
195
|
+
{ group: 'Object', concept: 'Attachment', icon: 'FileInput' },
|
|
196
|
+
{ group: 'Object', concept: 'Blocklist', icon: 'Ban' },
|
|
197
|
+
{ group: 'Object', concept: 'Calendar event', icon: 'Calendar' },
|
|
198
|
+
{ group: 'Object', concept: 'Call recording', icon: 'Video' },
|
|
199
|
+
{ group: 'Object', concept: 'Dashboard', icon: 'LayoutDashboard' },
|
|
200
|
+
{ group: 'Object', concept: 'Message, thread', icon: 'MessageSquare' },
|
|
201
|
+
{ group: 'Object', concept: 'Message folder', icon: 'Folder' },
|
|
202
|
+
{ group: 'Object', concept: 'Campaign, delivery', icon: 'Send' },
|
|
203
|
+
{ group: 'Object', concept: 'List (people list)', icon: 'UsersRound' },
|
|
204
|
+
{ group: 'Object', concept: 'List member', icon: 'User' },
|
|
205
|
+
{ group: 'Object', concept: 'Suppression', icon: 'Ban' },
|
|
206
|
+
{ group: 'Object', concept: 'Short link', icon: 'Link' },
|
|
207
|
+
{ group: 'Object', concept: 'Timeline activity', icon: 'GitCommit' },
|
|
208
|
+
{ group: 'Object', concept: 'Workflow, automated trigger', icon: 'Workflow' },
|
|
209
|
+
{ group: 'Object', concept: 'Workflow run', icon: 'History' },
|
|
210
|
+
{ group: 'Object', concept: 'Workflow version', icon: 'Layers' },
|
|
211
|
+
{ group: 'Object', concept: 'AI chat thread', icon: 'MessageSquare' },
|
|
212
|
+
{ group: 'Object', concept: 'Agent', icon: 'Bot' },
|
|
213
|
+
{ group: 'Data model', concept: 'Data model', icon: 'Network' },
|
|
214
|
+
{ group: 'Data model', concept: 'Object', icon: 'Box' },
|
|
215
|
+
{ group: 'Data model', concept: 'Field', icon: 'ListFilter' },
|
|
216
|
+
{ group: 'Data model', concept: 'Record, record page', icon: 'BookUser' },
|
|
217
|
+
{ group: 'Field type', concept: 'Text', icon: 'Type' },
|
|
218
|
+
{ group: 'Field type', concept: 'Number', icon: 'Hash' },
|
|
219
|
+
{ group: 'Field type', concept: 'True/False', icon: 'ToggleLeft' },
|
|
220
|
+
{ group: 'Field type', concept: 'Date and Time', icon: 'CalendarClock' },
|
|
221
|
+
{ group: 'Field type', concept: 'Date', icon: 'CalendarDays' },
|
|
222
|
+
{ group: 'Field type', concept: 'Select', icon: 'Tag' },
|
|
223
|
+
{ group: 'Field type', concept: 'Multi-select', icon: 'Tags' },
|
|
224
|
+
{ group: 'Field type', concept: 'Rating', icon: 'Star' },
|
|
225
|
+
{ group: 'Field type', concept: 'Currency', icon: 'DollarSign' },
|
|
226
|
+
{ group: 'Field type', concept: 'Emails', icon: 'Mail' },
|
|
227
|
+
{ group: 'Field type', concept: 'Links', icon: 'Link' },
|
|
228
|
+
{ group: 'Field type', concept: 'Phones', icon: 'Phone' },
|
|
229
|
+
{ group: 'Field type', concept: 'Full name', icon: 'User' },
|
|
230
|
+
{ group: 'Field type', concept: 'Address', icon: 'Map' },
|
|
231
|
+
{ group: 'Field type', concept: 'Relation, morph relation', icon: 'Network' },
|
|
232
|
+
{ group: 'Field type', concept: 'Actor', icon: 'Settings' },
|
|
233
|
+
{ group: 'Field type', concept: 'Rich text', icon: 'Type' },
|
|
234
|
+
{ group: 'Field type', concept: 'JSON', icon: 'Braces' },
|
|
235
|
+
{ group: 'Field type', concept: 'Array', icon: 'Brackets' },
|
|
236
|
+
{ group: 'Field type', concept: 'Files', icon: 'File' },
|
|
237
|
+
{ group: 'Field type', concept: 'UUID', icon: 'Fingerprint' },
|
|
238
|
+
{ group: 'View', concept: 'View, table view', icon: 'Table' },
|
|
239
|
+
{ group: 'View', concept: 'Kanban view', icon: 'Kanban' },
|
|
240
|
+
{ group: 'View', concept: 'Calendar view', icon: 'Calendar' },
|
|
241
|
+
{ group: 'View', concept: 'Group by', icon: 'LayoutList' },
|
|
242
|
+
{ group: 'View', concept: 'Filter', icon: 'Filter' },
|
|
243
|
+
{ group: 'View', concept: 'Filter off', icon: 'FilterX' },
|
|
244
|
+
{ group: 'View', concept: 'Sort', icon: 'ArrowUpDown' },
|
|
245
|
+
{ group: 'View', concept: 'Sort ascending / descending', icon: 'ArrowUpNarrowWide' },
|
|
246
|
+
{ group: 'View', concept: 'Compact density', icon: 'Rows3' },
|
|
247
|
+
{ group: 'View', concept: 'Aggregate (sum)', icon: 'Sigma' },
|
|
248
|
+
{ group: 'Layout', concept: 'Layout, app window', icon: 'AppWindow' },
|
|
249
|
+
{ group: 'Layout', concept: 'Layout page', icon: 'PanelsTopLeft' },
|
|
250
|
+
{ group: 'Layout', concept: 'Widget', icon: 'LayoutGrid' },
|
|
251
|
+
{ group: 'Layout', concept: 'Side panel', icon: 'PanelRight' },
|
|
252
|
+
{ group: 'Layout', concept: 'Navigation sidebar', icon: 'PanelLeft' },
|
|
253
|
+
{ group: 'Layout', concept: 'Command menu item', icon: 'Command' },
|
|
254
|
+
{ group: 'Layout', concept: 'Navigation item', icon: 'Compass' },
|
|
255
|
+
{ group: 'Settings', concept: 'Workspace', icon: 'Settings' },
|
|
256
|
+
{ group: 'Settings', concept: 'Members, team', icon: 'Users' },
|
|
257
|
+
{ group: 'Settings', concept: 'Roles, permissions', icon: 'Lock' },
|
|
258
|
+
{ group: 'Settings', concept: 'Billing', icon: 'CreditCard' },
|
|
259
|
+
{ group: 'Settings', concept: 'Security, API key', icon: 'Key' },
|
|
260
|
+
{ group: 'Settings', concept: 'Audit logs', icon: 'History' },
|
|
261
|
+
{ group: 'Settings', concept: 'Apps', icon: 'LayoutGrid' },
|
|
262
|
+
{ group: 'Settings', concept: 'Marketplace', icon: 'ShoppingBag' },
|
|
263
|
+
{ group: 'Settings', concept: 'Admin panel', icon: 'Server' },
|
|
264
|
+
{ group: 'Developer', concept: 'API', icon: 'Webhook' },
|
|
265
|
+
{ group: 'Developer', concept: 'Developers', icon: 'Code' },
|
|
266
|
+
{ group: 'Developer', concept: 'Webhook', icon: 'Webhook' },
|
|
267
|
+
{ group: 'Developer', concept: 'Integration', icon: 'Plug' },
|
|
268
|
+
{ group: 'Developer', concept: 'Connected account', icon: 'AtSign' },
|
|
269
|
+
{ group: 'Developer', concept: 'Functions', icon: 'FileCode' },
|
|
270
|
+
{ group: 'Developer', concept: 'Execution logs', icon: 'Terminal' },
|
|
271
|
+
{ group: 'AI', concept: 'Ask AI, MCP', icon: 'Sparkles' },
|
|
272
|
+
{ group: 'AI', concept: 'Model', icon: 'Cpu' },
|
|
273
|
+
{ group: 'AI', concept: 'Prompt', icon: 'SquareTerminal' },
|
|
274
|
+
{ group: 'AI', concept: 'Tools', icon: 'Wrench' },
|
|
275
|
+
{ group: 'AI', concept: 'Skill', icon: 'Book' },
|
|
276
|
+
{ group: 'AI', concept: 'Dictation', icon: 'Mic' },
|
|
277
|
+
{ group: 'Activity', concept: 'Notification', icon: 'Bell' },
|
|
278
|
+
{ group: 'Activity', concept: 'Files', icon: 'Files' },
|
|
279
|
+
{ group: 'Activity', concept: 'Attachments', icon: 'Paperclip' },
|
|
280
|
+
{ group: 'Activity', concept: 'Transcript', icon: 'Quote' },
|
|
281
|
+
{ group: 'Chrome', concept: 'Add', icon: 'Plus' },
|
|
282
|
+
{ group: 'Chrome', concept: 'Delete', icon: 'Trash2' },
|
|
283
|
+
{ group: 'Chrome', concept: 'More actions', icon: 'MoreVertical' },
|
|
284
|
+
{ group: 'Chrome', concept: 'Close', icon: 'X' },
|
|
285
|
+
{ group: 'Chrome', concept: 'Chevrons', icon: 'ChevronLeft' },
|
|
286
|
+
{ group: 'Chrome', concept: 'Edit', icon: 'Pencil' },
|
|
287
|
+
{ group: 'Chrome', concept: 'Confirm', icon: 'Check' },
|
|
288
|
+
{ group: 'Chrome', concept: 'Copy', icon: 'Copy' },
|
|
289
|
+
{ group: 'Chrome', concept: 'Refresh', icon: 'RefreshCw' },
|
|
290
|
+
{ group: 'Chrome', concept: 'Search', icon: 'Search' },
|
|
291
|
+
{ group: 'Chrome', concept: 'Show / hide', icon: 'Eye' },
|
|
292
|
+
{ group: 'Chrome', concept: 'Info', icon: 'Info' },
|
|
293
|
+
{ group: 'Chrome', concept: 'Warning', icon: 'AlertTriangle' },
|
|
294
|
+
{ group: 'Chrome', concept: 'Open record', icon: 'ArrowUpRight' },
|
|
295
|
+
{ group: 'Chrome', concept: 'Expand to full page', icon: 'Maximize2' },
|
|
296
|
+
{ group: 'Chrome', concept: 'External link', icon: 'ExternalLink' },
|
|
297
|
+
{ group: 'Chrome', concept: 'Drag handle', icon: 'GripVertical' },
|
|
298
|
+
{ group: 'Chrome', concept: 'Favorite / unfavorite', icon: 'Heart' },
|
|
299
|
+
{ group: 'Chrome', concept: 'Pin / unpin', icon: 'Pin' },
|
|
300
|
+
{ group: 'Chrome', concept: 'Import / export', icon: 'FileInput' },
|
|
301
|
+
{ group: 'Chrome', concept: 'Merge', icon: 'Merge' },
|
|
302
|
+
{ group: 'Chrome', concept: 'Restore', icon: 'RotateCcw' },
|
|
303
|
+
{ group: 'Chrome', concept: 'Archive off', icon: 'ArchiveX' },
|
|
304
|
+
{ group: 'Chrome', concept: 'Log out', icon: 'LogOut' },
|
|
305
|
+
{ group: 'Chrome', concept: 'Globe, domain', icon: 'Globe' },
|
|
306
|
+
{ group: 'Chrome', concept: 'Run, pause', icon: 'Play' },
|
|
307
|
+
{ group: 'Chrome', concept: 'Save', icon: 'Save' },
|
|
308
|
+
{ group: 'Chrome', concept: 'Colour', icon: 'Palette' },
|
|
309
|
+
{ group: 'Chrome', concept: 'Status change', icon: 'ArrowRightLeft' },
|
|
310
|
+
{ group: 'Chrome', concept: 'Social: LinkedIn, X', icon: 'Linkedin' },
|
|
311
|
+
];
|
|
312
|
+
/**
|
|
313
|
+
* The icon each field type is drawn with — in a column header, a kanban card's
|
|
314
|
+
* field row, the data-model editor. Keyed by @hanzo/data's FieldType; longText,
|
|
315
|
+
* percent, url, email and position are not concepts of their own in the
|
|
316
|
+
* dictionary, so they take the nearest Lucide meaning.
|
|
317
|
+
*/
|
|
318
|
+
exports.FIELD_ICONS = {
|
|
319
|
+
text: 'Type',
|
|
320
|
+
longText: 'AlignLeft',
|
|
321
|
+
richText: 'Type',
|
|
322
|
+
number: 'Hash',
|
|
323
|
+
percent: 'Percent',
|
|
324
|
+
currency: 'DollarSign',
|
|
325
|
+
boolean: 'ToggleLeft',
|
|
326
|
+
select: 'Tag',
|
|
327
|
+
multiSelect: 'Tags',
|
|
328
|
+
date: 'CalendarDays',
|
|
329
|
+
dateTime: 'CalendarClock',
|
|
330
|
+
email: 'Mail',
|
|
331
|
+
url: 'Link',
|
|
332
|
+
links: 'Link',
|
|
333
|
+
phone: 'Phone',
|
|
334
|
+
rating: 'Star',
|
|
335
|
+
relation: 'Network',
|
|
336
|
+
json: 'Braces',
|
|
337
|
+
uuid: 'Fingerprint',
|
|
338
|
+
fullName: 'User',
|
|
339
|
+
address: 'Map',
|
|
340
|
+
files: 'File',
|
|
341
|
+
position: 'ListOrdered',
|
|
342
|
+
actor: 'Settings',
|
|
343
|
+
};
|
|
344
|
+
const FALLBACK = { object: 'Box', view: 'Table', option: null, other: null };
|
|
345
|
+
/** The same-name candidates for a Tabler name, in the order they are tried. */
|
|
346
|
+
const candidates = (stored) => {
|
|
347
|
+
const bare = stored.startsWith('Icon') ? stored.slice(4) : stored;
|
|
348
|
+
const out = [bare, `${bare}2`, `${bare}3`];
|
|
349
|
+
for (const shape of ['Circle', 'Square']) {
|
|
350
|
+
if (bare.startsWith(shape) && bare.length > shape.length)
|
|
351
|
+
out.push(bare.slice(shape.length) + shape);
|
|
352
|
+
if (bare.endsWith(shape) && bare.length > shape.length)
|
|
353
|
+
out.push(shape + bare.slice(0, -shape.length));
|
|
354
|
+
}
|
|
355
|
+
return out;
|
|
356
|
+
};
|
|
357
|
+
/**
|
|
358
|
+
* The Lucide name a stored icon name resolves to, against the names that exist
|
|
359
|
+
* (`names`, which `loadIcons` supplies): itself, its Tabler pair, a same-name
|
|
360
|
+
* match, or the kind's fallback; `null` when there is none.
|
|
361
|
+
*/
|
|
362
|
+
function resolveIcon(stored, names, kind = 'other') {
|
|
363
|
+
if (stored) {
|
|
364
|
+
if (names.has(stored))
|
|
365
|
+
return stored;
|
|
366
|
+
const pair = exports.TABLER[stored];
|
|
367
|
+
if (pair && names.has(pair))
|
|
368
|
+
return pair;
|
|
369
|
+
if (/^[A-Z]/.test(stored))
|
|
370
|
+
for (const c of candidates(stored))
|
|
371
|
+
if (names.has(c))
|
|
372
|
+
return c;
|
|
373
|
+
}
|
|
374
|
+
return FALLBACK[kind];
|
|
375
|
+
}
|
|
376
|
+
/** Lowercased words a search over icons matches: the name split at its capitals, and the concepts drawn with it. */
|
|
377
|
+
function iconWords(name) {
|
|
378
|
+
const own = name.replace(/([a-z0-9])([A-Z])/g, '$1 $2').toLowerCase();
|
|
379
|
+
const concepts = exports.CONCEPTS.filter((c) => c.icon === name).map((c) => c.concept.toLowerCase());
|
|
380
|
+
return [own, ...concepts].join(' ');
|
|
381
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Icons are stored BY NAME — an object's, a view's, a navigation item's, a
|
|
3
|
+
* select option's — and the name Hanzo stores is a Lucide name. This module turns
|
|
4
|
+
* a stored name into one, whatever wrote it, and names the icon each record
|
|
5
|
+
* concept and field type is drawn with.
|
|
6
|
+
*
|
|
7
|
+
* Lucide is the one icon set (@hanzogui/lucide-icons-2); there is no second
|
|
8
|
+
* family beside it. A record imported from a product that stored Tabler names
|
|
9
|
+
* ("IconBuildingSkyscraper") keeps its icon through `TABLER`, then the same-name
|
|
10
|
+
* rule, then a per-kind fallback — the order reuse decided:
|
|
11
|
+
*
|
|
12
|
+
* 1. a Lucide name stands as it is;
|
|
13
|
+
* 2. a mapped Tabler name takes its pair (`TABLER`, by meaning, not spelling);
|
|
14
|
+
* 3. else "Icon" is stripped and the rest tried as a Lucide name, then with a
|
|
15
|
+
* trailing 2 or 3, then with a leading or trailing Circle/Square moved to
|
|
16
|
+
* the other end (Tabler's "CircleCheck" is Lucide's "CheckCircle");
|
|
17
|
+
* 4. else the kind's fallback: an object is a Box, a view a Table, an option
|
|
18
|
+
* nothing.
|
|
19
|
+
*
|
|
20
|
+
* Names and pairs only: the concept dictionary is twenty-ui's (MIT, NOTICE) and
|
|
21
|
+
* the pairs map its names onto Lucide's; no glyph of either set is copied. This
|
|
22
|
+
* module imports nothing, so naming a concept costs a string, and the icons are
|
|
23
|
+
* loaded only where one is drawn (`loadIcons` in icon-picker.tsx, one async
|
|
24
|
+
* chunk).
|
|
25
|
+
*/
|
|
26
|
+
/** Twenty/Tabler names → the Lucide icon that means the same thing (153 pairs). */
|
|
27
|
+
export declare const TABLER: Readonly<Record<string, string>>;
|
|
28
|
+
/** What a record concept is drawn with: the group it belongs to, the concept, its Lucide name. */
|
|
29
|
+
export type Concept = {
|
|
30
|
+
group: string;
|
|
31
|
+
concept: string;
|
|
32
|
+
icon: string;
|
|
33
|
+
};
|
|
34
|
+
/** The CRM's concepts and the one Lucide icon each is drawn with. */
|
|
35
|
+
export declare const CONCEPTS: readonly Concept[];
|
|
36
|
+
/**
|
|
37
|
+
* The icon each field type is drawn with — in a column header, a kanban card's
|
|
38
|
+
* field row, the data-model editor. Keyed by @hanzo/data's FieldType; longText,
|
|
39
|
+
* percent, url, email and position are not concepts of their own in the
|
|
40
|
+
* dictionary, so they take the nearest Lucide meaning.
|
|
41
|
+
*/
|
|
42
|
+
export declare const FIELD_ICONS: Readonly<Record<string, string>>;
|
|
43
|
+
/** Where a stored icon is used, which decides what an unknown one falls back to. */
|
|
44
|
+
export type IconKind = 'object' | 'view' | 'option' | 'other';
|
|
45
|
+
/**
|
|
46
|
+
* The Lucide name a stored icon name resolves to, against the names that exist
|
|
47
|
+
* (`names`, which `loadIcons` supplies): itself, its Tabler pair, a same-name
|
|
48
|
+
* match, or the kind's fallback; `null` when there is none.
|
|
49
|
+
*/
|
|
50
|
+
export declare function resolveIcon(stored: string | null | undefined, names: ReadonlySet<string>, kind?: IconKind): string | null;
|
|
51
|
+
/** Lowercased words a search over icons matches: the name split at its capitals, and the concepts drawn with it. */
|
|
52
|
+
export declare function iconWords(name: string): string;
|
|
53
|
+
//# sourceMappingURL=icons.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"icons.d.ts","sourceRoot":"","sources":["../../../src/backends/gui/icons.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,mFAAmF;AACnF,eAAO,MAAM,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CA0JnD,CAAA;AAED,kGAAkG;AAClG,MAAM,MAAM,OAAO,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAA;AAEtE,qEAAqE;AACrE,eAAO,MAAM,QAAQ,EAAE,SAAS,OAAO,EA2HtC,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAyBxD,CAAA;AAED,oFAAoF;AACpF,MAAM,MAAM,QAAQ,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAA;AAe7D;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,KAAK,EAAE,WAAW,CAAC,MAAM,CAAC,EAAE,IAAI,GAAE,QAAkB,GAAG,MAAM,GAAG,IAAI,CAQlI;AAED,oHAAoH;AACpH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAI9C"}
|