@pollinations/ui 0.1.0-alpha.4 → 0.1.0-alpha.41

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 (89) hide show
  1. package/README.md +16 -8
  2. package/dist/{Button-ByKwRtdw.d.cts → Button-Bt_eMnOx.d.ts} +4 -2
  3. package/dist/app-user-menu/sdk.d.ts +17 -5
  4. package/dist/app-user-menu/sdk.js +105 -775
  5. package/dist/app-user-menu/sdk.js.map +1 -1
  6. package/dist/app.css +21 -0
  7. package/dist/auth/index.d.ts +12 -5
  8. package/dist/auth/index.js +170 -1159
  9. package/dist/auth/index.js.map +1 -1
  10. package/dist/auth/sdk.d.ts +1 -1
  11. package/dist/auth/sdk.js +9 -205
  12. package/dist/auth/sdk.js.map +1 -1
  13. package/dist/brand/badge-made-with.svg +1 -0
  14. package/dist/brand/polli/polli-lockup-horizontal-black.png +0 -0
  15. package/dist/brand/polli/polli-lockup-horizontal-white.png +0 -0
  16. package/dist/brand/polli/polli.png +0 -0
  17. package/dist/chunk-B7T42IY2.js +255 -0
  18. package/dist/chunk-B7T42IY2.js.map +1 -0
  19. package/dist/chunk-DFYLQTCM.js +107 -0
  20. package/dist/chunk-DFYLQTCM.js.map +1 -0
  21. package/dist/chunk-EHOK3XKM.js +112 -0
  22. package/dist/chunk-EHOK3XKM.js.map +1 -0
  23. package/dist/chunk-FZXMS7HJ.js +93 -0
  24. package/dist/chunk-FZXMS7HJ.js.map +1 -0
  25. package/dist/chunk-KLAOGE6Y.js +125 -0
  26. package/dist/chunk-KLAOGE6Y.js.map +1 -0
  27. package/dist/chunk-KTGSOTNW.js +534 -0
  28. package/dist/chunk-KTGSOTNW.js.map +1 -0
  29. package/dist/chunk-LAZ5O2ZK.js +105 -0
  30. package/dist/chunk-LAZ5O2ZK.js.map +1 -0
  31. package/dist/chunk-MS2GGEMU.js +311 -0
  32. package/dist/chunk-MS2GGEMU.js.map +1 -0
  33. package/dist/chunk-MU7JQOTF.js +170 -0
  34. package/dist/chunk-MU7JQOTF.js.map +1 -0
  35. package/dist/chunk-OWQ2HDQB.js +50 -0
  36. package/dist/chunk-OWQ2HDQB.js.map +1 -0
  37. package/dist/chunk-QPNEXTZ5.js +88 -0
  38. package/dist/chunk-QPNEXTZ5.js.map +1 -0
  39. package/dist/{app-user-menu/sdk.cjs → chunk-R3RMENGN.js} +114 -773
  40. package/dist/chunk-R3RMENGN.js.map +1 -0
  41. package/dist/chunk-WV4XTYMU.js +58 -0
  42. package/dist/chunk-WV4XTYMU.js.map +1 -0
  43. package/dist/chunk-WVDV47XQ.js +651 -0
  44. package/dist/chunk-WVDV47XQ.js.map +1 -0
  45. package/dist/connect.js +100 -0
  46. package/dist/connect.js.map +1 -0
  47. package/dist/gen/index.d.ts +14 -7
  48. package/dist/gen/index.js +59 -474
  49. package/dist/gen/index.js.map +1 -1
  50. package/dist/index-BR4r9rhQ.d.ts +90 -0
  51. package/dist/index.browser.min.js +1 -1
  52. package/dist/index.browser.min.js.map +1 -1
  53. package/dist/index.d.ts +195 -103
  54. package/dist/index.js +1051 -2801
  55. package/dist/index.js.map +1 -1
  56. package/dist/licenses/Octicons-MIT.txt +21 -0
  57. package/dist/markdown.d.ts +3 -1
  58. package/dist/markdown.js +69 -598
  59. package/dist/markdown.js.map +1 -1
  60. package/dist/styles.css +1 -1
  61. package/dist/theme.css +12 -0
  62. package/dist/types-CCy9JNu9.d.ts +6 -0
  63. package/dist/wallet/index.d.ts +20 -1
  64. package/dist/wallet/index.js +19 -370
  65. package/dist/wallet/index.js.map +1 -1
  66. package/package.json +18 -22
  67. package/dist/Button-ByKwRtdw.d.ts +0 -29
  68. package/dist/Chip-v-ADv6cz.d.cts +0 -18
  69. package/dist/Dialog-D3Nqt8cE.d.cts +0 -66
  70. package/dist/app-user-menu/sdk.cjs.map +0 -1
  71. package/dist/app-user-menu/sdk.d.cts +0 -33
  72. package/dist/auth/index.cjs +0 -1512
  73. package/dist/auth/index.cjs.map +0 -1
  74. package/dist/auth/index.d.cts +0 -112
  75. package/dist/auth/sdk.cjs +0 -244
  76. package/dist/auth/sdk.cjs.map +0 -1
  77. package/dist/auth/sdk.d.cts +0 -40
  78. package/dist/gen/index.cjs +0 -687
  79. package/dist/gen/index.cjs.map +0 -1
  80. package/dist/gen/index.d.cts +0 -84
  81. package/dist/index.cjs +0 -5183
  82. package/dist/index.cjs.map +0 -1
  83. package/dist/index.d.cts +0 -933
  84. package/dist/markdown.cjs +0 -826
  85. package/dist/markdown.cjs.map +0 -1
  86. package/dist/markdown.d.cts +0 -16
  87. package/dist/wallet/index.cjs +0 -429
  88. package/dist/wallet/index.cjs.map +0 -1
  89. package/dist/wallet/index.d.cts +0 -53
