@xaui/native 0.9.1-alpha.12 → 0.9.1-alpha.14

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.
@@ -3,7 +3,7 @@
3
3
 
4
4
 
5
5
 
6
- var _chunkFDUI4IAMcjs = require('./chunk-FDUI4IAM.cjs');
6
+ var _chunk6N5JXRUZcjs = require('./chunk-6N5JXRUZ.cjs');
7
7
 
8
8
  // src/provider/xaui-provider.tsx
9
9
  var _reactnative = require('react-native');
@@ -11,38 +11,38 @@ var _reactnative = require('react-native');
11
11
  // src/theme/derive-colors.ts
12
12
  function deriveColors(s) {
13
13
  return {
14
- accentPressed: _chunkFDUI4IAMcjs.mix.call(void 0, s.accent, s.accentForeground, 0.1),
15
- successPressed: _chunkFDUI4IAMcjs.mix.call(void 0, s.success, s.successForeground, 0.1),
16
- warningPressed: _chunkFDUI4IAMcjs.mix.call(void 0, s.warning, s.warningForeground, 0.1),
17
- dangerPressed: _chunkFDUI4IAMcjs.mix.call(void 0, s.danger, s.dangerForeground, 0.1),
18
- defaultPressed: _chunkFDUI4IAMcjs.mix.call(void 0, s.default, s.defaultForeground, 0.04),
19
- surfacePressed: _chunkFDUI4IAMcjs.mix.call(void 0, s.surface, s.surfaceForeground, 0.08),
20
- defaultSoft: _chunkFDUI4IAMcjs.alpha.call(void 0, s.default, 0.5),
14
+ accentPressed: _chunk6N5JXRUZcjs.mix.call(void 0, s.accent, s.foreground, 0.1),
15
+ successPressed: _chunk6N5JXRUZcjs.mix.call(void 0, s.success, s.foreground, 0.1),
16
+ warningPressed: _chunk6N5JXRUZcjs.mix.call(void 0, s.warning, s.foreground, 0.1),
17
+ dangerPressed: _chunk6N5JXRUZcjs.mix.call(void 0, s.danger, s.foreground, 0.1),
18
+ defaultPressed: _chunk6N5JXRUZcjs.mix.call(void 0, s.default, s.defaultForeground, 0.04),
19
+ surfacePressed: _chunk6N5JXRUZcjs.mix.call(void 0, s.surface, s.surfaceForeground, 0.08),
20
+ defaultSoft: _chunk6N5JXRUZcjs.alpha.call(void 0, s.default, 0.5),
21
21
  defaultSoftForeground: s.defaultForeground,
22
- defaultSoftPressed: _chunkFDUI4IAMcjs.alpha.call(void 0, s.default, 0.6),
23
- accentSoft: _chunkFDUI4IAMcjs.alpha.call(void 0, s.accent, 0.15),
24
- accentSoftForeground: _chunkFDUI4IAMcjs.mix.call(void 0, s.accent, s.foreground, 0.2),
25
- accentSoftPressed: _chunkFDUI4IAMcjs.alpha.call(void 0, s.accent, 0.2),
26
- successSoft: _chunkFDUI4IAMcjs.alpha.call(void 0, s.success, 0.15),
27
- successSoftForeground: _chunkFDUI4IAMcjs.mix.call(void 0, s.success, s.foreground, 0.3),
28
- successSoftPressed: _chunkFDUI4IAMcjs.alpha.call(void 0, s.success, 0.2),
29
- warningSoft: _chunkFDUI4IAMcjs.alpha.call(void 0, s.warning, 0.15),
30
- warningSoftForeground: _chunkFDUI4IAMcjs.mix.call(void 0, s.warning, s.foreground, 0.35),
31
- warningSoftPressed: _chunkFDUI4IAMcjs.alpha.call(void 0, s.warning, 0.2),
32
- dangerSoft: _chunkFDUI4IAMcjs.alpha.call(void 0, s.danger, 0.15),
33
- dangerSoftForeground: _chunkFDUI4IAMcjs.mix.call(void 0, s.danger, s.foreground, 0.2),
34
- dangerSoftPressed: _chunkFDUI4IAMcjs.alpha.call(void 0, s.danger, 0.2),
35
- backgroundSecondary: _chunkFDUI4IAMcjs.mix.call(void 0, s.background, s.foreground, 0.04),
36
- backgroundTertiary: _chunkFDUI4IAMcjs.mix.call(void 0, s.background, s.foreground, 0.08),
22
+ defaultSoftPressed: _chunk6N5JXRUZcjs.alpha.call(void 0, s.default, 0.6),
23
+ accentSoft: _chunk6N5JXRUZcjs.alpha.call(void 0, s.accent, 0.15),
24
+ accentSoftForeground: _chunk6N5JXRUZcjs.mix.call(void 0, s.accent, s.foreground, 0.2),
25
+ accentSoftPressed: _chunk6N5JXRUZcjs.alpha.call(void 0, s.accent, 0.2),
26
+ successSoft: _chunk6N5JXRUZcjs.alpha.call(void 0, s.success, 0.15),
27
+ successSoftForeground: _chunk6N5JXRUZcjs.mix.call(void 0, s.success, s.foreground, 0.3),
28
+ successSoftPressed: _chunk6N5JXRUZcjs.alpha.call(void 0, s.success, 0.2),
29
+ warningSoft: _chunk6N5JXRUZcjs.alpha.call(void 0, s.warning, 0.15),
30
+ warningSoftForeground: _chunk6N5JXRUZcjs.mix.call(void 0, s.warning, s.foreground, 0.35),
31
+ warningSoftPressed: _chunk6N5JXRUZcjs.alpha.call(void 0, s.warning, 0.2),
32
+ dangerSoft: _chunk6N5JXRUZcjs.alpha.call(void 0, s.danger, 0.15),
33
+ dangerSoftForeground: _chunk6N5JXRUZcjs.mix.call(void 0, s.danger, s.foreground, 0.2),
34
+ dangerSoftPressed: _chunk6N5JXRUZcjs.alpha.call(void 0, s.danger, 0.2),
35
+ backgroundSecondary: _chunk6N5JXRUZcjs.mix.call(void 0, s.background, s.foreground, 0.04),
36
+ backgroundTertiary: _chunk6N5JXRUZcjs.mix.call(void 0, s.background, s.foreground, 0.08),
37
37
  backgroundInverse: s.foreground,
38
- borderSecondary: _chunkFDUI4IAMcjs.mix.call(void 0, s.surface, s.surfaceForeground, 0.22),
39
- borderTertiary: _chunkFDUI4IAMcjs.mix.call(void 0, s.surface, s.surfaceForeground, 0.34),
40
- separatorSecondary: _chunkFDUI4IAMcjs.mix.call(void 0, s.surface, s.surfaceForeground, 0.15),
41
- separatorTertiary: _chunkFDUI4IAMcjs.mix.call(void 0, s.surface, s.surfaceForeground, 0.19),
42
- fieldPressed: _chunkFDUI4IAMcjs.mix.call(void 0, s.fieldBackground, s.fieldForeground, 0.1),
38
+ borderSecondary: _chunk6N5JXRUZcjs.mix.call(void 0, s.surface, s.surfaceForeground, 0.22),
39
+ borderTertiary: _chunk6N5JXRUZcjs.mix.call(void 0, s.surface, s.surfaceForeground, 0.34),
40
+ separatorSecondary: _chunk6N5JXRUZcjs.mix.call(void 0, s.surface, s.surfaceForeground, 0.15),
41
+ separatorTertiary: _chunk6N5JXRUZcjs.mix.call(void 0, s.surface, s.surfaceForeground, 0.19),
42
+ fieldPressed: _chunk6N5JXRUZcjs.mix.call(void 0, s.fieldBackground, s.fieldForeground, 0.1),
43
43
  fieldFocus: s.fieldBackground,
44
- fieldBorderPressed: _chunkFDUI4IAMcjs.mix.call(void 0, s.fieldBorder, s.fieldForeground, 0.12),
45
- fieldBorderFocus: _chunkFDUI4IAMcjs.mix.call(void 0, s.fieldBorder, s.fieldForeground, 0.26)
44
+ fieldBorderPressed: _chunk6N5JXRUZcjs.mix.call(void 0, s.fieldBorder, s.fieldForeground, 0.12),
45
+ fieldBorderFocus: _chunk6N5JXRUZcjs.mix.call(void 0, s.fieldBorder, s.fieldForeground, 0.26)
46
46
  };
47
47
  }
