@pollinations/ui 0.1.0-alpha.3 → 0.1.0-alpha.31
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 +32 -13
- package/dist/{Button-CO3Dpbkj.d.cts → Button-BGqClaBr.d.ts} +2 -2
- package/dist/{Dialog-yXzIFrDg.d.ts → Dialog-D3Nqt8cE.d.ts} +4 -1
- package/dist/app-user-menu/sdk.d.ts +29 -1
- package/dist/app-user-menu/sdk.js +120 -729
- package/dist/app-user-menu/sdk.js.map +1 -1
- package/dist/app.css +13 -0
- package/dist/auth/index.d.ts +17 -7
- package/dist/auth/index.js +209 -1187
- package/dist/auth/index.js.map +1 -1
- package/dist/auth/sdk.d.ts +1 -1
- package/dist/auth/sdk.js +9 -200
- package/dist/auth/sdk.js.map +1 -1
- package/dist/brand/badge-made-with.svg +1 -0
- package/dist/brand/lockup-horizontal-black.png +0 -0
- package/dist/brand/lockup-horizontal-black.svg +3 -3
- package/dist/brand/lockup-horizontal-white.png +0 -0
- package/dist/brand/lockup-horizontal-white.svg +3 -3
- package/dist/brand/lockup-horizontal.svg +4 -1
- package/dist/brand/lockup-stacked-black.png +0 -0
- package/dist/brand/lockup-stacked-black.svg +1 -1
- package/dist/brand/lockup-stacked-white.png +0 -0
- package/dist/brand/lockup-stacked-white.svg +1 -1
- package/dist/brand/lockup-stacked.svg +1 -1
- package/dist/brand/mark-black.png +0 -0
- package/dist/brand/mark-black.svg +1 -3
- package/dist/brand/mark-white.png +0 -0
- package/dist/brand/mark-white.svg +1 -3
- package/dist/brand/mark.svg +1 -1
- 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.png +0 -0
- package/dist/chunk-2BI7XJMG.js +418 -0
- package/dist/chunk-2BI7XJMG.js.map +1 -0
- package/dist/chunk-3VM5R3OI.js +50 -0
- package/dist/chunk-3VM5R3OI.js.map +1 -0
- package/dist/chunk-7GDUPN6U.js +115 -0
- package/dist/chunk-7GDUPN6U.js.map +1 -0
- package/dist/chunk-7NTX3FPZ.js +602 -0
- package/dist/chunk-7NTX3FPZ.js.map +1 -0
- package/dist/chunk-7XDOOFTL.js +105 -0
- package/dist/chunk-7XDOOFTL.js.map +1 -0
- package/dist/chunk-DD7MHUFD.js +93 -0
- package/dist/chunk-DD7MHUFD.js.map +1 -0
- package/dist/chunk-DLKKLAD7.js +536 -0
- package/dist/chunk-DLKKLAD7.js.map +1 -0
- package/dist/chunk-FLQFOTMR.js +107 -0
- package/dist/chunk-FLQFOTMR.js.map +1 -0
- package/dist/chunk-LKOYOXBG.js +284 -0
- package/dist/chunk-LKOYOXBG.js.map +1 -0
- package/dist/chunk-LKUZU37X.js +15 -0
- package/dist/chunk-LKUZU37X.js.map +1 -0
- package/dist/chunk-LRXUPEQM.js +58 -0
- package/dist/chunk-LRXUPEQM.js.map +1 -0
- package/dist/chunk-PBNBZKEZ.js +260 -0
- package/dist/chunk-PBNBZKEZ.js.map +1 -0
- package/dist/chunk-TVPFAM3B.js +88 -0
- package/dist/chunk-TVPFAM3B.js.map +1 -0
- package/dist/chunk-ZLD4VLUG.js +112 -0
- package/dist/chunk-ZLD4VLUG.js.map +1 -0
- package/dist/connect.js +100 -0
- package/dist/connect.js.map +1 -0
- package/dist/gen/index.d.ts +19 -8
- package/dist/gen/index.js +64 -450
- package/dist/gen/index.js.map +1 -1
- package/dist/index-efnABLqH.d.ts +87 -0
- package/dist/index.browser.min.js +1 -1
- package/dist/index.browser.min.js.map +1 -1
- package/dist/index.d.ts +245 -116
- package/dist/index.js +1216 -2748
- package/dist/index.js.map +1 -1
- package/dist/markdown.js +51 -588
- package/dist/markdown.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/theme.css +10 -8
- package/dist/types-CCy9JNu9.d.ts +6 -0
- package/dist/wallet/index.d.ts +5 -0
- package/dist/wallet/index.js +17 -356
- package/dist/wallet/index.js.map +1 -1
- package/package.json +18 -22
- package/dist/Button-CO3Dpbkj.d.ts +0 -29
- package/dist/Chip-v-ADv6cz.d.cts +0 -18
- package/dist/Dialog-yXzIFrDg.d.cts +0 -63
- package/dist/app-user-menu/sdk.cjs +0 -893
- package/dist/app-user-menu/sdk.cjs.map +0 -1
- package/dist/app-user-menu/sdk.d.cts +0 -17
- package/dist/auth/index.cjs +0 -1502
- package/dist/auth/index.cjs.map +0 -1
- package/dist/auth/index.d.cts +0 -109
- package/dist/auth/sdk.cjs +0 -239
- package/dist/auth/sdk.cjs.map +0 -1
- package/dist/auth/sdk.d.cts +0 -40
- package/dist/gen/index.cjs +0 -658
- package/dist/gen/index.cjs.map +0 -1
- package/dist/gen/index.d.cts +0 -80
- package/dist/index.cjs +0 -4967
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -887
- package/dist/markdown.cjs +0 -821
- package/dist/markdown.cjs.map +0 -1
- package/dist/markdown.d.cts +0 -16
- package/dist/wallet/index.cjs +0 -415
- package/dist/wallet/index.cjs.map +0 -1
- package/dist/wallet/index.d.cts +0 -52
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`
|
|
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`:
|
|
@@ -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
|
|
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
|
|
|
@@ -130,16 +136,27 @@ Wallet colors and utilities are bundled into the main stylesheet
|
|
|
130
136
|
|
|
131
137
|
## Dialog layout
|
|
132
138
|
|
|
133
|
-
`Dialog`
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
+
`Dialog` keeps rounded corners at every width. Below 480px it spans the phone
|
|
140
|
+
width with an 8px vertical gap; larger viewports have a 16px outer inset and use
|
|
141
|
+
the `size` width limit. Height follows the content, capped by the available
|
|
142
|
+
viewport. Confirmations and completed results follow the same phone-width rule.
|
|
143
|
+
|
|
144
|
+
Use `DialogHeader`, `DialogBody` (scrolling content), and `DialogFooter` for
|
|
145
|
+
consistent spacing and actions. The frame uses Enter's themed panel color;
|
|
146
|
+
inner cards use the neutral `Surface` default. `AuthModal` uses the same frame
|
|
147
|
+
for standalone pages. Content such as document previews can request a height,
|
|
148
|
+
which remains capped by the shared frame.
|
|
149
|
+
|
|
150
|
+
Enter's `ResourceDialog` keeps expandable forms top-aligned at every width;
|
|
151
|
+
completed results use the centered `Dialog`. Both inherit the same viewport sizing.
|
|
139
152
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
153
|
+
Actions that write server data use a bordered button (`intent="commit"`).
|
|
154
|
+
Navigation and export actions, including device Continue and Copy and close,
|
|
155
|
+
use the default filled style. Sign-in uses `intent="brand"`; destructive
|
|
156
|
+
confirmations use `intent="danger"`. Cancel/Decline/Close actions use the muted,
|
|
157
|
+
borderless `intent="neutral"` style.
|
|
158
|
+
Saved-card checkout preserves its dedicated footer: full-width Confirm with
|
|
159
|
+
Cancel and the alternative payment-method link on the line below.
|
|
143
160
|
|
|
144
161
|
## What's exported
|
|
145
162
|
|
|
@@ -181,10 +198,12 @@ in the shared dashboard wrapper rather than repeating dimensions in consumers.
|
|
|
181
198
|
`Switch`, `TabButton`, `Table`, `TableBody`, `TableCell`, `TableHead`,
|
|
182
199
|
`TableHeaderCell`, `TableRow`, `Text`, `Textarea`, `Tooltip`.
|
|
183
200
|
- **Design compositions** — `Alert`, `CodeBlock`, `Collapsible`,
|
|
184
|
-
`CopyButton`, `EditableCombobox`, `EditableComboboxToken`,
|
|
201
|
+
`CopyButton`, `CopyStateIcon`, `EditableCombobox`, `EditableComboboxToken`,
|
|
185
202
|
`ExternalLinkButton`, `FieldStack`, `FileUpload`, `InfoTip`, `LinkCard`,
|
|
186
203
|
`MediaPlaceholder`, `MultiSelect`, `NavItem`, `PeriodPicker`, `Section`,
|
|
187
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.
|
|
188
207
|
`FieldStack` supports label, helper, action, error, and opt-in aligned label
|
|
189
208
|
rows for compact forms.
|
|
190
209
|
`EditableCombobox.startContent` renders content inside a wrapping input shell
|
|
@@ -2,14 +2,14 @@ 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";
|
|
9
9
|
readonly xs: "polli:h-5 polli:px-1.5 polli:py-0 polli:text-[11px] polli:leading-none";
|
|
10
10
|
readonly sm: "polli:min-h-7 polli:px-2 polli:pt-0.5 polli:pb-1";
|
|
11
11
|
readonly md: "polli:min-h-9 polli:px-4 polli:pt-1.5 polli:pb-2";
|
|
12
|
-
readonly lg: "polli:min-h-12 polli:px-6 polli:py-3";
|
|
12
|
+
readonly lg: "polli:min-h-12 polli:px-6 polli:py-3 polli:text-base";
|
|
13
13
|
};
|
|
14
14
|
type BaseButtonProps = {
|
|
15
15
|
icon?: ReactNode;
|
|
@@ -56,7 +56,10 @@ type DialogBodyProps = ScrollAreaProps & {
|
|
|
56
56
|
footnote?: ReactNode;
|
|
57
57
|
bodyClassName?: string;
|
|
58
58
|
};
|
|
59
|
-
/**
|
|
59
|
+
/**
|
|
60
|
+
* Scroll area whose actions follow the content and stay pinned to the bottom
|
|
61
|
+
* once the content scrolls, so a short screen never opens a gap above them.
|
|
62
|
+
*/
|
|
60
63
|
declare function DialogBody({ children, actions, footnote, bodyClassName, className, ...props }: DialogBodyProps): react_jsx_runtime.JSX.Element;
|
|
61
64
|
declare const DialogFooter: FC<DialogFooterProps>;
|
|
62
65
|
|
|
@@ -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-efnABLqH.js';
|
|
3
|
+
import '../types-CCy9JNu9.js';
|
|
4
|
+
import 'react';
|
|
2
5
|
|
|
3
6
|
type AppUserMenuLabels = {
|
|
4
7
|
authorize: string;
|
|
@@ -7,11 +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;
|
|
21
|
+
/** Larger logged-out action for prominent placements such as a page hero. */
|
|
22
|
+
connectSize?: keyof typeof CONNECT_SIZES;
|
|
13
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;
|
|
32
|
+
};
|
|
33
|
+
declare const CONNECT_SIZES: {
|
|
34
|
+
md: {
|
|
35
|
+
button: string;
|
|
36
|
+
mark: string;
|
|
37
|
+
};
|
|
38
|
+
lg: {
|
|
39
|
+
button: string;
|
|
40
|
+
mark: string;
|
|
41
|
+
};
|
|
14
42
|
};
|
|
15
|
-
declare function AppUserMenu({ dashboardHref, 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;
|
|
16
44
|
|
|
17
45
|
export { AppUserMenu, type AppUserMenuLabels, type AppUserMenuProps };
|