@pollinations/ui 0.1.0-alpha.1 → 0.1.0-alpha.3
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/README.md +137 -36
- package/dist/Button-CO3Dpbkj.d.cts +29 -0
- package/dist/Button-CO3Dpbkj.d.ts +29 -0
- package/dist/Chip-v-ADv6cz.d.cts +18 -0
- package/dist/Chip-v-ADv6cz.d.ts +18 -0
- package/dist/Dialog-yXzIFrDg.d.cts +63 -0
- package/dist/Dialog-yXzIFrDg.d.ts +63 -0
- package/dist/app-user-menu/sdk.cjs +631 -235
- package/dist/app-user-menu/sdk.cjs.map +1 -1
- package/dist/app-user-menu/sdk.d.cts +6 -7
- package/dist/app-user-menu/sdk.d.ts +6 -7
- package/dist/app-user-menu/sdk.js +639 -236
- package/dist/app-user-menu/sdk.js.map +1 -1
- package/dist/app.css +6 -122
- package/dist/auth/index.cjs +1346 -76
- package/dist/auth/index.cjs.map +1 -1
- package/dist/auth/index.d.cts +88 -6
- package/dist/auth/index.d.ts +88 -6
- package/dist/auth/index.js +1343 -75
- package/dist/auth/index.js.map +1 -1
- package/dist/auth/sdk.cjs +239 -0
- package/dist/auth/sdk.cjs.map +1 -0
- package/dist/auth/sdk.d.cts +40 -0
- package/dist/auth/sdk.d.ts +40 -0
- package/dist/auth/sdk.js +208 -0
- package/dist/auth/sdk.js.map +1 -0
- package/dist/brand/lockup-horizontal-black.png +0 -0
- package/dist/brand/lockup-horizontal-black.svg +4 -0
- package/dist/brand/lockup-horizontal-white.png +0 -0
- package/dist/brand/lockup-horizontal-white.svg +4 -0
- package/dist/brand/lockup-horizontal.svg +1 -0
- package/dist/brand/lockup-stacked-black.png +0 -0
- package/dist/brand/lockup-stacked-black.svg +4 -0
- package/dist/brand/lockup-stacked-white.png +0 -0
- package/dist/brand/lockup-stacked-white.svg +4 -0
- package/dist/brand/lockup-stacked.svg +4 -0
- package/dist/brand/mark-black.png +0 -0
- package/dist/brand/mark-black.svg +3 -0
- package/dist/brand/mark-white.png +0 -0
- package/dist/brand/mark-white.svg +3 -0
- package/dist/brand/mark.svg +1 -0
- package/dist/brand/polli/polli-lockup-horizontal-black.png +0 -0
- package/dist/brand/polli/polli-lockup-horizontal-white.png +0 -0
- package/dist/brand/polli/polli-lockup-stacked-black.png +0 -0
- package/dist/brand/polli/polli-lockup-stacked-white.png +0 -0
- package/dist/brand/polli/polli.png +0 -0
- package/dist/brand/wordmark-black.png +0 -0
- package/dist/brand/wordmark-black.svg +1 -0
- package/dist/brand/wordmark-white.png +0 -0
- package/dist/brand/wordmark-white.svg +1 -0
- package/dist/brand/wordmark.svg +1 -0
- package/dist/fonts/geist-pixel-square.woff2 +0 -0
- package/dist/gen/index.cjs +395 -214
- package/dist/gen/index.cjs.map +1 -1
- package/dist/gen/index.d.cts +64 -19
- package/dist/gen/index.d.ts +64 -19
- package/dist/gen/index.js +391 -212
- package/dist/gen/index.js.map +1 -1
- package/dist/index.browser.min.js +2 -0
- package/dist/index.browser.min.js.map +1 -0
- package/dist/index.cjs +3464 -1559
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +498 -174
- package/dist/index.d.ts +498 -174
- package/dist/index.js +3518 -1671
- package/dist/index.js.map +1 -1
- package/dist/licenses/Geist-OFL.txt +93 -0
- package/dist/markdown.cjs +821 -0
- package/dist/markdown.cjs.map +1 -0
- package/dist/markdown.d.cts +16 -0
- package/dist/markdown.d.ts +16 -0
- package/dist/markdown.js +792 -0
- package/dist/markdown.js.map +1 -0
- package/dist/styles.css +1 -1
- package/dist/theme.css +92 -0
- package/dist/wallet/index.cjs +255 -42
- package/dist/wallet/index.cjs.map +1 -1
- package/dist/wallet/index.d.cts +29 -7
- package/dist/wallet/index.d.ts +29 -7
- package/dist/wallet/index.js +254 -42
- package/dist/wallet/index.js.map +1 -1
- package/package.json +106 -89
- package/dist/Chip-CQCq34kS.d.cts +0 -20
- package/dist/Chip-Cj4xG7Te.d.ts +0 -20
- package/dist/assets/logo-wordmark.svg +0 -1
- package/dist/assets/logo.svg +0 -4
- package/dist/theme-jRPPBmld.d.cts +0 -20
- package/dist/theme-jRPPBmld.d.ts +0 -20
package/dist/gen/index.cjs
CHANGED
|
@@ -20,11 +20,13 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/modules/gen/index.ts
|
|
21
21
|
var gen_exports = {};
|
|
22
22
|
__export(gen_exports, {
|
|
23
|
-
|
|
23
|
+
ModalityChip: () => ModalityChip,
|
|
24
|
+
ModalityDot: () => ModalityDot,
|
|
25
|
+
ModalityTab: () => ModalityTab,
|
|
26
|
+
ModelAccessIcon: () => ModelAccessIcon,
|
|
24
27
|
ModelSelector: () => ModelSelector,
|
|
25
28
|
categoryLabel: () => categoryLabel,
|
|
26
|
-
|
|
27
|
-
modalityTheme: () => modalityTheme
|
|
29
|
+
getModalityKey: () => getModalityKey
|
|
28
30
|
});
|
|
29
31
|
module.exports = __toCommonJS(gen_exports);
|
|
30
32
|
|
|
@@ -36,66 +38,354 @@ function cn(...inputs) {
|
|
|
36
38
|
return twMerge((0, import_clsx.clsx)(...inputs));
|
|
37
39
|
}
|
|
38
40
|
|
|
39
|
-
// src/primitives/
|
|
41
|
+
// src/primitives/Chip.tsx
|
|
40
42
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
41
|
-
var
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
var chipSizes = {
|
|
44
|
+
icon: "polli:h-5 polli:w-5 polli:p-0 polli:text-xs",
|
|
45
|
+
sm: "polli:h-5 polli:px-2 polli:text-xs",
|
|
46
|
+
md: "polli:h-6 polli:px-2.5 polli:text-sm",
|
|
47
|
+
lg: "polli:h-7 polli:px-3 polli:text-sm"
|
|
45
48
|
};
|
|
46
|
-
var themeClasses = "polli:bg-theme-bg-active polli:text-theme-text-base polli:hover:bg-theme-bg-hover polli:transition-colors";
|
|
47
49
|
var intentClasses = {
|
|
48
|
-
|
|
50
|
+
news: "polli:bg-intent-news-bg-light polli:text-intent-news-text",
|
|
51
|
+
new: "polli:bg-intent-new-bg-light polli:text-intent-new-text",
|
|
52
|
+
free: "polli:bg-intent-free-bg-light polli:text-intent-free-text",
|
|
53
|
+
alpha: "polli:bg-intent-alpha-bg-light polli:text-intent-alpha-text",
|
|
54
|
+
neutral: "polli:bg-ink-100/80 polli:text-ink-900",
|
|
55
|
+
success: "polli:bg-intent-success-bg-bright/15 polli:text-intent-success-text",
|
|
56
|
+
warning: "polli:bg-intent-warning-bg-light polli:text-intent-warning-text",
|
|
57
|
+
info: "polli:bg-intent-info-bg-light polli:text-intent-info-text",
|
|
58
|
+
danger: "polli:bg-intent-danger-bg-light polli:text-intent-danger-text"
|
|
59
|
+
};
|
|
60
|
+
var Chip = ({
|
|
61
|
+
intent,
|
|
62
|
+
size = "md",
|
|
63
|
+
className,
|
|
64
|
+
children,
|
|
65
|
+
...rest
|
|
66
|
+
}) => {
|
|
67
|
+
const intentClass = intent ? intentClasses[intent] : "polli:bg-theme-bg-active polli:text-theme-text-strong";
|
|
68
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
69
|
+
"span",
|
|
70
|
+
{
|
|
71
|
+
...rest,
|
|
72
|
+
className: cn(
|
|
73
|
+
"polli:inline-flex polli:shrink-0 polli:items-center polli:justify-center polli:gap-1 polli:rounded-lg polli:font-medium polli:leading-none",
|
|
74
|
+
chipSizes[size],
|
|
75
|
+
intentClass,
|
|
76
|
+
className
|
|
77
|
+
),
|
|
78
|
+
children
|
|
79
|
+
}
|
|
80
|
+
);
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
// src/modules/gen/themes.ts
|
|
84
|
+
var MODALITIES = [
|
|
85
|
+
"text",
|
|
86
|
+
"image",
|
|
87
|
+
"video",
|
|
88
|
+
"audio",
|
|
89
|
+
"realtime",
|
|
90
|
+
"embedding"
|
|
91
|
+
];
|
|
92
|
+
function getModalityKey(category) {
|
|
93
|
+
const lower = category.toLowerCase();
|
|
94
|
+
if (lower === "images") return "image";
|
|
95
|
+
if (lower === "embeddings") return "embedding";
|
|
96
|
+
return MODALITIES.includes(lower) ? lower : null;
|
|
97
|
+
}
|
|
98
|
+
var modalityColorVar = (key) => `var(--polli-color-modality-${key})`;
|
|
99
|
+
var modalityBgVar = (key) => `var(--polli-color-modality-${key}-bg)`;
|
|
100
|
+
|
|
101
|
+
// src/modules/gen/ModalityChip.tsx
|
|
102
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
103
|
+
function ModalityChip({
|
|
104
|
+
modality,
|
|
105
|
+
size = "sm",
|
|
106
|
+
className,
|
|
107
|
+
children
|
|
108
|
+
}) {
|
|
109
|
+
const key = getModalityKey(modality);
|
|
110
|
+
if (!key) {
|
|
111
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Chip, { intent: "neutral", size, className, children });
|
|
112
|
+
}
|
|
113
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
114
|
+
Chip,
|
|
115
|
+
{
|
|
116
|
+
size,
|
|
117
|
+
className,
|
|
118
|
+
style: {
|
|
119
|
+
backgroundColor: modalityBgVar(key),
|
|
120
|
+
color: `color-mix(in oklab, ${modalityColorVar(key)} 72%, var(--polli-color-text-strong))`
|
|
121
|
+
},
|
|
122
|
+
children
|
|
123
|
+
}
|
|
124
|
+
);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// src/modules/gen/ModalityDot.tsx
|
|
128
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
129
|
+
function ModalityDot({
|
|
130
|
+
modality,
|
|
131
|
+
className
|
|
132
|
+
}) {
|
|
133
|
+
const key = getModalityKey(modality);
|
|
134
|
+
if (!key) return null;
|
|
135
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
136
|
+
"span",
|
|
137
|
+
{
|
|
138
|
+
"aria-hidden": "true",
|
|
139
|
+
className: cn(
|
|
140
|
+
"polli:inline-block polli:size-2 polli:shrink-0 polli:rounded-full",
|
|
141
|
+
className
|
|
142
|
+
),
|
|
143
|
+
style: { backgroundColor: modalityColorVar(key) }
|
|
144
|
+
}
|
|
145
|
+
);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
// src/primitives/TabButton.tsx
|
|
149
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
150
|
+
var tabButtonBaseClass = "polli-control polli:inline-flex polli:items-center polli:justify-center polli:rounded-full polli:font-medium polli:leading-normal polli:transition-colors polli:duration-200";
|
|
151
|
+
var tabButtonSizeClass = {
|
|
152
|
+
xs: "polli:px-2.5 polli:py-1 polli:text-xs",
|
|
153
|
+
lg: "polli:px-5 polli:py-2 polli:text-lg",
|
|
154
|
+
md: "polli:px-4 polli:py-1.5 polli:text-base",
|
|
155
|
+
sm: "polli:px-3 polli:py-1.5 polli:text-sm"
|
|
156
|
+
};
|
|
157
|
+
var variantClasses = {
|
|
158
|
+
// The default tab look: borderless and monochrome. Selected uses `bg-active`
|
|
159
|
+
// — the same light resting fill as the site's normal buttons. Both states
|
|
160
|
+
// deepen to `bg-hover` and use the theme's hover label color. Non-selected
|
|
161
|
+
// uses the quiet `bg-subtle` token until then.
|
|
162
|
+
soft: {
|
|
163
|
+
base: "",
|
|
164
|
+
active: "polli:bg-theme-bg-active polli:text-theme-text-strong polli:hover:bg-theme-bg-hover polli:hover:text-theme-text-hover",
|
|
165
|
+
inactive: "polli:bg-theme-bg-subtle polli:text-theme-text-base polli:hover:bg-theme-bg-hover polli:hover:text-theme-text-hover"
|
|
166
|
+
},
|
|
167
|
+
// Transparent until hovered or selected — for multi-select toggles and
|
|
168
|
+
// inline rows where a filled idle pill would read as a hard selection.
|
|
169
|
+
ghost: {
|
|
170
|
+
base: "polli:border polli:border-transparent",
|
|
171
|
+
active: "polli:bg-theme-bg-active polli:text-theme-text-strong polli:hover:bg-theme-bg-hover polli:hover:text-theme-text-hover",
|
|
172
|
+
inactive: "polli:bg-transparent polli:text-theme-text-base polli:hover:bg-theme-bg-hover polli:hover:text-theme-text-hover"
|
|
173
|
+
}
|
|
174
|
+
};
|
|
175
|
+
function TabButton({
|
|
176
|
+
as,
|
|
177
|
+
active,
|
|
178
|
+
onClick,
|
|
179
|
+
children,
|
|
180
|
+
size = "md",
|
|
181
|
+
variant = "soft",
|
|
182
|
+
intent,
|
|
183
|
+
ariaLabel,
|
|
184
|
+
disabled = false,
|
|
185
|
+
className,
|
|
186
|
+
...rest
|
|
187
|
+
}) {
|
|
188
|
+
const Component = as || "button";
|
|
189
|
+
const isButton = Component === "button";
|
|
190
|
+
const colors = variantClasses[intent === "neutral" ? "soft" : variant];
|
|
191
|
+
const handleClick = disabled ? (event) => {
|
|
192
|
+
event.preventDefault();
|
|
193
|
+
event.stopPropagation();
|
|
194
|
+
} : onClick;
|
|
195
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
196
|
+
Component,
|
|
197
|
+
{
|
|
198
|
+
...rest,
|
|
199
|
+
...isButton ? { type: "button", disabled } : {},
|
|
200
|
+
...!isButton && disabled ? { "aria-disabled": true, tabIndex: -1 } : {},
|
|
201
|
+
...Component === "a" && disabled ? { href: void 0 } : {},
|
|
202
|
+
onClick: handleClick,
|
|
203
|
+
...ariaLabel !== void 0 ? { "aria-label": ariaLabel } : {},
|
|
204
|
+
...isButton ? { "aria-pressed": active } : { "aria-current": active ? "page" : void 0 },
|
|
205
|
+
className: cn(
|
|
206
|
+
tabButtonBaseClass,
|
|
207
|
+
variantClasses[variant].base,
|
|
208
|
+
active ? colors.active : colors.inactive,
|
|
209
|
+
disabled && "polli:pointer-events-none polli:cursor-not-allowed polli:opacity-50",
|
|
210
|
+
tabButtonSizeClass[size],
|
|
211
|
+
className
|
|
212
|
+
),
|
|
213
|
+
children
|
|
214
|
+
}
|
|
215
|
+
);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
// src/modules/gen/ModalityTab.tsx
|
|
219
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
220
|
+
function ModalityTab({
|
|
221
|
+
active,
|
|
222
|
+
onClick,
|
|
223
|
+
children,
|
|
224
|
+
size = "md",
|
|
225
|
+
disabled = false,
|
|
226
|
+
className,
|
|
227
|
+
...rest
|
|
228
|
+
}) {
|
|
229
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
230
|
+
TabButton,
|
|
231
|
+
{
|
|
232
|
+
...rest,
|
|
233
|
+
active,
|
|
234
|
+
onClick,
|
|
235
|
+
size,
|
|
236
|
+
disabled,
|
|
237
|
+
className,
|
|
238
|
+
children
|
|
239
|
+
}
|
|
240
|
+
);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
// src/primitives/icons/index.tsx
|
|
244
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
245
|
+
var strokeProps = {
|
|
246
|
+
fill: "none",
|
|
247
|
+
stroke: "currentColor",
|
|
248
|
+
strokeWidth: 2,
|
|
249
|
+
strokeLinecap: "round",
|
|
250
|
+
strokeLinejoin: "round"
|
|
251
|
+
};
|
|
252
|
+
function CardIcon(props) {
|
|
253
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
|
|
254
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("rect", { x: "2", y: "5", width: "20", height: "14", rx: "2" }),
|
|
255
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M2 10h20" })
|
|
256
|
+
] });
|
|
257
|
+
}
|
|
258
|
+
function SproutIcon(props) {
|
|
259
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
|
|
260
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M7 20h10" }),
|
|
261
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M10 20c5.5-2.5.8-6.4 3-10" }),
|
|
262
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M9.5 9.4c1.1.8 1.8 2.2 2.3 3.7-2 .4-3.5.4-4.8-.3-1.2-.6-2.3-1.9-3-4.2 2.8-.5 4.4 0 5.5.8z" }),
|
|
263
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d: "M14.1 6a7 7 0 0 0-1.1 4c1.9-.1 3.3-.6 4.3-1.4 1-1 1.6-2.3 1.7-4.6-2.7.1-4 1-4.9 2z" })
|
|
264
|
+
] });
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
// src/modules/gen/ModelAccessIcon.tsx
|
|
268
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
269
|
+
function ModelAccessIcon({
|
|
270
|
+
paidOnly = false,
|
|
271
|
+
className = "polli:h-3.5 polli:w-3.5"
|
|
272
|
+
}) {
|
|
273
|
+
const label = paidOnly ? "Paid Pollen required" : "Works with any Pollen";
|
|
274
|
+
const Icon = paidOnly ? CardIcon : SproutIcon;
|
|
275
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
276
|
+
"span",
|
|
277
|
+
{
|
|
278
|
+
role: "img",
|
|
279
|
+
"aria-label": label,
|
|
280
|
+
title: label,
|
|
281
|
+
className: "polli:inline-flex polli:shrink-0",
|
|
282
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Icon, { className })
|
|
283
|
+
}
|
|
284
|
+
);
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
// src/primitives/Button.tsx
|
|
288
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
289
|
+
var pillSizes = {
|
|
290
|
+
icon: "polli:h-12 polli:w-12 polli:p-0",
|
|
291
|
+
xs: "polli:h-5 polli:px-1.5 polli:py-0 polli:text-[11px] polli:leading-none",
|
|
292
|
+
sm: "polli:min-h-7 polli:px-2 polli:pt-0.5 polli:pb-1",
|
|
293
|
+
md: "polli:min-h-9 polli:px-4 polli:pt-1.5 polli:pb-2",
|
|
294
|
+
lg: "polli:min-h-12 polli:px-6 polli:py-3"
|
|
295
|
+
};
|
|
296
|
+
var raisedSizes = {
|
|
297
|
+
icon: "polli:h-12 polli:w-12 polli:p-0",
|
|
298
|
+
xs: "polli:px-2 polli:py-1 polli:text-xs",
|
|
299
|
+
sm: "polli:px-4 polli:py-2 polli:text-sm",
|
|
300
|
+
md: "polli:px-7 polli:py-3.5 polli:text-base",
|
|
301
|
+
lg: "polli:px-8 polli:py-4 polli:text-lg"
|
|
302
|
+
};
|
|
303
|
+
var appearanceClasses = {
|
|
304
|
+
pill: "polli:rounded-full",
|
|
305
|
+
raised: "polli:rounded-xl polli:border-r-[3px] polli:border-b-[3px] polli:border-solid polli:border-theme-text-strong/20 polli:hover:border-theme-text-strong/45"
|
|
306
|
+
};
|
|
307
|
+
var themeClasses = "polli:bg-theme-bg-active polli:text-theme-text-strong polli:hover:bg-theme-bg-hover polli:hover:text-theme-text-hover polli:transition-colors";
|
|
308
|
+
var outlined = "polli:border polli:border-theme-text-soft polli:bg-surface-white polli:text-theme-text-strong polli:transition-colors polli:[.dark_&]:bg-transparent";
|
|
309
|
+
var intentClasses2 = {
|
|
310
|
+
brand: `${outlined} polli:hover:bg-theme-text-soft/10`,
|
|
311
|
+
commit: `${outlined} polli:hover:border-theme-bg-active polli:hover:bg-theme-bg-active polli:focus-visible:border-theme-bg-active polli:focus-visible:bg-theme-bg-active polli:[.dark_&]:hover:bg-theme-bg-active polli:[.dark_&]:focus-visible:bg-theme-bg-active`,
|
|
312
|
+
danger: "polli:border polli:border-intent-danger-text polli:bg-transparent polli:text-intent-danger-text polli:hover:bg-intent-danger-bg-hover polli:focus-visible:bg-intent-danger-bg-hover polli:transition-colors",
|
|
313
|
+
info: "polli:bg-intent-info-bg-light polli:text-intent-info-text polli:hover:bg-intent-info-bg-hover polli:transition-colors",
|
|
314
|
+
// Secondary actions never take the accent: one step stronger grey on hover.
|
|
315
|
+
neutral: "polli:bg-theme-bg-subtle polli:text-theme-text-base polli:hover:bg-theme-text-muted/25 polli:hover:text-theme-text-strong polli:transition-colors"
|
|
49
316
|
};
|
|
50
317
|
var buttonClasses = ({
|
|
51
|
-
theme: _theme,
|
|
52
318
|
intent,
|
|
319
|
+
appearance = "pill",
|
|
53
320
|
size,
|
|
54
321
|
className,
|
|
55
322
|
disabled
|
|
56
323
|
}) => {
|
|
57
|
-
const colorClasses = intent ?
|
|
324
|
+
const colorClasses = intent ? intentClasses2[intent] : themeClasses;
|
|
325
|
+
const sizeClasses = appearance === "raised" ? raisedSizes : pillSizes;
|
|
58
326
|
return cn(
|
|
59
|
-
"polli-control polli:inline-flex polli:items-center polli:justify-center polli:
|
|
327
|
+
"polli-control polli:inline-flex polli:items-center polli:justify-center polli:self-center polli:font-body polli:text-sm polli:font-medium polli:leading-normal polli:box-border polli:border polli:border-transparent",
|
|
60
328
|
disabled ? "polli:opacity-50 polli:cursor-not-allowed" : "polli:hover:filter polli:hover:brightness-105 polli:cursor-pointer",
|
|
61
329
|
colorClasses,
|
|
62
|
-
|
|
330
|
+
appearanceClasses[appearance],
|
|
331
|
+
sizeClasses[size || "md"],
|
|
63
332
|
className
|
|
64
333
|
);
|
|
65
334
|
};
|
|
66
335
|
function Button({
|
|
67
336
|
as,
|
|
68
337
|
children,
|
|
69
|
-
|
|
338
|
+
icon,
|
|
70
339
|
intent,
|
|
340
|
+
appearance,
|
|
71
341
|
size,
|
|
72
342
|
className,
|
|
73
343
|
disabled,
|
|
74
344
|
...buttonProps
|
|
75
345
|
}) {
|
|
76
346
|
const Component = as || "button";
|
|
77
|
-
|
|
347
|
+
const isButton = Component === "button";
|
|
348
|
+
const isAnchor = Component === "a";
|
|
349
|
+
const buttonType = buttonProps.type;
|
|
350
|
+
const onClick = buttonProps.onClick;
|
|
351
|
+
const handleClick = disabled ? (event) => {
|
|
352
|
+
event.preventDefault();
|
|
353
|
+
event.stopPropagation();
|
|
354
|
+
} : onClick;
|
|
355
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
78
356
|
Component,
|
|
79
357
|
{
|
|
80
|
-
|
|
358
|
+
...buttonProps,
|
|
81
359
|
"data-intent": intent,
|
|
360
|
+
...isButton ? { type: buttonType ?? "button", disabled } : {},
|
|
361
|
+
...!isButton && disabled ? { "aria-disabled": true, tabIndex: -1 } : {},
|
|
362
|
+
...isAnchor && disabled ? { href: void 0 } : {},
|
|
363
|
+
onClick: handleClick,
|
|
82
364
|
className: buttonClasses({
|
|
83
|
-
theme,
|
|
84
365
|
intent,
|
|
366
|
+
appearance,
|
|
85
367
|
size,
|
|
86
368
|
className,
|
|
87
369
|
disabled
|
|
88
370
|
}),
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
371
|
+
children: [
|
|
372
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
373
|
+
"span",
|
|
374
|
+
{
|
|
375
|
+
"aria-hidden": "true",
|
|
376
|
+
className: "polli:mr-2 polli:flex polli:size-4 polli:shrink-0 polli:[&>svg]:size-full",
|
|
377
|
+
children: icon
|
|
378
|
+
}
|
|
379
|
+
),
|
|
380
|
+
children
|
|
381
|
+
]
|
|
92
382
|
}
|
|
93
383
|
);
|
|
94
384
|
}
|
|
95
385
|
|
|
96
386
|
// src/primitives/ChevronIcon.tsx
|
|
97
|
-
var
|
|
98
|
-
var ChevronIcon = ({ expanded, className }) => /* @__PURE__ */ (0,
|
|
387
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
388
|
+
var ChevronIcon = ({ expanded, className }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
99
389
|
"svg",
|
|
100
390
|
{
|
|
101
391
|
"aria-hidden": "true",
|
|
@@ -107,7 +397,7 @@ var ChevronIcon = ({ expanded, className }) => /* @__PURE__ */ (0, import_jsx_ru
|
|
|
107
397
|
expanded && "polli:rotate-180",
|
|
108
398
|
className
|
|
109
399
|
),
|
|
110
|
-
children: /* @__PURE__ */ (0,
|
|
400
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
111
401
|
"path",
|
|
112
402
|
{
|
|
113
403
|
d: "M3 4.5 6 7.5l3-3",
|
|
@@ -121,61 +411,24 @@ var ChevronIcon = ({ expanded, className }) => /* @__PURE__ */ (0, import_jsx_ru
|
|
|
121
411
|
}
|
|
122
412
|
);
|
|
123
413
|
|
|
124
|
-
// src/primitives/Chip.tsx
|
|
125
|
-
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
126
|
-
var chipSizes = {
|
|
127
|
-
sm: "polli:px-2 polli:py-0.5 polli:text-xs",
|
|
128
|
-
md: "polli:px-2.5 polli:py-0.5 polli:text-sm",
|
|
129
|
-
lg: "polli:px-3 polli:py-1 polli:text-sm"
|
|
130
|
-
};
|
|
131
|
-
var intentClasses2 = {
|
|
132
|
-
news: "polli:bg-intent-news-bg-light polli:text-intent-news-text",
|
|
133
|
-
alpha: "polli:bg-intent-alpha-bg-light polli:text-intent-alpha-text",
|
|
134
|
-
neutral: "polli:bg-ink-100/80 polli:text-ink-900",
|
|
135
|
-
success: "polli:bg-intent-success-bg-light polli:text-intent-success-text",
|
|
136
|
-
warning: "polli:bg-intent-warning-bg-light polli:text-intent-warning-text",
|
|
137
|
-
danger: "polli:bg-intent-danger-bg-light polli:text-intent-danger-text"
|
|
138
|
-
};
|
|
139
|
-
var Chip = ({
|
|
140
|
-
theme,
|
|
141
|
-
intent,
|
|
142
|
-
size = "md",
|
|
143
|
-
className,
|
|
144
|
-
children,
|
|
145
|
-
...rest
|
|
146
|
-
}) => {
|
|
147
|
-
const intentClass = intent ? intentClasses2[intent] : "polli:bg-theme-bg-active polli:text-theme-text-strong";
|
|
148
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
149
|
-
"span",
|
|
150
|
-
{
|
|
151
|
-
...rest,
|
|
152
|
-
"data-theme": theme,
|
|
153
|
-
className: cn(
|
|
154
|
-
"polli:inline-flex polli:shrink-0 polli:items-center polli:gap-1 polli:rounded-lg polli:font-medium polli:leading-normal",
|
|
155
|
-
chipSizes[size],
|
|
156
|
-
intentClass,
|
|
157
|
-
className
|
|
158
|
-
),
|
|
159
|
-
children
|
|
160
|
-
}
|
|
161
|
-
);
|
|
162
|
-
};
|
|
163
|
-
|
|
164
414
|
// src/primitives/Dropdown.tsx
|
|
165
415
|
var import_popover = require("@ark-ui/react/popover");
|
|
166
416
|
var import_portal = require("@ark-ui/react/portal");
|
|
167
417
|
var import_react = require("react");
|
|
168
|
-
var
|
|
169
|
-
var DEFAULT_PANEL = "polli:rounded-lg polli:
|
|
418
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
419
|
+
var DEFAULT_PANEL = "polli:rounded-lg polli:bg-surface-menu polli:shadow-lg";
|
|
170
420
|
var Dropdown = ({
|
|
171
|
-
theme,
|
|
172
421
|
trigger,
|
|
173
422
|
children,
|
|
174
423
|
align = "start",
|
|
424
|
+
side = "bottom",
|
|
175
425
|
open: openProp,
|
|
426
|
+
portalled = true,
|
|
176
427
|
onOpenChange,
|
|
177
|
-
className
|
|
428
|
+
className,
|
|
429
|
+
panelStyle
|
|
178
430
|
}) => {
|
|
431
|
+
const triggerId = (0, import_react.useId)();
|
|
179
432
|
const [internalOpen, setInternalOpen] = (0, import_react.useState)(false);
|
|
180
433
|
const isControlled = openProp !== void 0;
|
|
181
434
|
const open = isControlled ? openProp : internalOpen;
|
|
@@ -183,22 +436,26 @@ var Dropdown = ({
|
|
|
183
436
|
if (!isControlled) setInternalOpen(next);
|
|
184
437
|
onOpenChange?.(next);
|
|
185
438
|
};
|
|
186
|
-
return /* @__PURE__ */ (0,
|
|
439
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
187
440
|
import_popover.Popover.Root,
|
|
188
441
|
{
|
|
442
|
+
ids: { trigger: triggerId },
|
|
189
443
|
open,
|
|
444
|
+
portalled,
|
|
190
445
|
onOpenChange: (details) => setOpen(details.open),
|
|
191
446
|
positioning: {
|
|
192
|
-
placement: align
|
|
447
|
+
placement: `${side}-${align}`,
|
|
448
|
+
strategy: portalled ? "absolute" : "fixed"
|
|
193
449
|
},
|
|
194
450
|
children: [
|
|
195
|
-
/* @__PURE__ */ (0,
|
|
196
|
-
/* @__PURE__ */ (0,
|
|
451
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_popover.Popover.Trigger, { asChild: true, children: trigger(open) }),
|
|
452
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_portal.Portal, { disabled: !portalled, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_popover.Popover.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
197
453
|
import_popover.Popover.Content,
|
|
198
454
|
{
|
|
199
|
-
"
|
|
455
|
+
"aria-labelledby": triggerId,
|
|
456
|
+
style: panelStyle,
|
|
200
457
|
className: cn(
|
|
201
|
-
"polli:z-
|
|
458
|
+
"polli:z-[120] polli:overflow-hidden polli:focus:outline-none",
|
|
202
459
|
DEFAULT_PANEL,
|
|
203
460
|
className
|
|
204
461
|
),
|
|
@@ -212,17 +469,18 @@ var Dropdown = ({
|
|
|
212
469
|
|
|
213
470
|
// src/primitives/ScrollArea.tsx
|
|
214
471
|
var import_react2 = require("react");
|
|
215
|
-
var
|
|
472
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
216
473
|
var axisClasses = {
|
|
217
474
|
y: "polli:overflow-y-auto polli:overflow-x-hidden",
|
|
218
|
-
x: "polli:overflow-x-auto polli:overflow-y-hidden"
|
|
475
|
+
x: "polli:overflow-x-auto polli:overflow-y-hidden",
|
|
476
|
+
both: "polli:overflow-auto"
|
|
219
477
|
};
|
|
220
478
|
function assignRef(ref, value) {
|
|
221
479
|
if (typeof ref === "function") ref(value);
|
|
222
480
|
else if (ref) ref.current = value;
|
|
223
481
|
}
|
|
224
482
|
var ScrollArea = (0, import_react2.forwardRef)(
|
|
225
|
-
({
|
|
483
|
+
({ axis = "y", scrollbar = "subtle", className, children, ...rest }, externalRef) => {
|
|
226
484
|
const innerRef = (0, import_react2.useRef)(null);
|
|
227
485
|
const setRef = (0, import_react2.useCallback)(
|
|
228
486
|
(node) => {
|
|
@@ -232,6 +490,7 @@ var ScrollArea = (0, import_react2.forwardRef)(
|
|
|
232
490
|
[externalRef]
|
|
233
491
|
);
|
|
234
492
|
(0, import_react2.useEffect)(() => {
|
|
493
|
+
if (scrollbar === "native") return;
|
|
235
494
|
const element = innerRef.current;
|
|
236
495
|
if (!element) return;
|
|
237
496
|
let hideTimer = null;
|
|
@@ -281,15 +540,15 @@ var ScrollArea = (0, import_react2.forwardRef)(
|
|
|
281
540
|
element.removeEventListener("focusin", handleInteraction);
|
|
282
541
|
element.removeEventListener("focusout", scheduleHide);
|
|
283
542
|
};
|
|
284
|
-
}, []);
|
|
285
|
-
return /* @__PURE__ */ (0,
|
|
543
|
+
}, [scrollbar]);
|
|
544
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
286
545
|
"div",
|
|
287
546
|
{
|
|
288
547
|
...rest,
|
|
289
548
|
ref: setRef,
|
|
290
|
-
"data-theme": theme,
|
|
291
549
|
className: cn(
|
|
292
|
-
"
|
|
550
|
+
scrollbar === "subtle" && "polli-scrollbar-subtle",
|
|
551
|
+
"polli:min-w-0 polli:max-w-full",
|
|
293
552
|
axisClasses[axis],
|
|
294
553
|
className
|
|
295
554
|
),
|
|
@@ -300,96 +559,22 @@ var ScrollArea = (0, import_react2.forwardRef)(
|
|
|
300
559
|
);
|
|
301
560
|
ScrollArea.displayName = "ScrollArea";
|
|
302
561
|
|
|
303
|
-
// src/primitives/TabButton.tsx
|
|
304
|
-
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
305
|
-
var sizeClasses = {
|
|
306
|
-
md: "polli:px-4 polli:py-1.5 polli:text-base",
|
|
307
|
-
sm: "polli:px-3 polli:py-1.5 polli:text-sm"
|
|
308
|
-
};
|
|
309
|
-
var variantClasses = {
|
|
310
|
-
default: {
|
|
311
|
-
base: "polli:border",
|
|
312
|
-
active: "polli:bg-theme-bg-active polli:text-theme-text-strong polli:border-theme-border",
|
|
313
|
-
inactive: "polli:bg-theme-bg-subtle polli:text-theme-text-base polli:border-theme-border polli:hover:bg-theme-bg-active"
|
|
314
|
-
},
|
|
315
|
-
ghost: {
|
|
316
|
-
base: "polli:border polli:border-transparent",
|
|
317
|
-
active: "polli:bg-theme-bg-active polli:text-theme-text-strong",
|
|
318
|
-
inactive: "polli:bg-transparent polli:text-theme-text-base polli:hover:bg-theme-bg-subtle polli:hover:text-theme-text-strong"
|
|
319
|
-
}
|
|
320
|
-
};
|
|
321
|
-
var TabButton = ({
|
|
322
|
-
theme,
|
|
323
|
-
active,
|
|
324
|
-
onClick,
|
|
325
|
-
children,
|
|
326
|
-
size = "md",
|
|
327
|
-
variant = "default",
|
|
328
|
-
ariaLabel,
|
|
329
|
-
disabled = false,
|
|
330
|
-
className
|
|
331
|
-
}) => {
|
|
332
|
-
const classes = variantClasses[variant];
|
|
333
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
334
|
-
"button",
|
|
335
|
-
{
|
|
336
|
-
type: "button",
|
|
337
|
-
"data-theme": theme,
|
|
338
|
-
onClick,
|
|
339
|
-
"aria-label": ariaLabel,
|
|
340
|
-
"aria-pressed": active,
|
|
341
|
-
disabled,
|
|
342
|
-
className: cn(
|
|
343
|
-
"polli-control polli:inline-flex polli:items-center polli:justify-center polli:rounded-full polli:font-medium polli:leading-normal polli:transition-all polli:duration-200",
|
|
344
|
-
classes.base,
|
|
345
|
-
active ? classes.active : classes.inactive,
|
|
346
|
-
disabled && "polli:cursor-not-allowed polli:opacity-50",
|
|
347
|
-
sizeClasses[size],
|
|
348
|
-
className
|
|
349
|
-
),
|
|
350
|
-
children
|
|
351
|
-
}
|
|
352
|
-
);
|
|
353
|
-
};
|
|
354
|
-
|
|
355
|
-
// src/modules/gen/themes.ts
|
|
356
|
-
var MODALITY_THEMES = {
|
|
357
|
-
text: "blue",
|
|
358
|
-
image: "pink",
|
|
359
|
-
video: "teal",
|
|
360
|
-
audio: "amber",
|
|
361
|
-
realtime: "coral",
|
|
362
|
-
embedding: "violet"
|
|
363
|
-
};
|
|
364
|
-
function modalityTheme(category) {
|
|
365
|
-
return MODALITY_THEMES[category];
|
|
366
|
-
}
|
|
367
|
-
function normalize(category) {
|
|
368
|
-
const lower = category.toLowerCase();
|
|
369
|
-
if (lower === "images") return "image";
|
|
370
|
-
if (lower === "embeddings") return "embedding";
|
|
371
|
-
return lower in MODALITY_THEMES ? lower : null;
|
|
372
|
-
}
|
|
373
|
-
function getModalityTheme(category) {
|
|
374
|
-
const key = normalize(category);
|
|
375
|
-
return key ? MODALITY_THEMES[key] : null;
|
|
376
|
-
}
|
|
377
|
-
|
|
378
562
|
// src/modules/gen/ModelSelector.tsx
|
|
379
|
-
var
|
|
563
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
380
564
|
var CATEGORY_LABELS = {
|
|
381
565
|
image: "Image",
|
|
382
566
|
video: "Video",
|
|
383
567
|
text: "Text",
|
|
384
568
|
audio: "Audio",
|
|
569
|
+
"3d": "3D",
|
|
385
570
|
embedding: "Embeddings",
|
|
386
571
|
realtime: "Realtime"
|
|
387
572
|
};
|
|
388
573
|
function categoryLabel(category) {
|
|
389
574
|
return CATEGORY_LABELS[category];
|
|
390
575
|
}
|
|
391
|
-
function
|
|
392
|
-
return model.
|
|
576
|
+
function modelId(model) {
|
|
577
|
+
return model.id ?? model.name;
|
|
393
578
|
}
|
|
394
579
|
function ModelSelector({
|
|
395
580
|
models,
|
|
@@ -398,80 +583,76 @@ function ModelSelector({
|
|
|
398
583
|
isLoading = false,
|
|
399
584
|
onChange
|
|
400
585
|
}) {
|
|
401
|
-
const filteredModels = models.filter(
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
const currentModel = models.find((model) => model.id === value);
|
|
405
|
-
const theme = modalityTheme(category);
|
|
406
|
-
const modelLabel = currentModel ? displayModelName(currentModel) : "Select";
|
|
586
|
+
const filteredModels = models.filter((model) => model.category === category).sort((a, b) => modelId(a).localeCompare(modelId(b)));
|
|
587
|
+
const currentModel = models.find((model) => modelId(model) === value);
|
|
588
|
+
const modelLabel = currentModel ? currentModel.title ?? currentModel.name : "Select";
|
|
407
589
|
const accessibleLabel = currentModel ? `${CATEGORY_LABELS[category]} model: ${modelLabel}` : `Select ${CATEGORY_LABELS[category].toLowerCase()} model`;
|
|
408
|
-
return /* @__PURE__ */ (0,
|
|
590
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
409
591
|
Dropdown,
|
|
410
592
|
{
|
|
411
|
-
|
|
412
|
-
align: "end",
|
|
593
|
+
align: "start",
|
|
413
594
|
className: "polli:w-[min(24rem,calc(100vw-2rem))] polli:p-2",
|
|
414
|
-
trigger: (open) => /* @__PURE__ */ (0,
|
|
595
|
+
trigger: (open) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
415
596
|
Button,
|
|
416
597
|
{
|
|
417
598
|
type: "button",
|
|
418
|
-
theme,
|
|
419
599
|
"aria-label": accessibleLabel,
|
|
420
600
|
className: "polli:min-w-64 polli:max-w-full polli:self-start polli:justify-between polli:gap-2",
|
|
421
601
|
children: [
|
|
422
|
-
/* @__PURE__ */ (0,
|
|
423
|
-
|
|
602
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "polli:flex polli:min-w-0 polli:items-center polli:gap-2", children: [
|
|
603
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "polli:truncate", children: modelLabel }),
|
|
604
|
+
currentModel && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
605
|
+
ModelAccessIcon,
|
|
606
|
+
{
|
|
607
|
+
paidOnly: currentModel.paid_only
|
|
608
|
+
}
|
|
609
|
+
)
|
|
610
|
+
] }),
|
|
611
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ChevronIcon, { expanded: open })
|
|
424
612
|
]
|
|
425
613
|
}
|
|
426
614
|
),
|
|
427
|
-
children: (close) => isLoading ? /* @__PURE__ */ (0,
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
}
|
|
458
|
-
)
|
|
459
|
-
]
|
|
460
|
-
},
|
|
461
|
-
model.id
|
|
462
|
-
);
|
|
463
|
-
}) })
|
|
464
|
-
}
|
|
465
|
-
)
|
|
615
|
+
children: (close) => isLoading ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "polli:m-0 polli:px-2 polli:py-2 polli:text-sm polli:text-theme-text-soft", children: "Loading models..." }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(ScrollArea, { className: "polli:max-h-80 polli:pr-2", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "polli:flex polli:flex-col polli:gap-1", children: filteredModels.map((model) => {
|
|
616
|
+
const id = modelId(model);
|
|
617
|
+
const isActive = value === id;
|
|
618
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
619
|
+
TabButton,
|
|
620
|
+
{
|
|
621
|
+
active: isActive,
|
|
622
|
+
size: "sm",
|
|
623
|
+
variant: "ghost",
|
|
624
|
+
className: "polli:w-full polli:justify-start polli:text-left",
|
|
625
|
+
onClick: () => {
|
|
626
|
+
onChange(id);
|
|
627
|
+
close();
|
|
628
|
+
},
|
|
629
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "polli:flex polli:min-w-0 polli:flex-col polli:gap-0.5", children: [
|
|
630
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "polli:flex polli:min-w-0 polli:items-center polli:gap-2", children: [
|
|
631
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "polli:truncate", children: model.title ?? model.name }),
|
|
632
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
633
|
+
ModelAccessIcon,
|
|
634
|
+
{
|
|
635
|
+
paidOnly: model.paid_only
|
|
636
|
+
}
|
|
637
|
+
)
|
|
638
|
+
] }),
|
|
639
|
+
model.description && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "polli:truncate polli:text-xs polli:font-normal polli:text-theme-text-muted", children: model.description })
|
|
640
|
+
] })
|
|
641
|
+
},
|
|
642
|
+
id
|
|
643
|
+
);
|
|
644
|
+
}) }) })
|
|
466
645
|
}
|
|
467
646
|
);
|
|
468
647
|
}
|
|
469
648
|
// Annotate the CommonJS export names for ESM import in node:
|
|
470
649
|
0 && (module.exports = {
|
|
471
|
-
|
|
650
|
+
ModalityChip,
|
|
651
|
+
ModalityDot,
|
|
652
|
+
ModalityTab,
|
|
653
|
+
ModelAccessIcon,
|
|
472
654
|
ModelSelector,
|
|
473
655
|
categoryLabel,
|
|
474
|
-
|
|
475
|
-
modalityTheme
|
|
656
|
+
getModalityKey
|
|
476
657
|
});
|
|
477
658
|
//# sourceMappingURL=index.cjs.map
|