48
48
 
@@ -183,10 +183,10 @@ var tokens = {
183
183
  separator: "#d4d4d8",
184
184
  focus: "#9333ea",
185
185
  link: "#18181b",
186
- accentPressed: "#9c4eee",
187
- successPressed: "#378c50",
188
- warningPressed: "#bd642f",
189
- dangerPressed: "#e2473f",
186
+ accentPressed: "#8533d3",
187
+ successPressed: "#1b753a",
188
+ warningPressed: "#a34d13",
189
+ dangerPressed: "#c72927",
190
190
  defaultPressed: "#eaeaeb",
191
191
  surfacePressed: "#eaeaea",
192
192
  defaultSoft: "rgba(244, 244, 245, 0.5)",
@@ -253,10 +253,10 @@ var tokens = {
253
253
  separator: "#52525b",
254
254
  focus: "#c084fc",
255
255
  link: "#fafafa",
256
- accentPressed: "#ad78e3",
257
- successPressed: "#47c875",
258
- warningPressed: "#e1ac2b",
259
- dangerPressed: "#df6868",
256
+ accentPressed: "#c691fd",
257
+ successPressed: "#64e18d",
258
+ warningPressed: "#fbc54b",
259
+ dangerPressed: "#fa807e",
260
260
  defaultPressed: "#2e2e31",
261
261
  surfacePressed: "#27272a",
262
262
  defaultSoft: "rgba(39, 39, 42, 0.5)",
@@ -361,7 +361,7 @@ function resolveMode(mode, config, id) {
361
361
  };
362
362
  }
363
363
  function createTheme(config = {}) {
364
- const id = _chunkFDUI4IAMcjs.stableHash.call(void 0, config);
364
+ const id = _chunk6N5JXRUZcjs.stableHash.call(void 0, config);
365
365
  return {
366
366
  id,
367
367
  light: resolveMode("light", config, id),
@@ -379,7 +379,7 @@ function XAUIProvider({
379
379
  }) {
380
380
  const scheme = _reactnative.useColorScheme.call(void 0, );
381
381
  const resolved = colorMode === "system" ? scheme === "dark" ? "dark" : "light" : colorMode;
382
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkFDUI4IAMcjs.ThemeContext.Provider, { value: theme[resolved], children });
382
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6N5JXRUZcjs.ThemeContext.Provider, { value: theme[resolved], children });
383
383
  }
384
384
 
385
385
  // src/theme/palette.ts
@@ -1,4 +1,8 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }// src/system/portal/portal.tsx
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
+
3
+ var _chunkGRXC6J5Mcjs = require('./chunk-GRXC6J5M.cjs');
4
+
5
+ // src/system/portal/portal.tsx
2
6
  var _react = require('react');
3
7
 
4
8
  // src/system/portal/portal-context.ts
@@ -26,7 +30,8 @@ var _jsxruntime = require('react/jsx-runtime');
26
30
  var styles = _reactnative.StyleSheet.create({
27
31
  container: { flex: 1 }
28
32
  });
29
- function PortalHost({ children }) {
33
+ function PortalHost({ children, ...props }) {
34
+ const [styleProps] = _chunkGRXC6J5Mcjs.useStyleProps.call(void 0, props);
30
35
  const [portals, setPortals] = _react.useState.call(void 0, /* @__PURE__ */ new Map());
31
36
  const addPortal = _react.useCallback.call(void 0, (key, element) => {
32
37
  setPortals((current) => new Map(current).set(key, element));
@@ -43,7 +48,7 @@ function PortalHost({ children }) {
43
48
  () => ({ addPortal, removePortal }),
44
49
  [addPortal, removePortal]
45
50
  );
46
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PortalContext.Provider, { value: methods, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnative.View, { style: styles.container, children: [
51
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PortalContext.Provider, { value: methods, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _reactnative.View, { style: [styles.container, styleProps], children: [
47
52
  children,
48
53
  Array.from(portals, ([key, element]) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _react.Fragment, { children: element }, key))
49
54
  ] }) });