@xenosystem/components 0.4.0 → 0.6.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.
@@ -44,8 +44,10 @@ interface SignInFormProps {
44
44
  animate?: boolean;
45
45
  /** Diagnostic hook the panel sets to its phase; carried to the DOM as `data-phase`. */
46
46
  phase?: string;
47
+ /** One callback for every action (a declaration binds this once); an action's own `onClick` still wins. */
48
+ onAction?: (id: string) => void;
47
49
  }
48
- declare function SignInForm({ tag, title, body, actions, note, warning, identity, animate, phase }: SignInFormProps): react.JSX.Element;
50
+ declare function SignInForm({ tag, title, body, actions, note, warning, identity, animate, phase, onAction }: SignInFormProps): react.JSX.Element;
49
51
  /** The licence plates are the same form with a tag; kept as a name so a panel reads honestly. */
50
52
  declare const LicencePlate: typeof SignInForm;
51
53
 
@@ -163,4 +165,21 @@ interface GalleryEntry {
163
165
  }
164
166
  declare function gallery(): GalleryEntry[];
165
167
 
166
- export { AuthDoor, type AuthDoorProps, AuthHero, type AuthHeroProps, type AuthHeroStat, CREDENTIAL_STATES, type CredentialErrors, CredentialForm, type CredentialFormProps, type CredentialMode, type CredentialValues, EmailDisclosure, type EmailDisclosureProps, type GalleryEntry, LicencePlate, OrDivider, STATES, type SignInAction, SignInForm, type SignInFormProps, type SocialProvider, SocialSignIn, type SocialSignInProps, XenoMark, ensureAuthStyles, gallery };
168
+ /**
169
+ * `COMPONENTS` — the family's units by their `family/Unit` names, for a block declaration's registry
170
+ * (`@xenosystem/block-sdk`). A block names `auth/SignInForm`; the host resolves it here. One map per
171
+ * family, merged by the host; nothing is registered by hand elsewhere.
172
+ */
173
+
174
+ declare const COMPONENTS: {
175
+ readonly 'auth/AuthDoor': typeof AuthDoor;
176
+ readonly 'auth/AuthHero': typeof AuthHero;
177
+ readonly 'auth/SignInForm': typeof SignInForm;
178
+ readonly 'auth/CredentialForm': typeof CredentialForm;
179
+ readonly 'auth/SocialSignIn': typeof SocialSignIn;
180
+ readonly 'auth/EmailDisclosure': typeof EmailDisclosure;
181
+ readonly 'auth/OrDivider': typeof OrDivider;
182
+ readonly 'auth/XenoMark': typeof XenoMark;
183
+ };
184
+
185
+ export { AuthDoor, type AuthDoorProps, AuthHero, type AuthHeroProps, type AuthHeroStat, COMPONENTS, CREDENTIAL_STATES, type CredentialErrors, CredentialForm, type CredentialFormProps, type CredentialMode, type CredentialValues, EmailDisclosure, type EmailDisclosureProps, type GalleryEntry, LicencePlate, OrDivider, STATES, type SignInAction, SignInForm, type SignInFormProps, type SocialProvider, SocialSignIn, type SocialSignInProps, XenoMark, ensureAuthStyles, gallery };
@@ -19,7 +19,7 @@ var CSS = `
19
19
  .xc-auth[data-aspect=square] .xc-brand svg,.xc-auth__head .xc-brand svg{width:20px;height:20px}
20
20
  .xc-brand__word{font-size:13px;font-weight:700;letter-spacing:.2em;text-transform:uppercase}
21
21
  .xc-auth[data-aspect=square] .xc-brand__word,.xc-auth__head .xc-brand__word{font-size:11px}
22
- .xc-hero__h1{font-size:3.5rem;font-weight:700;line-height:1.1;letter-spacing:-.02em;max-width:32rem}
22
+ .xc-hero__h1{font-size:3.5rem;font-weight:700;line-height:1.1;letter-spacing:-.02em;max-width:32rem;white-space:pre-line}
23
23
  .xc-auth[data-aspect=square] .xc-hero__h1{font-size:2rem}
24
24
  .xc-hero__lead{margin-top:16px;max-width:24rem;font-size:16px;line-height:1.6}
25
25
  .xc-hero__stats{display:flex;align-items:center;gap:32px}
@@ -134,7 +134,7 @@ function AuthHero({ headline, lead, stats, imageSrc, compact }) {
134
134
  import { useEffect, useState } from "react";
135
135
  import { Button } from "@xenosystem/elements-react";
136
136
  import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
137
- function SignInForm({ tag, title, body, actions, note, warning, identity, animate = true, phase }) {
137
+ function SignInForm({ tag, title, body, actions, note, warning, identity, animate = true, phase, onAction }) {
138
138
  useAuthStyles();
139
139
  const [visible, setVisible] = useState(!animate);
140
140
  useEffect(() => {
@@ -146,7 +146,7 @@ function SignInForm({ tag, title, body, actions, note, warning, identity, animat
146
146
  tag && /* @__PURE__ */ jsx3("span", { className: "xc-form__tag", children: tag }),
147
147
  /* @__PURE__ */ jsx3("h2", { className: "xc-form__h2", children: title }),
148
148
  /* @__PURE__ */ jsx3("p", { className: "xc-form__sub", children: body }),
149
- actions.length > 0 && /* @__PURE__ */ jsx3("div", { className: "xc-form__actions", children: actions.map((a) => /* @__PURE__ */ jsx3(Button, { variant: a.variant ?? "secondary", size: "lg", disabled: a.disabled, onClick: a.onClick, "data-intent": a.id, children: a.label }, a.id)) }),
149
+ actions.length > 0 && /* @__PURE__ */ jsx3("div", { className: "xc-form__actions", children: actions.map((a) => /* @__PURE__ */ jsx3(Button, { variant: a.variant ?? "secondary", size: "lg", disabled: a.disabled, onClick: a.onClick ?? (onAction ? () => onAction(a.id) : void 0), "data-intent": a.id, children: a.label }, a.id)) }),
150
150
  note && /* @__PURE__ */ jsx3("p", { className: "xc-form__note", children: note }),
151
151
  warning && /* @__PURE__ */ jsx3("p", { className: "xc-form__warn", children: warning }),
152
152
  identity && /* @__PURE__ */ jsxs3("p", { className: "xc-form__who", children: [
@@ -357,9 +357,22 @@ function gallery() {
357
357
  out.push({ family: "auth", unit: "OrDivider", state: "default", stage: "form", render: () => /* @__PURE__ */ jsx9(OrDivider, {}) });
358
358
  return out;
359
359
  }
360
+
361
+ // src/auth/components.ts
362
+ var COMPONENTS = {
363
+ "auth/AuthDoor": AuthDoor,
364
+ "auth/AuthHero": AuthHero,
365
+ "auth/SignInForm": SignInForm,
366
+ "auth/CredentialForm": CredentialForm,
367
+ "auth/SocialSignIn": SocialSignIn,
368
+ "auth/EmailDisclosure": EmailDisclosure,
369
+ "auth/OrDivider": OrDivider,
370
+ "auth/XenoMark": XenoMark
371
+ };
360
372
  export {
361
373
  AuthDoor,
362
374
  AuthHero,
375
+ COMPONENTS,
363
376
  CREDENTIAL_STATES,
364
377
  CredentialForm,
365
378
  EmailDisclosure,
package/dist/index.d.ts CHANGED
@@ -3,6 +3,6 @@
3
3
  * Families are subpaths: `@xenosystem/components/auth`, `/navigation`, `/feedback`, `/data`.
4
4
  * This root re-exports nothing on purpose: import the family you use, so a bundle carries only it.
5
5
  */
6
- declare const COMPONENTS_VERSION = "0.4.0";
6
+ declare const COMPONENTS_VERSION = "0.6.0";
7
7
 
8
8
  export { COMPONENTS_VERSION };
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/index.ts
2
- var COMPONENTS_VERSION = "0.4.0";
2
+ var COMPONENTS_VERSION = "0.6.0";
3
3
  export {
4
4
  COMPONENTS_VERSION
5
5
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xenosystem/components",
3
- "version": "0.4.0",
3
+ "version": "0.6.0",
4
4
  "description": "XENO Components — rung 2 of the front ladder: molecules composed from @xenosystem/elements, with no host contract. Families as subpaths: /auth, /navigation, /feedback, /data.",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",