@pontive/pontkit-core 1.36.0 → 1.37.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.
@@ -7,7 +7,8 @@ export { AUTH_PROVIDERS, PROVIDER_NAMES, providerIcon, type AuthProvider } from
7
7
  /** What the button shows: the legacy kit's `content` prop. */
8
8
  export declare const AUTH_BUTTON_CONTENTS: readonly ["label", "icon-label", "icon"];
9
9
  export type AuthButtonContent = (typeof AUTH_BUTTON_CONTENTS)[number];
10
- export type AuthButtonIconAlign = "start" | "end";
10
+ export declare const AUTH_BUTTON_ICON_ALIGNS: readonly ["start", "end"];
11
+ export type AuthButtonIconAlign = (typeof AUTH_BUTTON_ICON_ALIGNS)[number];
11
12
  /**
12
13
  * # AuthButton: the shared base of the auth-flow buttons
13
14
  *
@@ -26,7 +26,8 @@ export interface FieldValidateDetail {
26
26
  issues: FieldIssue[];
27
27
  }
28
28
  /** "default": every rule; "simple": `required` only (the legacy `validation` attribute). */
29
- export type FieldValidationMode = "default" | "simple";
29
+ export declare const FIELD_VALIDATION_MODES: readonly ["default", "simple"];
30
+ export type FieldValidationMode = (typeof FIELD_VALIDATION_MODES)[number];
30
31
  /** Compiles a pattern source, preferring Unicode mode (needed for `\p{L}`). */
31
32
  export declare function compilePattern(source: string): RegExp | null;
32
33
  /**
@@ -15,7 +15,8 @@ export type PasswordRule = {
15
15
  /** The legacy named patterns (field.defs.ts). */
16
16
  export declare const PASSWORD_RULE_PATTERNS: Record<PasswordRuleName, RegExp>;
17
17
  export declare const DEFAULT_PASSWORD_RULES: PasswordRule[];
18
- export type SecretFieldVariant = "toggle" | "simple";
18
+ export declare const SECRET_FIELD_VARIANTS: readonly ["toggle", "simple"];
19
+ export type SecretFieldVariant = (typeof SECRET_FIELD_VARIANTS)[number];
19
20
  /**
20
21
  * A field whose value is secret: `type="password"`, and with
21
22
  * `variant="toggle"` (default) a show/hide button, built as shadcn builds it,
@@ -2,7 +2,8 @@ import { PropertyDeclarations } from 'lit';
2
2
  import { DesignModeController } from '../../core/design-mode';
3
3
  import { HostElement } from '../../core/host-element';
4
4
  /** The legacy render-spec values. */
5
- export type ContainerType = "flex_column" | "flex_row";
5
+ export declare const CONTAINER_TYPES: readonly ["flex_column", "flex_row"];
6
+ export type ContainerType = (typeof CONTAINER_TYPES)[number];
6
7
  export type ContainerAlign = "stretch" | "start" | "center" | "end";
7
8
  export type ContainerJustify = "start" | "center" | "end" | "between";
8
9
  /**
@@ -1,6 +1,7 @@
1
1
  import { PropertyDeclarations, PropertyValues } from 'lit';
2
2
  import { HostElement } from '../../core/host-element';
3
- export type GapType = "vertical" | "horizontal";
3
+ export declare const GAP_TYPES: readonly ["vertical", "horizontal"];
4
+ export type GapType = (typeof GAP_TYPES)[number];
4
5
  /**
5
6
  * # `<pont2-gap>`: a fixed spacer
6
7
  *
@@ -1,6 +1,7 @@
1
1
  import { PropertyDeclarations } from 'lit';
2
2
  import { HostElement } from '../../core/host-element';
3
- export type HeaderAlign = "start" | "center" | "end";
3
+ export declare const HEADER_ALIGNS: readonly ["start", "center", "end"];
4
+ export type HeaderAlign = (typeof HEADER_ALIGNS)[number];
4
5
  /**
5
6
  * # `<pont2-header>`: the screen's heading group (logo, title, subtitle)
6
7
  *
@@ -1,7 +1,10 @@
1
1
  import { nothing, PropertyDeclarations, PropertyValues } from 'lit';
2
2
  import { ActionController } from '../../core/controllers/action';
3
3
  import { HostElement } from '../../core/host-element';
4
- export type LinkAlign = "start" | "center" | "end";
4
+ export declare const LINK_ALIGNS: readonly ["start", "center", "end"];
5
+ export type LinkAlign = (typeof LINK_ALIGNS)[number];
6
+ export declare const LINK_SERVICES: readonly ["auth", "other"];
7
+ export type LinkService = (typeof LINK_SERVICES)[number];
5
8
  /**
6
9
  * # `<pont2-link>`: "Don't have an account? Sign up"
7
10
  *
@@ -45,7 +48,7 @@ export declare class Link extends HostElement {
45
48
  label: string;
46
49
  prompt: string;
47
50
  event: string | undefined;
48
- service: "auth" | "other";
51
+ service: LinkService;
49
52
  href: string | undefined;
50
53
  target: string | undefined;
51
54
  rel: string | undefined;
@@ -1,7 +1,8 @@
1
1
  import { nothing, PropertyDeclarations } from 'lit';
2
2
  import { DesignModeController } from '../../core/design-mode';
3
3
  import { HostElement } from '../../core/host-element';
4
- export type LogoAlign = "start" | "center" | "end";
4
+ export declare const LOGO_ALIGNS: readonly ["start", "center", "end"];
5
+ export type LogoAlign = (typeof LOGO_ALIGNS)[number];
5
6
  /**
6
7
  * A logo source as an `<img src>`: URLs and `data:` URIs pass through; a bare
7
8
  * base64 string is treated as an SVG (the legacy `resolveIconSource` rule).
@@ -4,7 +4,8 @@ import { InputOTP } from '../../primitives/input-otp/input-otp';
4
4
  import { InputOptions } from '../../primitives/input/input';
5
5
  import { AuthField, FieldIssue } from '../auth-field/auth-field';
6
6
  /** The legacy `pont-otp` layouts, kept for render-spec parity. */
