@pollinations/ui 0.1.0-alpha.3 → 0.1.0-alpha.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. package/README.md +32 -13
  2. package/dist/{Button-CO3Dpbkj.d.cts → Button-BGqClaBr.d.ts} +2 -2
  3. package/dist/{Dialog-yXzIFrDg.d.ts → Dialog-D3Nqt8cE.d.ts} +4 -1
  4. package/dist/app-user-menu/sdk.d.ts +29 -1
  5. package/dist/app-user-menu/sdk.js +120 -729
  6. package/dist/app-user-menu/sdk.js.map +1 -1
  7. package/dist/app.css +13 -0
  8. package/dist/auth/index.d.ts +17 -7
  9. package/dist/auth/index.js +209 -1187
  10. package/dist/auth/index.js.map +1 -1
  11. package/dist/auth/sdk.d.ts +1 -1
  12. package/dist/auth/sdk.js +9 -200
  13. package/dist/auth/sdk.js.map +1 -1
  14. package/dist/brand/badge-made-with.svg +1 -0
  15. package/dist/brand/lockup-horizontal-black.png +0 -0
  16. package/dist/brand/lockup-horizontal-black.svg +3 -3
  17. package/dist/brand/lockup-horizontal-white.png +0 -0
  18. package/dist/brand/lockup-horizontal-white.svg +3 -3
  19. package/dist/brand/lockup-horizontal.svg +4 -1
  20. package/dist/brand/lockup-stacked-black.png +0 -0
  21. package/dist/brand/lockup-stacked-black.svg +1 -1
  22. package/dist/brand/lockup-stacked-white.png +0 -0
  23. package/dist/brand/lockup-stacked-white.svg +1 -1
  24. package/dist/brand/lockup-stacked.svg +1 -1
  25. package/dist/brand/mark-black.png +0 -0
  26. package/dist/brand/mark-black.svg +1 -3
  27. package/dist/brand/mark-white.png +0 -0
  28. package/dist/brand/mark-white.svg +1 -3
  29. package/dist/brand/mark.svg +1 -1
  30. package/dist/brand/polli/polli-lockup-horizontal-black.png +0 -0
  31. package/dist/brand/polli/polli-lockup-horizontal-white.png +0 -0
  32. package/dist/brand/polli/polli.png +0 -0
  33. package/dist/chunk-2BI7XJMG.js +418 -0
  34. package/dist/chunk-2BI7XJMG.js.map +1 -0
  35. package/dist/chunk-3VM5R3OI.js +50 -0
  36. package/dist/chunk-3VM5R3OI.js.map +1 -0
  37. package/dist/chunk-7GDUPN6U.js +115 -0
  38. package/dist/chunk-7GDUPN6U.js.map +1 -0
  39. package/dist/chunk-7NTX3FPZ.js +602 -0
  40. package/dist/chunk-7NTX3FPZ.js.map +1 -0
  41. package/dist/chunk-7XDOOFTL.js +105 -0
  42. package/dist/chunk-7XDOOFTL.js.map +1 -0
  43. package/dist/chunk-DD7MHUFD.js +93 -0
  44. package/dist/chunk-DD7MHUFD.js.map +1 -0
  45. package/dist/chunk-FLQFOTMR.js +107 -0
  46. package/dist/chunk-FLQFOTMR.js.map +1 -0
  47. package/dist/chunk-FRHLA7LM.js +533 -0
  48. package/dist/chunk-FRHLA7LM.js.map +1 -0
  49. package/dist/chunk-LKOYOXBG.js +284 -0
  50. package/dist/chunk-LKOYOXBG.js.map +1 -0
  51. package/dist/chunk-LKUZU37X.js +15 -0
  52. package/dist/chunk-LKUZU37X.js.map +1 -0
  53. package/dist/chunk-LRXUPEQM.js +58 -0
  54. package/dist/chunk-LRXUPEQM.js.map +1 -0
  55. package/dist/chunk-PBNBZKEZ.js +260 -0
  56. package/dist/chunk-PBNBZKEZ.js.map +1 -0
  57. package/dist/chunk-TVPFAM3B.js +88 -0
  58. package/dist/chunk-TVPFAM3B.js.map +1 -0
  59. package/dist/chunk-ZLD4VLUG.js +112 -0
  60. package/dist/chunk-ZLD4VLUG.js.map +1 -0
  61. package/dist/connect.js +100 -0
  62. package/dist/connect.js.map +1 -0
  63. package/dist/gen/index.d.ts +19 -8
  64. package/dist/gen/index.js +64 -450
  65. package/dist/gen/index.js.map +1 -1
  66. package/dist/index-efnABLqH.d.ts +87 -0
  67. package/dist/index.browser.min.js +1 -1
  68. package/dist/index.browser.min.js.map +1 -1
  69. package/dist/index.d.ts +245 -116
  70. package/dist/index.js +1216 -2748
  71. package/dist/index.js.map +1 -1
  72. package/dist/markdown.js +51 -588
  73. package/dist/markdown.js.map +1 -1
  74. package/dist/styles.css +1 -1
  75. package/dist/theme.css +10 -8
  76. package/dist/types-CCy9JNu9.d.ts +6 -0
  77. package/dist/wallet/index.d.ts +5 -0
  78. package/dist/wallet/index.js +17 -356
  79. package/dist/wallet/index.js.map +1 -1
  80. package/package.json +18 -22
  81. package/dist/Button-CO3Dpbkj.d.ts +0 -29
  82. package/dist/Chip-v-ADv6cz.d.cts +0 -18
  83. package/dist/Dialog-yXzIFrDg.d.cts +0 -63
  84. package/dist/app-user-menu/sdk.cjs +0 -893
  85. package/dist/app-user-menu/sdk.cjs.map +0 -1
  86. package/dist/app-user-menu/sdk.d.cts +0 -17
  87. package/dist/auth/index.cjs +0 -1502
  88. package/dist/auth/index.cjs.map +0 -1
  89. package/dist/auth/index.d.cts +0 -109
  90. package/dist/auth/sdk.cjs +0 -239
  91. package/dist/auth/sdk.cjs.map +0 -1
  92. package/dist/auth/sdk.d.cts +0 -40
  93. package/dist/gen/index.cjs +0 -658
  94. package/dist/gen/index.cjs.map +0 -1
  95. package/dist/gen/index.d.cts +0 -80
  96. package/dist/index.cjs +0 -4967
  97. package/dist/index.cjs.map +0 -1
  98. package/dist/index.d.cts +0 -887
  99. package/dist/markdown.cjs +0 -821
  100. package/dist/markdown.cjs.map +0 -1
  101. package/dist/markdown.d.cts +0 -16
  102. package/dist/wallet/index.cjs +0 -415
  103. package/dist/wallet/index.cjs.map +0 -1
  104. package/dist/wallet/index.d.cts +0 -52
