@pollinations/ui 0.0.2 → 0.1.0-alpha.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/README.md +10 -6
- package/dist/{Button-CWUBCiIc.d.cts → Button-BvLF_Km2.d.cts} +3 -3
- package/dist/{Button-Bn8pGg6N.d.ts → Button-DQAZzvyQ.d.ts} +3 -3
- package/dist/auth/index.cjs +77 -62
- package/dist/auth/index.cjs.map +1 -1
- package/dist/auth/index.js +77 -62
- package/dist/auth/index.js.map +1 -1
- package/dist/auth/sdk.cjs +7 -6
- package/dist/auth/sdk.cjs.map +1 -1
- package/dist/auth/sdk.d.cts +1 -1
- package/dist/auth/sdk.d.ts +1 -1
- package/dist/auth/sdk.js +7 -6
- package/dist/auth/sdk.js.map +1 -1
- package/dist/compositions/app-user.cjs +497 -0
- package/dist/compositions/app-user.cjs.map +1 -0
- package/dist/compositions/app-user.d.cts +18 -0
- package/dist/compositions/app-user.d.ts +18 -0
- package/dist/compositions/app-user.js +469 -0
- package/dist/compositions/app-user.js.map +1 -0
- package/dist/index.cjs +932 -270
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +101 -6
- package/dist/index.d.ts +101 -6
- package/dist/index.js +891 -247
- package/dist/index.js.map +1 -1
- package/dist/modality/index.cjs +21 -18
- package/dist/modality/index.cjs.map +1 -1
- package/dist/modality/index.d.cts +6 -5
- package/dist/modality/index.d.ts +6 -5
- package/dist/modality/index.js +21 -18
- package/dist/modality/index.js.map +1 -1
- package/dist/models/index.cjs +508 -0
- package/dist/models/index.cjs.map +1 -0
- package/dist/models/index.d.cts +22 -0
- package/dist/models/index.d.ts +22 -0
- package/dist/models/index.js +486 -0
- package/dist/models/index.js.map +1 -0
- package/dist/styles.css +1 -1
- package/dist/wallet/index.cjs +13 -4
- package/dist/wallet/index.cjs.map +1 -1
- package/dist/wallet/index.js +13 -4
- package/dist/wallet/index.js.map +1 -1
- package/dist/wallet/sdk.cjs +2 -2
- package/dist/wallet/sdk.cjs.map +1 -1
- package/dist/wallet/sdk.js +2 -2
- package/dist/wallet/sdk.js.map +1 -1
- package/package.json +17 -5
- package/dist/wallet.css +0 -73
package/dist/modality/index.cjs
CHANGED
|
@@ -25,42 +25,45 @@ __export(modality_exports, {
|
|
|
25
25
|
module.exports = __toCommonJS(modality_exports);
|
|
26
26
|
|
|
27
27
|
// src/modules/modality/colors.ts
|
|
28
|
+
var filled = "polli:bg-theme-bg-active polli:text-theme-text-strong";
|
|
29
|
+
var hover = "polli:hover:bg-theme-bg-subtle polli:hover:text-theme-text-strong";
|
|
30
|
+
var text = "polli:text-theme-text-strong";
|
|
28
31
|
var MODALITY_COLORS = {
|
|
29
32
|
text: {
|
|
30
33
|
theme: "blue",
|
|
31
|
-
filled
|
|
32
|
-
hover
|
|
33
|
-
text
|
|
34
|
+
filled,
|
|
35
|
+
hover,
|
|
36
|
+
text
|
|
34
37
|
},
|
|
35
38
|
image: {
|
|
36
39
|
theme: "pink",
|
|
37
|
-
filled
|
|
38
|
-
hover
|
|
39
|
-
text
|
|
40
|
+
filled,
|
|
41
|
+
hover,
|
|
42
|
+
text
|
|
40
43
|
},
|
|
41
44
|
video: {
|
|
42
45
|
theme: "teal",
|
|
43
|
-
filled
|
|
44
|
-
hover
|
|
45
|
-
text
|
|
46
|
+
filled,
|
|
47
|
+
hover,
|
|
48
|
+
text
|
|
46
49
|
},
|
|
47
50
|
audio: {
|
|
48
51
|
theme: "violet",
|
|
49
|
-
filled
|
|
50
|
-
hover
|
|
51
|
-
text
|
|
52
|
+
filled,
|
|
53
|
+
hover,
|
|
54
|
+
text
|
|
52
55
|
},
|
|
53
56
|
realtime: {
|
|
54
57
|
theme: "green",
|
|
55
|
-
filled
|
|
56
|
-
hover
|
|
57
|
-
text
|
|
58
|
+
filled,
|
|
59
|
+
hover,
|
|
60
|
+
text
|
|
58
61
|
},
|
|
59
62
|
embedding: {
|
|
60
63
|
theme: "amber",
|
|
61
|
-
filled
|
|
62
|
-
hover
|
|
63
|
-
text
|
|
64
|
+
filled,
|
|
65
|
+
hover,
|
|
66
|
+
text
|
|
64
67
|
}
|
|
65
68
|
};
|
|
66
69
|
function normalize(category) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/modules/modality/index.ts","../../src/modules/modality/colors.ts"],"sourcesContent":["export {\n getModalityColors,\n type Modality,\n type ModalityColorSet,\n} from \"./colors.ts\";\n","/**\n * Single source of truth for modality colors.\n *\n * Each modality (text/image/video/audio/realtime/embedding)
|
|
1
|
+
{"version":3,"sources":["../../src/modules/modality/index.ts","../../src/modules/modality/colors.ts"],"sourcesContent":["export {\n getModalityColors,\n type Modality,\n type ModalityColorSet,\n} from \"./colors.ts\";\n","/**\n * Single source of truth for modality colors.\n *\n * Each modality (text/image/video/audio/realtime/embedding) maps to one\n * package theme. Class recipes are token-based, so callers should pass the\n * returned `theme` to the primitive or set `data-theme` on an ancestor.\n * Used by apps to compose model-selection buttons and static modality chips.\n * This module only owns modality color data; primitives own shape and behavior.\n */\nimport type { ThemeName } from \"../../theme.ts\";\n\nexport type Modality =\n | \"text\"\n | \"image\"\n | \"video\"\n | \"audio\"\n | \"realtime\"\n | \"embedding\";\n\nexport type ModalityColorSet = {\n /** Matching package theme for surfaces/chips that should inherit this hue. */\n theme: ThemeName;\n /** Selected/filled state using the active theme tokens. */\n filled: string;\n /** Hover hint shown on the unselected button using the active theme. */\n hover: string;\n /** Heading text colour using the active theme. */\n text: string;\n};\n\nconst filled = \"polli:bg-theme-bg-active polli:text-theme-text-strong\";\nconst hover =\n \"polli:hover:bg-theme-bg-subtle polli:hover:text-theme-text-strong\";\nconst text = \"polli:text-theme-text-strong\";\n\n// No borders — chips and buttons in this system are borderless.\nexport const MODALITY_COLORS: Record<Modality, ModalityColorSet> = {\n text: {\n theme: \"blue\",\n filled,\n hover,\n text,\n },\n image: {\n theme: \"pink\",\n filled,\n hover,\n text,\n },\n video: {\n theme: \"teal\",\n filled,\n hover,\n text,\n },\n audio: {\n theme: \"violet\",\n filled,\n hover,\n text,\n },\n realtime: {\n theme: \"green\",\n filled,\n hover,\n text,\n },\n embedding: {\n theme: \"amber\",\n filled,\n hover,\n text,\n },\n};\n\n/** Map any human-typed category string to the canonical `Modality` key. */\nfunction normalize(category: string): Modality | null {\n const lower = category.toLowerCase();\n if (lower === \"images\") return \"image\";\n if (lower === \"embeddings\") return \"embedding\";\n if (\n lower === \"text\" ||\n lower === \"image\" ||\n lower === \"video\" ||\n lower === \"audio\" ||\n lower === \"realtime\" ||\n lower === \"embedding\"\n ) {\n return lower;\n }\n return null;\n}\n\nexport function getModalityColors(category: string): ModalityColorSet | null {\n const key = normalize(category);\n return key ? MODALITY_COLORS[key] : null;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;AC8BA,IAAM,SAAS;AACf,IAAM,QACF;AACJ,IAAM,OAAO;AAGN,IAAM,kBAAsD;AAAA,EAC/D,MAAM;AAAA,IACF,OAAO;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,EACJ;AAAA,EACA,OAAO;AAAA,IACH,OAAO;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,EACJ;AAAA,EACA,OAAO;AAAA,IACH,OAAO;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,EACJ;AAAA,EACA,OAAO;AAAA,IACH,OAAO;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,EACJ;AAAA,EACA,UAAU;AAAA,IACN,OAAO;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,EACJ;AAAA,EACA,WAAW;AAAA,IACP,OAAO;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,EACJ;AACJ;AAGA,SAAS,UAAU,UAAmC;AAClD,QAAM,QAAQ,SAAS,YAAY;AACnC,MAAI,UAAU,SAAU,QAAO;AAC/B,MAAI,UAAU,aAAc,QAAO;AACnC,MACI,UAAU,UACV,UAAU,WACV,UAAU,WACV,UAAU,WACV,UAAU,cACV,UAAU,aACZ;AACE,WAAO;AAAA,EACX;AACA,SAAO;AACX;AAEO,SAAS,kBAAkB,UAA2C;AACzE,QAAM,MAAM,UAAU,QAAQ;AAC9B,SAAO,MAAM,gBAAgB,GAAG,IAAI;AACxC;","names":[]}
|
|
@@ -3,8 +3,9 @@ import { T as ThemeName } from '../theme-VMRlhqST.cjs';
|
|
|
3
3
|
/**
|
|
4
4
|
* Single source of truth for modality colors.
|
|
5
5
|
*
|
|
6
|
-
* Each modality (text/image/video/audio/realtime/embedding)
|
|
7
|
-
*
|
|
6
|
+
* Each modality (text/image/video/audio/realtime/embedding) maps to one
|
|
7
|
+
* package theme. Class recipes are token-based, so callers should pass the
|
|
8
|
+
* returned `theme` to the primitive or set `data-theme` on an ancestor.
|
|
8
9
|
* Used by apps to compose model-selection buttons and static modality chips.
|
|
9
10
|
* This module only owns modality color data; primitives own shape and behavior.
|
|
10
11
|
*/
|
|
@@ -13,11 +14,11 @@ type Modality = "text" | "image" | "video" | "audio" | "realtime" | "embedding";
|
|
|
13
14
|
type ModalityColorSet = {
|
|
14
15
|
/** Matching package theme for surfaces/chips that should inherit this hue. */
|
|
15
16
|
theme: ThemeName;
|
|
16
|
-
/** Selected/filled state
|
|
17
|
+
/** Selected/filled state using the active theme tokens. */
|
|
17
18
|
filled: string;
|
|
18
|
-
/** Hover hint shown on the unselected button
|
|
19
|
+
/** Hover hint shown on the unselected button using the active theme. */
|
|
19
20
|
hover: string;
|
|
20
|
-
/** Heading text colour
|
|
21
|
+
/** Heading text colour using the active theme. */
|
|
21
22
|
text: string;
|
|
22
23
|
};
|
|
23
24
|
declare function getModalityColors(category: string): ModalityColorSet | null;
|
package/dist/modality/index.d.ts
CHANGED
|
@@ -3,8 +3,9 @@ import { T as ThemeName } from '../theme-VMRlhqST.js';
|
|
|
3
3
|
/**
|
|
4
4
|
* Single source of truth for modality colors.
|
|
5
5
|
*
|
|
6
|
-
* Each modality (text/image/video/audio/realtime/embedding)
|
|
7
|
-
*
|
|
6
|
+
* Each modality (text/image/video/audio/realtime/embedding) maps to one
|
|
7
|
+
* package theme. Class recipes are token-based, so callers should pass the
|
|
8
|
+
* returned `theme` to the primitive or set `data-theme` on an ancestor.
|
|
8
9
|
* Used by apps to compose model-selection buttons and static modality chips.
|
|
9
10
|
* This module only owns modality color data; primitives own shape and behavior.
|
|
10
11
|
*/
|
|
@@ -13,11 +14,11 @@ type Modality = "text" | "image" | "video" | "audio" | "realtime" | "embedding";
|
|
|
13
14
|
type ModalityColorSet = {
|
|
14
15
|
/** Matching package theme for surfaces/chips that should inherit this hue. */
|
|
15
16
|
theme: ThemeName;
|
|
16
|
-
/** Selected/filled state
|
|
17
|
+
/** Selected/filled state using the active theme tokens. */
|
|
17
18
|
filled: string;
|
|
18
|
-
/** Hover hint shown on the unselected button
|
|
19
|
+
/** Hover hint shown on the unselected button using the active theme. */
|
|
19
20
|
hover: string;
|
|
20
|
-
/** Heading text colour
|
|
21
|
+
/** Heading text colour using the active theme. */
|
|
21
22
|
text: string;
|
|
22
23
|
};
|
|
23
24
|
declare function getModalityColors(category: string): ModalityColorSet | null;
|
package/dist/modality/index.js
CHANGED
|
@@ -1,40 +1,43 @@
|
|
|
1
1
|
// src/modules/modality/colors.ts
|
|
2
|
+
var filled = "polli:bg-theme-bg-active polli:text-theme-text-strong";
|
|
3
|
+
var hover = "polli:hover:bg-theme-bg-subtle polli:hover:text-theme-text-strong";
|
|
4
|
+
var text = "polli:text-theme-text-strong";
|
|
2
5
|
var MODALITY_COLORS = {
|
|
3
6
|
text: {
|
|
4
7
|
theme: "blue",
|
|
5
|
-
filled
|
|
6
|
-
hover
|
|
7
|
-
text
|
|
8
|
+
filled,
|
|
9
|
+
hover,
|
|
10
|
+
text
|
|
8
11
|
},
|
|
9
12
|
image: {
|
|
10
13
|
theme: "pink",
|
|
11
|
-
filled
|
|
12
|
-
hover
|
|
13
|
-
text
|
|
14
|
+
filled,
|
|
15
|
+
hover,
|
|
16
|
+
text
|
|
14
17
|
},
|
|
15
18
|
video: {
|
|
16
19
|
theme: "teal",
|
|
17
|
-
filled
|
|
18
|
-
hover
|
|
19
|
-
text
|
|
20
|
+
filled,
|
|
21
|
+
hover,
|
|
22
|
+
text
|
|
20
23
|
},
|
|
21
24
|
audio: {
|
|
22
25
|
theme: "violet",
|
|
23
|
-
filled
|
|
24
|
-
hover
|
|
25
|
-
text
|
|
26
|
+
filled,
|
|
27
|
+
hover,
|
|
28
|
+
text
|
|
26
29
|
},
|
|
27
30
|
realtime: {
|
|
28
31
|
theme: "green",
|
|
29
|
-
filled
|
|
30
|
-
hover
|
|
31
|
-
text
|
|
32
|
+
filled,
|
|
33
|
+
hover,
|
|
34
|
+
text
|
|
32
35
|
},
|
|
33
36
|
embedding: {
|
|
34
37
|
theme: "amber",
|
|
35
|
-
filled
|
|
36
|
-
hover
|
|
37
|
-
text
|
|
38
|
+
filled,
|
|
39
|
+
hover,
|
|
40
|
+
text
|
|
38
41
|
}
|
|
39
42
|
};
|
|
40
43
|
function normalize(category) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/modules/modality/colors.ts"],"sourcesContent":["/**\n * Single source of truth for modality colors.\n *\n * Each modality (text/image/video/audio/realtime/embedding)
|
|
1
|
+
{"version":3,"sources":["../../src/modules/modality/colors.ts"],"sourcesContent":["/**\n * Single source of truth for modality colors.\n *\n * Each modality (text/image/video/audio/realtime/embedding) maps to one\n * package theme. Class recipes are token-based, so callers should pass the\n * returned `theme` to the primitive or set `data-theme` on an ancestor.\n * Used by apps to compose model-selection buttons and static modality chips.\n * This module only owns modality color data; primitives own shape and behavior.\n */\nimport type { ThemeName } from \"../../theme.ts\";\n\nexport type Modality =\n | \"text\"\n | \"image\"\n | \"video\"\n | \"audio\"\n | \"realtime\"\n | \"embedding\";\n\nexport type ModalityColorSet = {\n /** Matching package theme for surfaces/chips that should inherit this hue. */\n theme: ThemeName;\n /** Selected/filled state using the active theme tokens. */\n filled: string;\n /** Hover hint shown on the unselected button using the active theme. */\n hover: string;\n /** Heading text colour using the active theme. */\n text: string;\n};\n\nconst filled = \"polli:bg-theme-bg-active polli:text-theme-text-strong\";\nconst hover =\n \"polli:hover:bg-theme-bg-subtle polli:hover:text-theme-text-strong\";\nconst text = \"polli:text-theme-text-strong\";\n\n// No borders — chips and buttons in this system are borderless.\nexport const MODALITY_COLORS: Record<Modality, ModalityColorSet> = {\n text: {\n theme: \"blue\",\n filled,\n hover,\n text,\n },\n image: {\n theme: \"pink\",\n filled,\n hover,\n text,\n },\n video: {\n theme: \"teal\",\n filled,\n hover,\n text,\n },\n audio: {\n theme: \"violet\",\n filled,\n hover,\n text,\n },\n realtime: {\n theme: \"green\",\n filled,\n hover,\n text,\n },\n embedding: {\n theme: \"amber\",\n filled,\n hover,\n text,\n },\n};\n\n/** Map any human-typed category string to the canonical `Modality` key. */\nfunction normalize(category: string): Modality | null {\n const lower = category.toLowerCase();\n if (lower === \"images\") return \"image\";\n if (lower === \"embeddings\") return \"embedding\";\n if (\n lower === \"text\" ||\n lower === \"image\" ||\n lower === \"video\" ||\n lower === \"audio\" ||\n lower === \"realtime\" ||\n lower === \"embedding\"\n ) {\n return lower;\n }\n return null;\n}\n\nexport function getModalityColors(category: string): ModalityColorSet | null {\n const key = normalize(category);\n return key ? MODALITY_COLORS[key] : null;\n}\n"],"mappings":";AA8BA,IAAM,SAAS;AACf,IAAM,QACF;AACJ,IAAM,OAAO;AAGN,IAAM,kBAAsD;AAAA,EAC/D,MAAM;AAAA,IACF,OAAO;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,EACJ;AAAA,EACA,OAAO;AAAA,IACH,OAAO;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,EACJ;AAAA,EACA,OAAO;AAAA,IACH,OAAO;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,EACJ;AAAA,EACA,OAAO;AAAA,IACH,OAAO;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,EACJ;AAAA,EACA,UAAU;AAAA,IACN,OAAO;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,EACJ;AAAA,EACA,WAAW;AAAA,IACP,OAAO;AAAA,IACP;AAAA,IACA;AAAA,IACA;AAAA,EACJ;AACJ;AAGA,SAAS,UAAU,UAAmC;AAClD,QAAM,QAAQ,SAAS,YAAY;AACnC,MAAI,UAAU,SAAU,QAAO;AAC/B,MAAI,UAAU,aAAc,QAAO;AACnC,MACI,UAAU,UACV,UAAU,WACV,UAAU,WACV,UAAU,WACV,UAAU,cACV,UAAU,aACZ;AACE,WAAO;AAAA,EACX;AACA,SAAO;AACX;AAEO,SAAS,kBAAkB,UAA2C;AACzE,QAAM,MAAM,UAAU,QAAQ;AAC9B,SAAO,MAAM,gBAAgB,GAAG,IAAI;AACxC;","names":[]}
|