@sigx/lynx-zero 0.4.9

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.
Files changed (100) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +25 -0
  3. package/dist/components/SwiperIndicator.d.ts +43 -0
  4. package/dist/components/SwiperIndicator.d.ts.map +1 -0
  5. package/dist/components/SwiperIndicator.js +272 -0
  6. package/dist/components/SwiperIndicator.js.map +1 -0
  7. package/dist/contract.d.ts +95 -0
  8. package/dist/contract.d.ts.map +1 -0
  9. package/dist/contract.js +30 -0
  10. package/dist/contract.js.map +1 -0
  11. package/dist/index.d.ts +30 -0
  12. package/dist/index.d.ts.map +1 -0
  13. package/dist/index.js +41 -0
  14. package/dist/index.js.map +1 -0
  15. package/dist/layout/Center.d.ts +7 -0
  16. package/dist/layout/Center.d.ts.map +1 -0
  17. package/dist/layout/Center.js +25 -0
  18. package/dist/layout/Center.js.map +1 -0
  19. package/dist/layout/Col.d.ts +8 -0
  20. package/dist/layout/Col.d.ts.map +1 -0
  21. package/dist/layout/Col.js +34 -0
  22. package/dist/layout/Col.js.map +1 -0
  23. package/dist/layout/Row.d.ts +8 -0
  24. package/dist/layout/Row.d.ts.map +1 -0
  25. package/dist/layout/Row.js +34 -0
  26. package/dist/layout/Row.js.map +1 -0
  27. package/dist/layout/ScrollView.d.ts +6 -0
  28. package/dist/layout/ScrollView.d.ts.map +1 -0
  29. package/dist/layout/ScrollView.js +19 -0
  30. package/dist/layout/ScrollView.js.map +1 -0
  31. package/dist/layout/Spacer.d.ts +4 -0
  32. package/dist/layout/Spacer.d.ts.map +1 -0
  33. package/dist/layout/Spacer.js +12 -0
  34. package/dist/layout/Spacer.js.map +1 -0
  35. package/dist/preset/index.d.ts +31 -0
  36. package/dist/preset/index.d.ts.map +1 -0
  37. package/dist/preset/index.js +72 -0
  38. package/dist/preset/index.js.map +1 -0
  39. package/dist/shared/press.d.ts +3 -0
  40. package/dist/shared/press.d.ts.map +1 -0
  41. package/dist/shared/press.js +7 -0
  42. package/dist/shared/press.js.map +1 -0
  43. package/dist/shared/styles.d.ts +27 -0
  44. package/dist/shared/styles.d.ts.map +1 -0
  45. package/dist/shared/styles.js +62 -0
  46. package/dist/shared/styles.js.map +1 -0
  47. package/dist/shared/tabs-selection.d.ts +25 -0
  48. package/dist/shared/tabs-selection.d.ts.map +1 -0
  49. package/dist/shared/tabs-selection.js +45 -0
  50. package/dist/shared/tabs-selection.js.map +1 -0
  51. package/dist/styles/tokens.css +98 -0
  52. package/dist/theme/StatusBarSync.d.ts +42 -0
  53. package/dist/theme/StatusBarSync.d.ts.map +1 -0
  54. package/dist/theme/StatusBarSync.js +89 -0
  55. package/dist/theme/StatusBarSync.js.map +1 -0
  56. package/dist/theme/ThemeProvider.d.ts +144 -0
  57. package/dist/theme/ThemeProvider.d.ts.map +1 -0
  58. package/dist/theme/ThemeProvider.js +328 -0
  59. package/dist/theme/ThemeProvider.js.map +1 -0
  60. package/dist/theme/color-mix.d.ts +21 -0
  61. package/dist/theme/color-mix.d.ts.map +1 -0
  62. package/dist/theme/color-mix.js +65 -0
  63. package/dist/theme/color-mix.js.map +1 -0
  64. package/dist/theme/registry.d.ts +182 -0
  65. package/dist/theme/registry.d.ts.map +1 -0
  66. package/dist/theme/registry.js +182 -0
  67. package/dist/theme/registry.js.map +1 -0
  68. package/dist/theme/theme-state.d.ts +43 -0
  69. package/dist/theme/theme-state.d.ts.map +1 -0
  70. package/dist/theme/theme-state.js +94 -0
  71. package/dist/theme/theme-state.js.map +1 -0
  72. package/dist/theme/use-screen-theme.d.ts +4 -0
  73. package/dist/theme/use-screen-theme.d.ts.map +1 -0
  74. package/dist/theme/use-screen-theme.js +43 -0
  75. package/dist/theme/use-screen-theme.js.map +1 -0
  76. package/dist/theme/use-theme-colors.d.ts +48 -0
  77. package/dist/theme/use-theme-colors.d.ts.map +1 -0
  78. package/dist/theme/use-theme-colors.js +69 -0
  79. package/dist/theme/use-theme-colors.js.map +1 -0
  80. package/package.json +80 -0
  81. package/src/components/SwiperIndicator.tsx +519 -0
  82. package/src/contract.ts +136 -0
  83. package/src/index.ts +101 -0
  84. package/src/layout/Center.tsx +41 -0
  85. package/src/layout/Col.tsx +53 -0
  86. package/src/layout/Row.tsx +53 -0
  87. package/src/layout/ScrollView.tsx +38 -0
  88. package/src/layout/Spacer.tsx +18 -0
  89. package/src/preset/index.ts +77 -0
  90. package/src/shared/press.ts +6 -0
  91. package/src/shared/styles.ts +82 -0
  92. package/src/shared/tabs-selection.ts +57 -0
  93. package/src/styles/tokens.css +98 -0
  94. package/src/theme/StatusBarSync.tsx +104 -0
  95. package/src/theme/ThemeProvider.tsx +492 -0
  96. package/src/theme/color-mix.ts +68 -0
  97. package/src/theme/registry.ts +290 -0
  98. package/src/theme/theme-state.ts +112 -0
  99. package/src/theme/use-screen-theme.ts +42 -0
  100. package/src/theme/use-theme-colors.ts +99 -0
