@multiplatform.one/theme 10.27.4 → 11.0.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.
Files changed (52) hide show
  1. package/README.md +6 -4
  2. package/dist/cjs/index.gnome.cjs +0 -1
  3. package/dist/cjs/index.gnome.native.cjs +0 -1
  4. package/dist/cjs/index.gnome.native.js +0 -1
  5. package/dist/cjs/index.gnome.native.js.map +1 -1
  6. package/dist/cjs/theme/createThemes.cjs +0 -4
  7. package/dist/cjs/theme/createThemes.native.cjs +0 -4
  8. package/dist/cjs/theme/createThemes.native.js +0 -4
  9. package/dist/cjs/theme/createThemes.native.js.map +1 -1
  10. package/dist/cjs/theme/overlaySurfaces.cjs +0 -21
  11. package/dist/cjs/theme/overlaySurfaces.native.cjs +0 -22
  12. package/dist/cjs/theme/overlaySurfaces.native.js +0 -22
  13. package/dist/cjs/theme/overlaySurfaces.native.js.map +1 -1
  14. package/dist/cjs/theme/unknownTokenGuard.cjs +32 -1
  15. package/dist/cjs/theme/unknownTokenGuard.native.cjs +70 -1
  16. package/dist/cjs/theme/unknownTokenGuard.native.js +70 -1
  17. package/dist/cjs/theme/unknownTokenGuard.native.js.map +1 -1
  18. package/dist/esm/index.gnome.mjs +2 -2
  19. package/dist/esm/index.gnome.native.js +2 -2
  20. package/dist/esm/theme/createThemes.mjs +0 -4
  21. package/dist/esm/theme/createThemes.mjs.map +1 -1
  22. package/dist/esm/theme/createThemes.native.js +0 -4
  23. package/dist/esm/theme/createThemes.native.js.map +1 -1
  24. package/dist/esm/theme/overlaySurfaces.mjs +4 -24
  25. package/dist/esm/theme/overlaySurfaces.mjs.map +1 -1
  26. package/dist/esm/theme/overlaySurfaces.native.js +4 -25
  27. package/dist/esm/theme/overlaySurfaces.native.js.map +1 -1
  28. package/dist/esm/theme/unknownTokenGuard.mjs +32 -1
  29. package/dist/esm/theme/unknownTokenGuard.mjs.map +1 -1
  30. package/dist/esm/theme/unknownTokenGuard.native.js +70 -1
  31. package/dist/esm/theme/unknownTokenGuard.native.js.map +1 -1
  32. package/package.json +5 -5
  33. package/src/index.gnome.ts +0 -1
  34. package/src/theme/controlEdges.spec.ts +2 -2
  35. package/src/theme/createDefaultThemeConfig.spec.ts +6 -14
  36. package/src/theme/createThemes.ts +0 -4
  37. package/src/theme/overlaySurfaces.focus.spec.tsx +0 -48
  38. package/src/theme/overlaySurfaces.tsx +4 -46
  39. package/src/theme/rampRoles.spec.ts +1 -1
  40. package/src/theme/rowStates.spec.ts +1 -1
  41. package/src/theme/selectedState.spec.ts +1 -2
  42. package/src/theme/subsetThemes.spec.ts +3 -3
  43. package/src/theme/unknownTokenGuard.spec.tsx +35 -1
  44. package/src/theme/unknownTokenGuard.ts +54 -3
  45. package/types/index.gnome.d.ts +1 -1
  46. package/types/index.gnome.d.ts.map +1 -1
  47. package/types/theme/createThemes.d.ts +0 -12
  48. package/types/theme/createThemes.d.ts.map +1 -1
  49. package/types/theme/overlaySurfaces.d.ts +1 -10
  50. package/types/theme/overlaySurfaces.d.ts.map +1 -1
  51. package/types/theme/unknownTokenGuard.d.ts +3 -2
  52. package/types/theme/unknownTokenGuard.d.ts.map +1 -1