package/README.md CHANGED
@@ -46,7 +46,8 @@ The root `@pollinations/ui` entry also ships a browser IIFE bundle for
46
46
  no-build pages. It exposes SDK-free primitives and compositions on
47
47
  `window.PollinationsUI`. Non-root subpaths such as `@pollinations/ui/auth`,
48
48
  `@pollinations/ui/wallet`, `@pollinations/ui/gen`, and
49
- `@pollinations/ui/app-user-menu/sdk` remain ESM/CJS-only.
49
+ `@pollinations/ui/app-user-menu/sdk` are ESM-only. The alpha package ships
50
+ ES modules with shared chunks; it does not include a CommonJS build.
50
51
 
51
52
  React 19 no longer ships UMD builds, so load React from an ESM CDN first, set
52
53
  the globals expected by the IIFE bundle, then load `@pollinations/ui`:
@@ -54,7 +55,7 @@ the globals expected by the IIFE bundle, then load `@pollinations/ui`:
54
55
  ```html
55
56
  <link
56
57
  rel="stylesheet"
57
- href="https://cdn.jsdelivr.net/npm/@pollinations/ui@alpha/styles.css"
58
+ href="https://cdn.jsdelivr.net/npm/@pollinations/ui@alpha/dist/styles.css"
58
59
  />
59
60
  <div id="root"></div>
60
61
  <script type="module">
@@ -82,12 +83,17 @@ the globals expected by the IIFE bundle, then load `@pollinations/ui`:
82
83
  ```
83
84
 
84
85
  The browser bundle keeps React and ReactDOM external via those globals, but it
85
- does bundle the root entry's package dependencies, including Ark UI,
86
- react-markdown, remark, and rehype.
86
+ does bundle the root entry's package dependencies, including Ark UI. Markdown
87
+ and its react-markdown/remark/rehype dependencies are available only through
88
+ the ESM `@pollinations/ui/markdown` subpath.
87
89
 
88
90
  React's guidance on loading React 19 without UMD builds:
89
91
  https://react.dev/blog/2024/04/25/react-19-upgrade-guide#umd-builds-removed
90
92
 