@@ -1,6 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { ReactNode, ComponentPropsWithoutRef } from 'react';
3
- import { ModelInfo, ModelCategory } from '@pollinations/sdk';
2
+ import { ReactNode, ComponentType, ComponentPropsWithoutRef } from 'react';
3
+ import { ModelCategory, ModelInfo } from '@pollinations/sdk';
4
+ import { I as IconProps } from '../types-CCy9JNu9.js';
4
5
 
5
6
  /**
6
7
  * A `Chip` colored as a model modality: faint modality background + a readable
@@ -35,18 +36,24 @@ type ModalityTabOwnProps = {
35
36
  size?: "sm" | "md" | "lg";
36
37
  disabled?: boolean;
37
38
  className?: string;
39
+ /** Leading icon, drawn before the label. */
40
+ icon?: ComponentType<IconProps>;
41
+ /** Tints the icon of an idle, unhovered tab in this modality's colour. */
42
+ modality?: ModelCategory;
38
43
  };
39
44
  /**
40
- * A model-filter tab. Monochrome and borderless — it renders the app's `soft`
41
- * TabButton, so it uses exactly the same tokens as the dashboard tabs: selected
42
- * is `bg-active` (the resting button fill, no hover), idle is the quiet
43
- * `bg-subtle`, and hover darkens to `bg-hover` like any button.
45
+ * A model-filter tab. Borderless — it renders the app's `soft` TabButton, so
46
+ * it uses exactly the same tokens as the dashboard tabs: selected is
47
+ * `bg-active` (the resting button fill, no hover), idle is the quiet
48
+ * `bg-subtle`, and hover darkens to `bg-hover` like any button. With
49
+ * `modality`, only an idle tab's icon carries the modality colour; selection
50
+ * and hover stay monochrome, so amber remains the only selection signal.
44
51
  *
45
52
  * Rest props (including a runtime-injected ref) pass through to the button —
46
53
  * required when the tab is a popover trigger, where the positioner's anchor
47
54
  * ref arrives via asChild and a closed prop set would silently drop it.
48
55
  */
49
- declare function ModalityTab({ active, onClick, children, size, disabled, className, ...rest }: ModalityTabOwnProps & Omit<ComponentPropsWithoutRef<"button">, keyof ModalityTabOwnProps>): react_jsx_runtime.JSX.Element;
56
+ declare function ModalityTab({ active, onClick, children, size, disabled, className, icon: Icon, modality, ...rest }: ModalityTabOwnProps & Omit<ComponentPropsWithoutRef<"button">, keyof ModalityTabOwnProps>): react_jsx_runtime.JSX.Element;
50
57
 
51
58
  type ModelAccessIconProps = {
52
59
  paidOnly?: boolean;
@@ -76,5 +83,9 @@ declare function ModelSelector({ models, category, value, isLoading, onChange, }
76
83
  type ModalityKey = ModelCategory;
77
84
  /** Map an untrusted category string to its modality key; null if unknown. */
78
85
  declare function getModalityKey(category: string): ModalityKey | null;
86
+ /** CSS var for a modality's faint chip background. */
87
+ declare const modalityBgVar: (key: ModalityKey) => string;
88
+ /** A modality's text color, mixed toward the strong text so it stays readable on its background. */
89
+ declare const modalityTextColor: (key: ModalityKey) => string;
79
90
 
80
- export { ModalityChip, ModalityDot, ModalityTab, ModelAccessIcon, type ModelAccessIconProps, ModelSelector, type ModelSelectorCategory, categoryLabel, getModalityKey };
91
+ export { ModalityChip, ModalityDot, ModalityTab, ModelAccessIcon, type ModelAccessIconProps, ModelSelector, type ModelSelectorCategory, categoryLabel, getModalityKey, modalityBgVar, modalityTextColor };