7
- export type OtpLayout = "digits_only" | "simple" | "with_separator" | "with_spacing";
7
+ export declare const OTP_LAYOUTS: readonly ["digits_only", "simple", "with_separator", "with_spacing"];
8
+ export type OtpLayout = (typeof OTP_LAYOUTS)[number];
8
9
  /**
9
10
  * # `<pont2-otp-field>`: a verification-code field
10
11
  *
@@ -1,6 +1,7 @@
1
1
  import { nothing, PropertyDeclarations, PropertyValues } from 'lit';
2
2
  import { HostElement } from '../../core/host-element';
3
- export type QrErrorCorrection = "L" | "M" | "Q" | "H";
3
+ export declare const QR_ERROR_CORRECTIONS: readonly ["L", "M", "Q", "H"];
4
+ export type QrErrorCorrection = (typeof QR_ERROR_CORRECTIONS)[number];
4
5
  /**
5
6
  * One SVG path covering every dark module of `text`'s QR code, plus the
6
7
  * code's size. `null` when the text cannot be encoded.
@@ -1,7 +1,9 @@
1
1
  import { PropertyDeclarations, TemplateResult } from 'lit';
2
2
  import { HostElement } from '../../core/host-element';
3
- export type WatermarkVariant = "brand" | "theme" | "muted";
4
- export type WatermarkLogoAlign = "start" | "end";
3
+ export declare const WATERMARK_VARIANTS: readonly ["brand", "theme", "muted"];
4
+ export type WatermarkVariant = (typeof WATERMARK_VARIANTS)[number];
5
+ export declare const WATERMARK_LOGO_ALIGNS: readonly ["start", "end"];
6
+ export type WatermarkLogoAlign = (typeof WATERMARK_LOGO_ALIGNS)[number];
5
7
  /** The watermark's content (label + logo), shared with the block's footer. */
6
8
  export declare function watermarkContent(label: string, logoAlign: WatermarkLogoAlign): TemplateResult;
7
9
  /**
@@ -0,0 +1,29 @@
1
+ export interface CatalogAttribute {
2
+ key: string;
3
+ label?: string;
4
+ type: string;
5
+ description?: string;
6
+ default?: unknown;
7
+ options?: string[];
8
+ required?: boolean;
9
+ }
10
+ export interface CatalogElement {
11
+ tag: string;
12
+ label?: string;
13
+ description?: string;
14
+ category?: string;
15
+ container?: boolean;
16
+ is_field?: boolean;
17
+ is_trigger?: boolean;
18
+ requires_condition?: string | null;
19
+ attributes: CatalogAttribute[];
20
+ insertion_presets?: Record<string, unknown>;
21
+ }
22
+ export declare const pont2TagFor: (legacy: string) => string | null;
23
+ export interface BuiltCatalog {
24
+ elements: CatalogElement[];
25
+ /** What couldn't be derived: each one is a decision to make, not to guess. */
26
+ problems: string[];
27
+ }
28
+ /** Derives pont2's catalog entries from the legacy ones and the live elements. */
29
+ export declare function buildPont2Catalog(legacy: CatalogElement[]): BuiltCatalog;
@@ -1,10 +1,8 @@
1
1
  /* @pontive/pontkit-core pont2 — generated by pont2/scripts/build-css.mjs */
2
2
  /*
3
- * Load the legacy pontkit stylesheet and pont2 together.
4
- * The legacy file (Tailwind 3, unlayered preflight) is imported INTO the
5
- * lowest layer, so its element resets can no longer override pont2's layered
6
- * recipes. Declared order: pont-legacy < pont2.* < your unlayered CSS.
3
+ * Kept for pages that imported it: the package's main stylesheet,
4
+ * dist/styles.css, now carries both kits itself (the legacy stylesheet in the
5
+ * lowest layer, pont-legacy, then pont2's layers; scripts/build-superset-css.mjs,
6
+ * migration plan decision D4). Importing it is all this file does.
7
7
  */
8
- @layer pont-legacy, pont2.reset, pont2.tokens, pont2.base, pont2.primitives, pont2.kit, pont2.theme.preset, pont2.theme.brand;
9
- @import url("../styles.css") layer(pont-legacy);
10
- @import url("./styles.css");
8
+ @import url("../styles.css");