@jirawatpyk/aura-react 5.62.0 → 5.63.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/README.md CHANGED
@@ -186,6 +186,11 @@ DataTable with sort and page in the URL (4.17): `onStateChange={({ sort, page })
186
186
  - **Time zone**: `timeZone` on AuraProvider, DatePicker, DateRangePicker and Calendar decides "today" (the marker, `min`/`max="today"`, the first month shown); or pass `today` as an ISO date. `todayIn('Asia/Bangkok')` is exported from the root and `/server`.
187
187
  - **Toasts** queue past three instead of dropping: six in a row all show, in order, three at a time.
188
188
 
189
+ ## 5.63 — Chamber-OS addendum 79 (#178)
190
+
191
+ - **A lazy chip still makes `meta` the chip row:** a Server Component's Badge or StatusPill passed through a `'use client'` wrapper can arrive as a lazy node on Next's dev server. PageHeader now looks through a resolved lazy node (a chip makes the row, text keeps the line, as when it arrives resolved), and an unresolved one is neutral — the other children decide — so the layout no longer depends on the build mode. Anything else unresolved (a promise, an iterator) keeps a line.
192
+ - **`metaLayout`:** `"row"` lays `meta` out as the wrapping chip row whatever it holds, `"line"` as a text line; `"auto"` (default) keeps 5.62's guess (elements only → row). Pass `metaLayout="row"` where chips come from a Server Component, so nothing is guessed (an all-lazy meta that hasn't resolved would otherwise be a line). Also from `/server`. Drop the `flex flex-wrap items-center gap-2` stand-in.
193
+
189
194
  ## 5.62 — Chamber-OS addendum 78 (#177)
190
195
 
191
196
  - **PageHeader `meta` lays chips out as a row:** a `meta` made only of elements (Badges, a StatusPill — through Fragments and arrays) is now a wrapping row, 8px apart and vertically centred, as `eyebrow` — so chips no longer touch when the JSX has no space between them, and they wrap on a phone. Any text in it — a string `meta` ("128 members · updated 3 min ago"), or a sentence with a `<strong>`, `<time>`, a link or `{count}` — keeps it a text line, as before. Also from `/server`. Drop a `flex flex-wrap items-center gap-2` stand-in wrapper.
@@ -7914,6 +7914,7 @@ window.Aura = (() => {
7914
7914
  // src/PageHeader.tsx
7915
7915
  var React43 = __toESM(require_react(), 1);
7916
7916
  var h8 = React43.createElement;
7917
+ var LAZY = Symbol.for("react.lazy");
7917
7918
  function chipsOnly(node) {
7918
7919
  let el = 0;
7919
7920
  const walk = function(n3) {
@@ -7921,6 +7922,16 @@ window.Aura = (() => {
7921
7922
  if (typeof n3 === "string") return n3.trim() === "";
7922
7923
  if (typeof n3 === "number" || typeof n3 === "bigint") return false;
7923
7924
  if (Array.isArray(n3)) return n3.every(walk);
7925
+ if (typeof n3 === "object" && n3.$$typeof === LAZY) {
7926
+ const lazy = n3;
7927
+ let value;
7928
+ try {
7929
+ value = lazy._init(lazy._payload);
7930
+ } catch {
7931
+ return true;
7932
+ }
7933
+ return walk(value);
7934
+ }
7924
7935
  if (React43.isValidElement(n3)) {
7925
7936
  if (n3.type === React43.Fragment) return walk(n3.props.children);
7926
7937
  el++;
@@ -7946,7 +7957,7 @@ window.Aura = (() => {
7946
7957
  const size = props.size === "compact" || props.size === "hero" || props.size === "hero-lg" ? props.size : null;
7947
7958
  const eyebrow = props.eyebrow;
7948
7959
  const plainEyebrow = typeof eyebrow === "string" || typeof eyebrow === "number";
7949
- const richMeta = chipsOnly(props.meta);
7960
+ const richMeta = props.metaLayout === "row" ? true : props.metaLayout === "line" ? false : chipsOnly(props.meta);
7950
7961
  const heading = h8(
7951
7962
  "h" + level,
7952
7963
  {
@@ -7896,6 +7896,7 @@ var React44 = __toESM(require("react"), 1);
7896
7896
  // src/PageHeader.tsx
7897
7897
  var React43 = __toESM(require("react"), 1);
7898
7898
  var h8 = React43.createElement;
7899
+ var LAZY = Symbol.for("react.lazy");
7899
7900
  function chipsOnly(node) {
7900
7901
  let el = 0;
7901
7902
  const walk = function(n3) {
@@ -7903,6 +7904,16 @@ function chipsOnly(node) {
7903
7904
  if (typeof n3 === "string") return n3.trim() === "";
7904
7905
  if (typeof n3 === "number" || typeof n3 === "bigint") return false;
7905
7906
  if (Array.isArray(n3)) return n3.every(walk);
7907
+ if (typeof n3 === "object" && n3.$$typeof === LAZY) {
7908
+ const lazy = n3;
7909
+ let value;
7910
+ try {
7911
+ value = lazy._init(lazy._payload);
7912
+ } catch {
7913
+ return true;
7914
+ }
7915
+ return walk(value);
7916
+ }
7906
7917
  if (React43.isValidElement(n3)) {
7907
7918
  if (n3.type === React43.Fragment) return walk(n3.props.children);
7908
7919
  el++;
@@ -7928,7 +7939,7 @@ var PageHeader = React43.forwardRef(function PageHeader2(props, ref) {
7928
7939
  const size = props.size === "compact" || props.size === "hero" || props.size === "hero-lg" ? props.size : null;
7929
7940
  const eyebrow = props.eyebrow;
7930
7941
  const plainEyebrow = typeof eyebrow === "string" || typeof eyebrow === "number";
7931
- const richMeta = chipsOnly(props.meta);
7942
+ const richMeta = props.metaLayout === "row" ? true : props.metaLayout === "line" ? false : chipsOnly(props.meta);
7932
7943
  const heading = h8(
7933
7944
  "h" + level,
7934
7945
  {
@@ -2,6 +2,7 @@
2
2
  import * as React from "react";
3
3
  import { cx } from "./classes.js";
4
4
  const h = React.createElement;
5
+ const LAZY = Symbol.for("react.lazy");
5
6
  function chipsOnly(node) {
6
7
  let el = 0;
7
8
  const walk = function(n) {
@@ -9,6 +10,16 @@ function chipsOnly(node) {
9
10
  if (typeof n === "string") return n.trim() === "";
10
11
  if (typeof n === "number" || typeof n === "bigint") return false;
11
12
  if (Array.isArray(n)) return n.every(walk);
13
+ if (typeof n === "object" && n.$$typeof === LAZY) {
14
+ const lazy = n;
15
+ let value;
16
+ try {
17
+ value = lazy._init(lazy._payload);
18
+ } catch {
19
+ return true;
20
+ }
21
+ return walk(value);
22
+ }
12
23
  if (React.isValidElement(n)) {
13
24
  if (n.type === React.Fragment) return walk(n.props.children);
14
25
  el++;
@@ -34,7 +45,7 @@ const PageHeader = React.forwardRef(function PageHeader2(props, ref) {
34
45
  const size = props.size === "compact" || props.size === "hero" || props.size === "hero-lg" ? props.size : null;
35
46
  const eyebrow = props.eyebrow;
36
47
  const plainEyebrow = typeof eyebrow === "string" || typeof eyebrow === "number";
37
- const richMeta = chipsOnly(props.meta);
48
+ const richMeta = props.metaLayout === "row" ? true : props.metaLayout === "line" ? false : chipsOnly(props.meta);
38
49
  const heading = h(
39
50
  "h" + level,
40
51
  {
package/dist/index.d.cts CHANGED
@@ -2075,6 +2075,10 @@ export interface PageHeaderProps extends Pick<React$1.HTMLAttributes<HTMLElement
2075
2075
  /** A line under the title — counts, last update, owner. 5.62 (Chamber-OS 177): made only of elements (Badges, a
2076
2076
  * StatusPill), it is laid out as a wrapping row, 8px apart; any text in it keeps it a line. */
2077
2077
  meta?: React$1.ReactNode | undefined;
2078
+ /** 5.63 (Chamber-OS 178): `row` lays `meta` out as the wrapping chip row whatever its children are, `line` as a text
2079
+ * line; `auto` (default) guesses from them (elements only → row). Pass `row` when chips come from a Server Component
2080
+ * through a client wrapper, where they may arrive unresolved. */
2081
+ metaLayout?: "auto" | "row" | "line" | undefined;
2078
2082
  /** Buttons for the page, bottom-aligned at the end; they wrap below the text on a narrow screen. */
2079
2083
  actions?: React$1.ReactNode | undefined;
2080
2084
  /** 5.37 (DxT Monitor #17): below this breakpoint (`sm` 640px, `md` 768px, `lg` 1024px) the actions take the whole
package/dist/index.d.ts CHANGED
@@ -2075,6 +2075,10 @@ export interface PageHeaderProps extends Pick<React$1.HTMLAttributes<HTMLElement
2075
2075
  /** A line under the title — counts, last update, owner. 5.62 (Chamber-OS 177): made only of elements (Badges, a
2076
2076
  * StatusPill), it is laid out as a wrapping row, 8px apart; any text in it keeps it a line. */
2077
2077
  meta?: React$1.ReactNode | undefined;
2078
+ /** 5.63 (Chamber-OS 178): `row` lays `meta` out as the wrapping chip row whatever its children are, `line` as a text
2079
+ * line; `auto` (default) guesses from them (elements only → row). Pass `row` when chips come from a Server Component
2080
+ * through a client wrapper, where they may arrive unresolved. */
2081
+ metaLayout?: "auto" | "row" | "line" | undefined;
2078
2082
  /** Buttons for the page, bottom-aligned at the end; they wrap below the text on a narrow screen. */
2079
2083
  actions?: React$1.ReactNode | undefined;
2080
2084
  /** 5.37 (DxT Monitor #17): below this breakpoint (`sm` 640px, `md` 768px, `lg` 1024px) the actions take the whole
@@ -1632,6 +1632,7 @@ function TableSkeleton(props) {
1632
1632
  // src/PageHeader.tsx
1633
1633
  var React6 = __toESM(require("react"), 1);
1634
1634
  var h5 = React6.createElement;
1635
+ var LAZY = Symbol.for("react.lazy");
1635
1636
  function chipsOnly(node) {
1636
1637
  let el = 0;
1637
1638
  const walk = function(n3) {
@@ -1639,6 +1640,16 @@ function chipsOnly(node) {
1639
1640
  if (typeof n3 === "string") return n3.trim() === "";
1640
1641
  if (typeof n3 === "number" || typeof n3 === "bigint") return false;
1641
1642
  if (Array.isArray(n3)) return n3.every(walk);
1643
+ if (typeof n3 === "object" && n3.$$typeof === LAZY) {
1644
+ const lazy = n3;
1645
+ let value;
1646
+ try {
1647
+ value = lazy._init(lazy._payload);
1648
+ } catch {
1649
+ return true;
1650
+ }
1651
+ return walk(value);
1652
+ }
1642
1653
  if (React6.isValidElement(n3)) {
1643
1654
  if (n3.type === React6.Fragment) return walk(n3.props.children);
1644
1655
  el++;
@@ -1664,7 +1675,7 @@ var PageHeader = React6.forwardRef(function PageHeader2(props, ref) {
1664
1675
  const size = props.size === "compact" || props.size === "hero" || props.size === "hero-lg" ? props.size : null;
1665
1676
  const eyebrow = props.eyebrow;
1666
1677
  const plainEyebrow = typeof eyebrow === "string" || typeof eyebrow === "number";
1667
- const richMeta = chipsOnly(props.meta);
1678
+ const richMeta = props.metaLayout === "row" ? true : props.metaLayout === "line" ? false : chipsOnly(props.meta);
1668
1679
  const heading = h5(
1669
1680
  "h" + level,
1670
1681
  {
@@ -585,6 +585,10 @@ export interface PageHeaderProps extends Pick<React$1.HTMLAttributes<HTMLElement
585
585
  /** A line under the title — counts, last update, owner. 5.62 (Chamber-OS 177): made only of elements (Badges, a
586
586
  * StatusPill), it is laid out as a wrapping row, 8px apart; any text in it keeps it a line. */
587
587
  meta?: React$1.ReactNode | undefined;
588
+ /** 5.63 (Chamber-OS 178): `row` lays `meta` out as the wrapping chip row whatever its children are, `line` as a text
589
+ * line; `auto` (default) guesses from them (elements only → row). Pass `row` when chips come from a Server Component
590
+ * through a client wrapper, where they may arrive unresolved. */
591
+ metaLayout?: "auto" | "row" | "line" | undefined;
588
592
  /** Buttons for the page, bottom-aligned at the end; they wrap below the text on a narrow screen. */
589
593
  actions?: React$1.ReactNode | undefined;
590
594
  /** 5.37 (DxT Monitor #17): below this breakpoint (`sm` 640px, `md` 768px, `lg` 1024px) the actions take the whole
@@ -585,6 +585,10 @@ export interface PageHeaderProps extends Pick<React$1.HTMLAttributes<HTMLElement
585
585
  /** A line under the title — counts, last update, owner. 5.62 (Chamber-OS 177): made only of elements (Badges, a
586
586
  * StatusPill), it is laid out as a wrapping row, 8px apart; any text in it keeps it a line. */
587
587
  meta?: React$1.ReactNode | undefined;
588
+ /** 5.63 (Chamber-OS 178): `row` lays `meta` out as the wrapping chip row whatever its children are, `line` as a text
589
+ * line; `auto` (default) guesses from them (elements only → row). Pass `row` when chips come from a Server Component
590
+ * through a client wrapper, where they may arrive unresolved. */
591
+ metaLayout?: "auto" | "row" | "line" | undefined;
588
592
  /** Buttons for the page, bottom-aligned at the end; they wrap below the text on a narrow screen. */
589
593
  actions?: React$1.ReactNode | undefined;
590
594
  /** 5.37 (DxT Monitor #17): below this breakpoint (`sm` 640px, `md` 768px, `lg` 1024px) the actions take the whole
@@ -1566,6 +1566,7 @@ function TableSkeleton(props) {
1566
1566
  // src/PageHeader.tsx
1567
1567
  import * as React6 from "react";
1568
1568
  var h5 = React6.createElement;
1569
+ var LAZY = Symbol.for("react.lazy");
1569
1570
  function chipsOnly(node) {
1570
1571
  let el = 0;
1571
1572
  const walk = function(n3) {
@@ -1573,6 +1574,16 @@ function chipsOnly(node) {
1573
1574
  if (typeof n3 === "string") return n3.trim() === "";
1574
1575
  if (typeof n3 === "number" || typeof n3 === "bigint") return false;
1575
1576
  if (Array.isArray(n3)) return n3.every(walk);
1577
+ if (typeof n3 === "object" && n3.$$typeof === LAZY) {
1578
+ const lazy = n3;
1579
+ let value;
1580
+ try {
1581
+ value = lazy._init(lazy._payload);
1582
+ } catch {
1583
+ return true;
1584
+ }
1585
+ return walk(value);
1586
+ }
1576
1587
  if (React6.isValidElement(n3)) {
1577
1588
  if (n3.type === React6.Fragment) return walk(n3.props.children);
1578
1589
  el++;
@@ -1598,7 +1609,7 @@ var PageHeader = React6.forwardRef(function PageHeader2(props, ref) {
1598
1609
  const size = props.size === "compact" || props.size === "hero" || props.size === "hero-lg" ? props.size : null;
1599
1610
  const eyebrow = props.eyebrow;
1600
1611
  const plainEyebrow = typeof eyebrow === "string" || typeof eyebrow === "number";
1601
- const richMeta = chipsOnly(props.meta);
1612
+ const richMeta = props.metaLayout === "row" ? true : props.metaLayout === "line" ? false : chipsOnly(props.meta);
1602
1613
  const heading = h5(
1603
1614
  "h" + level,
1604
1615
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jirawatpyk/aura-react",
3
- "version": "5.62.0",
3
+ "version": "5.63.0",
4
4
  "description": "AURA Design System — React components (Enterprise Standard, Human Creative). Thai-first: Buddhist-era dates, Thai collation.",
5
5
  "license": "MIT",
6
6
  "type": "module",