93
+ `dist/connect.js` is a separate, self-contained bundle (React included) that
94
+ defines the `<polli-connect>` Connect button. Usage:
95
+ [Drop-in Button](../../BRING_YOUR_OWN_POLLEN.md#-drop-in-button-no-build-step).
96
+
91
97
  For Pollinations apps that use unprefixed Tailwind utilities, import the
92
98
  package-owned app stylesheet instead:
93
99
 
@@ -192,10 +198,12 @@ Cancel and the alternative payment-method link on the line below.
192
198
  `Switch`, `TabButton`, `Table`, `TableBody`, `TableCell`, `TableHead`,
193
199
  `TableHeaderCell`, `TableRow`, `Text`, `Textarea`, `Tooltip`.
194
200
  - **Design compositions** — `Alert`, `CodeBlock`, `Collapsible`,
195
- `CopyButton`, `EditableCombobox`, `EditableComboboxToken`,
201
+ `CopyButton`, `CopyStateIcon`, `EditableCombobox`, `EditableComboboxToken`,
196
202
  `ExternalLinkButton`, `FieldStack`, `FileUpload`, `InfoTip`, `LinkCard`,
197
203
  `MediaPlaceholder`, `MultiSelect`, `NavItem`, `PeriodPicker`, `Section`,
198
204
  `StatCard`.
205
+ `CopyButton` shows the one copy feedback (a check and "Copied"); a spot that
206
+ draws its own icon uses `CopyStateIcon`, a clipboard that turns into a check.
199
207
  `FieldStack` supports label, helper, action, error, and opt-in aligned label
200
208
  rows for compact forms.
201
209
  `EditableCombobox.startContent` renders content inside a wrapping input shell
@@ -272,9 +280,9 @@ Wallet tokens are public (bundled into `@pollinations/ui/styles.css`):
272
280
  | `--polli-color-paid-pale` | Paid-balance wash. |
273
281
  | `--polli-color-paid-soft` | Paid-balance marker. |
274
282
  | `--polli-color-paid-deep` | Paid-balance text. |
275
- | `--polli-color-tier-pale` | Quest Pollen wash. |
276
- | `--polli-color-tier-soft` | Quest Pollen marker. |
277
- | `--polli-color-tier-deep` | Quest Pollen text. |
283
+ | `--polli-color-tier-pale` | Quest balance wash. |
284
+ | `--polli-color-tier-soft` | Quest balance marker. |
285
+ | `--polli-color-tier-deep` | Quest balance text. |
278
286
 
279
287
  **Intent (theme-independent):**
280
288
 
@@ -2,7 +2,7 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { PropsWithChildren, ReactNode } from 'react';
3
3
 
4
4
  /** Semantic action roles. Label recipes live on Chip. */
5
- type ButtonIntent = "danger" | "info" | "neutral" | "brand" | "commit";
5
+ type ButtonIntent = "danger" | "info" | "neutral" | "brand" | "commit" | "surface";
6
6
  type ButtonAppearance = "pill" | "raised";
7
7
  declare const pillSizes: {
8
8
  readonly icon: "polli:h-12 polli:w-12 polli:p-0";
@@ -20,10 +20,12 @@ type BaseButtonProps = {
20
20
  size?: keyof typeof pillSizes;
21
21
  className?: string;
22
22
  disabled?: boolean;
23
+ /** The action just succeeded; shown briefly before the flow moves on. */
24
+ done?: boolean;
23
25
  };
24
26
  type ButtonProps<T extends React.ElementType = "button"> = PropsWithChildren<BaseButtonProps> & {
25
27
  as?: T;
26
28
  } & Omit<React.ComponentPropsWithoutRef<T>, keyof BaseButtonProps | "as">;
27
- declare function Button<T extends React.ElementType = "button">({ as, children, icon, intent, appearance, size, className, disabled, ...buttonProps }: ButtonProps<T>): react_jsx_runtime.JSX.Element;
29
+ declare function Button<T extends React.ElementType = "button">({ as, children, icon, intent, appearance, size, className, disabled, done, ...buttonProps }: ButtonProps<T>): react_jsx_runtime.JSX.Element;
28
30
 
29
31
  export { type ButtonProps as B, type ButtonAppearance as a, Button as b };
@@ -1,4 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { a as AppIcon, D as DiscordIcon, g as BugIcon } from '../index-BR4r9rhQ.js';
3
+ import '../types-CCy9JNu9.js';
4
+ import 'react';
2
5
 
3
6
  type AppUserMenuLabels = {
4
7
  authorize: string;
@@ -7,27 +10,36 @@ type AppUserMenuLabels = {
7
10
  buyPollen: string;
8
11
  logout: string;
9
12
  };
13
+ declare const MENU_LINK_ICONS: {
14
+ app: typeof AppIcon;
15
+ discord: typeof DiscordIcon;
16
+ bug: typeof BugIcon;
17
+ };
10
18
  type AppUserMenuProps = {
11
19
  /** Optional caller-owned dashboard destination for the linked avatar. */
12
20
  dashboardHref?: string;
13
21
  /** Larger logged-out action for prominent placements such as a page hero. */
14
22
  connectSize?: keyof typeof CONNECT_SIZES;
15
23
  labels?: Partial<AppUserMenuLabels>;
24
+ /** Class for the dropdown panel, which renders in a portal outside the menu. */
25
+ menuClassName?: string;
26
+ menuLinks?: {
27
+ label: string;
28
+ href: string;
29
+ icon?: keyof typeof MENU_LINK_ICONS;
30
+ }[];
31
+ showBuyPollen?: boolean;
16
32
  };
17
33
  declare const CONNECT_SIZES: {
18
34
  md: {
19
35
  button: string;
20
- cell: string;
21
36
  mark: string;
22
- label: string;
23
37
  };
24
38
  lg: {
25
39
  button: string;
26
- cell: string;
27
40
  mark: string;
28
- label: string;
29
41
  };
30
42
  };
31
- declare function AppUserMenu({ dashboardHref, connectSize, labels: labelOverrides, }: AppUserMenuProps): react_jsx_runtime.JSX.Element;
43
+ declare function AppUserMenu({ dashboardHref, connectSize, labels: labelOverrides, menuClassName, menuLinks, showBuyPollen, }: AppUserMenuProps): react_jsx_runtime.JSX.Element;
32
44
 
33
45
  export { AppUserMenu, type AppUserMenuLabels, type AppUserMenuProps };