@@ -26,7 +26,6 @@ __export(overlaySurfaces_exports, {
26
26
  DialogOverlay: () => DialogOverlay,
27
27
  DialogRegionContext: () => DialogRegionContext,
28
28
  DialogSheetFaceProvider: () => DialogSheetFaceProvider,
29
- DialogShowFocus: () => DialogShowFocus,
30
29
  PopoverContent: () => PopoverContent,
31
30
  SheetBodyProvider: () => SheetBodyProvider,
32
31
  dialogScrim: () => dialogScrim,
@@ -53,7 +52,6 @@ var import_useResolvedKnobs = require("./useResolvedKnobs.cjs");
53
52
  var import_layoutTokens = require("./layoutTokens.cjs");
54
53
  var import_resolveKnobs = require("./resolveKnobs.cjs");
55
54
  var import_react = require("react");
56
- var import_web = require("@tamagui/web");
57
55
  var import_tamagui = require("tamagui");
58
56
  var import_jsx_runtime = require("react/jsx-runtime");
59
57
  const dialogScrim = "$scrim-dialog";
@@ -146,22 +144,6 @@ function contentById(contentId) {
146
144
  if (!contentId || typeof document === "undefined") return null;
147
145
  return document.getElementById(contentId);
148
146
  }
149
- function useDialogShowFocus(onOpenAutoFocus) {
150
- const { open, contentId } = (0, import_tamagui.useDialogContext)();
151
- (0, import_react.useEffect)(() => {
152
- if (!open || !contentId || !import_tamagui.isWeb || typeof document === "undefined") return;
153
- const content = document.getElementById(contentId);
154
- const focused = document.activeElement;
155
- if (!content || typeof HTMLElement === "undefined" || !(focused instanceof HTMLElement)) return;
156
- if (!content.contains(focused) || focused.tabIndex >= 0 && (0, import_keyboardFocusRing.wasKeyboardFocus)()) return;
157
- onOpenAutoFocus((0, import_web.createChangeEventDetails)("trigger-focus"));
158
- }, [open, contentId]);
159
- }
160
- function DialogShowFocus({ onOpenAutoFocus }) {
161
- const { contentId } = (0, import_tamagui.useDialogContext)();
162
- useDialogShowFocus(withHouseOpenFocus(onOpenAutoFocus, contentId));
163
- return null;
164
- }
165
147
  const DialogRegionContext = (0, import_react.createContext)({ inDialogRegion: false });
166
148
  function useDialogRegionContext() {
167
149
  return (0, import_react.useContext)(DialogRegionContext);
@@ -240,7 +222,6 @@ const DialogContentInner = (0, import_react.forwardRef)(function DialogContentIn
240
222
  const { knobProps } = (0, import_useResolvedKnobs.useResolvedKnobs)({ component: "DialogContent" });
241
223
  const { contentId } = (0, import_tamagui.useDialogContext)();
242
224
  const openFocus = withHouseOpenFocus(onOpenAutoFocus, contentId);
243
- useDialogShowFocus(openFocus);
244
225
  const windowFit = useWindowFit(props);
245
226
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Dialog.Content, {
246
227
  ref,
@@ -297,8 +278,6 @@ const AlertDialogContent = (0, import_react.forwardRef)(function AlertDialogCont
297
278
  });
298
279
  const AlertDialogContentInner = (0, import_react.forwardRef)(function AlertDialogContentInner2({ children, ...props }, ref) {
299
280
  const { knobProps } = (0, import_useResolvedKnobs.useResolvedKnobs)({ component: "AlertDialogContent" });
300
- const { contentId } = (0, import_tamagui.useDialogContext)();
301
- useDialogShowFocus(withHouseOpenFocus(props.onOpenAutoFocus, contentId));
302
281
  const windowFit = useWindowFit(props, import_layoutTokens.ALERT_READABLE_WIDTH);
303
282
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.AlertDialog.Content, {
304
283
  ref,
@@ -28,7 +28,6 @@ __export(overlaySurfaces_exports, {
28
28
  DialogOverlay: () => DialogOverlay,
29
29
  DialogRegionContext: () => DialogRegionContext,
30
30
  DialogSheetFaceProvider: () => DialogSheetFaceProvider,
31
- DialogShowFocus: () => DialogShowFocus,
32
31
  PopoverContent: () => PopoverContent,
33
32
  SheetBodyProvider: () => SheetBodyProvider,
34
33
  dialogScrim: () => dialogScrim,
@@ -56,7 +55,6 @@ var import_useResolvedKnobs = require("./useResolvedKnobs.native.js");
56
55
  var import_layoutTokens = require("./layoutTokens.native.js");
57
56
  var import_resolveKnobs = require("./resolveKnobs.native.js");
58
57
  var import_react = require("react");
59
- var import_web = require("@tamagui/web");
60
58
  var import_tamagui = require("tamagui");
61
59
  var dialogScrim = "$scrim-dialog";
62
60
  var sheetScrim = "$scrim-sheet";
@@ -150,23 +148,6 @@ function contentById(contentId) {
150
148
  if (!contentId || typeof document === "undefined") return null;
151
149
  return document.getElementById(contentId);
152
150
  }
153
- function useDialogShowFocus(onOpenAutoFocus) {
154
- var { open, contentId } = (0, import_tamagui.useDialogContext)();
155
- (0, import_react.useEffect)(function() {
156
- if (!open || !contentId || !import_tamagui.isWeb || typeof document === "undefined") return;
157
- var content = document.getElementById(contentId);
158
- var focused = document.activeElement;
159
- if (!content || typeof HTMLElement === "undefined" || !(focused instanceof HTMLElement)) return;
160
- if (!content.contains(focused) || focused.tabIndex >= 0 && (0, import_keyboardFocusRing.wasKeyboardFocus)()) return;
161
- onOpenAutoFocus((0, import_web.createChangeEventDetails)("trigger-focus"));
162
- }, [open, contentId]);
163
- }
164
- function DialogShowFocus(param) {
165
- var { onOpenAutoFocus } = param;
166
- var { contentId } = (0, import_tamagui.useDialogContext)();
167
- useDialogShowFocus(withHouseOpenFocus(onOpenAutoFocus, contentId));
168
- return null;
169
- }
170
151
  var DialogRegionContext = /* @__PURE__ */ (0, import_react.createContext)({ inDialogRegion: false });
171
152
  function useDialogRegionContext() {
172
153
  return (0, import_react.useContext)(DialogRegionContext);
@@ -251,7 +232,6 @@ var DialogContentInner = /* @__PURE__ */ (0, import_react.forwardRef)(function D
251
232
  var { knobProps } = (0, import_useResolvedKnobs.useResolvedKnobs)({ component: "DialogContent" });
252
233
  var { contentId } = (0, import_tamagui.useDialogContext)();
253
234
  var openFocus = withHouseOpenFocus(onOpenAutoFocus, contentId);
254
- useDialogShowFocus(openFocus);
255
235
  var windowFit = useWindowFit(props);
256
236
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Dialog.Content, {
257
237
  ref,
@@ -311,8 +291,6 @@ var AlertDialogContent = /* @__PURE__ */ (0, import_react.forwardRef)(function A
311
291
  var AlertDialogContentInner = /* @__PURE__ */ (0, import_react.forwardRef)(function AlertDialogContentInner2(param, ref) {
312
292
  var { children, ...props } = param;
313
293
  var { knobProps } = (0, import_useResolvedKnobs.useResolvedKnobs)({ component: "AlertDialogContent" });
314
- var { contentId } = (0, import_tamagui.useDialogContext)();
315
- useDialogShowFocus(withHouseOpenFocus(props.onOpenAutoFocus, contentId));
316
294
  var windowFit = useWindowFit(props, import_layoutTokens.ALERT_READABLE_WIDTH);
317
295
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.AlertDialog.Content, {
318
296
  ref,
@@ -28,7 +28,6 @@ __export(overlaySurfaces_exports, {
28
28
  DialogOverlay: () => DialogOverlay,
29
29
  DialogRegionContext: () => DialogRegionContext,
30
30
  DialogSheetFaceProvider: () => DialogSheetFaceProvider,
31
- DialogShowFocus: () => DialogShowFocus,
32
31
  PopoverContent: () => PopoverContent,
33
32
  SheetBodyProvider: () => SheetBodyProvider,
34
33
  dialogScrim: () => dialogScrim,
@@ -56,7 +55,6 @@ var import_useResolvedKnobs = require("./useResolvedKnobs.native.js");
56
55
  var import_layoutTokens = require("./layoutTokens.native.js");
57
56
  var import_resolveKnobs = require("./resolveKnobs.native.js");
58
57
  var import_react = require("react");
59
- var import_web = require("@tamagui/web");
60
58
  var import_tamagui = require("tamagui");
61
59
  var dialogScrim = "$scrim-dialog";
62
60
  var sheetScrim = "$scrim-sheet";
@@ -150,23 +148,6 @@ function contentById(contentId) {
150
148
  if (!contentId || typeof document === "undefined") return null;
151
149
  return document.getElementById(contentId);
152
150
  }
153
- function useDialogShowFocus(onOpenAutoFocus) {
154
- var { open, contentId } = (0, import_tamagui.useDialogContext)();
155
- (0, import_react.useEffect)(function() {
156
- if (!open || !contentId || !import_tamagui.isWeb || typeof document === "undefined") return;
157
- var content = document.getElementById(contentId);
158
- var focused = document.activeElement;
159
- if (!content || typeof HTMLElement === "undefined" || !(focused instanceof HTMLElement)) return;
160
- if (!content.contains(focused) || focused.tabIndex >= 0 && (0, import_keyboardFocusRing.wasKeyboardFocus)()) return;
161
- onOpenAutoFocus((0, import_web.createChangeEventDetails)("trigger-focus"));
162
- }, [open, contentId]);
163
- }
164
- function DialogShowFocus(param) {
165
- var { onOpenAutoFocus } = param;
166
- var { contentId } = (0, import_tamagui.useDialogContext)();
167
- useDialogShowFocus(withHouseOpenFocus(onOpenAutoFocus, contentId));
168
- return null;
169
- }
170
151
  var DialogRegionContext = /* @__PURE__ */ (0, import_react.createContext)({ inDialogRegion: false });
171
152
  function useDialogRegionContext() {
172
153
  return (0, import_react.useContext)(DialogRegionContext);
@@ -251,7 +232,6 @@ var DialogContentInner = /* @__PURE__ */ (0, import_react.forwardRef)(function D
251
232
  var { knobProps } = (0, import_useResolvedKnobs.useResolvedKnobs)({ component: "DialogContent" });
252
233
  var { contentId } = (0, import_tamagui.useDialogContext)();
253
234
  var openFocus = withHouseOpenFocus(onOpenAutoFocus, contentId);
254
- useDialogShowFocus(openFocus);
255
235
  var windowFit = useWindowFit(props);
256
236
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Dialog.Content, {
257
237
  ref,
@@ -311,8 +291,6 @@ var AlertDialogContent = /* @__PURE__ */ (0, import_react.forwardRef)(function A
311
291
  var AlertDialogContentInner = /* @__PURE__ */ (0, import_react.forwardRef)(function AlertDialogContentInner2(param, ref) {
312
292
  var { children, ...props } = param;
313
293
  var { knobProps } = (0, import_useResolvedKnobs.useResolvedKnobs)({ component: "AlertDialogContent" });
314
- var { contentId } = (0, import_tamagui.useDialogContext)();
315
- useDialogShowFocus(withHouseOpenFocus(props.onOpenAutoFocus, contentId));
316
294
  var windowFit = useWindowFit(props, import_layoutTokens.ALERT_READABLE_WIDTH);
317
295
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.AlertDialog.Content, {
318
296
  ref,
@@ -1 +1 @@
1
- {"version":3,"file":"overlaySurfaces.native.js","names":[],"sources":["cjs/theme/overlaySurfaces.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar overlaySurfaces_exports = {};\n__export(overlaySurfaces_exports, {\n AlertDialogContent: () => AlertDialogContent,\n AlertDialogOverlay: () => AlertDialogOverlay,\n DialogContent: () => DialogContent,\n DialogOverlay: () => DialogOverlay,\n DialogRegionContext: () => DialogRegionContext,\n DialogSheetFaceProvider: () => DialogSheetFaceProvider,\n DialogShowFocus: () => DialogShowFocus,\n PopoverContent: () => PopoverContent,\n SheetBodyProvider: () => SheetBodyProvider,\n dialogScrim: () => dialogScrim,\n overlayScrim: () => overlayScrim,\n sheetGrabber: () => sheetGrabber,\n sheetGrabberClearance: () => sheetGrabberClearance,\n sheetGrabberZone: () => sheetGrabberZone,\n sheetHandle: () => sheetHandle,\n sheetHandleTone: () => sheetHandleTone,\n sheetHandleWidthRatio: () => sheetHandleWidthRatio,\n sheetHandleZone: () => sheetHandleZone,\n sheetScrim: () => sheetScrim,\n useDialogRegionContext: () => useDialogRegionContext,\n useDialogSheetFace: () => useDialogSheetFace,\n useIsInDialogRegion: () => useIsInDialogRegion,\n useIsInSheetBody: () => useIsInSheetBody\n});\nmodule.exports = __toCommonJS(overlaySurfaces_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_keyboardFocusRing = require(\"../keyboardFocusRing\");\nvar import_motion = require(\"./motion\");\nvar import_transitionProps = require(\"./transitionProps\");\nvar import_Surface = require(\"./Surface\");\nvar import_useResolvedKnobs = require(\"./useResolvedKnobs\");\nvar import_layoutTokens = require(\"./layoutTokens\");\nvar import_resolveKnobs = require(\"./resolveKnobs\");\nvar import_react = require(\"react\");\nvar import_web = require(\"@tamagui/web\");\nvar import_tamagui = require(\"tamagui\");\nvar dialogScrim = \"$scrim-dialog\";\nvar sheetScrim = \"$scrim-sheet\";\nvar overlayScrim = dialogScrim;\nvar sheetGrabber = {\n width: 36,\n height: 5,\n borderRadius: 100,\n backgroundColor: \"$color-12\",\n opacity: 0.3,\n alignSelf: \"center\",\n marginHorizontal: 0,\n marginTop: 5,\n marginBottom: -10,\n zIndex: 10\n};\nvar sheetGrabberClearance = 16;\nvar sheetGrabberZone = {\n alignSelf: \"stretch\",\n alignItems: \"center\",\n height: 21\n};\nvar sheetHandleWidthRatio = 0.3;\nvar sheetHandle = {\n width: \"30%\",\n height: 10,\n borderRadius: 100,\n backgroundColor: \"$color-5\",\n opacity: 1,\n alignSelf: \"center\",\n marginHorizontal: 0,\n marginTop: 0,\n marginBottom: 8,\n zIndex: 10\n};\nvar sheetHandleZone = {\n alignSelf: \"stretch\",\n alignItems: \"center\",\n paddingTop: 8\n};\nvar sheetHandleToneOpen = {\n backgroundColor: \"$color-5\",\n opacity: 1\n};\nfunction sheetHandleTone(_scheme) {\n return sheetHandleToneOpen;\n}\nvar overlayFrameFocus = {\n outlineWidth: {\n default: 0,\n focus: 0,\n \"focus-visible\": 0\n },\n outlineStyle: {\n default: \"none\",\n focus: \"none\",\n \"focus-visible\": \"none\"\n }\n};\nfunction isTabbableWithin(node, container) {\n if (node.tabIndex < 0 || node.hidden || node.tagName === \"A\") return false;\n if (node.disabled) return false;\n if (typeof HTMLInputElement !== \"undefined\" && node instanceof HTMLInputElement && node.type === \"hidden\") {\n return false;\n }\n if (getComputedStyle(node).visibility === \"hidden\") return false;\n for (var el = node; el && el !== container; el = el.parentElement) {\n if (getComputedStyle(el).display === \"none\") return false;\n }\n return true;\n}\nfunction focusFirstTabbableOnOpen(details, container) {\n if (typeof HTMLElement === \"undefined\" || !(container instanceof HTMLElement)) return;\n var first = Array.from(container.querySelectorAll(\"*\")).find(function(node) {\n return isTabbableWithin(node, container);\n });\n if (!first) return;\n details.cancel();\n var focused = (0, import_keyboardFocusRing.focusOnOpen)(first, container);\n if (typeof HTMLInputElement !== \"undefined\" && focused instanceof HTMLInputElement) {\n focused.select();\n }\n}\nfunction withHouseOpenFocus(onOpenAutoFocus, contentId) {\n return function(details) {\n onOpenAutoFocus === null || onOpenAutoFocus === void 0 ? void 0 : onOpenAutoFocus(details);\n if (!details.isCanceled) focusFirstTabbableOnOpen(details, contentById(contentId));\n };\n}\nfunction contentById(contentId) {\n if (!contentId || typeof document === \"undefined\") return null;\n return document.getElementById(contentId);\n}\nfunction useDialogShowFocus(onOpenAutoFocus) {\n var { open, contentId } = (0, import_tamagui.useDialogContext)();\n (0, import_react.useEffect)(function() {\n if (!open || !contentId || !import_tamagui.isWeb || typeof document === \"undefined\") return;\n var content = document.getElementById(contentId);\n var focused = document.activeElement;\n if (!content || typeof HTMLElement === \"undefined\" || !(focused instanceof HTMLElement)) return;\n if (!content.contains(focused) || focused.tabIndex >= 0 && (0, import_keyboardFocusRing.wasKeyboardFocus)()) return;\n onOpenAutoFocus((0, import_web.createChangeEventDetails)(\"trigger-focus\"));\n }, [\n open,\n contentId\n ]);\n}\nfunction DialogShowFocus(param) {\n var { onOpenAutoFocus } = param;\n var { contentId } = (0, import_tamagui.useDialogContext)();\n useDialogShowFocus(withHouseOpenFocus(onOpenAutoFocus, contentId));\n return null;\n}\nvar DialogRegionContext = /* @__PURE__ */ (0, import_react.createContext)({\n inDialogRegion: false\n});\nfunction useDialogRegionContext() {\n return (0, import_react.useContext)(DialogRegionContext);\n}\nfunction useIsInDialogRegion() {\n return useDialogRegionContext().inDialogRegion;\n}\nvar IN_DIALOG_REGION = {\n inDialogRegion: true\n};\nvar SheetBodyContext = /* @__PURE__ */ (0, import_react.createContext)(false);\nvar SheetBodyProvider = SheetBodyContext.Provider;\nfunction useIsInSheetBody() {\n return (0, import_react.useContext)(SheetBodyContext);\n}\nvar DialogSheetFaceContext = /* @__PURE__ */ (0, import_react.createContext)(false);\nvar DialogSheetFaceProvider = DialogSheetFaceContext.Provider;\nfunction useDialogSheetFace() {\n return (0, import_react.useContext)(DialogSheetFaceContext);\n}\nvar DialogSheetBody = /* @__PURE__ */ (0, import_react.forwardRef)(function DialogSheetBody2(param, ref) {\n var { children } = param;\n var { knobProps } = (0, import_useResolvedKnobs.useResolvedKnobs)({\n component: \"DialogContent\"\n });\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.YStack, {\n ref,\n ...knobProps.gap,\n ...{\n \"data-mp-dialog-face\": \"sheet\"\n },\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogSheetFaceContext.Provider, {\n value: false,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogRegionContext.Provider, {\n value: IN_DIALOG_REGION,\n children\n })\n })\n });\n});\nvar overlayEnterExit = {\n opacity: {\n enter: 0,\n exit: 0\n },\n y: {\n enter: -4,\n exit: -4\n },\n scale: {\n enter: 0.97,\n exit: 0.97\n }\n};\nvar DialogContent = /* @__PURE__ */ (0, import_react.forwardRef)(function DialogContent2(param, ref) {\n var { children, size = \"4\", ...props } = param;\n if (useDialogSheetFace()) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogSheetBody, {\n ref,\n children\n });\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Surface.Surface, {\n size,\n painted: false,\n elevated: true,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogContentInner, {\n ref,\n ...props,\n children\n })\n });\n});\nfunction useWindowFit(props, fallbackMaxWidth) {\n var _ref, _props_maxWidth;\n var { width: windowWidth } = (0, import_tamagui.useWindowDimensions)();\n var room = windowWidth > 0 ? Math.max(0, windowWidth - 2 * (0, import_resolveKnobs.panelPaddingPx)()) : void 0;\n var fit = function fit2(value) {\n return room != null && typeof value === \"number\" ? Math.min(value, room) : value;\n };\n if (room == null) return fallbackMaxWidth == null ? void 0 : {\n maxWidth: fallbackMaxWidth\n };\n return {\n maxWidth: fit((_ref = (_props_maxWidth = props.maxWidth) !== null && _props_maxWidth !== void 0 ? _props_maxWidth : fallbackMaxWidth) !== null && _ref !== void 0 ? _ref : room),\n ...props.minWidth != null ? {\n minWidth: fit(props.minWidth)\n } : void 0,\n ...props.width != null ? {\n width: fit(props.width)\n } : void 0\n };\n}\nvar DialogContentInner = /* @__PURE__ */ (0, import_react.forwardRef)(function DialogContentInner2(param, ref) {\n var { children, onOpenAutoFocus, ...props } = param;\n var { knobProps } = (0, import_useResolvedKnobs.useResolvedKnobs)({\n component: \"DialogContent\"\n });\n var { contentId } = (0, import_tamagui.useDialogContext)();\n var openFocus = withHouseOpenFocus(onOpenAutoFocus, contentId);\n useDialogShowFocus(openFocus);\n var windowFit = useWindowFit(props);\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Dialog.Content, {\n ref,\n position: \"relative\",\n pointerEvents: \"auto\",\n ...knobProps.elevatedSurface,\n ...knobProps.containerRadius,\n ...knobProps.panelPadding,\n ...knobProps.gap,\n elevate: false,\n ...(0, import_transitionProps.transitionProps)(knobProps.motion.overlay),\n ...overlayEnterExit,\n ...overlayFrameFocus,\n onOpenAutoFocus: openFocus,\n ...props,\n ...windowFit,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogRegionContext.Provider, {\n value: IN_DIALOG_REGION,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SheetBodyContext.Provider, {\n value: false,\n children\n })\n })\n });\n});\nvar scrimFade = {\n opacity: {\n enter: 0,\n exit: 0\n }\n};\nvar DialogOverlay = /* @__PURE__ */ (0, import_react.forwardRef)(function DialogOverlay2(param, ref) {\n var { children, ...props } = param;\n var { knobProps } = (0, import_useResolvedKnobs.useResolvedKnobs)();\n var sheetFace = useDialogSheetFace();\n if (sheetFace) return null;\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Dialog.Overlay, {\n ref,\n backgroundColor: dialogScrim,\n ...(0, import_transitionProps.transitionProps)((0, import_motion.scrimFor)(knobProps.motion.overlay)),\n ...scrimFade,\n ...props,\n children\n });\n});\nvar AlertDialogContent = /* @__PURE__ */ (0, import_react.forwardRef)(function AlertDialogContent2(param, ref) {\n var { children, size = \"4\", ...props } = param;\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Surface.Surface, {\n size,\n painted: false,\n elevated: true,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertDialogContentInner, {\n ref,\n ...props,\n children\n })\n });\n});\nvar AlertDialogContentInner = /* @__PURE__ */ (0, import_react.forwardRef)(function AlertDialogContentInner2(param, ref) {\n var { children, ...props } = param;\n var { knobProps } = (0, import_useResolvedKnobs.useResolvedKnobs)({\n component: \"AlertDialogContent\"\n });\n var { contentId } = (0, import_tamagui.useDialogContext)();\n useDialogShowFocus(withHouseOpenFocus(props.onOpenAutoFocus, contentId));\n var windowFit = useWindowFit(props, import_layoutTokens.ALERT_READABLE_WIDTH);\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.AlertDialog.Content, {\n ref,\n ...knobProps.elevatedSurface,\n ...knobProps.containerRadius,\n ...knobProps.panelPadding,\n ...knobProps.gap,\n elevate: false,\n ...(0, import_transitionProps.transitionProps)(knobProps.motion.overlay),\n ...overlayEnterExit,\n ...overlayFrameFocus,\n ...props,\n ...windowFit,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogRegionContext.Provider, {\n value: IN_DIALOG_REGION,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SheetBodyContext.Provider, {\n value: false,\n children\n })\n })\n });\n});\nvar AlertDialogOverlay = /* @__PURE__ */ (0, import_react.forwardRef)(function AlertDialogOverlay2(param, ref) {\n var { children, ...props } = param;\n var { knobProps } = (0, import_useResolvedKnobs.useResolvedKnobs)();\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.AlertDialog.Overlay, {\n ref,\n backgroundColor: dialogScrim,\n ...(0, import_transitionProps.transitionProps)((0, import_motion.scrimFor)(knobProps.motion.overlay)),\n ...scrimFade,\n ...props,\n children\n });\n});\nvar PopoverContent = /* @__PURE__ */ (0, import_react.forwardRef)(function PopoverContent2(param, ref) {\n var { children, onOpenAutoFocus: _onOpenAutoFocus, ...props } = param;\n var { knobProps } = (0, import_useResolvedKnobs.useResolvedKnobs)({\n component: \"PopoverContent\",\n painted: false\n });\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.YStack, {\n ref,\n ...knobProps.elevatedSurface,\n ...knobProps.containerRadius,\n ...(0, import_transitionProps.transitionProps)(knobProps.motion.overlay),\n ...overlayEnterExit,\n ...overlayFrameFocus,\n ...props,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Surface.Surface, {\n painted: false,\n elevated: true,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SheetBodyContext.Provider, {\n value: false,\n children\n })\n })\n });\n});\n//# sourceMappingURL=overlaySurfaces.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,0BAA0B,CAAC;AAC/B,SAAS,yBAAyB;CAChC,0BAA0B;CAC1B,0BAA0B;CAC1B,qBAAqB;CACrB,qBAAqB;CACrB,2BAA2B;CAC3B,+BAA+B;CAC/B,uBAAuB;CACvB,sBAAsB;CACtB,yBAAyB;CACzB,mBAAmB;CACnB,oBAAoB;CACpB,oBAAoB;CACpB,6BAA6B;CAC7B,wBAAwB;CACxB,mBAAmB;CACnB,uBAAuB;CACvB,6BAA6B;CAC7B,uBAAuB;CACvB,kBAAkB;CAClB,8BAA8B;CAC9B,0BAA0B;CAC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U;GACV,UAA0B,iBAAC,GAAG,mBAAmB,IAAG,CAAE,iBAAiB,UAAU;IAC/E,OAAO;IACP;GACF,CAAC;EACH,CAAC;CACH,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"overlaySurfaces.native.js","names":[],"sources":["cjs/theme/overlaySurfaces.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar overlaySurfaces_exports = {};\n__export(overlaySurfaces_exports, {\n AlertDialogContent: () => AlertDialogContent,\n AlertDialogOverlay: () => AlertDialogOverlay,\n DialogContent: () => DialogContent,\n DialogOverlay: () => DialogOverlay,\n DialogRegionContext: () => DialogRegionContext,\n DialogSheetFaceProvider: () => DialogSheetFaceProvider,\n PopoverContent: () => PopoverContent,\n SheetBodyProvider: () => SheetBodyProvider,\n dialogScrim: () => dialogScrim,\n overlayScrim: () => overlayScrim,\n sheetGrabber: () => sheetGrabber,\n sheetGrabberClearance: () => sheetGrabberClearance,\n sheetGrabberZone: () => sheetGrabberZone,\n sheetHandle: () => sheetHandle,\n sheetHandleTone: () => sheetHandleTone,\n sheetHandleWidthRatio: () => sheetHandleWidthRatio,\n sheetHandleZone: () => sheetHandleZone,\n sheetScrim: () => sheetScrim,\n useDialogRegionContext: () => useDialogRegionContext,\n useDialogSheetFace: () => useDialogSheetFace,\n useIsInDialogRegion: () => useIsInDialogRegion,\n useIsInSheetBody: () => useIsInSheetBody\n});\nmodule.exports = __toCommonJS(overlaySurfaces_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_keyboardFocusRing = require(\"../keyboardFocusRing\");\nvar import_motion = require(\"./motion\");\nvar import_transitionProps = require(\"./transitionProps\");\nvar import_Surface = require(\"./Surface\");\nvar import_useResolvedKnobs = require(\"./useResolvedKnobs\");\nvar import_layoutTokens = require(\"./layoutTokens\");\nvar import_resolveKnobs = require(\"./resolveKnobs\");\nvar import_react = require(\"react\");\nvar import_tamagui = require(\"tamagui\");\nvar dialogScrim = \"$scrim-dialog\";\nvar sheetScrim = \"$scrim-sheet\";\nvar overlayScrim = dialogScrim;\nvar sheetGrabber = {\n width: 36,\n height: 5,\n borderRadius: 100,\n backgroundColor: \"$color-12\",\n opacity: 0.3,\n alignSelf: \"center\",\n marginHorizontal: 0,\n marginTop: 5,\n marginBottom: -10,\n zIndex: 10\n};\nvar sheetGrabberClearance = 16;\nvar sheetGrabberZone = {\n alignSelf: \"stretch\",\n alignItems: \"center\",\n height: 21\n};\nvar sheetHandleWidthRatio = 0.3;\nvar sheetHandle = {\n width: \"30%\",\n height: 10,\n borderRadius: 100,\n backgroundColor: \"$color-5\",\n opacity: 1,\n alignSelf: \"center\",\n marginHorizontal: 0,\n marginTop: 0,\n marginBottom: 8,\n zIndex: 10\n};\nvar sheetHandleZone = {\n alignSelf: \"stretch\",\n alignItems: \"center\",\n paddingTop: 8\n};\nvar sheetHandleToneOpen = {\n backgroundColor: \"$color-5\",\n opacity: 1\n};\nfunction sheetHandleTone(_scheme) {\n return sheetHandleToneOpen;\n}\nvar overlayFrameFocus = {\n outlineWidth: {\n default: 0,\n focus: 0,\n \"focus-visible\": 0\n },\n outlineStyle: {\n default: \"none\",\n focus: \"none\",\n \"focus-visible\": \"none\"\n }\n};\nfunction isTabbableWithin(node, container) {\n if (node.tabIndex < 0 || node.hidden || node.tagName === \"A\") return false;\n if (node.disabled) return false;\n if (typeof HTMLInputElement !== \"undefined\" && node instanceof HTMLInputElement && node.type === \"hidden\") {\n return false;\n }\n if (getComputedStyle(node).visibility === \"hidden\") return false;\n for (var el = node; el && el !== container; el = el.parentElement) {\n if (getComputedStyle(el).display === \"none\") return false;\n }\n return true;\n}\nfunction focusFirstTabbableOnOpen(details, container) {\n if (typeof HTMLElement === \"undefined\" || !(container instanceof HTMLElement)) return;\n var first = Array.from(container.querySelectorAll(\"*\")).find(function(node) {\n return isTabbableWithin(node, container);\n });\n if (!first) return;\n details.cancel();\n var focused = (0, import_keyboardFocusRing.focusOnOpen)(first, container);\n if (typeof HTMLInputElement !== \"undefined\" && focused instanceof HTMLInputElement) {\n focused.select();\n }\n}\nfunction withHouseOpenFocus(onOpenAutoFocus, contentId) {\n return function(details) {\n onOpenAutoFocus === null || onOpenAutoFocus === void 0 ? void 0 : onOpenAutoFocus(details);\n if (!details.isCanceled) focusFirstTabbableOnOpen(details, contentById(contentId));\n };\n}\nfunction contentById(contentId) {\n if (!contentId || typeof document === \"undefined\") return null;\n return document.getElementById(contentId);\n}\nvar DialogRegionContext = /* @__PURE__ */ (0, import_react.createContext)({\n inDialogRegion: false\n});\nfunction useDialogRegionContext() {\n return (0, import_react.useContext)(DialogRegionContext);\n}\nfunction useIsInDialogRegion() {\n return useDialogRegionContext().inDialogRegion;\n}\nvar IN_DIALOG_REGION = {\n inDialogRegion: true\n};\nvar SheetBodyContext = /* @__PURE__ */ (0, import_react.createContext)(false);\nvar SheetBodyProvider = SheetBodyContext.Provider;\nfunction useIsInSheetBody() {\n return (0, import_react.useContext)(SheetBodyContext);\n}\nvar DialogSheetFaceContext = /* @__PURE__ */ (0, import_react.createContext)(false);\nvar DialogSheetFaceProvider = DialogSheetFaceContext.Provider;\nfunction useDialogSheetFace() {\n return (0, import_react.useContext)(DialogSheetFaceContext);\n}\nvar DialogSheetBody = /* @__PURE__ */ (0, import_react.forwardRef)(function DialogSheetBody2(param, ref) {\n var { children } = param;\n var { knobProps } = (0, import_useResolvedKnobs.useResolvedKnobs)({\n component: \"DialogContent\"\n });\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.YStack, {\n ref,\n ...knobProps.gap,\n ...{\n \"data-mp-dialog-face\": \"sheet\"\n },\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogSheetFaceContext.Provider, {\n value: false,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogRegionContext.Provider, {\n value: IN_DIALOG_REGION,\n children\n })\n })\n });\n});\nvar overlayEnterExit = {\n opacity: {\n enter: 0,\n exit: 0\n },\n y: {\n enter: -4,\n exit: -4\n },\n scale: {\n enter: 0.97,\n exit: 0.97\n }\n};\nvar DialogContent = /* @__PURE__ */ (0, import_react.forwardRef)(function DialogContent2(param, ref) {\n var { children, size = \"4\", ...props } = param;\n if (useDialogSheetFace()) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogSheetBody, {\n ref,\n children\n });\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Surface.Surface, {\n size,\n painted: false,\n elevated: true,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogContentInner, {\n ref,\n ...props,\n children\n })\n });\n});\nfunction useWindowFit(props, fallbackMaxWidth) {\n var _ref, _props_maxWidth;\n var { width: windowWidth } = (0, import_tamagui.useWindowDimensions)();\n var room = windowWidth > 0 ? Math.max(0, windowWidth - 2 * (0, import_resolveKnobs.panelPaddingPx)()) : void 0;\n var fit = function fit2(value) {\n return room != null && typeof value === \"number\" ? Math.min(value, room) : value;\n };\n if (room == null) return fallbackMaxWidth == null ? void 0 : {\n maxWidth: fallbackMaxWidth\n };\n return {\n maxWidth: fit((_ref = (_props_maxWidth = props.maxWidth) !== null && _props_maxWidth !== void 0 ? _props_maxWidth : fallbackMaxWidth) !== null && _ref !== void 0 ? _ref : room),\n ...props.minWidth != null ? {\n minWidth: fit(props.minWidth)\n } : void 0,\n ...props.width != null ? {\n width: fit(props.width)\n } : void 0\n };\n}\nvar DialogContentInner = /* @__PURE__ */ (0, import_react.forwardRef)(function DialogContentInner2(param, ref) {\n var { children, onOpenAutoFocus, ...props } = param;\n var { knobProps } = (0, import_useResolvedKnobs.useResolvedKnobs)({\n component: \"DialogContent\"\n });\n var { contentId } = (0, import_tamagui.useDialogContext)();\n var openFocus = withHouseOpenFocus(onOpenAutoFocus, contentId);\n var windowFit = useWindowFit(props);\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Dialog.Content, {\n ref,\n position: \"relative\",\n pointerEvents: \"auto\",\n ...knobProps.elevatedSurface,\n ...knobProps.containerRadius,\n ...knobProps.panelPadding,\n ...knobProps.gap,\n elevate: false,\n ...(0, import_transitionProps.transitionProps)(knobProps.motion.overlay),\n ...overlayEnterExit,\n ...overlayFrameFocus,\n onOpenAutoFocus: openFocus,\n ...props,\n ...windowFit,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogRegionContext.Provider, {\n value: IN_DIALOG_REGION,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SheetBodyContext.Provider, {\n value: false,\n children\n })\n })\n });\n});\nvar scrimFade = {\n opacity: {\n enter: 0,\n exit: 0\n }\n};\nvar DialogOverlay = /* @__PURE__ */ (0, import_react.forwardRef)(function DialogOverlay2(param, ref) {\n var { children, ...props } = param;\n var { knobProps } = (0, import_useResolvedKnobs.useResolvedKnobs)();\n var sheetFace = useDialogSheetFace();\n if (sheetFace) return null;\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.Dialog.Overlay, {\n ref,\n backgroundColor: dialogScrim,\n ...(0, import_transitionProps.transitionProps)((0, import_motion.scrimFor)(knobProps.motion.overlay)),\n ...scrimFade,\n ...props,\n children\n });\n});\nvar AlertDialogContent = /* @__PURE__ */ (0, import_react.forwardRef)(function AlertDialogContent2(param, ref) {\n var { children, size = \"4\", ...props } = param;\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Surface.Surface, {\n size,\n painted: false,\n elevated: true,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AlertDialogContentInner, {\n ref,\n ...props,\n children\n })\n });\n});\nvar AlertDialogContentInner = /* @__PURE__ */ (0, import_react.forwardRef)(function AlertDialogContentInner2(param, ref) {\n var { children, ...props } = param;\n var { knobProps } = (0, import_useResolvedKnobs.useResolvedKnobs)({\n component: \"AlertDialogContent\"\n });\n var windowFit = useWindowFit(props, import_layoutTokens.ALERT_READABLE_WIDTH);\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.AlertDialog.Content, {\n ref,\n ...knobProps.elevatedSurface,\n ...knobProps.containerRadius,\n ...knobProps.panelPadding,\n ...knobProps.gap,\n elevate: false,\n ...(0, import_transitionProps.transitionProps)(knobProps.motion.overlay),\n ...overlayEnterExit,\n ...overlayFrameFocus,\n ...props,\n ...windowFit,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DialogRegionContext.Provider, {\n value: IN_DIALOG_REGION,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SheetBodyContext.Provider, {\n value: false,\n children\n })\n })\n });\n});\nvar AlertDialogOverlay = /* @__PURE__ */ (0, import_react.forwardRef)(function AlertDialogOverlay2(param, ref) {\n var { children, ...props } = param;\n var { knobProps } = (0, import_useResolvedKnobs.useResolvedKnobs)();\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.AlertDialog.Overlay, {\n ref,\n backgroundColor: dialogScrim,\n ...(0, import_transitionProps.transitionProps)((0, import_motion.scrimFor)(knobProps.motion.overlay)),\n ...scrimFade,\n ...props,\n children\n });\n});\nvar PopoverContent = /* @__PURE__ */ (0, import_react.forwardRef)(function PopoverContent2(param, ref) {\n var { children, onOpenAutoFocus: _onOpenAutoFocus, ...props } = param;\n var { knobProps } = (0, import_useResolvedKnobs.useResolvedKnobs)({\n component: \"PopoverContent\",\n painted: false\n });\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.YStack, {\n ref,\n ...knobProps.elevatedSurface,\n ...knobProps.containerRadius,\n ...(0, import_transitionProps.transitionProps)(knobProps.motion.overlay),\n ...overlayEnterExit,\n ...overlayFrameFocus,\n ...props,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Surface.Surface, {\n painted: false,\n elevated: true,\n children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SheetBodyContext.Provider, {\n value: false,\n children\n })\n })\n });\n});\n//# sourceMappingURL=overlaySurfaces.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,0BAA0B,CAAC;AAC/B,SAAS,yBAAyB;CAChC,0BAA0B;CAC1B,0BAA0B;CAC1B,qBAAqB;CACrB,qBAAqB;CACrB,2BAA2B;CAC3B,+BAA+B;CAC/B,sBAAsB;CACtB,yBAAyB;CACzB,mBAAmB;CACnB,oBAAoB;CACpB,oBAAoB;CACpB,6BAA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EACH,GAAG;EACH;CACF,CAAC;AACH,CAAC;AACD,IAAI,iBAAiC,iBAAC,GAAG,aAAa,WAAU,CAAE,SAAS,gBAAgB,OAAO,KAAK;CACrG,IAAI,EAAE,UAAU,iBAAiB,kBAAkB,GAAG,UAAU;CAChE,IAAI,EAAE,eAAe,GAAG,wBAAwB,iBAAgB,CAAE;EAChE,WAAW;EACX,SAAS;CACX,CAAC;CACD,OAAuB,iBAAC,GAAG,mBAAmB,IAAG,CAAE,eAAe,QAAQ;EACxE;EACA,GAAG,UAAU;EACb,GAAG,UAAU;EACb,IAAI,GAAG,uBAAuB,gBAAe,CAAE,UAAU,OAAO,OAAO;EACvE,GAAG;EACH,GAAG;EACH,GAAG;EACH,UAA0B,iBAAC,GAAG,mBAAmB,IAAG,CAAE,eAAe,SAAS;GAC5E,SAAS;GACT,UAAU;GACV,UAA0B,iBAAC,GAAG,mBAAmB,IAAG,CAAE,iBAAiB,UAAU;IAC/E,OAAO;IACP;GACF,CAAC;EACH,CAAC;CACH,CAAC;AACH,CAAC"}
@@ -70,13 +70,44 @@ function guardTable(table) {
70
70
  guarded.add(proxy);
71
71
  return proxy;
72
72
  }
73
+ function kebabThemeKey(key) {
74
+ return key.replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/([A-Za-z])(\d)/g, "$1-$2").toLowerCase();
75
+ }
76
+ function themeKeysOf(themes) {
77
+ const keys = /* @__PURE__ */ new Set();
78
+ for (const theme of Object.values(themes ?? {})) {
79
+ for (const key of Object.keys(theme)) keys.add(key);
80
+ }
81
+ return keys;
82
+ }
83
+ function guardColorTable(table, themes) {
84
+ if (guarded.has(table)) return table;
85
+ let keys;
86
+ const proxy = new Proxy(table, { get(target, key, receiver) {
87
+ const value = Reflect.get(target, key, receiver);
88
+ if (value !== void 0 || typeof key !== "string" || key in target) return value;
89
+ const meant = kebabThemeKey(key);
90
+ if (meant === key) return value;
91
+ keys ??= themes();
92
+ if (keys.has(key) || !keys.has(meant)) return value;
93
+ (0, import_devWarn.devWarn)("unknown-token", {
94
+ component: renderingComponent(),
95
+ value: `$${key}`,
96
+ suggest: `$${meant}`
97
+ });
98
+ return value;
99
+ } });
100
+ guarded.add(proxy);
101
+ return proxy;
102
+ }
73
103
  function guardUnknownTokens(config) {
74
104
  if (process.env.NODE_ENV === "production") return config;
75
- const tables = config.tokensParsed;
105
+ const { tokensParsed: tables, themes } = config;
76
106
  if (!tables) return config;
77
107
  for (const category of guardedCategories) {
78
108
  const table = tables[category];
79
109
  if (table) tables[category] = guardTable(table);
80
110
  }
111
+ if (tables.color) tables.color = guardColorTable(tables.color, () => themeKeysOf(themes));
81
112
  return config;
82
113
  }
@@ -92,9 +92,75 @@ function guardTable(table) {
92
92
  guarded.add(proxy);
93
93
  return proxy;
94
94
  }
95
+ function kebabThemeKey(key) {
96
+ return key.replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/([A-Za-z])(\d)/g, "$1-$2").toLowerCase();
97
+ }
98
+ function themeKeysOf(themes) {
99
+ var keys = /* @__PURE__ */ new Set();
100
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
101
+ try {
102
+ for (var _iterator = Object.values(themes !== null && themes !== void 0 ? themes : {})[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
103
+ var theme = _step.value;
104
+ var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = void 0;
105
+ try {
106
+ for (var _iterator1 = Object.keys(theme)[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {
107
+ var key = _step1.value;
108
+ keys.add(key);
109
+ }
110
+ } catch (err) {
111
+ _didIteratorError1 = true;
112
+ _iteratorError1 = err;
113
+ } finally {
114
+ try {
115
+ if (!_iteratorNormalCompletion1 && _iterator1.return != null) {
116
+ _iterator1.return();
117
+ }
118
+ } finally {
119
+ if (_didIteratorError1) {
120
+ throw _iteratorError1;
121
+ }
122
+ }
123
+ }
124
+ }
125
+ } catch (err) {
126
+ _didIteratorError = true;
127
+ _iteratorError = err;
128
+ } finally {
129
+ try {
130
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
131
+ _iterator.return();
132
+ }
133
+ } finally {
134
+ if (_didIteratorError) {
135
+ throw _iteratorError;
136
+ }
137
+ }
138
+ }
139
+ return keys;
140
+ }
141
+ function guardColorTable(table, themes) {
142
+ if (guarded.has(table)) return table;
143
+ var keys;
144
+ var proxy = new Proxy(table, { get(target, key, receiver) {
145
+ var value = Reflect.get(target, key, receiver);
146
+ if (value !== void 0 || typeof key !== "string" || key in target) return value;
147
+ var meant = kebabThemeKey(key);
148
+ if (meant === key) return value;
149
+ keys !== null && keys !== void 0 ? keys : keys = themes();
150
+ if (keys.has(key) || !keys.has(meant)) return value;
151
+ (0, import_devWarn.devWarn)("unknown-token", {
152
+ component: renderingComponent(),
153
+ value: `$${key}`,
154
+ suggest: `$${meant}`
155
+ });
156
+ return value;
157
+ } });
158
+ guarded.add(proxy);
159
+ return proxy;
160
+ }
95
161
  function guardUnknownTokens(config) {
96
162
  if (process.env.NODE_ENV === "production") return config;
97
- var tables = config.tokensParsed;
163
+ var { tokensParsed: tables, themes } = config;
98
164
  if (!tables) return config;
99
165
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
100
166
  try {
@@ -117,5 +183,8 @@ function guardUnknownTokens(config) {
117
183
  }
118
184
  }
119
185
  }
186
+ if (tables.color) tables.color = guardColorTable(tables.color, function() {
187
+ return themeKeysOf(themes);
188
+ });
120
189
  return config;
121
190
  }
@@ -92,9 +92,75 @@ function guardTable(table) {
92
92
  guarded.add(proxy);
93
93
  return proxy;
94
94
  }
95
+ function kebabThemeKey(key) {
96
+ return key.replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/([A-Za-z])(\d)/g, "$1-$2").toLowerCase();
97
+ }
98
+ function themeKeysOf(themes) {
99
+ var keys = /* @__PURE__ */ new Set();
100
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
101
+ try {
102
+ for (var _iterator = Object.values(themes !== null && themes !== void 0 ? themes : {})[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
103
+ var theme = _step.value;
104
+ var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = void 0;
105
+ try {
106
+ for (var _iterator1 = Object.keys(theme)[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {
107
+ var key = _step1.value;
108
+ keys.add(key);
109
+ }
110
+ } catch (err) {
111
+ _didIteratorError1 = true;
112
+ _iteratorError1 = err;
113
+ } finally {
114
+ try {
115
+ if (!_iteratorNormalCompletion1 && _iterator1.return != null) {
116
+ _iterator1.return();
117
+ }
118
+ } finally {
119
+ if (_didIteratorError1) {
120
+ throw _iteratorError1;
121
+ }
122
+ }
123
+ }
124
+ }
125
+ } catch (err) {
126
+ _didIteratorError = true;
127
+ _iteratorError = err;
128
+ } finally {
129
+ try {
130
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
131
+ _iterator.return();
132
+ }
133
+ } finally {
134
+ if (_didIteratorError) {
135
+ throw _iteratorError;
136
+ }
137
+ }
138
+ }
139
+ return keys;
140
+ }
141
+ function guardColorTable(table, themes) {
142
+ if (guarded.has(table)) return table;
143
+ var keys;
144
+ var proxy = new Proxy(table, { get(target, key, receiver) {
145
+ var value = Reflect.get(target, key, receiver);
146
+ if (value !== void 0 || typeof key !== "string" || key in target) return value;
147
+ var meant = kebabThemeKey(key);
148
+ if (meant === key) return value;
149
+ keys !== null && keys !== void 0 ? keys : keys = themes();
150
+ if (keys.has(key) || !keys.has(meant)) return value;
151
+ (0, import_devWarn.devWarn)("unknown-token", {
152
+ component: renderingComponent(),
153
+ value: `$${key}`,
154
+ suggest: `$${meant}`
155
+ });
156
+ return value;
157
+ } });
158
+ guarded.add(proxy);
159
+ return proxy;
160
+ }
95
161
  function guardUnknownTokens(config) {
96
162
  if (process.env.NODE_ENV === "production") return config;
97
- var tables = config.tokensParsed;
163
+ var { tokensParsed: tables, themes } = config;
98
164
  if (!tables) return config;
99
165
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
100
166
  try {
@@ -117,6 +183,9 @@ function guardUnknownTokens(config) {
117
183
  }
118
184
  }
119
185
  }
186
+ if (tables.color) tables.color = guardColorTable(tables.color, function() {
187
+ return themeKeysOf(themes);
188
+ });
120
189
  return config;
121
190
  }
122
191
 
@@ -1 +1 @@
1
- {"version":3,"file":"unknownTokenGuard.native.js","names":[],"sources":["cjs/theme/unknownTokenGuard.native.js"],"sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar unknownTokenGuard_exports = {};\n__export(unknownTokenGuard_exports, {\n guardUnknownTokens: () => guardUnknownTokens\n});\nmodule.exports = __toCommonJS(unknownTokenGuard_exports);\nvar React = __toESM(require(\"react\"));\nvar import_devWarn = require(\"../devWarn\");\nvar guardedCategories = [\n \"size\",\n \"space\"\n];\nvar scaleStep = /^-?\\d+(?:[.-]\\d+)?$/;\nvar guarded = /* @__PURE__ */ new WeakSet();\nfunction ownerNames(stack) {\n var _ref;\n var names = [];\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = ((_ref = stack === null || stack === void 0 ? void 0 : stack.split(\"\\n\")) !== null && _ref !== void 0 ? _ref : [])[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var line = _step.value;\n var _exec;\n var frame = (_exec = /^\\s*at (?:new )?([\\w$.<>]+) \\(/.exec(line)) !== null && _exec !== void 0 ? _exec : /^\\s*([\\w$.<>]+)@/.exec(line);\n if (frame) names.push(frame[1]);\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n return names;\n}\nfunction ownerName(stack) {\n var [owner, outer] = ownerNames(stack);\n if (!owner) return void 0;\n return outer && /^[A-Z]\\w*$/.test(outer) ? `${owner} in ${outer}` : owner;\n}\nfunction renderingComponent() {\n var capture = React.captureOwnerStack;\n try {\n var _ownerName;\n return (_ownerName = ownerName(capture === null || capture === void 0 ? void 0 : capture())) !== null && _ownerName !== void 0 ? _ownerName : \"unknown\";\n } catch (unused) {\n return \"unknown\";\n }\n}\nfunction guardTable(table) {\n if (guarded.has(table)) return table;\n var proxy = new Proxy(table, {\n get(target, key, receiver) {\n var value = Reflect.get(target, key, receiver);\n if (value === void 0 && typeof key === \"string\" && scaleStep.test(key) && !(key in target)) {\n var meant = key.replace(\".\", \"-\");\n (0, import_devWarn.devWarn)(\"unknown-token\", {\n component: renderingComponent(),\n value: `$${key}`,\n suggest: meant !== key && meant in target ? `$${meant}` : void 0\n });\n }\n return value;\n }\n });\n guarded.add(proxy);\n return proxy;\n}\nfunction guardUnknownTokens(config) {\n if (process.env.NODE_ENV === \"production\") return config;\n var tables = config.tokensParsed;\n if (!tables) return config;\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = guardedCategories[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var category = _step.value;\n var table = tables[category];\n if (table) tables[category] = guardTable(table);\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n return config;\n}\n//# sourceMappingURL=unknownTokenGuard.js.map\n"],"mappings":";;;AACA,IAAI,WAAW,OAAO;AACtB,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO;AAC1B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACv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AAM,oBAAoB,OAAO,iBAAiB,KAAK;CACvF,IAAI;EACF,KAAK,IAAI,YAAY,kBAAkB,OAAO,SAAS,CAAC,GAAG,OAAO,EAAE,6BAA6B,QAAQ,UAAU,KAAK,EAAC,CAAE,OAAO,4BAA4B,MAAM;GAClK,IAAI,WAAW,MAAM;GACrB,IAAI,QAAQ,OAAO;GACnB,IAAI,OAAO,OAAO,YAAY,WAAW,KAAK;EAChD;CACF,SAAS,KAAK;EACZ,oBAAoB;EACpB,iBAAiB;CACnB,UAAU;EACR,IAAI;GACF,IAAI,CAAC,6BAA6B,UAAU,UAAU,MAAM;IAC1D,UAAU,OAAO;GACnB;EACF,UAAU;GACR,IAAI,mBAAmB;IACrB,MAAM;GACR;EACF;CACF;CACA,OAAO;AACT"}
1
+ {"version":3,"file":"unknownTokenGuard.native.js","names":[],"sources":["cjs/theme/unknownTokenGuard.native.js"],"sourcesContent":["\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar unknownTokenGuard_exports = {};\n__export(unknownTokenGuard_exports, {\n guardUnknownTokens: () => guardUnknownTokens\n});\nmodule.exports = __toCommonJS(unknownTokenGuard_exports);\nvar React = __toESM(require(\"react\"));\nvar import_devWarn = require(\"../devWarn\");\nvar guardedCategories = [\n \"size\",\n \"space\"\n];\nvar scaleStep = /^-?\\d+(?:[.-]\\d+)?$/;\nvar guarded = /* @__PURE__ */ new WeakSet();\nfunction ownerNames(stack) {\n var _ref;\n var names = [];\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = ((_ref = stack === null || stack === void 0 ? void 0 : stack.split(\"\\n\")) !== null && _ref !== void 0 ? _ref : [])[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var line = _step.value;\n var _exec;\n var frame = (_exec = /^\\s*at (?:new )?([\\w$.<>]+) \\(/.exec(line)) !== null && _exec !== void 0 ? _exec : /^\\s*([\\w$.<>]+)@/.exec(line);\n if (frame) names.push(frame[1]);\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n return names;\n}\nfunction ownerName(stack) {\n var [owner, outer] = ownerNames(stack);\n if (!owner) return void 0;\n return outer && /^[A-Z]\\w*$/.test(outer) ? `${owner} in ${outer}` : owner;\n}\nfunction renderingComponent() {\n var capture = React.captureOwnerStack;\n try {\n var _ownerName;\n return (_ownerName = ownerName(capture === null || capture === void 0 ? void 0 : capture())) !== null && _ownerName !== void 0 ? _ownerName : \"unknown\";\n } catch (unused) {\n return \"unknown\";\n }\n}\nfunction guardTable(table) {\n if (guarded.has(table)) return table;\n var proxy = new Proxy(table, {\n get(target, key, receiver) {\n var value = Reflect.get(target, key, receiver);\n if (value === void 0 && typeof key === \"string\" && scaleStep.test(key) && !(key in target)) {\n var meant = key.replace(\".\", \"-\");\n (0, import_devWarn.devWarn)(\"unknown-token\", {\n component: renderingComponent(),\n value: `$${key}`,\n suggest: meant !== key && meant in target ? `$${meant}` : void 0\n });\n }\n return value;\n }\n });\n guarded.add(proxy);\n return proxy;\n}\nfunction kebabThemeKey(key) {\n return key.replace(/([a-z0-9])([A-Z])/g, \"$1-$2\").replace(/([A-Za-z])(\\d)/g, \"$1-$2\").toLowerCase();\n}\nfunction themeKeysOf(themes) {\n var keys = /* @__PURE__ */ new Set();\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = Object.values(themes !== null && themes !== void 0 ? themes : {})[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var theme = _step.value;\n var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = void 0;\n try {\n for (var _iterator1 = Object.keys(theme)[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {\n var key = _step1.value;\n keys.add(key);\n }\n } catch (err) {\n _didIteratorError1 = true;\n _iteratorError1 = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion1 && _iterator1.return != null) {\n _iterator1.return();\n }\n } finally {\n if (_didIteratorError1) {\n throw _iteratorError1;\n }\n }\n }\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n return keys;\n}\nfunction guardColorTable(table, themes) {\n if (guarded.has(table)) return table;\n var keys;\n var proxy = new Proxy(table, {\n get(target, key, receiver) {\n var value = Reflect.get(target, key, receiver);\n if (value !== void 0 || typeof key !== \"string\" || key in target) return value;\n var meant = kebabThemeKey(key);\n if (meant === key) return value;\n keys !== null && keys !== void 0 ? keys : keys = themes();\n if (keys.has(key) || !keys.has(meant)) return value;\n (0, import_devWarn.devWarn)(\"unknown-token\", {\n component: renderingComponent(),\n value: `$${key}`,\n suggest: `$${meant}`\n });\n return value;\n }\n });\n guarded.add(proxy);\n return proxy;\n}\nfunction guardUnknownTokens(config) {\n if (process.env.NODE_ENV === \"production\") return config;\n var { tokensParsed: tables, themes } = config;\n if (!tables) return config;\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = guardedCategories[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var category = _step.value;\n var table = tables[category];\n if (table) tables[category] = guardTable(table);\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n if (tables.color) tables.color = guardColorTable(tables.color, function() {\n return themeKeysOf(themes);\n });\n return config;\n}\n//# sourceMappingURL=unknownTokenGuard.js.map\n"],"mappings":";;;AACA,IAAI,WAAW,OAAO;AACtB,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO;AAC1B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,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,OAAO,WAAW;EACxE,OAAO,YAAY,MAAM;CAC3B,CAAC;CACD,OAAO;AACT"}
@@ -10,7 +10,7 @@ import { PresetContext, usePresetContext, usePresetTints } from "./theme/PresetC
10
10
  import { Preset, applyColorTheme } from "./theme/Preset.mjs";
11
11
  import { Surface, SurfaceContext, bySizeToken, clampSurfaceSize, compareSizeTokens, sizeTokenBelow, sizeTokenStep, sizeTokenStop, surfaceSizeRank, useBarSurface, useElevatedSurface, useFieldSurface } from "./theme/Surface.mjs";
12
12
  import { controlTierDisabled, controlTierPaint, controlTierWash, controlTrackFill, isDarkThemeName } from "./theme/controlTiers.mjs";
13
- import { AlertDialogContent, AlertDialogOverlay, DialogContent, DialogOverlay, DialogRegionContext, DialogSheetFaceProvider, DialogShowFocus, PopoverContent, SheetBodyProvider, dialogScrim, overlayScrim, sheetGrabber, sheetGrabberClearance, sheetGrabberZone, sheetHandle, sheetHandleTone, sheetHandleWidthRatio, sheetHandleZone, sheetScrim, useDialogRegionContext, useDialogSheetFace, useIsInDialogRegion, useIsInSheetBody } from "./theme/overlaySurfaces.mjs";
13
+ import { AlertDialogContent, AlertDialogOverlay, DialogContent, DialogOverlay, DialogRegionContext, DialogSheetFaceProvider, PopoverContent, SheetBodyProvider, dialogScrim, overlayScrim, sheetGrabber, sheetGrabberClearance, sheetGrabberZone, sheetHandle, sheetHandleTone, sheetHandleWidthRatio, sheetHandleZone, sheetScrim, useDialogRegionContext, useDialogSheetFace, useIsInDialogRegion, useIsInSheetBody } from "./theme/overlaySurfaces.mjs";
14
14
  import { boldPreset, consolePreset, defaultPreset, densePreset, heroPreset, roomyPreset, storefrontPreset } from "./theme/presets.mjs";
15
15
  import { IntentAccentTokensContext, IntentContext, solidButtonIntents, solidPaletteThemes, useIntentAccentTokens, useIntentContext, useResolvedKnobs } from "./theme/useResolvedKnobs.mjs";
16
16
  import { useTheme } from "./theme/useTheme.mjs";
@@ -48,4 +48,4 @@ import { rampStepOf, rowStateLadder } from "./theme/rowStates.mjs";
48
48
  import { useTouchSurface } from "./theme/useTouchSurface.mjs";
49
49
  import { tokenNumber } from "./theme/tokenNumber.mjs";
50
50
 
51
- export { $color, AlertDialogContent, AlertDialogOverlay, Anchor, BodyFont, BorderRadius, BorderWidth, BulkBarPlacement, CLOCK_TIME, CornerSmoothing, DEFAULT_SIZE_RECIPE_INPUTS, DETAIL_READABLE_WIDTH, DIALOG_MAX_ACTIONS, DialogContent, DialogOverlay, DialogRegionContext, DialogSheetFaceProvider, DialogShowFocus, DisabledStyle, Elevation, FIELD_FOCUS_COLOR, FIELD_FOCUS_REST, FIELD_FOCUS_STYLE, FIELD_KEYBOARD_ATTR, FOCUS_RING_CLIPPED_OFFSET, FOCUS_RING_FLUSH_OFFSET, FOCUS_RING_HALO_OFFSET, FOCUS_RING_MIN_CONTRAST, FOCUS_RING_MIN_WIDTH, FOCUS_VISIBLE_RING, FOCUS_VISIBLE_RING_HALO, FOCUS_VISIBLE_RING_INSET, FORM_READABLE_WIDTH, FORM_READABLE_WIDTH_MAX, FORM_READABLE_WIDTH_MIN, FieldLabelPlacement, FillStyle, FontCategory, FontWeight, FormAutofocus, GLYPH_CONTRAST_FLOOR, GlyphTintFallbackProvider, GroupPositionContext, H1, H2, H3, H4, H5, H6, Heading, HeadingFont, ISO_DATE_ONLY, IconSlot, Intent, IntentAccentTokensContext, IntentContext, LAYOUT_SIZE_CLASS_ORDER, MIN_PRESS_TARGET, NARROW_BREAKPOINT, OVERLAY_ANCHOR_GAP, OVERLAY_ATTACH_GAP, OVERLAY_BREAKPOINT, PageGutter, PageTitleScale, Paragraph, PopoverContent, Preset, PresetContext, READING_WIDTH_BODY_FALLBACK, READING_WIDTH_CH, READING_WIDTH_CH_EM, READING_WIDTH_MAX_CH, READING_WIDTH_MIN_CH, RequiredMarking, SANCTIONED_FOCUS_RING_OFFSETS, SIZE_RECIPE_FAMILY_NAMES, SIZE_RECIPE_RADIUS_STOPS, SIZE_RECIPE_RADIUS_TOKEN_TO_STOP, SIZE_RECIPE_TOKENS, SIZE_TOKEN_EXPONENTS, STATE_LAYER_HOVER, STATE_LAYER_PRESS, ScreenNesting, SelectAllScope, SheetBodyProvider, SizableText, Surface, SurfaceContext, TAMAGUI_ERA, TOUCH_HEIGHT_FLOOR, TableZebra, Text, TextAccent, TimestampStyle, __resetDevWarnSeen, __resetThemeDevWarnSeen, aaTextContrastRatio, accentIdentityCandidates, animationConfig, animationDurations, animationNames, animations, apcaContrast, applyColorTheme, applyRadiusStop, applyTouchFloor, assertContrast, assertNoPrebuiltThemes, boldPreset, borderRadiusMap, buttonColors, bySizeToken, capContainerRadius, capFieldRadius, cardElevationMap, cardLift, clampSurfaceSize, clearPresets, cloneSizeRecipeInputs, cloneTileSizeInputs, compareSizeTokens, composeKnobs, compositeFocusRingCss, consolePreset, containerCapProps, containerRadiusMap, contrastRatio, controlTierDisabled, controlTierPaint, controlTierWash, controlTrackFill, createDefaultFont, createDefaultThemeConfig, createRecipeFamilies, createThemeConfig, createThemesBuilder, animationConfig2 as cssAnimationConfig, currencyAffix, defaultIntents, defaultKnobs, defaultMaxPanes, defaultPreset, defaultRecipeInputs, defaultTileSizeInputs, defaultWidthFactors, densePreset, devWarn, dialogScrim, dynamicTypeFit, edgeColorAt, effectiveFontScale, elevationMap, emptyStateKnobs, ensureCompositeFocusRing, ensureFocusVisibleRing, ensureHairlineFallback, ensureKeyboardModalityTracking, fieldFocusCss, fieldFocusHoldsContrast, fieldKeyboardRing, fillLabelLc, findReadableStep, focusOnOpen, focusRingColorMeetsContrast, focusVisibleRing, formatAbsoluteDate, formatAbsoluteDateTime, formatCalendarDate, formatCurrency, formatDayLong, formatDayOfMonth, formatMonthYear, formatNumber, formatPercent, formatRelativeTimestamp, formatTimeOfDay, generateSizeRecipeTables, generateSizeRecipes, generateTileSizeLadder, getActiveScaleTokens, getGeneratedSizeRecipes, getGroupPosition, getHeadingFontFamily, getLayoutSizeClass, getMonthNames, getPreset, getPresetNames, getSizeRecipeFamily, getSizeRecipeInputs, getTileSizeLadder, getWeekdayNames, glyphTintFallback, hairline, hairlineBorderWidth, hairlineFallbackCss, hairlineWidth, headingMaxFontScale, heroPreset, holdHueToFloor, holdInkFloor, houseComponentThemes, houseGrandChildrenThemes, houseTemplates, inSwitchOffBand, inputColors, interactionStates, isDarkThemeName, isLightGround, isSanctionedFocusRingOffset, isTouchSurface, keyboardFocusRingProps, knobStates, labelFontSizeFor, layoutBreakpoints, layoutSizeClassAtLeast, listHeightForRows, maxFontScaleToFit, measureContrast, mediaAspectRatios, menuRowActive, menuRowCheckGlyph, menuRowCheckInk, menuRowChecked, menuRowCheckedFill, menuRowFrame, menuRowIconGlyph, mergeRecipeInputs, minContrastRatio, motionDurationMs, motionExitFactor, motionFor, motionHideDelayMs, motionRoleProperties, motionSeconds, motionSettleMs, motionStops, animationConfig3 as nativeAnimationConfig, negateSpaceToken, nestedControlPx, normalizeAnimationKnob, normalizeColorScale, normalizeNumberText, normalizeSizeToken, normalizeToHex, numberSeparators, overlayElevationMap, overlayScrim, paintedCardFill, panelPaddingPx, parseCalendarDate, pickReadableForeground, pickStates, plateContrastRatio, platformSystemTint, pressTargetHitSlop, pressTargetStyle, radiusClassProps, radiusOverrideFor, radiusResolutionProps, radiusStopFromToken, railFillRadius, rampStepOf, readingWidthStyle, recipeFamilies, recipeFromTokenChannels, recipeKeyAbove, recipeKeyBelow, registerPreset, relativeLuminance, resolveAccentOnSurface, resolveAccentTintedSurface, resolveActiveTabInk, resolveChartPalette, resolveControlRadius, resolveCurrencyCode, resolveFillGlyphInk, resolveGlyphPaint, resolveGlyphTint, resolveIdentityInk, resolveKnobs, resolveLegibleInkOn, resolveMediaAspect, resolveMenuRowCheckInk, resolvePageTitleScale, resolveRadiusClass, resolveRadiusForPart, resolveSizeRecipeInputs, resolveTextRoles, resolveThemeContrast, resolveThemeFromPreset, resolveTileSizeInputs, roomyPreset, rowStateLadder, scaleRadiusPx, scaleSpaceFractionPx, scrimFor, semanticGroups, setActiveScaleTokens, setBottomEdgeOwnedByTabHost, setSizeRecipeInputs, sheetGrabber, sheetGrabberClearance, sheetGrabberZone, sheetHandle, sheetHandleTone, sheetHandleWidthRatio, sheetHandleZone, sheetScrim, sizeKeyBelow, sizeRecipeBoxVariants, sizeRecipeEscape, sizeRecipeForToken, sizeRecipeFromHeight, sizeRecipeIconVariants, sizeRecipeTypeVariants, sizeRecipes, sizeTokenBelow, sizeTokenStep, sizeTokenStop, sizedElevation, solidButtonIntents, solidPaletteThemes, spacingRoles, stackEdgeRadius, stackRadiusProps, stateFragment, storefrontPreset, surfaceSizeRank, switchOffFillAlpha, switchOffFillBand, systemFillHex, systemFillLuminance, tamaguiEra, textFieldInset, themeDevWarn, tileColumnsForWidth, tileRungFlexProps, tileSizeLadder, tileSizeRungs, tileSizeStepExponents, tintHueNames, tokenNumber, transitionProps, useAccentOnSurface, useAccentTintedSurface, useActiveTabInk, useBarSurface, useBottomEdgeOwnedByTabHost, useChartPalette, useDialogRegionContext, useDialogSheetFace, useElevatedSurface, useFieldSurface, useGlyphColor, useGlyphTintOnSurface, useGroupPosition, useIdentityHue, useIdentityInkOnSurface, useIntentAccentTokens, useIntentContext, useIsInDialogRegion, useIsInSheetBody, useLayoutSizeClass, useLegibleInkOn, useMenuRowCheckInk, useMultiPane, usePageGutter, useParentScreen, usePhoneTableBleed, usePresetContext, usePresetTints, useReadableTextOn, useReadingWidthStyle, useResolvedKnobs, useSemanticGaps, useTheme, useTouchSurface, warnBannedErrorWords, warnBareDisabled, warnCancelDisabled, warnDeprecatedProp, warnDialogTooManyActions, warnOutlineNone, warnOutlinedIgnored, warnPlaceholderAsLabel, warnPositiveTabIndex, warnSelectTooFewOptions, warnSizeRecipeEscape, warnTooltipOnDisabled, wasKeyboardFocus, withDefaultStateLayer };
51
+ export { $color, AlertDialogContent, AlertDialogOverlay, Anchor, BodyFont, BorderRadius, BorderWidth, BulkBarPlacement, CLOCK_TIME, CornerSmoothing, DEFAULT_SIZE_RECIPE_INPUTS, DETAIL_READABLE_WIDTH, DIALOG_MAX_ACTIONS, DialogContent, DialogOverlay, DialogRegionContext, DialogSheetFaceProvider, DisabledStyle, Elevation, FIELD_FOCUS_COLOR, FIELD_FOCUS_REST, FIELD_FOCUS_STYLE, FIELD_KEYBOARD_ATTR, FOCUS_RING_CLIPPED_OFFSET, FOCUS_RING_FLUSH_OFFSET, FOCUS_RING_HALO_OFFSET, FOCUS_RING_MIN_CONTRAST, FOCUS_RING_MIN_WIDTH, FOCUS_VISIBLE_RING, FOCUS_VISIBLE_RING_HALO, FOCUS_VISIBLE_RING_INSET, FORM_READABLE_WIDTH, FORM_READABLE_WIDTH_MAX, FORM_READABLE_WIDTH_MIN, FieldLabelPlacement, FillStyle, FontCategory, FontWeight, FormAutofocus, GLYPH_CONTRAST_FLOOR, GlyphTintFallbackProvider, GroupPositionContext, H1, H2, H3, H4, H5, H6, Heading, HeadingFont, ISO_DATE_ONLY, IconSlot, Intent, IntentAccentTokensContext, IntentContext, LAYOUT_SIZE_CLASS_ORDER, MIN_PRESS_TARGET, NARROW_BREAKPOINT, OVERLAY_ANCHOR_GAP, OVERLAY_ATTACH_GAP, OVERLAY_BREAKPOINT, PageGutter, PageTitleScale, Paragraph, PopoverContent, Preset, PresetContext, READING_WIDTH_BODY_FALLBACK, READING_WIDTH_CH, READING_WIDTH_CH_EM, READING_WIDTH_MAX_CH, READING_WIDTH_MIN_CH, RequiredMarking, SANCTIONED_FOCUS_RING_OFFSETS, SIZE_RECIPE_FAMILY_NAMES, SIZE_RECIPE_RADIUS_STOPS, SIZE_RECIPE_RADIUS_TOKEN_TO_STOP, SIZE_RECIPE_TOKENS, SIZE_TOKEN_EXPONENTS, STATE_LAYER_HOVER, STATE_LAYER_PRESS, ScreenNesting, SelectAllScope, SheetBodyProvider, SizableText, Surface, SurfaceContext, TAMAGUI_ERA, TOUCH_HEIGHT_FLOOR, TableZebra, Text, TextAccent, TimestampStyle, __resetDevWarnSeen, __resetThemeDevWarnSeen, aaTextContrastRatio, accentIdentityCandidates, animationConfig, animationDurations, animationNames, animations, apcaContrast, applyColorTheme, applyRadiusStop, applyTouchFloor, assertContrast, assertNoPrebuiltThemes, boldPreset, borderRadiusMap, buttonColors, bySizeToken, capContainerRadius, capFieldRadius, cardElevationMap, cardLift, clampSurfaceSize, clearPresets, cloneSizeRecipeInputs, cloneTileSizeInputs, compareSizeTokens, composeKnobs, compositeFocusRingCss, consolePreset, containerCapProps, containerRadiusMap, contrastRatio, controlTierDisabled, controlTierPaint, controlTierWash, controlTrackFill, createDefaultFont, createDefaultThemeConfig, createRecipeFamilies, createThemeConfig, createThemesBuilder, animationConfig2 as cssAnimationConfig, currencyAffix, defaultIntents, defaultKnobs, defaultMaxPanes, defaultPreset, defaultRecipeInputs, defaultTileSizeInputs, defaultWidthFactors, densePreset, devWarn, dialogScrim, dynamicTypeFit, edgeColorAt, effectiveFontScale, elevationMap, emptyStateKnobs, ensureCompositeFocusRing, ensureFocusVisibleRing, ensureHairlineFallback, ensureKeyboardModalityTracking, fieldFocusCss, fieldFocusHoldsContrast, fieldKeyboardRing, fillLabelLc, findReadableStep, focusOnOpen, focusRingColorMeetsContrast, focusVisibleRing, formatAbsoluteDate, formatAbsoluteDateTime, formatCalendarDate, formatCurrency, formatDayLong, formatDayOfMonth, formatMonthYear, formatNumber, formatPercent, formatRelativeTimestamp, formatTimeOfDay, generateSizeRecipeTables, generateSizeRecipes, generateTileSizeLadder, getActiveScaleTokens, getGeneratedSizeRecipes, getGroupPosition, getHeadingFontFamily, getLayoutSizeClass, getMonthNames, getPreset, getPresetNames, getSizeRecipeFamily, getSizeRecipeInputs, getTileSizeLadder, getWeekdayNames, glyphTintFallback, hairline, hairlineBorderWidth, hairlineFallbackCss, hairlineWidth, headingMaxFontScale, heroPreset, holdHueToFloor, holdInkFloor, houseComponentThemes, houseGrandChildrenThemes, houseTemplates, inSwitchOffBand, inputColors, interactionStates, isDarkThemeName, isLightGround, isSanctionedFocusRingOffset, isTouchSurface, keyboardFocusRingProps, knobStates, labelFontSizeFor, layoutBreakpoints, layoutSizeClassAtLeast, listHeightForRows, maxFontScaleToFit, measureContrast, mediaAspectRatios, menuRowActive, menuRowCheckGlyph, menuRowCheckInk, menuRowChecked, menuRowCheckedFill, menuRowFrame, menuRowIconGlyph, mergeRecipeInputs, minContrastRatio, motionDurationMs, motionExitFactor, motionFor, motionHideDelayMs, motionRoleProperties, motionSeconds, motionSettleMs, motionStops, animationConfig3 as nativeAnimationConfig, negateSpaceToken, nestedControlPx, normalizeAnimationKnob, normalizeColorScale, normalizeNumberText, normalizeSizeToken, normalizeToHex, numberSeparators, overlayElevationMap, overlayScrim, paintedCardFill, panelPaddingPx, parseCalendarDate, pickReadableForeground, pickStates, plateContrastRatio, platformSystemTint, pressTargetHitSlop, pressTargetStyle, radiusClassProps, radiusOverrideFor, radiusResolutionProps, radiusStopFromToken, railFillRadius, rampStepOf, readingWidthStyle, recipeFamilies, recipeFromTokenChannels, recipeKeyAbove, recipeKeyBelow, registerPreset, relativeLuminance, resolveAccentOnSurface, resolveAccentTintedSurface, resolveActiveTabInk, resolveChartPalette, resolveControlRadius, resolveCurrencyCode, resolveFillGlyphInk, resolveGlyphPaint, resolveGlyphTint, resolveIdentityInk, resolveKnobs, resolveLegibleInkOn, resolveMediaAspect, resolveMenuRowCheckInk, resolvePageTitleScale, resolveRadiusClass, resolveRadiusForPart, resolveSizeRecipeInputs, resolveTextRoles, resolveThemeContrast, resolveThemeFromPreset, resolveTileSizeInputs, roomyPreset, rowStateLadder, scaleRadiusPx, scaleSpaceFractionPx, scrimFor, semanticGroups, setActiveScaleTokens, setBottomEdgeOwnedByTabHost, setSizeRecipeInputs, sheetGrabber, sheetGrabberClearance, sheetGrabberZone, sheetHandle, sheetHandleTone, sheetHandleWidthRatio, sheetHandleZone, sheetScrim, sizeKeyBelow, sizeRecipeBoxVariants, sizeRecipeEscape, sizeRecipeForToken, sizeRecipeFromHeight, sizeRecipeIconVariants, sizeRecipeTypeVariants, sizeRecipes, sizeTokenBelow, sizeTokenStep, sizeTokenStop, sizedElevation, solidButtonIntents, solidPaletteThemes, spacingRoles, stackEdgeRadius, stackRadiusProps, stateFragment, storefrontPreset, surfaceSizeRank, switchOffFillAlpha, switchOffFillBand, systemFillHex, systemFillLuminance, tamaguiEra, textFieldInset, themeDevWarn, tileColumnsForWidth, tileRungFlexProps, tileSizeLadder, tileSizeRungs, tileSizeStepExponents, tintHueNames, tokenNumber, transitionProps, useAccentOnSurface, useAccentTintedSurface, useActiveTabInk, useBarSurface, useBottomEdgeOwnedByTabHost, useChartPalette, useDialogRegionContext, useDialogSheetFace, useElevatedSurface, useFieldSurface, useGlyphColor, useGlyphTintOnSurface, useGroupPosition, useIdentityHue, useIdentityInkOnSurface, useIntentAccentTokens, useIntentContext, useIsInDialogRegion, useIsInSheetBody, useLayoutSizeClass, useLegibleInkOn, useMenuRowCheckInk, useMultiPane, usePageGutter, useParentScreen, usePhoneTableBleed, usePresetContext, usePresetTints, useReadableTextOn, useReadingWidthStyle, useResolvedKnobs, useSemanticGaps, useTheme, useTouchSurface, warnBannedErrorWords, warnBareDisabled, warnCancelDisabled, warnDeprecatedProp, warnDialogTooManyActions, warnOutlineNone, warnOutlinedIgnored, warnPlaceholderAsLabel, warnPositiveTabIndex, warnSelectTooFewOptions, warnSizeRecipeEscape, warnTooltipOnDisabled, wasKeyboardFocus, withDefaultStateLayer };