@adea-ai/ui 0.142.4 → 0.144.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/components/composites/accent-picker/accent-picker.d.ts +28 -0
- package/dist/components/composites/accent-picker/accent-picker.d.ts.map +1 -0
- package/dist/components/composites/accent-picker/accent-picker.js +107 -0
- package/dist/components/composites/accent-picker/accent-picker.js.map +1 -0
- package/dist/components/composites/accent-picker/index.d.ts +2 -0
- package/dist/components/composites/accent-picker/index.d.ts.map +1 -0
- package/dist/components/composites/accent-picker/index.js +2 -0
- package/dist/components/composites/icon-picker/icon-picker.d.ts +52 -0
- package/dist/components/composites/icon-picker/icon-picker.d.ts.map +1 -0
- package/dist/components/composites/icon-picker/icon-picker.js +265 -0
- package/dist/components/composites/icon-picker/icon-picker.js.map +1 -0
- package/dist/components/composites/icon-picker/image-data-url.d.ts +42 -0
- package/dist/components/composites/icon-picker/image-data-url.d.ts.map +1 -0
- package/dist/components/composites/icon-picker/image-data-url.js +90 -0
- package/dist/components/composites/icon-picker/image-data-url.js.map +1 -0
- package/dist/components/composites/icon-picker/index.d.ts +4 -0
- package/dist/components/composites/icon-picker/index.d.ts.map +1 -0
- package/dist/components/composites/icon-picker/index.js +4 -0
- package/dist/components/composites/icon-picker/shell-icons.d.ts +264 -0
- package/dist/components/composites/icon-picker/shell-icons.d.ts.map +1 -0
- package/dist/components/composites/icon-picker/shell-icons.js +334 -0
- package/dist/components/composites/icon-picker/shell-icons.js.map +1 -0
- package/dist/components/composites/settings/settings-navigation.js +1 -1
- package/dist/components/composites/settings/settings-navigation.js.map +1 -1
- package/dist/components/composites/settings/settings.d.ts +8 -14
- package/dist/components/composites/settings/settings.d.ts.map +1 -1
- package/dist/components/composites/settings/settings.js +88 -37
- package/dist/components/composites/settings/settings.js.map +1 -1
- package/dist/components/composites/terminal/terminal.js +2 -2
- package/dist/components/composites/terminal/terminal.js.map +1 -1
- package/dist/components/composites/tree/tree.d.ts +6 -0
- package/dist/components/composites/tree/tree.d.ts.map +1 -1
- package/dist/components/composites/tree/tree.js +35 -14
- package/dist/components/composites/tree/tree.js.map +1 -1
- package/dist/components/composites/workspace-switcher/index.d.ts +2 -0
- package/dist/components/composites/workspace-switcher/index.d.ts.map +1 -0
- package/dist/components/composites/workspace-switcher/index.js +2 -0
- package/dist/components/composites/workspace-switcher/workspace-switcher.d.ts +44 -0
- package/dist/components/composites/workspace-switcher/workspace-switcher.d.ts.map +1 -0
- package/dist/components/composites/workspace-switcher/workspace-switcher.js +157 -0
- package/dist/components/composites/workspace-switcher/workspace-switcher.js.map +1 -0
- package/dist/components/layout/shell-rail/index.d.ts +2 -0
- package/dist/components/layout/shell-rail/index.d.ts.map +1 -0
- package/dist/components/layout/shell-rail/index.js +2 -0
- package/dist/components/layout/shell-rail/shell-rail.d.ts +36 -0
- package/dist/components/layout/shell-rail/shell-rail.d.ts.map +1 -0
- package/dist/components/layout/shell-rail/shell-rail.js +124 -0
- package/dist/components/layout/shell-rail/shell-rail.js.map +1 -0
- package/dist/components/layout/shell-top-bar/index.d.ts +2 -0
- package/dist/components/layout/shell-top-bar/index.d.ts.map +1 -0
- package/dist/components/layout/shell-top-bar/index.js +2 -0
- package/dist/components/layout/shell-top-bar/shell-top-bar.d.ts +68 -0
- package/dist/components/layout/shell-top-bar/shell-top-bar.d.ts.map +1 -0
- package/dist/components/layout/shell-top-bar/shell-top-bar.js +135 -0
- package/dist/components/layout/shell-top-bar/shell-top-bar.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -1
- package/dist/r/accent-picker.json +25 -0
- package/dist/r/icon-picker.json +37 -0
- package/dist/r/registry.json +141 -1
- package/dist/r/settings.json +3 -1
- package/dist/r/shell-rail.json +27 -0
- package/dist/r/shell-top-bar.json +23 -0
- package/dist/r/src/components/composites/accent-picker/accent-picker.tsx +106 -0
- package/dist/r/src/components/composites/accent-picker/index.ts +1 -0
- package/dist/r/src/components/composites/icon-picker/icon-picker.tsx +246 -0
- package/dist/r/src/components/composites/icon-picker/image-data-url.ts +107 -0
- package/dist/r/src/components/composites/icon-picker/index.ts +25 -0
- package/dist/r/src/components/composites/icon-picker/shell-icons.ts +166 -0
- package/dist/r/src/components/composites/settings/settings-navigation.tsx +1 -1
- package/dist/r/src/components/composites/settings/settings.tsx +40 -5
- package/dist/r/src/components/composites/tree/tree.tsx +25 -0
- package/dist/r/src/components/composites/workspace-switcher/index.ts +5 -0
- package/dist/r/src/components/composites/workspace-switcher/workspace-switcher.tsx +128 -0
- package/dist/r/src/components/layout/shell-rail/index.ts +1 -0
- package/dist/r/src/components/layout/shell-rail/shell-rail.tsx +120 -0
- package/dist/r/src/components/layout/shell-top-bar/index.ts +1 -0
- package/dist/r/src/components/layout/shell-top-bar/shell-top-bar.tsx +185 -0
- package/dist/r/workspace-switcher.json +26 -0
- package/package.json +1 -1
- package/registry.json +141 -1
- package/src/components/composites/accent-picker/accent-picker.tsx +106 -0
- package/src/components/composites/accent-picker/index.ts +1 -0
- package/src/components/composites/icon-picker/icon-picker.tsx +246 -0
- package/src/components/composites/icon-picker/image-data-url.ts +107 -0
- package/src/components/composites/icon-picker/index.ts +25 -0
- package/src/components/composites/icon-picker/shell-icons.ts +166 -0
- package/src/components/composites/settings/settings-navigation.tsx +1 -1
- package/src/components/composites/settings/settings.tsx +40 -5
- package/src/components/composites/tree/tree.tsx +25 -0
- package/src/components/composites/workspace-switcher/index.ts +5 -0
- package/src/components/composites/workspace-switcher/workspace-switcher.tsx +128 -0
- package/src/components/layout/shell-rail/index.ts +1 -0
- package/src/components/layout/shell-rail/shell-rail.tsx +120 -0
- package/src/components/layout/shell-top-bar/index.ts +1 -0
- package/src/components/layout/shell-top-bar/shell-top-bar.tsx +185 -0
- package/src/index.ts +5 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
//#region src/components/composites/icon-picker/image-data-url.ts
|
|
2
|
+
/**
|
|
3
|
+
* Turning an uploaded picture into the small square mark a workspace stores.
|
|
4
|
+
*
|
|
5
|
+
* The mark travels with the workspace record (it is shown in every list the
|
|
6
|
+
* workspace appears in), so it is resized to a fixed square and re-encoded
|
|
7
|
+
* before it leaves the browser rather than stored as the user's original file.
|
|
8
|
+
* Re-encoding also drops metadata and any embedded script an SVG could carry:
|
|
9
|
+
* only raster images are accepted and the result is always a `data:image/webp`
|
|
10
|
+
* or `data:image/png` URL.
|
|
11
|
+
*/
|
|
12
|
+
/** The edge, in pixels, of the stored square. 2x the largest tile the apps draw. */
|
|
13
|
+
var MARK_IMAGE_SIZE = 128;
|
|
14
|
+
/** The largest source file read, before resizing. */
|
|
15
|
+
var MARK_IMAGE_MAX_SOURCE_BYTES = 8388608;
|
|
16
|
+
/** The largest encoded result kept; a stored mark never exceeds this many characters. */
|
|
17
|
+
var MARK_IMAGE_MAX_DATA_URL_LENGTH = 49152;
|
|
18
|
+
var ACCEPTED_TYPES = /* @__PURE__ */ new Set([
|
|
19
|
+
"image/png",
|
|
20
|
+
"image/jpeg",
|
|
21
|
+
"image/webp",
|
|
22
|
+
"image/gif"
|
|
23
|
+
]);
|
|
24
|
+
/** Thrown by {@link markImageFromFile}; `problem` keys {@link markImageProblemCopy}. */
|
|
25
|
+
var MarkImageError = class extends Error {
|
|
26
|
+
problem;
|
|
27
|
+
constructor(problem) {
|
|
28
|
+
super(problem);
|
|
29
|
+
this.name = "MarkImageError";
|
|
30
|
+
this.problem = problem;
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
var markImageProblemCopy = {
|
|
34
|
+
type: "Choose a PNG, JPEG, WebP or GIF image.",
|
|
35
|
+
size: "That image is larger than 8 MB. Choose a smaller one.",
|
|
36
|
+
unreadable: "That image could not be read. Try a different file.",
|
|
37
|
+
"too-large": "That image is too detailed to store as a mark. Try a simpler one."
|
|
38
|
+
};
|
|
39
|
+
/** Whether a stored value is a mark image this module could have produced. */
|
|
40
|
+
function isMarkImageDataUrl(value) {
|
|
41
|
+
return typeof value === "string" && value.length <= 49152 && /^data:image\/(?:webp|png);base64,[A-Za-z0-9+/]+={0,2}$/.test(value);
|
|
42
|
+
}
|
|
43
|
+
/** Pre-flight checks that need no decoding; `undefined` means the file may be read. */
|
|
44
|
+
function checkMarkImageFile(file) {
|
|
45
|
+
if (!ACCEPTED_TYPES.has(file.type)) return "type";
|
|
46
|
+
if (file.size > 8388608) return "size";
|
|
47
|
+
}
|
|
48
|
+
/** The source rectangle of the largest centred square, so the mark is a cover crop. */
|
|
49
|
+
function centredSquare(width, height) {
|
|
50
|
+
const side = Math.min(width, height);
|
|
51
|
+
return {
|
|
52
|
+
x: Math.floor((width - side) / 2),
|
|
53
|
+
y: Math.floor((height - side) / 2),
|
|
54
|
+
side
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Resize an image file to the stored mark. Rejects with a {@link MarkImageError}
|
|
59
|
+
* so the caller can show `markImageProblemCopy[error.problem]`.
|
|
60
|
+
*/
|
|
61
|
+
async function markImageFromFile(file) {
|
|
62
|
+
const problem = checkMarkImageFile(file);
|
|
63
|
+
if (problem) throw new MarkImageError(problem);
|
|
64
|
+
let bitmap;
|
|
65
|
+
try {
|
|
66
|
+
bitmap = await createImageBitmap(file);
|
|
67
|
+
} catch {
|
|
68
|
+
throw new MarkImageError("unreadable");
|
|
69
|
+
}
|
|
70
|
+
try {
|
|
71
|
+
const canvas = document.createElement("canvas");
|
|
72
|
+
canvas.width = 128;
|
|
73
|
+
canvas.height = 128;
|
|
74
|
+
const context = canvas.getContext("2d");
|
|
75
|
+
if (!context) throw new MarkImageError("unreadable");
|
|
76
|
+
const crop = centredSquare(bitmap.width, bitmap.height);
|
|
77
|
+
context.drawImage(bitmap, crop.x, crop.y, crop.side, crop.side, 0, 0, 128, 128);
|
|
78
|
+
for (const type of ["image/webp", "image/png"]) {
|
|
79
|
+
const url = canvas.toDataURL(type, .85);
|
|
80
|
+
if (url.startsWith(`data:${type}`) && isMarkImageDataUrl(url)) return url;
|
|
81
|
+
}
|
|
82
|
+
throw new MarkImageError("too-large");
|
|
83
|
+
} finally {
|
|
84
|
+
bitmap.close();
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
//#endregion
|
|
88
|
+
export { MARK_IMAGE_MAX_DATA_URL_LENGTH, MARK_IMAGE_MAX_SOURCE_BYTES, MARK_IMAGE_SIZE, MarkImageError, centredSquare, checkMarkImageFile, isMarkImageDataUrl, markImageFromFile, markImageProblemCopy };
|
|
89
|
+
|
|
90
|
+
//# sourceMappingURL=image-data-url.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image-data-url.js","names":[],"sources":["../../../../src/components/composites/icon-picker/image-data-url.ts"],"sourcesContent":["/**\n * Turning an uploaded picture into the small square mark a workspace stores.\n *\n * The mark travels with the workspace record (it is shown in every list the\n * workspace appears in), so it is resized to a fixed square and re-encoded\n * before it leaves the browser rather than stored as the user's original file.\n * Re-encoding also drops metadata and any embedded script an SVG could carry:\n * only raster images are accepted and the result is always a `data:image/webp`\n * or `data:image/png` URL.\n */\n\n/** The edge, in pixels, of the stored square. 2x the largest tile the apps draw. */\nexport const MARK_IMAGE_SIZE = 128\n/** The largest source file read, before resizing. */\nexport const MARK_IMAGE_MAX_SOURCE_BYTES = 8 * 1024 * 1024\n/** The largest encoded result kept; a stored mark never exceeds this many characters. */\nexport const MARK_IMAGE_MAX_DATA_URL_LENGTH = 48 * 1024\n\nconst ACCEPTED_TYPES = new Set(['image/png', 'image/jpeg', 'image/webp', 'image/gif'])\n\nexport type MarkImageProblem = 'type' | 'size' | 'unreadable' | 'too-large'\n\n/** Thrown by {@link markImageFromFile}; `problem` keys {@link markImageProblemCopy}. */\nexport class MarkImageError extends Error {\n readonly problem: MarkImageProblem\n constructor(problem: MarkImageProblem) {\n super(problem)\n this.name = 'MarkImageError'\n this.problem = problem\n }\n}\n\nexport const markImageProblemCopy: Readonly<Record<MarkImageProblem, string>> = {\n type: 'Choose a PNG, JPEG, WebP or GIF image.',\n size: 'That image is larger than 8 MB. Choose a smaller one.',\n unreadable: 'That image could not be read. Try a different file.',\n 'too-large': 'That image is too detailed to store as a mark. Try a simpler one.',\n}\n\n/** Whether a stored value is a mark image this module could have produced. */\nexport function isMarkImageDataUrl(value: unknown): value is string {\n return (\n typeof value === 'string' &&\n value.length <= MARK_IMAGE_MAX_DATA_URL_LENGTH &&\n /^data:image\\/(?:webp|png);base64,[A-Za-z0-9+/]+={0,2}$/.test(value)\n )\n}\n\n/** Pre-flight checks that need no decoding; `undefined` means the file may be read. */\nexport function checkMarkImageFile(\n file: Readonly<{ type: string; size: number }>\n): MarkImageProblem | undefined {\n if (!ACCEPTED_TYPES.has(file.type)) return 'type'\n if (file.size > MARK_IMAGE_MAX_SOURCE_BYTES) return 'size'\n return undefined\n}\n\n/** The source rectangle of the largest centred square, so the mark is a cover crop. */\nexport function centredSquare(\n width: number,\n height: number\n): Readonly<{ x: number; y: number; side: number }> {\n const side = Math.min(width, height)\n return { x: Math.floor((width - side) / 2), y: Math.floor((height - side) / 2), side }\n}\n\n/**\n * Resize an image file to the stored mark. Rejects with a {@link MarkImageError}\n * so the caller can show `markImageProblemCopy[error.problem]`.\n */\nexport async function markImageFromFile(file: File): Promise<string> {\n const problem = checkMarkImageFile(file)\n if (problem) throw new MarkImageError(problem)\n let bitmap: ImageBitmap\n try {\n bitmap = await createImageBitmap(file)\n } catch {\n throw new MarkImageError('unreadable')\n }\n try {\n const canvas = document.createElement('canvas')\n canvas.width = MARK_IMAGE_SIZE\n canvas.height = MARK_IMAGE_SIZE\n const context = canvas.getContext('2d')\n if (!context) throw new MarkImageError('unreadable')\n const crop = centredSquare(bitmap.width, bitmap.height)\n context.drawImage(\n bitmap,\n crop.x,\n crop.y,\n crop.side,\n crop.side,\n 0,\n 0,\n MARK_IMAGE_SIZE,\n MARK_IMAGE_SIZE\n )\n // WebP where the browser can encode it; PNG is the always-available fallback.\n for (const type of ['image/webp', 'image/png']) {\n const url = canvas.toDataURL(type, 0.85)\n if (url.startsWith(`data:${type}`) && isMarkImageDataUrl(url)) return url\n }\n throw new MarkImageError('too-large')\n } finally {\n bitmap.close()\n }\n}\n"],"mappings":";;;;;;;;;;;;AAYA,IAAa,kBAAkB;;AAE/B,IAAa,8BAA8B;;AAE3C,IAAa,iCAAiC;AAE9C,IAAM,iCAAiB,IAAI,IAAI;CAAC;CAAa;CAAc;CAAc;AAAW,CAAC;;AAKrF,IAAa,iBAAb,cAAoC,MAAM;CACxC;CACA,YAAY,SAA2B;EACrC,MAAM,OAAO;EACb,KAAK,OAAO;EACZ,KAAK,UAAU;CACjB;AACF;AAEA,IAAa,uBAAmE;CAC9E,MAAM;CACN,MAAM;CACN,YAAY;CACZ,aAAa;AACf;;AAGA,SAAgB,mBAAmB,OAAiC;CAClE,OACE,OAAO,UAAU,YACjB,MAAM,UAAA,SACN,yDAAyD,KAAK,KAAK;AAEvE;;AAGA,SAAgB,mBACd,MAC8B;CAC9B,IAAI,CAAC,eAAe,IAAI,KAAK,IAAI,GAAG,OAAO;CAC3C,IAAI,KAAK,OAAA,SAAoC,OAAO;AAEtD;;AAGA,SAAgB,cACd,OACA,QACkD;CAClD,MAAM,OAAO,KAAK,IAAI,OAAO,MAAM;CACnC,OAAO;EAAE,GAAG,KAAK,OAAO,QAAQ,QAAQ,CAAC;EAAG,GAAG,KAAK,OAAO,SAAS,QAAQ,CAAC;EAAG;CAAK;AACvF;;;;;AAMA,eAAsB,kBAAkB,MAA6B;CACnE,MAAM,UAAU,mBAAmB,IAAI;CACvC,IAAI,SAAS,MAAM,IAAI,eAAe,OAAO;CAC7C,IAAI;CACJ,IAAI;EACF,SAAS,MAAM,kBAAkB,IAAI;CACvC,QAAQ;EACN,MAAM,IAAI,eAAe,YAAY;CACvC;CACA,IAAI;EACF,MAAM,SAAS,SAAS,cAAc,QAAQ;EAC9C,OAAO,QAAA;EACP,OAAO,SAAA;EACP,MAAM,UAAU,OAAO,WAAW,IAAI;EACtC,IAAI,CAAC,SAAS,MAAM,IAAI,eAAe,YAAY;EACnD,MAAM,OAAO,cAAc,OAAO,OAAO,OAAO,MAAM;EACtD,QAAQ,UACN,QACA,KAAK,GACL,KAAK,GACL,KAAK,MACL,KAAK,MACL,GACA,GAAA,KAAA,GAGF;EAEA,KAAK,MAAM,QAAQ,CAAC,cAAc,WAAW,GAAG;GAC9C,MAAM,MAAM,OAAO,UAAU,MAAM,GAAI;GACvC,IAAI,IAAI,WAAW,QAAQ,MAAM,KAAK,mBAAmB,GAAG,GAAG,OAAO;EACxE;EACA,MAAM,IAAI,eAAe,WAAW;CACtC,UAAU;EACR,OAAO,MAAM;CACf;AACF"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { IconPicker, IconPickerDropdown, type IconPickerDropdownProps, type IconPickerProps, } from './icon-picker';
|
|
2
|
+
export { MARK_IMAGE_MAX_DATA_URL_LENGTH, MARK_IMAGE_MAX_SOURCE_BYTES, MARK_IMAGE_SIZE, MarkImageError, centredSquare, checkMarkImageFile, isMarkImageDataUrl, markImageFromFile, markImageProblemCopy, type MarkImageProblem, } from './image-data-url';
|
|
3
|
+
export { isShellIconKey, resolveShellIcon, shellIconEntries, shellIconLabel, type ShellIconKey, } from './shell-icons';
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/composites/icon-picker/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,kBAAkB,EAClB,KAAK,uBAAuB,EAC5B,KAAK,eAAe,GACrB,MAAM,eAAe,CAAA;AACtB,OAAO,EACL,8BAA8B,EAC9B,2BAA2B,EAC3B,eAAe,EACf,cAAc,EACd,aAAa,EACb,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,oBAAoB,EACpB,KAAK,gBAAgB,GACtB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACd,KAAK,YAAY,GAClB,MAAM,eAAe,CAAA"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { MARK_IMAGE_MAX_DATA_URL_LENGTH, MARK_IMAGE_MAX_SOURCE_BYTES, MARK_IMAGE_SIZE, MarkImageError, centredSquare, checkMarkImageFile, isMarkImageDataUrl, markImageFromFile, markImageProblemCopy } from "./image-data-url.js";
|
|
2
|
+
import { isShellIconKey, resolveShellIcon, shellIconEntries, shellIconLabel } from "./shell-icons.js";
|
|
3
|
+
import { IconPicker, IconPickerDropdown } from "./icon-picker.js";
|
|
4
|
+
export { IconPicker, IconPickerDropdown, MARK_IMAGE_MAX_DATA_URL_LENGTH, MARK_IMAGE_MAX_SOURCE_BYTES, MARK_IMAGE_SIZE, MarkImageError, centredSquare, checkMarkImageFile, isMarkImageDataUrl, isShellIconKey, markImageFromFile, markImageProblemCopy, resolveShellIcon, shellIconEntries, shellIconLabel };
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
import { type LucideIcon } from 'lucide-solid';
|
|
2
|
+
/**
|
|
3
|
+
* The icons a workspace or a project may choose for itself.
|
|
4
|
+
*
|
|
5
|
+
* A curated set rather than the whole Lucide catalogue, for two reasons the
|
|
6
|
+
* picker depends on: the keys are persisted, so each one is a promise that the
|
|
7
|
+
* glyph keeps existing, and every icon here is imported by name so a consumer's
|
|
8
|
+
* bundle pays for these few dozen glyphs and not for the library.
|
|
9
|
+
*
|
|
10
|
+
* `home`, `box` and `folder` lead the list because they are the defaults the
|
|
11
|
+
* apps already use: Home workspaces carry `home`, other workspaces `box` and
|
|
12
|
+
* projects `folder`. Keys are lowercase kebab-case so they are valid project
|
|
13
|
+
* `iconKey`s as well as workspace logo values.
|
|
14
|
+
*/
|
|
15
|
+
export declare const shellIconEntries: readonly [{
|
|
16
|
+
readonly key: 'home';
|
|
17
|
+
readonly label: 'Home';
|
|
18
|
+
readonly icon: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
|
|
19
|
+
}, {
|
|
20
|
+
readonly key: 'box';
|
|
21
|
+
readonly label: 'Box';
|
|
22
|
+
readonly icon: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
|
|
23
|
+
}, {
|
|
24
|
+
readonly key: 'folder';
|
|
25
|
+
readonly label: 'Folder';
|
|
26
|
+
readonly icon: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
|
|
27
|
+
}, {
|
|
28
|
+
readonly key: 'git-folder';
|
|
29
|
+
readonly label: 'Repository';
|
|
30
|
+
readonly icon: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
|
|
31
|
+
}, {
|
|
32
|
+
readonly key: 'briefcase';
|
|
33
|
+
readonly label: 'Briefcase';
|
|
34
|
+
readonly icon: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
|
|
35
|
+
}, {
|
|
36
|
+
readonly key: 'building';
|
|
37
|
+
readonly label: 'Building';
|
|
38
|
+
readonly icon: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
|
|
39
|
+
}, {
|
|
40
|
+
readonly key: 'users';
|
|
41
|
+
readonly label: 'Team';
|
|
42
|
+
readonly icon: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
|
|
43
|
+
}, {
|
|
44
|
+
readonly key: 'rocket';
|
|
45
|
+
readonly label: 'Rocket';
|
|
46
|
+
readonly icon: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
|
|
47
|
+
}, {
|
|
48
|
+
readonly key: 'star';
|
|
49
|
+
readonly label: 'Star';
|
|
50
|
+
readonly icon: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
|
|
51
|
+
}, {
|
|
52
|
+
readonly key: 'heart';
|
|
53
|
+
readonly label: 'Heart';
|
|
54
|
+
readonly icon: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
|
|
55
|
+
}, {
|
|
56
|
+
readonly key: 'code';
|
|
57
|
+
readonly label: 'Code';
|
|
58
|
+
readonly icon: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
|
|
59
|
+
}, {
|
|
60
|
+
readonly key: 'terminal';
|
|
61
|
+
readonly label: 'Terminal';
|
|
62
|
+
readonly icon: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
|
|
63
|
+
}, {
|
|
64
|
+
readonly key: 'cpu';
|
|
65
|
+
readonly label: 'Chip';
|
|
66
|
+
readonly icon: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
|
|
67
|
+
}, {
|
|
68
|
+
readonly key: 'server';
|
|
69
|
+
readonly label: 'Server';
|
|
70
|
+
readonly icon: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
|
|
71
|
+
}, {
|
|
72
|
+
readonly key: 'database';
|
|
73
|
+
readonly label: 'Database';
|
|
74
|
+
readonly icon: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
|
|
75
|
+
}, {
|
|
76
|
+
readonly key: 'cloud';
|
|
77
|
+
readonly label: 'Cloud';
|
|
78
|
+
readonly icon: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
|
|
79
|
+
}, {
|
|
80
|
+
readonly key: 'globe';
|
|
81
|
+
readonly label: 'Globe';
|
|
82
|
+
readonly icon: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
|
|
83
|
+
}, {
|
|
84
|
+
readonly key: 'bot';
|
|
85
|
+
readonly label: 'Agent';
|
|
86
|
+
readonly icon: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
|
|
87
|
+
}, {
|
|
88
|
+
readonly key: 'brain';
|
|
89
|
+
readonly label: 'Brain';
|
|
90
|
+
readonly icon: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
|
|
91
|
+
}, {
|
|
92
|
+
readonly key: 'sparkles';
|
|
93
|
+
readonly label: 'Sparkles';
|
|
94
|
+
readonly icon: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
|
|
95
|
+
}, {
|
|
96
|
+
readonly key: 'lightbulb';
|
|
97
|
+
readonly label: 'Idea';
|
|
98
|
+
readonly icon: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
|
|
99
|
+
}, {
|
|
100
|
+
readonly key: 'flask';
|
|
101
|
+
readonly label: 'Lab';
|
|
102
|
+
readonly icon: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
|
|
103
|
+
}, {
|
|
104
|
+
readonly key: 'book';
|
|
105
|
+
readonly label: 'Book';
|
|
106
|
+
readonly icon: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
|
|
107
|
+
}, {
|
|
108
|
+
readonly key: 'graduation';
|
|
109
|
+
readonly label: 'Study';
|
|
110
|
+
readonly icon: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
|
|
111
|
+
}, {
|
|
112
|
+
readonly key: 'newspaper';
|
|
113
|
+
readonly label: 'News';
|
|
114
|
+
readonly icon: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
|
|
115
|
+
}, {
|
|
116
|
+
readonly key: 'megaphone';
|
|
117
|
+
readonly label: 'Marketing';
|
|
118
|
+
readonly icon: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
|
|
119
|
+
}, {
|
|
120
|
+
readonly key: 'chart';
|
|
121
|
+
readonly label: 'Chart';
|
|
122
|
+
readonly icon: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
|
|
123
|
+
}, {
|
|
124
|
+
readonly key: 'wallet';
|
|
125
|
+
readonly label: 'Finance';
|
|
126
|
+
readonly icon: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
|
|
127
|
+
}, {
|
|
128
|
+
readonly key: 'cart';
|
|
129
|
+
readonly label: 'Shop';
|
|
130
|
+
readonly icon: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
|
|
131
|
+
}, {
|
|
132
|
+
readonly key: 'package';
|
|
133
|
+
readonly label: 'Package';
|
|
134
|
+
readonly icon: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
|
|
135
|
+
}, {
|
|
136
|
+
readonly key: 'layers';
|
|
137
|
+
readonly label: 'Layers';
|
|
138
|
+
readonly icon: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
|
|
139
|
+
}, {
|
|
140
|
+
readonly key: 'puzzle';
|
|
141
|
+
readonly label: 'Puzzle';
|
|
142
|
+
readonly icon: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
|
|
143
|
+
}, {
|
|
144
|
+
readonly key: 'shield';
|
|
145
|
+
readonly label: 'Security';
|
|
146
|
+
readonly icon: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
|
|
147
|
+
}, {
|
|
148
|
+
readonly key: 'key';
|
|
149
|
+
readonly label: 'Key';
|
|
150
|
+
readonly icon: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
|
|
151
|
+
}, {
|
|
152
|
+
readonly key: 'wrench';
|
|
153
|
+
readonly label: 'Tools';
|
|
154
|
+
readonly icon: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
|
|
155
|
+
}, {
|
|
156
|
+
readonly key: 'hammer';
|
|
157
|
+
readonly label: 'Build';
|
|
158
|
+
readonly icon: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
|
|
159
|
+
}, {
|
|
160
|
+
readonly key: 'zap';
|
|
161
|
+
readonly label: 'Bolt';
|
|
162
|
+
readonly icon: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
|
|
163
|
+
}, {
|
|
164
|
+
readonly key: 'flame';
|
|
165
|
+
readonly label: 'Flame';
|
|
166
|
+
readonly icon: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
|
|
167
|
+
}, {
|
|
168
|
+
readonly key: 'target';
|
|
169
|
+
readonly label: 'Target';
|
|
170
|
+
readonly icon: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
|
|
171
|
+
}, {
|
|
172
|
+
readonly key: 'trophy';
|
|
173
|
+
readonly label: 'Trophy';
|
|
174
|
+
readonly icon: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
|
|
175
|
+
}, {
|
|
176
|
+
readonly key: 'flag';
|
|
177
|
+
readonly label: 'Flag';
|
|
178
|
+
readonly icon: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
|
|
179
|
+
}, {
|
|
180
|
+
readonly key: 'compass';
|
|
181
|
+
readonly label: 'Compass';
|
|
182
|
+
readonly icon: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
|
|
183
|
+
}, {
|
|
184
|
+
readonly key: 'map';
|
|
185
|
+
readonly label: 'Map';
|
|
186
|
+
readonly icon: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
|
|
187
|
+
}, {
|
|
188
|
+
readonly key: 'plane';
|
|
189
|
+
readonly label: 'Travel';
|
|
190
|
+
readonly icon: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
|
|
191
|
+
}, {
|
|
192
|
+
readonly key: 'anchor';
|
|
193
|
+
readonly label: 'Anchor';
|
|
194
|
+
readonly icon: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
|
|
195
|
+
}, {
|
|
196
|
+
readonly key: 'mountain';
|
|
197
|
+
readonly label: 'Mountain';
|
|
198
|
+
readonly icon: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
|
|
199
|
+
}, {
|
|
200
|
+
readonly key: 'leaf';
|
|
201
|
+
readonly label: 'Garden';
|
|
202
|
+
readonly icon: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
|
|
203
|
+
}, {
|
|
204
|
+
readonly key: 'sun';
|
|
205
|
+
readonly label: 'Sun';
|
|
206
|
+
readonly icon: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
|
|
207
|
+
}, {
|
|
208
|
+
readonly key: 'moon';
|
|
209
|
+
readonly label: 'Moon';
|
|
210
|
+
readonly icon: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
|
|
211
|
+
}, {
|
|
212
|
+
readonly key: 'palette';
|
|
213
|
+
readonly label: 'Design';
|
|
214
|
+
readonly icon: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
|
|
215
|
+
}, {
|
|
216
|
+
readonly key: 'camera';
|
|
217
|
+
readonly label: 'Camera';
|
|
218
|
+
readonly icon: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
|
|
219
|
+
}, {
|
|
220
|
+
readonly key: 'music';
|
|
221
|
+
readonly label: 'Music';
|
|
222
|
+
readonly icon: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
|
|
223
|
+
}, {
|
|
224
|
+
readonly key: 'gamepad';
|
|
225
|
+
readonly label: 'Games';
|
|
226
|
+
readonly icon: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
|
|
227
|
+
}, {
|
|
228
|
+
readonly key: 'coffee';
|
|
229
|
+
readonly label: 'Coffee';
|
|
230
|
+
readonly icon: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
|
|
231
|
+
}, {
|
|
232
|
+
readonly key: 'utensils';
|
|
233
|
+
readonly label: 'Kitchen';
|
|
234
|
+
readonly icon: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
|
|
235
|
+
}, {
|
|
236
|
+
readonly key: 'dumbbell';
|
|
237
|
+
readonly label: 'Gym';
|
|
238
|
+
readonly icon: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
|
|
239
|
+
}, {
|
|
240
|
+
readonly key: 'gem';
|
|
241
|
+
readonly label: 'Gem';
|
|
242
|
+
readonly icon: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
|
|
243
|
+
}, {
|
|
244
|
+
readonly key: 'messages';
|
|
245
|
+
readonly label: 'Chat';
|
|
246
|
+
readonly icon: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
|
|
247
|
+
}, {
|
|
248
|
+
readonly key: 'shapes';
|
|
249
|
+
readonly label: 'Shapes';
|
|
250
|
+
readonly icon: (props: import("lucide-solid").LucideProps) => import("solid-js").JSX.Element;
|
|
251
|
+
}];
|
|
252
|
+
export type ShellIconKey = (typeof shellIconEntries)[number]['key'];
|
|
253
|
+
/** Whether a stored string names an icon in the curated set. */
|
|
254
|
+
export declare function isShellIconKey(value: string): value is ShellIconKey;
|
|
255
|
+
/**
|
|
256
|
+
* The glyph for a stored key, or `fallback` when the key is not in the set.
|
|
257
|
+
* Callers pass the fallback their surface wants (a workspace falls back to
|
|
258
|
+
* `box`, a project to `folder`), so an unknown key degrades to the default
|
|
259
|
+
* rather than to an empty tile.
|
|
260
|
+
*/
|
|
261
|
+
export declare function resolveShellIcon(key: string | null | undefined, fallback?: ShellIconKey): LucideIcon;
|
|
262
|
+
/** The picker's accessible name for a key. */
|
|
263
|
+
export declare function shellIconLabel(key: string): string;
|
|
264
|
+
//# sourceMappingURL=shell-icons.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shell-icons.d.ts","sourceRoot":"","sources":["../../../../src/components/composites/icon-picker/shell-icons.ts"],"names":[],"mappings":"AAAA,OAAO,EAiCL,KAAK,UAAU,EA4BhB,MAAM,cAAc,CAAA;AAErB;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,gBAAgB;kBACpB,MAAM;oBAAS,MAAM;;;kBACrB,KAAK;oBAAS,KAAK;;;kBACnB,QAAQ;oBAAS,QAAQ;;;kBACzB,YAAY;oBAAS,YAAY;;;kBACjC,WAAW;oBAAS,WAAW;;;kBAC/B,UAAU;oBAAS,UAAU;;;kBAC7B,OAAO;oBAAS,MAAM;;;kBACtB,QAAQ;oBAAS,QAAQ;;;kBACzB,MAAM;oBAAS,MAAM;;;kBACrB,OAAO;oBAAS,OAAO;;;kBACvB,MAAM;oBAAS,MAAM;;;kBACrB,UAAU;oBAAS,UAAU;;;kBAC7B,KAAK;oBAAS,MAAM;;;kBACpB,QAAQ;oBAAS,QAAQ;;;kBACzB,UAAU;oBAAS,UAAU;;;kBAC7B,OAAO;oBAAS,OAAO;;;kBACvB,OAAO;oBAAS,OAAO;;;kBACvB,KAAK;oBAAS,OAAO;;;kBACrB,OAAO;oBAAS,OAAO;;;kBACvB,UAAU;oBAAS,UAAU;;;kBAC7B,WAAW;oBAAS,MAAM;;;kBAC1B,OAAO;oBAAS,KAAK;;;kBACrB,MAAM;oBAAS,MAAM;;;kBACrB,YAAY;oBAAS,OAAO;;;kBAC5B,WAAW;oBAAS,MAAM;;;kBAC1B,WAAW;oBAAS,WAAW;;;kBAC/B,OAAO;oBAAS,OAAO;;;kBACvB,QAAQ;oBAAS,SAAS;;;kBAC1B,MAAM;oBAAS,MAAM;;;kBACrB,SAAS;oBAAS,SAAS;;;kBAC3B,QAAQ;oBAAS,QAAQ;;;kBACzB,QAAQ;oBAAS,QAAQ;;;kBACzB,QAAQ;oBAAS,UAAU;;;kBAC3B,KAAK;oBAAS,KAAK;;;kBACnB,QAAQ;oBAAS,OAAO;;;kBACxB,QAAQ;oBAAS,OAAO;;;kBACxB,KAAK;oBAAS,MAAM;;;kBACpB,OAAO;oBAAS,OAAO;;;kBACvB,QAAQ;oBAAS,QAAQ;;;kBACzB,QAAQ;oBAAS,QAAQ;;;kBACzB,MAAM;oBAAS,MAAM;;;kBACrB,SAAS;oBAAS,SAAS;;;kBAC3B,KAAK;oBAAS,KAAK;;;kBACnB,OAAO;oBAAS,QAAQ;;;kBACxB,QAAQ;oBAAS,QAAQ;;;kBACzB,UAAU;oBAAS,UAAU;;;kBAC7B,MAAM;oBAAS,QAAQ;;;kBACvB,KAAK;oBAAS,KAAK;;;kBACnB,MAAM;oBAAS,MAAM;;;kBACrB,SAAS;oBAAS,QAAQ;;;kBAC1B,QAAQ;oBAAS,QAAQ;;;kBACzB,OAAO;oBAAS,OAAO;;;kBACvB,SAAS;oBAAS,OAAO;;;kBACzB,QAAQ;oBAAS,QAAQ;;;kBACzB,UAAU;oBAAS,SAAS;;;kBAC5B,UAAU;oBAAS,KAAK;;;kBACxB,KAAK;oBAAS,KAAK;;;kBACnB,UAAU;oBAAS,MAAM;;;kBACzB,QAAQ;oBAAS,QAAQ;;EACwD,CAAA;AAE1F,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,CAAA;AAMnE,gEAAgE;AAChE,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,YAAY,CAEnE;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAC9B,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAC9B,QAAQ,GAAE,YAAuB,GAChC,UAAU,CAEZ;AAED,8CAA8C;AAC9C,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAElD"}
|