@@ -0,0 +1,25 @@
1
+ import { jsx as _jsx } from "@sigx/lynx/jsx-runtime";
2
+ import { component } from '@sigx/lynx';
3
+ import { resolveBoxStyle } from '../shared/styles.js';
4
+ export const Center = component(({ props, slots }) => {
5
+ const getStyle = () => {
6
+ const style = {
7
+ display: 'flex',
8
+ justifyContent: 'center',
9
+ alignItems: 'center',
10
+ };
11
+ const box = resolveBoxStyle({
12
+ width: props.width,
13
+ height: props.height,
14
+ flex: props.flex,
15
+ background: props.background,
16
+ borderRadius: props.borderRadius,
17
+ });
18
+ for (const key in box) {
19
+ style[key] = box[key];
20
+ }
21
+ return style;
22
+ };
23
+ return () => (_jsx("view", { class: props.class, style: getStyle(), children: slots.default?.() }));
24
+ });
25
+ //# sourceMappingURL=Center.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Center.js","sourceRoot":"","sources":["../../src/layout/Center.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAe,MAAM,YAAY,CAAC;AAEpD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAWtD,MAAM,CAAC,MAAM,MAAM,GAAG,SAAS,CAAc,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE;IAChE,MAAM,QAAQ,GAAG,GAAoC,EAAE;QACrD,MAAM,KAAK,GAAoC;YAC7C,OAAO,EAAE,MAAM;YACf,cAAc,EAAE,QAAQ;YACxB,UAAU,EAAE,QAAQ;SACrB,CAAC;QAEF,MAAM,GAAG,GAAG,eAAe,CAAC;YAC1B,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB,UAAU,EAAE,KAAK,CAAC,UAAU;YAC5B,YAAY,EAAE,KAAK,CAAC,YAAY;SACjC,CAAC,CAAC;QACH,KAAK,MAAM,GAAG,IAAI,GAAG,EAAE,CAAC;YACtB,KAAK,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,GAAG,CAAoB,CAAC;QAC3C,CAAC;QAED,OAAO,KAAK,CAAC;IACf,CAAC,CAAC;IAEF,OAAO,GAAG,EAAE,CAAC,CACX,eAAM,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,YACxC,KAAK,CAAC,OAAO,EAAE,EAAE,GACb,CACR,CAAC;AACJ,CAAC,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { type Define } from '@sigx/lynx';
2
+ import type { BackgroundValue } from '../contract.js';
3
+ import { type SpacingValue } from '../shared/styles.js';
4
+ export type ColProps = Define.Prop<'gap', number, false> & Define.Prop<'align', 'flex-start' | 'center' | 'flex-end' | 'stretch' | 'baseline', false> & Define.Prop<'justify', 'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around' | 'space-evenly', false> & Define.Prop<'wrap', boolean, false> & Define.Prop<'padding', SpacingValue, false> & Define.Prop<'margin', SpacingValue, false> & Define.Prop<'width', number | string, false> & Define.Prop<'height', number | string, false> & Define.Prop<'flex', number, false> & Define.Prop<'background', BackgroundValue, false> & Define.Prop<'borderRadius', number, false> & Define.Prop<'class', string, false> & Define.Slot<'default'>;
5
+ export declare const Col: import("@sigx/runtime-core").ComponentFactory<ColProps, void, {
6
+ default: () => import("@sigx/runtime-core").JSXElement | import("@sigx/runtime-core").JSXElement[] | null;
7
+ }>;
8
+ //# sourceMappingURL=Col.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Col.d.ts","sourceRoot":"","sources":["../../src/layout/Col.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,MAAM,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAE,KAAK,YAAY,EAAmB,MAAM,qBAAqB,CAAC;AAEzE,MAAM,MAAM,QAAQ,GAChB,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,GACjC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,YAAY,GAAG,QAAQ,GAAG,UAAU,GAAG,SAAS,GAAG,UAAU,EAAE,KAAK,CAAC,GAC1F,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,YAAY,GAAG,QAAQ,GAAG,UAAU,GAAG,eAAe,GAAG,cAAc,GAAG,cAAc,EAAE,KAAK,CAAC,GACvH,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,CAAC,GACnC,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,YAAY,EAAE,KAAK,CAAC,GAC3C,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,YAAY,EAAE,KAAK,CAAC,GAC1C,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,KAAK,CAAC,GAC5C,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,KAAK,CAAC,GAC7C,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,GAClC,MAAM,CAAC,IAAI,CAAC,YAAY,EAAE,eAAe,EAAE,KAAK,CAAC,GACjD,MAAM,CAAC,IAAI,CAAC,cAAc,EAAE,MAAM,EAAE,KAAK,CAAC,GAC1C,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,GACnC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;AAE3B,eAAO,MAAM,GAAG;;EAiCd,CAAC"}
@@ -0,0 +1,34 @@
1
+ import { jsx as _jsx } from "@sigx/lynx/jsx-runtime";
2
+ import { component } from '@sigx/lynx';
3
+ import { resolveBoxStyle } from '../shared/styles.js';
4
+ export const Col = component(({ props, slots }) => {
5
+ const getStyle = () => {
6
+ const style = {
7
+ display: 'flex',
8
+ flexDirection: 'column',
9
+ };
10
+ if (props.gap !== undefined)
11
+ style.gap = props.gap;
12
+ if (props.align)
13
+ style.alignItems = props.align;
14
+ if (props.justify)
15
+ style.justifyContent = props.justify;
16
+ if (props.wrap)
17
+ style.flexWrap = 'wrap';
18
+ const box = resolveBoxStyle({
19
+ width: props.width,
20
+ height: props.height,
21
+ flex: props.flex,
22
+ background: props.background,
23
+ borderRadius: props.borderRadius,
24
+ padding: props.padding,
25
+ margin: props.margin,
26
+ });
27
+ for (const key in box) {
28
+ style[key] = box[key];
29
+ }
30
+ return style;
31
+ };
32
+ return () => (_jsx("view", { class: props.class, style: getStyle(), children: slots.default?.() }));
33
+ });
34
+ //# sourceMappingURL=Col.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Col.js","sourceRoot":"","sources":["../../src/layout/Col.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAe,MAAM,YAAY,CAAC;AAEpD,OAAO,EAAqB,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAiBzE,MAAM,CAAC,MAAM,GAAG,GAAG,SAAS,CAAW,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE;IAC1D,MAAM,QAAQ,GAAG,GAAoC,EAAE;QACrD,MAAM,KAAK,GAAoC;YAC7C,OAAO,EAAE,MAAM;YACf,aAAa,EAAE,QAAQ;SACxB,CAAC;QAEF,IAAI,KAAK,CAAC,GAAG,KAAK,SAAS;YAAE,KAAK,CAAC,GAAG,GAAG,KAAK,CAAC,GAAG,CAAC;QACnD,IAAI,KAAK,CAAC,KAAK;YAAE,KAAK,CAAC,UAAU,GAAG,KAAK,CAAC,KAAK,CAAC;QAChD,IAAI,KAAK,CAAC,OAAO;YAAE,KAAK,CAAC,cAAc,GAAG,KAAK,CAAC,OAAO,CAAC;QACxD,IAAI,KAAK,CAAC,IAAI;YAAE,KAAK,CAAC,QAAQ,GAAG,MAAM,CAAC;QAExC,MAAM,GAAG,GAAG,eAAe,CAAC;YAC1B,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB,UAAU,EAAE,KAAK,CAAC,UAAU;YAC5B,YAAY,EAAE,KAAK,CAAC,YAAY;YAChC,OAAO,EAAE,KAAK,CAAC,OAAO;YACtB,MAAM,EAAE,KAAK,CAAC,MAAM;SACrB,CAAC,CAAC;QACH,KAAK,MAAM,GAAG,IAAI,GAAG,EAAE,CAAC;YACtB,KAAK,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,GAAG,CAAoB,CAAC;QAC3C,CAAC;QAED,OAAO,KAAK,CAAC;IACf,CAAC,CAAC;IAEF,OAAO,GAAG,EAAE,CAAC,CACX,eAAM,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,YACxC,KAAK,CAAC,OAAO,EAAE,EAAE,GACb,CACR,CAAC;AACJ,CAAC,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { type Define } from '@sigx/lynx';
2
+ import type { BackgroundValue } from '../contract.js';
3
+ import { type SpacingValue } from '../shared/styles.js';
4
+ export type RowProps = Define.Prop<'gap', number, false> & Define.Prop<'align', 'flex-start' | 'center' | 'flex-end' | 'stretch' | 'baseline', false> & Define.Prop<'justify', 'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around' | 'space-evenly', false> & Define.Prop<'wrap', boolean, false> & Define.Prop<'padding', SpacingValue, false> & Define.Prop<'margin', SpacingValue, false> & Define.Prop<'width', number | string, false> & Define.Prop<'height', number | string, false> & Define.Prop<'flex', number, false> & Define.Prop<'background', BackgroundValue, false> & Define.Prop<'borderRadius', number, false> & Define.Prop<'class', string, false> & Define.Slot<'default'>;
5
+ export declare const Row: import("@sigx/runtime-core").ComponentFactory<RowProps, void, {
6
+ default: () => import("@sigx/runtime-core").JSXElement | import("@sigx/runtime-core").JSXElement[] | null;
7
+ }>;
8
+ //# sourceMappingURL=Row.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Row.d.ts","sourceRoot":"","sources":["../../src/layout/Row.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,MAAM,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAE,KAAK,YAAY,EAAmB,MAAM,qBAAqB,CAAC;AAEzE,MAAM,MAAM,QAAQ,GAChB,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,GACjC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,YAAY,GAAG,QAAQ,GAAG,UAAU,GAAG,SAAS,GAAG,UAAU,EAAE,KAAK,CAAC,GAC1F,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,YAAY,GAAG,QAAQ,GAAG,UAAU,GAAG,eAAe,GAAG,cAAc,GAAG,cAAc,EAAE,KAAK,CAAC,GACvH,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,CAAC,GACnC,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,YAAY,EAAE,KAAK,CAAC,GAC3C,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,YAAY,EAAE,KAAK,CAAC,GAC1C,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,KAAK,CAAC,GAC5C,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,KAAK,CAAC,GAC7C,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,GAClC,MAAM,CAAC,IAAI,CAAC,YAAY,EAAE,eAAe,EAAE,KAAK,CAAC,GACjD,MAAM,CAAC,IAAI,CAAC,cAAc,EAAE,MAAM,EAAE,KAAK,CAAC,GAC1C,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,GACnC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;AAE3B,eAAO,MAAM,GAAG;;EAiCd,CAAC"}
@@ -0,0 +1,34 @@
1
+ import { jsx as _jsx } from "@sigx/lynx/jsx-runtime";
2
+ import { component } from '@sigx/lynx';
3
+ import { resolveBoxStyle } from '../shared/styles.js';
4
+ export const Row = component(({ props, slots }) => {
5
+ const getStyle = () => {
6
+ const style = {
7
+ display: 'flex',
8
+ flexDirection: 'row',
9
+ };
10
+ if (props.gap !== undefined)
11
+ style.gap = props.gap;
12
+ if (props.align)
13
+ style.alignItems = props.align;
14
+ if (props.justify)
15
+ style.justifyContent = props.justify;
16
+ if (props.wrap)
17
+ style.flexWrap = 'wrap';
18
+ const box = resolveBoxStyle({
19
+ width: props.width,
20
+ height: props.height,
21
+ flex: props.flex,
22
+ background: props.background,
23
+ borderRadius: props.borderRadius,
24
+ padding: props.padding,
25
+ margin: props.margin,
26
+ });
27
+ for (const key in box) {
28
+ style[key] = box[key];
29
+ }
30
+ return style;
31
+ };
32
+ return () => (_jsx("view", { class: props.class, style: getStyle(), children: slots.default?.() }));
33
+ });
34
+ //# sourceMappingURL=Row.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Row.js","sourceRoot":"","sources":["../../src/layout/Row.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAe,MAAM,YAAY,CAAC;AAEpD,OAAO,EAAqB,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAiBzE,MAAM,CAAC,MAAM,GAAG,GAAG,SAAS,CAAW,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE;IAC1D,MAAM,QAAQ,GAAG,GAAoC,EAAE;QACrD,MAAM,KAAK,GAAoC;YAC7C,OAAO,EAAE,MAAM;YACf,aAAa,EAAE,KAAK;SACrB,CAAC;QAEF,IAAI,KAAK,CAAC,GAAG,KAAK,SAAS;YAAE,KAAK,CAAC,GAAG,GAAG,KAAK,CAAC,GAAG,CAAC;QACnD,IAAI,KAAK,CAAC,KAAK;YAAE,KAAK,CAAC,UAAU,GAAG,KAAK,CAAC,KAAK,CAAC;QAChD,IAAI,KAAK,CAAC,OAAO;YAAE,KAAK,CAAC,cAAc,GAAG,KAAK,CAAC,OAAO,CAAC;QACxD,IAAI,KAAK,CAAC,IAAI;YAAE,KAAK,CAAC,QAAQ,GAAG,MAAM,CAAC;QAExC,MAAM,GAAG,GAAG,eAAe,CAAC;YAC1B,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB,UAAU,EAAE,KAAK,CAAC,UAAU;YAC5B,YAAY,EAAE,KAAK,CAAC,YAAY;YAChC,OAAO,EAAE,KAAK,CAAC,OAAO;YACtB,MAAM,EAAE,KAAK,CAAC,MAAM;SACrB,CAAC,CAAC;QACH,KAAK,MAAM,GAAG,IAAI,GAAG,EAAE,CAAC;YACtB,KAAK,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC,GAAG,CAAoB,CAAC;QAC3C,CAAC;QAED,OAAO,KAAK,CAAC;IACf,CAAC,CAAC;IAEF,OAAO,GAAG,EAAE,CAAC,CACX,eAAM,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,YACxC,KAAK,CAAC,OAAO,EAAE,EAAE,GACb,CACR,CAAC;AACJ,CAAC,CAAC,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { type Define } from '@sigx/lynx';
2
+ export type ScrollViewProps = Define.Prop<'direction', 'vertical' | 'horizontal', false> & Define.Prop<'height', number | string, false> & Define.Prop<'width', number | string, false> & Define.Prop<'flex', number, false> & Define.Prop<'showScrollbar', boolean, false> & Define.Prop<'bounces', boolean, false> & Define.Prop<'class', string, false> & Define.Slot<'default'>;
3
+ export declare const ScrollView: import("@sigx/runtime-core").ComponentFactory<ScrollViewProps, void, {
4
+ default: () => import("@sigx/runtime-core").JSXElement | import("@sigx/runtime-core").JSXElement[] | null;
5
+ }>;
6
+ //# sourceMappingURL=ScrollView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ScrollView.d.ts","sourceRoot":"","sources":["../../src/layout/ScrollView.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,MAAM,EAAE,MAAM,YAAY,CAAC;AAEpD,MAAM,MAAM,eAAe,GACvB,MAAM,CAAC,IAAI,CAAC,WAAW,EAAE,UAAU,GAAG,YAAY,EAAE,KAAK,CAAC,GAC1D,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,KAAK,CAAC,GAC7C,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,KAAK,CAAC,GAC5C,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,GAClC,MAAM,CAAC,IAAI,CAAC,eAAe,EAAE,OAAO,EAAE,KAAK,CAAC,GAC5C,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,EAAE,KAAK,CAAC,GACtC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,GACnC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;AAE3B,eAAO,MAAM,UAAU;;EAyBrB,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { jsx as _jsx } from "@sigx/lynx/jsx-runtime";
2
+ import { component } from '@sigx/lynx';
3
+ export const ScrollView = component(({ props, slots }) => {
4
+ const getStyle = () => {
5
+ const style = {};
6
+ if (props.height !== undefined)
7
+ style.height = props.height;
8
+ if (props.width !== undefined)
9
+ style.width = props.width;
10
+ if (props.flex !== undefined)
11
+ style.flex = props.flex;
12
+ return style;
13
+ };
14
+ return () => {
15
+ const dir = props.direction ?? 'vertical';
16
+ return (_jsx("scroll-view", { class: props.class, style: getStyle(), "scroll-orientation": dir, "scroll-y": dir === 'vertical' ? true : undefined, "scroll-x": dir === 'horizontal' ? true : undefined, "show-scrollbar": props.showScrollbar, bounces: props.bounces, children: slots.default?.() }));
17
+ };
18
+ });
19
+ //# sourceMappingURL=ScrollView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ScrollView.js","sourceRoot":"","sources":["../../src/layout/ScrollView.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAe,MAAM,YAAY,CAAC;AAYpD,MAAM,CAAC,MAAM,UAAU,GAAG,SAAS,CAAkB,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE;IACxE,MAAM,QAAQ,GAAG,GAAoC,EAAE;QACrD,MAAM,KAAK,GAAoC,EAAE,CAAC;QAClD,IAAI,KAAK,CAAC,MAAM,KAAK,SAAS;YAAE,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;QAC5D,IAAI,KAAK,CAAC,KAAK,KAAK,SAAS;YAAE,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;QACzD,IAAI,KAAK,CAAC,IAAI,KAAK,SAAS;YAAE,KAAK,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;QACtD,OAAO,KAAK,CAAC;IACf,CAAC,CAAC;IAEF,OAAO,GAAG,EAAE;QACV,MAAM,GAAG,GAAG,KAAK,CAAC,SAAS,IAAI,UAAU,CAAC;QAC1C,OAAO,CACL,sBACE,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,KAAK,EAAE,QAAQ,EAAE,wBACG,GAAG,cACb,GAAG,KAAK,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,cACrC,GAAG,KAAK,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,oBACjC,KAAK,CAAC,aAAa,EACnC,OAAO,EAAE,KAAK,CAAC,OAAO,YAErB,KAAK,CAAC,OAAO,EAAE,EAAE,GACN,CACf,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { type Define } from '@sigx/lynx';
2
+ export type SpacerProps = Define.Prop<'size', number, false> & Define.Prop<'class', string, false>;
3
+ export declare const Spacer: import("@sigx/runtime-core").ComponentFactory<SpacerProps, void, {}>;
4
+ //# sourceMappingURL=Spacer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Spacer.d.ts","sourceRoot":"","sources":["../../src/layout/Spacer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,MAAM,EAAE,MAAM,YAAY,CAAC;AAEpD,MAAM,MAAM,WAAW,GACnB,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,GAClC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;AAExC,eAAO,MAAM,MAAM,sEAWjB,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { jsx as _jsx } from "@sigx/lynx/jsx-runtime";
2
+ import { component } from '@sigx/lynx';
3
+ export const Spacer = component(({ props }) => {
4
+ const getStyle = () => {
5
+ if (props.size !== undefined) {
6
+ return { width: props.size, height: props.size };
7
+ }
8
+ return { flex: 1 };
9
+ };
10
+ return () => (_jsx("view", { class: props.class, style: getStyle() }));
11
+ });
12
+ //# sourceMappingURL=Spacer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Spacer.js","sourceRoot":"","sources":["../../src/layout/Spacer.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAe,MAAM,YAAY,CAAC;AAMpD,MAAM,CAAC,MAAM,MAAM,GAAG,SAAS,CAAc,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACzD,MAAM,QAAQ,GAAG,GAAoC,EAAE;QACrD,IAAI,KAAK,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;YAC7B,OAAO,EAAE,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC;QACnD,CAAC;QACD,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;IACrB,CAAC,CAAC;IAEF,OAAO,GAAG,EAAE,CAAC,CACX,eAAM,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAI,CAChD,CAAC;AACJ,CAAC,CAAC,CAAC"}
@@ -0,0 +1,31 @@
1
+ import type { Config } from 'tailwindcss';
2
+ /**
3
+ * The design-system-neutral Tailwind preset pieces — the parts of a DS preset
4
+ * that are really the *contract*, not the design system:
5
+ *
6
+ * • `contractColors`: every semantic color token (incl. the `*-soft`
7
+ * tints) → `var(--color-*)`, so utilities like `bg-primary` and
8
+ * `text-base-content` resolve against the active theme of whichever
9
+ * design system is mounted.
10
+ * • `contractFontSizes`: re-points Tailwind's `text-xs`…`text-3xl`
11
+ * font-size utilities at the shared `--text-*` ramp (defaults in
12
+ * `styles/tokens.css`, multiplied app-wide by the theme controller's
13
+ * `fontScale`). Merged via `theme.extend.fontSize`, so larger Tailwind
14
+ * keys (`text-4xl`+) keep their rem defaults.
15
+ * • `lynxLayoutPlugin`: ships `flex-fill` — the Lynx-correct "fill
16
+ * remaining space" utility. In Lynx (like React Native) the `flex: 1`
17
+ * shorthand expands to `flex: 1 1 auto`, where `flexBasis: 'auto'` sizes
18
+ * the box to its content first, collapsing the layout chain; Tailwind's
19
+ * own `flex-1` expands to the same broken shorthand. `flex-fill` writes
20
+ * the long-form properties so the result actually fills.
21
+ *
22
+ * Design-system presets compose these (`@sigx/lynx-daisyui/preset`,
23
+ * `@sigx/lynx-heroui/preset`) and layer any DS-specific extensions on top;
24
+ * apps normally consume the DS preset, not this one directly.
25
+ */
26
+ export declare const contractColors: Record<string, string>;
27
+ export declare const contractFontSizes: Record<string, string>;
28
+ export declare const lynxLayoutPlugin: import("tailwindcss/plugin").PluginWithConfig;
29
+ /** The composed neutral preset — what DS presets spread. */
30
+ export declare const zeroPreset: Partial<Config>;
31
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/preset/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAI1C;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAUhD,CAAC;AAEH,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAQpD,CAAC;AAEF,eAAO,MAAM,gBAAgB,+CAc3B,CAAC;AAEH,4DAA4D;AAC5D,eAAO,MAAM,UAAU,EAAE,OAAO,CAAC,MAAM,CAQtC,CAAC"}
@@ -0,0 +1,72 @@
1
+ import plugin from 'tailwindcss/plugin';
2
+ import { COLOR_VARIANT_LIST } from '../contract.js';
3
+ /**
4
+ * The design-system-neutral Tailwind preset pieces — the parts of a DS preset
5
+ * that are really the *contract*, not the design system:
6
+ *
7
+ * • `contractColors`: every semantic color token (incl. the `*-soft`
8
+ * tints) → `var(--color-*)`, so utilities like `bg-primary` and
9
+ * `text-base-content` resolve against the active theme of whichever
10
+ * design system is mounted.
11
+ * • `contractFontSizes`: re-points Tailwind's `text-xs`…`text-3xl`
12
+ * font-size utilities at the shared `--text-*` ramp (defaults in
13
+ * `styles/tokens.css`, multiplied app-wide by the theme controller's
14
+ * `fontScale`). Merged via `theme.extend.fontSize`, so larger Tailwind
15
+ * keys (`text-4xl`+) keep their rem defaults.
16
+ * • `lynxLayoutPlugin`: ships `flex-fill` — the Lynx-correct "fill
17
+ * remaining space" utility. In Lynx (like React Native) the `flex: 1`
18
+ * shorthand expands to `flex: 1 1 auto`, where `flexBasis: 'auto'` sizes
19
+ * the box to its content first, collapsing the layout chain; Tailwind's
20
+ * own `flex-1` expands to the same broken shorthand. `flex-fill` writes
21
+ * the long-form properties so the result actually fills.
22
+ *
23
+ * Design-system presets compose these (`@sigx/lynx-daisyui/preset`,
24
+ * `@sigx/lynx-heroui/preset`) and layer any DS-specific extensions on top;
25
+ * apps normally consume the DS preset, not this one directly.
26
+ */
27
+ export const contractColors = Object.fromEntries([
28
+ ...COLOR_VARIANT_LIST.flatMap((v) => [
29
+ [v, `var(--color-${v})`],
30
+ [`${v}-content`, `var(--color-${v}-content)`],
31
+ [`${v}-soft`, `var(--color-${v}-soft)`],
32
+ ]),
33
+ ['base-100', 'var(--color-base-100)'],
34
+ ['base-200', 'var(--color-base-200)'],
35
+ ['base-300', 'var(--color-base-300)'],
36
+ ['base-content', 'var(--color-base-content)'],
37
+ ]);
38
+ export const contractFontSizes = {
39
+ 'xs': 'var(--text-xs)',
40
+ 'sm': 'var(--text-sm)',
41
+ 'base': 'var(--text-base)',
42
+ 'lg': 'var(--text-lg)',
43
+ 'xl': 'var(--text-xl)',
44
+ '2xl': 'var(--text-2xl)',
45
+ '3xl': 'var(--text-3xl)',
46
+ };
47
+ export const lynxLayoutPlugin = plugin(({ addUtilities }) => {
48
+ addUtilities({
49
+ // Long-form flex-fill — the Lynx-correct "take remaining space along
50
+ // the main axis" utility. Default flex direction column; consumers
51
+ // who want a horizontal fill compose with `flex-row` on the parent.
52
+ '.flex-fill': {
53
+ flexGrow: '1',
54
+ flexShrink: '1',
55
+ flexBasis: '0',
56
+ minHeight: '0',
57
+ display: 'flex',
58
+ flexDirection: 'column',
59
+ },
60
+ });
61
+ });
62
+ /** The composed neutral preset — what DS presets spread. */
63
+ export const zeroPreset = {
64
+ theme: {
65
+ extend: {
66
+ colors: contractColors,
67
+ fontSize: contractFontSizes,
68
+ },
69
+ },
70
+ plugins: [lynxLayoutPlugin],
71
+ };
72
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/preset/index.ts"],"names":[],"mappings":"AACA,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,MAAM,CAAC,MAAM,cAAc,GAA2B,MAAM,CAAC,WAAW,CAAC;IACvE,GAAG,kBAAkB,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;QACnC,CAAC,CAAC,EAAE,eAAe,CAAC,GAAG,CAAC;QACxB,CAAC,GAAG,CAAC,UAAU,EAAE,eAAe,CAAC,WAAW,CAAC;QAC7C,CAAC,GAAG,CAAC,OAAO,EAAE,eAAe,CAAC,QAAQ,CAAC;KACxC,CAAC;IACF,CAAC,UAAU,EAAE,uBAAuB,CAAC;IACrC,CAAC,UAAU,EAAE,uBAAuB,CAAC;IACrC,CAAC,UAAU,EAAE,uBAAuB,CAAC;IACrC,CAAC,cAAc,EAAE,2BAA2B,CAAC;CAC9C,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,iBAAiB,GAA2B;IACvD,IAAI,EAAE,gBAAgB;IACtB,IAAI,EAAE,gBAAgB;IACtB,MAAM,EAAE,kBAAkB;IAC1B,IAAI,EAAE,gBAAgB;IACtB,IAAI,EAAE,gBAAgB;IACtB,KAAK,EAAE,iBAAiB;IACxB,KAAK,EAAE,iBAAiB;CACzB,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE;IAC1D,YAAY,CAAC;QACX,qEAAqE;QACrE,mEAAmE;QACnE,oEAAoE;QACpE,YAAY,EAAE;YACZ,QAAQ,EAAE,GAAG;YACb,UAAU,EAAE,GAAG;YACf,SAAS,EAAE,GAAG;YACd,SAAS,EAAE,GAAG;YACd,OAAO,EAAE,MAAM;YACf,aAAa,EAAE,QAAQ;SACxB;KACF,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,4DAA4D;AAC5D,MAAM,CAAC,MAAM,UAAU,GAAoB;IACzC,KAAK,EAAE;QACL,MAAM,EAAE;YACN,MAAM,EAAE,cAAc;YACtB,QAAQ,EAAE,iBAAiB;SAC5B;KACF;IACD,OAAO,EAAE,CAAC,gBAAgB,CAAC;CAC5B,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare const PRESSED_SCALE = 0.97;
2
+ export declare const PRESSED_OPACITY = 0.85;
3
+ //# sourceMappingURL=press.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"press.d.ts","sourceRoot":"","sources":["../../src/shared/press.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,aAAa,OAAO,CAAC;AAClC,eAAO,MAAM,eAAe,OAAO,CAAC"}
@@ -0,0 +1,7 @@
1
+ // Shared press-feedback defaults applied across interactive components in
2
+ // every design system. Lynx has no CSS `:active` support, so press feedback
3
+ // comes from `<Pressable>` (in `@sigx/lynx-gestures`) flipping inline
4
+ // opacity/transform on the main thread.
5
+ export const PRESSED_SCALE = 0.97;
6
+ export const PRESSED_OPACITY = 0.85;
7
+ //# sourceMappingURL=press.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"press.js","sourceRoot":"","sources":["../../src/shared/press.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,4EAA4E;AAC5E,sEAAsE;AACtE,wCAAwC;AACxC,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,CAAC;AAClC,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,CAAC"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Box-model style helpers shared by layout primitives and design-system
3
+ * components. Color values resolve through the semantic token contract
4
+ * (`resolveColorToken`), so `<Col background="base-100">` works identically
5
+ * under every design system's active theme.
6
+ */
7
+ import { type BackgroundValue } from '../contract.js';
8
+ export type SpacingValue = number | {
9
+ x?: number;
10
+ y?: number;
11
+ top?: number;
12
+ right?: number;
13
+ bottom?: number;
14
+ left?: number;
15
+ };
16
+ export interface BoxProps {
17
+ width?: number | string;
18
+ height?: number | string;
19
+ flex?: number;
20
+ background?: BackgroundValue;
21
+ borderRadius?: number;
22
+ padding?: SpacingValue;
23
+ margin?: SpacingValue;
24
+ }
25
+ export declare function resolveSpacing(value: SpacingValue | undefined, prefix: 'padding' | 'margin'): Record<string, number>;
26
+ export declare function resolveBoxStyle(props: BoxProps): Record<string, unknown>;
27
+ //# sourceMappingURL=styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/shared/styles.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAqB,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEzE,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG;IAClC,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,WAAW,QAAQ;IACvB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,MAAM,CAAC,EAAE,YAAY,CAAC;CACvB;AAED,wBAAgB,cAAc,CAC5B,KAAK,EAAE,YAAY,GAAG,SAAS,EAC/B,MAAM,EAAE,SAAS,GAAG,QAAQ,GAC3B,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CA2BxB;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAsBxE"}
@@ -0,0 +1,62 @@
1
+ /**
2
+ * Box-model style helpers shared by layout primitives and design-system
3
+ * components. Color values resolve through the semantic token contract
4
+ * (`resolveColorToken`), so `<Col background="base-100">` works identically
5
+ * under every design system's active theme.
6
+ */
7
+ import { resolveColorToken } from '../contract.js';
8
+ export function resolveSpacing(value, prefix) {
9
+ if (value === undefined)
10
+ return {};
11
+ if (typeof value === 'number') {
12
+ return {
13
+ [`${prefix}Top`]: value,
14
+ [`${prefix}Right`]: value,
15
+ [`${prefix}Bottom`]: value,
16
+ [`${prefix}Left`]: value,
17
+ };
18
+ }
19
+ const style = {};
20
+ if (value.top !== undefined)
21
+ style[`${prefix}Top`] = value.top;
22
+ else if (value.y !== undefined)
23
+ style[`${prefix}Top`] = value.y;
24
+ if (value.bottom !== undefined)
25
+ style[`${prefix}Bottom`] = value.bottom;
26
+ else if (value.y !== undefined)
27
+ style[`${prefix}Bottom`] = value.y;
28
+ if (value.right !== undefined)
29
+ style[`${prefix}Right`] = value.right;
30
+ else if (value.x !== undefined)
31
+ style[`${prefix}Right`] = value.x;
32
+ if (value.left !== undefined)
33
+ style[`${prefix}Left`] = value.left;
34
+ else if (value.x !== undefined)
35
+ style[`${prefix}Left`] = value.x;
36
+ return style;
37
+ }
38
+ export function resolveBoxStyle(props) {
39
+ const style = {};
40
+ if (props.width !== undefined)
41
+ style.width = props.width;
42
+ if (props.height !== undefined)
43
+ style.height = props.height;
44
+ if (props.flex !== undefined) {
45
+ // Lynx (like React Native) expands `flex: n` shorthand to
46
+ // `flex: n n auto`, where `flexBasis: 'auto'` means "size to content
47
+ // first" — which collapses the layout chain. Write the long-form so
48
+ // `<Center flex={1}>` etc. actually fill remaining space.
49
+ style.flexGrow = props.flex;
50
+ style.flexShrink = 1;
51
+ style.flexBasis = 0;
52
+ style.minHeight = 0;
53
+ }
54
+ if (props.background !== undefined)
55
+ style.backgroundColor = resolveColorToken(props.background);
56
+ if (props.borderRadius !== undefined)
57
+ style.borderRadius = props.borderRadius;
58
+ Object.assign(style, resolveSpacing(props.padding, 'padding'));
59
+ Object.assign(style, resolveSpacing(props.margin, 'margin'));
60
+ return style;
61
+ }
62
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../src/shared/styles.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,25 @@
1
+ export interface TabsSelection {
2
+ /** Whether the tab with this `value` is the selected one. Reactive. */
3
+ isActive(value: string): boolean;
4
+ /** Report a press on the tab with this `value` (drives `onChange`). */
5
+ select(value: string): void;
6
+ }
7
+ /**
8
+ * Inject the nearest enclosing `Tabs` container's selection. Outside any
9
+ * container this resolves to an inert selection (never active, presses
10
+ * no-op), so a bare `Tab` driven purely by `active`/`onPress` still works.
11
+ */
12
+ export declare const useTabsSelection: import("@sigx/runtime-core").InjectableFunction<TabsSelection>;
13
+ /**
14
+ * Provide a selection for the subtree. Call from the DS `Tabs` container's
15
+ * setup with getters into its reactive props:
16
+ *
17
+ * ```ts
18
+ * provideTabsSelection(
19
+ * () => props.activeTab,
20
+ * (v) => props.onChange?.(v),
21
+ * );
22
+ * ```
23
+ */
24
+ export declare function provideTabsSelection(getActive: () => string | undefined, onSelect: (value: string) => void): void;
25
+ //# sourceMappingURL=tabs-selection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tabs-selection.d.ts","sourceRoot":"","sources":["../../src/shared/tabs-selection.ts"],"names":[],"mappings":"AAiBA,MAAM,WAAW,aAAa;IAC5B,uEAAuE;IACvE,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;IACjC,uEAAuE;IACvE,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAOD;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,gEAAsD,CAAC;AAEpF;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAClC,SAAS,EAAE,MAAM,MAAM,GAAG,SAAS,EACnC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,GAChC,IAAI,CAMN"}
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Headless tabs selection — the shared behavior behind every design system's
3
+ * `Tabs`/`Tab` pair (extracted once daisy and hero both duplicated it; the
4
+ * #219 pilot was the evidence gate).
5
+ *
6
+ * The DS's `Tabs` container provides a `TabsSelection` built from its
7
+ * `activeTab`/`onChange` props; each `Tab` injects it to derive its active
8
+ * state from its `value` and to report presses. Explicit per-tab
9
+ * `active`/`onPress` props take precedence in the DS components, so the
10
+ * fully-controlled per-tab style keeps working.
11
+ *
12
+ * Reactivity: `provideTabsSelection` is called once at the container's setup
13
+ * with *getters* into the container's reactive props, so `isActive()` reads
14
+ * track the current `activeTab` value on every render.
15
+ */
16
+ import { defineInjectable, defineProvide } from '@sigx/lynx';
17
+ const NO_SELECTION = {
18
+ isActive: () => false,
19
+ select: () => { },
20
+ };
21
+ /**
22
+ * Inject the nearest enclosing `Tabs` container's selection. Outside any
23
+ * container this resolves to an inert selection (never active, presses
24
+ * no-op), so a bare `Tab` driven purely by `active`/`onPress` still works.
25
+ */
26
+ export const useTabsSelection = defineInjectable(() => NO_SELECTION);
27
+ /**
28
+ * Provide a selection for the subtree. Call from the DS `Tabs` container's
29
+ * setup with getters into its reactive props:
30
+ *
31
+ * ```ts
32
+ * provideTabsSelection(
33
+ * () => props.activeTab,
34
+ * (v) => props.onChange?.(v),
35
+ * );
36
+ * ```
37
+ */
38
+ export function provideTabsSelection(getActive, onSelect) {
39
+ const selection = {
40
+ isActive: (value) => getActive() === value,
41
+ select: onSelect,
42
+ };
43
+ defineProvide(useTabsSelection, () => selection);
44
+ }
45
+ //# sourceMappingURL=tabs-selection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tabs-selection.js","sourceRoot":"","sources":["../../src/shared/tabs-selection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAS7D,MAAM,YAAY,GAAkB;IAClC,QAAQ,EAAE,GAAG,EAAE,CAAC,KAAK;IACrB,MAAM,EAAE,GAAG,EAAE,GAAE,CAAC;CACjB,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,gBAAgB,CAAgB,GAAG,EAAE,CAAC,YAAY,CAAC,CAAC;AAEpF;;;;;;;;;;GAUG;AACH,MAAM,UAAU,oBAAoB,CAClC,SAAmC,EACnC,QAAiC;IAEjC,MAAM,SAAS,GAAkB;QAC/B,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,SAAS,EAAE,KAAK,KAAK;QAC1C,MAAM,EAAE,QAAQ;KACjB,CAAC;IACF,aAAa,CAAC,gBAAgB,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;AACnD,CAAC"}
@@ -0,0 +1,98 @@
1
+ /* Theme-agnostic structural design tokens.
2
+ *
3
+ * Theme COLORS come from the theme registry (seeded by the design-system package) and are
4
+ * applied as inline CSS custom properties by <ThemeProvider>. These
5
+ * radius / sizing / component tokens are identical across themes, so they
6
+ * ship once here under the `.lynx-zero` base class that <ThemeProvider> puts on
7
+ * its host view; CSS inheritance propagates them to every descendant. A theme
8
+ * may still override roundness via its `radius` field. */
9
+
10
+ .lynx-zero {
11
+ /* ── Roundness (DaisyUI v5 contract) ── */
12
+ --radius-selector: 8px;
13
+ --radius-field: 8px;
14
+ --radius-box: 16px;
15
+
16
+ /* ── Base size units (DaisyUI v5 contract) ──
17
+ * A theme's `sizes` ({ field, selector }) overrides these; <ThemeProvider>
18
+ * re-derives the component dimensions below from them in JS. We deliberately
19
+ * do NOT use `calc(var() * n)` in CSS — it's unproven in Lynx's runtime CSS
20
+ * engine. Defaults below are base 4px × the per-token multiples shown. */
21
+ --size-selector: 4px;
22
+ --size-field: 4px;
23
+
24
+ /* ── Field sizing scale (button / input / select) — field × 6/8/12/16 ── */
25
+ --size-xs: 24px;
26
+ --size-sm: 32px;
27
+ --size-md: 48px;
28
+ --size-lg: 64px;
29
+
30
+ /* ── Text ramp (public <Text> / <Heading> sizes) ──
31
+ * The xs→3xl scale the `text-*` utilities resolve to (the daisy preset maps
32
+ * Tailwind's fontSize keys onto these vars). Literal px so they resolve on
33
+ * the first paint, like every other structural token. Anchored on a 17px
34
+ * base — the iOS HIG Body size, so bare <Text> (the default) reads as native
35
+ * body — and stepped as an even ~1.2 modular scale (each step ≈1.17–1.21×).
36
+ *
37
+ * The controller's `fontScale` multiplies this ramp app-wide; <ThemeProvider>
38
+ * re-emits the literals in JS (no `calc(var() * n)` — unproven in Lynx).
39
+ * NOTE: keep in sync with FONT_DEFAULTS in theme/ThemeProvider.tsx. */
40
+ --text-xs: 12px;
41
+ --text-sm: 14px;
42
+ --text-base: 17px;
43
+ --text-lg: 20px;
44
+ --text-xl: 24px;
45
+ --text-2xl: 28px;
46
+ --text-3xl: 34px;
47
+
48
+ /* ── Font sizes (control-internal: button / input / badge labels) ──
49
+ * A separate axis from the text ramp above and deliberately NOT scaled with
50
+ * it — control chrome stays fixed. Kept as independent literals (no
51
+ * var→var indirection; unproven in Lynx) even though values mirror the ramp. */
52
+ --font-xs: 12px;
53
+ --font-sm: 14px;
54
+ --font-md: 14px;
55
+ --font-lg: 18px;
56
+
57
+ /* ── Spacing ── */
58
+ --padding-btn-xs: 8px;
59
+ --padding-btn-sm: 12px;
60
+ --padding-btn-md: 16px;
61
+ --padding-btn-lg: 24px;
62
+ --padding-box: 16px;
63
+ --padding-box-compact: 8px;
64
+ --gap-box: 8px;
65
+
66
+ /* ── Borders ── */
67
+ --border-btn: 1px;
68
+ --border-card: 1px;
69
+
70
+ /* ── Selector-driven sizes (checkbox / toggle / badge) — selector × the
71
+ * multiples shown; <ThemeProvider> re-derives these from `sizes.selector`. ── */
72
+ --checkbox-xs: 16px; /* ×4 */
73
+ --checkbox-sm: 20px; /* ×5 */
74
+ --checkbox-md: 24px; /* ×6 */
75
+ --checkbox-lg: 32px; /* ×8 */
76
+ --toggle-width-xs: 32px; /* ×8 */
77
+ --toggle-width-sm: 40px; /* ×10 */
78
+ --toggle-width-md: 48px; /* ×12 */
79
+ --toggle-width-lg: 56px; /* ×14 */
80
+ --toggle-height-xs: 24px; /* ×6 */
81
+ --toggle-height-sm: 24px; /* ×6 */
82
+ --toggle-height-md: 28px; /* ×7 */
83
+ --toggle-height-lg: 32px; /* ×8 */
84
+ --toggle-thumb-xs: 16px; /* ×4 */
85
+ --toggle-thumb-sm: 16px; /* ×4 */
86
+ --toggle-thumb-md: 20px; /* ×5 */
87
+ --toggle-thumb-lg: 24px; /* ×6 */
88
+ --badge-xs: 16px; /* ×4 */
89
+ --badge-sm: 20px; /* ×5 */
90
+ --badge-md: 24px; /* ×6 */
91
+ --badge-lg: 32px; /* ×8 */
92
+ --step-indicator: 32px;
93
+ --progress-height: 8px;
94
+ --modal-max-width: 400px;
95
+
96
+ /* ── Opacity ── */
97
+ --disabled-opacity: 0.5;
98
+ }