@pontive/pontkit-core 1.29.0 → 1.30.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/catalog.json +1 -1
- package/custom-elements.json +1 -1
- package/dist/pont2/index.mjs +678 -617
- package/dist/pont2/index.mjs.map +1 -1
- package/dist/pont2/kit/flow-widget/preview.d.ts +46 -0
- package/dist/pont2/kit/index.d.ts +1 -0
- package/dist/pont2/styles.css +18 -16
- package/dist/pont2/theme/tokens.json.d.ts +354 -354
- package/dist/pont2/theme.mjs +94 -94
- package/dist/pont2/theme.mjs.map +1 -1
- package/dist/pont2/tokens.json +354 -354
- package/package.json +1 -1
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { WidgetClient } from './flow-widget';
|
|
2
|
+
export interface PreviewScreen {
|
|
3
|
+
/** A name for a screen picker. */
|
|
4
|
+
label: string;
|
|
5
|
+
/** The widget to preview it in (its tag is `pont2-<flow>`). */
|
|
6
|
+
flow: "signin" | "signup";
|
|
7
|
+
/** The screen, as a render spec would write it. */
|
|
8
|
+
spec: string;
|
|
9
|
+
}
|
|
10
|
+
/** Sample screens for a branding preview, keyed by id. */
|
|
11
|
+
export declare const PREVIEW_SCREENS: {
|
|
12
|
+
readonly signin: {
|
|
13
|
+
readonly label: "Sign in";
|
|
14
|
+
readonly flow: "signin";
|
|
15
|
+
readonly spec: "<pont2-block>\n <pont2-header>\n <pont2-title content=\"Welcome back\"></pont2-title>\n <pont2-subtitle content=\"Sign in to your account\"></pont2-subtitle>\n </pont2-header>\n <pont2-provider-field providers=\"google apple github\"></pont2-provider-field>\n <pont2-divider label=\"Or continue with\"></pont2-divider>\n <pont2-identifier-field identifiers=\"email username\" required></pont2-identifier-field>\n <pont2-submit-button event=\"submit_identifier\" label=\"Continue\"></pont2-submit-button>\n <pont2-passkey-button content=\"icon-label\" event=\"passkey\"></pont2-passkey-button>\n <pont2-link prompt=\"Don't have an account?\" label=\"Sign up\" event=\"goto_signup\"></pont2-link>\n</pont2-block>";
|
|
16
|
+
};
|
|
17
|
+
readonly password: {
|
|
18
|
+
readonly label: "Password";
|
|
19
|
+
readonly flow: "signin";
|
|
20
|
+
readonly spec: "<pont2-block>\n <pont2-header>\n <pont2-title content=\"Enter your password\"></pont2-title>\n </pont2-header>\n <pont2-edit-identifier identifier=\"ada@example.com\" event=\"change_identifier\"></pont2-edit-identifier>\n <pont2-password-field required rules=\"[]\" forgot forgot-event=\"forgot_password\"></pont2-password-field>\n <pont2-submit-button event=\"submit_password\" label=\"Sign in\"></pont2-submit-button>\n</pont2-block>";
|
|
21
|
+
};
|
|
22
|
+
readonly verify: {
|
|
23
|
+
readonly label: "Verification code";
|
|
24
|
+
readonly flow: "signin";
|
|
25
|
+
readonly spec: "<pont2-block>\n <pont2-header>\n <pont2-title content=\"Check your email\"></pont2-title>\n <pont2-subtitle content=\"We sent a 6-digit code to ada@example.com\"></pont2-subtitle>\n </pont2-header>\n <pont2-alert status=\"info\" icon description=\"The code expires in 10 minutes.\"></pont2-alert>\n <pont2-container align=\"center\">\n <pont2-otp-field layout=\"simple\" required></pont2-otp-field>\n </pont2-container>\n <pont2-submit-button event=\"verify_code\" label=\"Verify\"></pont2-submit-button>\n <pont2-otp-resend duration=\"30\" event=\"resend_code\"></pont2-otp-resend>\n</pont2-block>";
|
|
26
|
+
};
|
|
27
|
+
readonly signup: {
|
|
28
|
+
readonly label: "Sign up";
|
|
29
|
+
readonly flow: "signup";
|
|
30
|
+
readonly spec: "<pont2-block>\n <pont2-header>\n <pont2-title content=\"Create an account\"></pont2-title>\n <pont2-subtitle content=\"It only takes a minute\"></pont2-subtitle>\n </pont2-header>\n <pont2-name-field required></pont2-name-field>\n <pont2-email-field required></pont2-email-field>\n <pont2-password-field required></pont2-password-field>\n <pont2-confirm-field required></pont2-confirm-field>\n <pont2-submit-button event=\"submit_signup\" label=\"Create account\"></pont2-submit-button>\n <pont2-link prompt=\"Already have an account?\" label=\"Sign in\" event=\"goto_signin\"></pont2-link>\n</pont2-block>";
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
export type PreviewScreenId = keyof typeof PREVIEW_SCREENS;
|
|
34
|
+
export interface PreviewClientOptions {
|
|
35
|
+
/** How long each request stays busy, in ms, so busy states can be seen (default 600). */
|
|
36
|
+
delay?: number;
|
|
37
|
+
/** The flow's localised messages (flow errors, "Start again" …). */
|
|
38
|
+
messages?: Record<string, string>;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* A `WidgetClient` that shows one screen and never leaves it. Every request
|
|
42
|
+
* (a submit, a provider button, a link) is busy for `delay` ms and then
|
|
43
|
+
* resolves without a new screen, so the screen and what was typed stay put.
|
|
44
|
+
* Nothing is sent anywhere.
|
|
45
|
+
*/
|
|
46
|
+
export declare function previewClient(spec: string, options?: PreviewClientOptions): WidgetClient;
|
package/dist/pont2/styles.css
CHANGED
|
@@ -39,14 +39,21 @@
|
|
|
39
39
|
* ref/ raw values, global only, never read by components
|
|
40
40
|
* sem/ design roles; light/dark lives in sem/color.css
|
|
41
41
|
*/
|
|
42
|
-
|
|
42
|
+
|
|
43
|
+
/* ./ref/color.css */
|
|
43
44
|
/*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
|
|
45
|
+
* ===========================================================================
|
|
46
|
+
* COLOR REFERENCE TOKENS
|
|
47
|
+
* --pont2-ref-color-*
|
|
48
|
+
* ===========================================================================
|
|
49
|
+
*/
|
|
50
|
+
|
|
51
|
+
/*
|
|
52
|
+
* --------------------------------------------------
|
|
53
|
+
* COLOR PALETTE
|
|
54
|
+
* --------------------------------------------------
|
|
49
55
|
*/
|
|
56
|
+
|
|
50
57
|
@layer pont2.tokens {
|
|
51
58
|
:root {
|
|
52
59
|
--pont2-ref-color-red-50: oklch(97.1% 0.013 17.38);
|
|
@@ -366,17 +373,12 @@
|
|
|
366
373
|
}
|
|
367
374
|
}
|
|
368
375
|
|
|
369
|
-
/* ./ref/roles.css */
|
|
370
376
|
/*
|
|
371
|
-
*
|
|
372
|
-
*
|
|
373
|
-
*
|
|
374
|
-
*
|
|
375
|
-
* base neutrals: surfaces, text, borders
|
|
376
|
-
* brand primary actions and charts (neutral by default, so the
|
|
377
|
-
* defaults look like shadcn's neutral theme)
|
|
378
|
-
* destructive, warning, success, info status colours
|
|
377
|
+
* --------------------------------------------------
|
|
378
|
+
* COLOR ROLES
|
|
379
|
+
* --------------------------------------------------
|
|
379
380
|
*/
|
|
381
|
+
|
|
380
382
|
@layer pont2.tokens {
|
|
381
383
|
:root {
|
|
382
384
|
--pont2-ref-color-base-50: var(--pont2-ref-color-neutral-50);
|
|
@@ -456,7 +458,7 @@
|
|
|
456
458
|
/* ./sem/color.css */
|
|
457
459
|
/*
|
|
458
460
|
* sem · colour roles: shadcn's set plus pont2's status colours, built on the
|
|
459
|
-
* ref
|
|
461
|
+
* ref colour roles (ref/color.css). The theme mode lives here and only here
|
|
460
462
|
* (docs/11-tokens.md §6).
|
|
461
463
|
*
|
|
462
464
|
* Defaults reproduce shadcn's neutral theme exactly. `primary` and
|