@multiplatform.one/theme 9.0.2 → 9.0.3

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 (119) hide show
  1. package/dist/cjs/theme/createThemes.cjs +151 -106
  2. package/dist/cjs/theme/createThemes.native.js +256 -197
  3. package/dist/cjs/theme/createThemes.native.js.map +1 -1
  4. package/dist/esm/audit/constraintAudit.native.js.map +1 -1
  5. package/dist/esm/audit/designTokens.native.js.map +1 -1
  6. package/dist/esm/audit/diffReport.native.js.map +1 -1
  7. package/dist/esm/audit/index.native.js.map +1 -1
  8. package/dist/esm/audit/themeMatrix.native.js.map +1 -1
  9. package/dist/esm/dates.native.js.map +1 -1
  10. package/dist/esm/devWarn.native.js.map +1 -1
  11. package/dist/esm/expo.native.js.map +1 -1
  12. package/dist/esm/figma/figmaTokens.native.js.map +1 -1
  13. package/dist/esm/font.native.js.map +1 -1
  14. package/dist/esm/fonts/createFontLoader.native.js.map +1 -1
  15. package/dist/esm/fonts/index.native.js.map +1 -1
  16. package/dist/esm/fonts/interFaces.native.js.map +1 -1
  17. package/dist/esm/fonts/types.native.js.map +1 -1
  18. package/dist/esm/index.gnome.native.js.map +1 -1
  19. package/dist/esm/index.native.js.map +1 -1
  20. package/dist/esm/keyboardFocusRing.native.js.map +1 -1
  21. package/dist/esm/menuRow.native.js.map +1 -1
  22. package/dist/esm/nativeTwins.native.js.map +1 -1
  23. package/dist/esm/numbers.native.js.map +1 -1
  24. package/dist/esm/theme/Heading.native.js.map +1 -1
  25. package/dist/esm/theme/IconSlot.native.js.map +1 -1
  26. package/dist/esm/theme/Intent.native.js.map +1 -1
  27. package/dist/esm/theme/Preset.native.js.map +1 -1
  28. package/dist/esm/theme/PresetContext.native.js.map +1 -1
  29. package/dist/esm/theme/Surface.native.js.map +1 -1
  30. package/dist/esm/theme/Text.native.js.map +1 -1
  31. package/dist/esm/theme/Tint.native.js.map +1 -1
  32. package/dist/esm/theme/accentInk.native.js.map +1 -1
  33. package/dist/esm/theme/activateThemeConfig.native.js.map +1 -1
  34. package/dist/esm/theme/animations/css.native.js.map +1 -1
  35. package/dist/esm/theme/animations/index.native.js.map +1 -1
  36. package/dist/esm/theme/animations/reactNative.native.js.map +1 -1
  37. package/dist/esm/theme/chartPalette.native.js.map +1 -1
  38. package/dist/esm/theme/colorRules.native.js.map +1 -1
  39. package/dist/esm/theme/controlTiers.native.js.map +1 -1
  40. package/dist/esm/theme/cookies.native.js.map +1 -1
  41. package/dist/esm/theme/createDefaultThemeConfig.native.js.map +1 -1
  42. package/dist/esm/theme/createThemes.mjs +151 -106
  43. package/dist/esm/theme/createThemes.mjs.map +1 -1
  44. package/dist/esm/theme/createThemes.native.js +256 -197
  45. package/dist/esm/theme/createThemes.native.js.map +1 -1
  46. package/dist/esm/theme/dedupeInherited.native.js.map +1 -1
  47. package/dist/esm/theme/defaults/accent.native.js.map +1 -1
  48. package/dist/esm/theme/defaults/base.native.js.map +1 -1
  49. package/dist/esm/theme/defaults/builderOptions.native.js.map +1 -1
  50. package/dist/esm/theme/defaults/categoryFonts.native.js.map +1 -1
  51. package/dist/esm/theme/defaults/fonts.native.js.map +1 -1
  52. package/dist/esm/theme/defaults/house.native.js.map +1 -1
  53. package/dist/esm/theme/defaults/index.native.js.map +1 -1
  54. package/dist/esm/theme/devtools/animationOptions.native.js.map +1 -1
  55. package/dist/esm/theme/devtools/buildSnapshot.native.js.map +1 -1
  56. package/dist/esm/theme/devtools/index.native.js.map +1 -1
  57. package/dist/esm/theme/devtools/knobIcons.native.js.map +1 -1
  58. package/dist/esm/theme/devtools/vizConstants.native.js.map +1 -1
  59. package/dist/esm/theme/dynamicType.native.js.map +1 -1
  60. package/dist/esm/theme/fieldFocus.native.js.map +1 -1
  61. package/dist/esm/theme/fillContrast.native.js.map +1 -1
  62. package/dist/esm/theme/focusState.native.js.map +1 -1
  63. package/dist/esm/theme/fontCategoryMetrics.native.js.map +1 -1
  64. package/dist/esm/theme/fontCategoryStacks.native.js.map +1 -1
  65. package/dist/esm/theme/glyphPaint.native.js.map +1 -1
  66. package/dist/esm/theme/glyphTint.native.js.map +1 -1
  67. package/dist/esm/theme/groupGeometry.native.js.map +1 -1
  68. package/dist/esm/theme/index.native.js.map +1 -1
  69. package/dist/esm/theme/intents.native.js.map +1 -1
  70. package/dist/esm/theme/knobs.native.js.map +1 -1
  71. package/dist/esm/theme/layoutTokens.native.js.map +1 -1
  72. package/dist/esm/theme/listRows.native.js.map +1 -1
  73. package/dist/esm/theme/mergedTokens.native.js.map +1 -1
  74. package/dist/esm/theme/motion.native.js.map +1 -1
  75. package/dist/esm/theme/motionStops.native.js.map +1 -1
  76. package/dist/esm/theme/motionTiming.native.js.map +1 -1
  77. package/dist/esm/theme/nativeMonoFamily.native.js.map +1 -1
  78. package/dist/esm/theme/nativePresetSwitch.native.js.map +1 -1
  79. package/dist/esm/theme/nativeSchemePreference.native.js.map +1 -1
  80. package/dist/esm/theme/nativeTheme.native.js.map +1 -1
  81. package/dist/esm/theme/nativeTransitionProps.native.js.map +1 -1
  82. package/dist/esm/theme/overlaySurfaces.native.js.map +1 -1
  83. package/dist/esm/theme/pageGutter.native.js.map +1 -1
  84. package/dist/esm/theme/preset.types.native.js.map +1 -1
  85. package/dist/esm/theme/presetPreview.native.js.map +1 -1
  86. package/dist/esm/theme/presetStore.native.js.map +1 -1
  87. package/dist/esm/theme/presetUserSync.native.js.map +1 -1
  88. package/dist/esm/theme/presets.native.js.map +1 -1
  89. package/dist/esm/theme/radiusClass.native.js.map +1 -1
  90. package/dist/esm/theme/radiusClassTable.generated.native.js.map +1 -1
  91. package/dist/esm/theme/ramps.native.js.map +1 -1
  92. package/dist/esm/theme/readableColor.native.js.map +1 -1
  93. package/dist/esm/theme/recipeInputs.native.js.map +1 -1
  94. package/dist/esm/theme/recipes.native.js.map +1 -1
  95. package/dist/esm/theme/resolveKnobs.native.js.map +1 -1
  96. package/dist/esm/theme/scale/activeScale.native.js.map +1 -1
  97. package/dist/esm/theme/scale/deriveRecipeInputs.native.js.map +1 -1
  98. package/dist/esm/theme/scale/index.native.js.map +1 -1
  99. package/dist/esm/theme/scale/scaleAttribute.native.js.map +1 -1
  100. package/dist/esm/theme/scale/scaleCss.native.js.map +1 -1
  101. package/dist/esm/theme/scale/scaleFonts.native.js.map +1 -1
  102. package/dist/esm/theme/scale/scaleInputs.native.js.map +1 -1
  103. package/dist/esm/theme/scale/themeScales.native.js.map +1 -1
  104. package/dist/esm/theme/scale/useActiveScale.native.js.map +1 -1
  105. package/dist/esm/theme/schemeStore.native.js.map +1 -1
  106. package/dist/esm/theme/shared.native.js.map +1 -1
  107. package/dist/esm/theme/sizeRecipes.native.js.map +1 -1
  108. package/dist/esm/theme/subsetThemes.native.js.map +1 -1
  109. package/dist/esm/theme/themeValue.native.js.map +1 -1
  110. package/dist/esm/theme/tileSizes.native.js.map +1 -1
  111. package/dist/esm/theme/tintHues.native.js.map +1 -1
  112. package/dist/esm/theme/tokenNumber.native.js.map +1 -1
  113. package/dist/esm/theme/touchManipulation.native.js.map +1 -1
  114. package/dist/esm/theme/useResolvedKnobs.native.js.map +1 -1
  115. package/dist/esm/theme/useTouchSurface.native.js.map +1 -1
  116. package/dist/esm/theme/v3TokenRoles.native.js.map +1 -1
  117. package/package.json +5 -5
  118. package/src/theme/createThemes.ts +229 -135
  119. package/types/theme/createThemes.d.ts.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"names":["pressableSelectors","touchManipulationCss","join"],"sources":["../../../src/theme/touchManipulation.ts"],"sourcesContent":[null],"mappings":"AASO,IAAAA,kBAAM,IACX,WACA,WACA,cACA,mBACA,iBACA,gBACA,qBACA,0BACA,6BACA,mBACA,mBACA,qBACA,kBACA,iBACF;AAEO,IAAAC,oBAAM,aAAuBD,kBAAU,CAAAE,IAAmB,KAAK;AAAK;AAAA;AAAA","ignoreList":[]}
1
+ {"version":3,"names":["pressableSelectors","touchManipulationCss","join"],"sources":["touchManipulation.native.js"],"sourcesContent":["var pressableSelectors = [\n \"a[href]\",\n \"summary\",\n \"label[for]\",\n '[role=\"button\"]',\n '[role=\"link\"]',\n '[role=\"tab\"]',\n '[role=\"menuitem\"]',\n '[role=\"menuitemradio\"]',\n '[role=\"menuitemcheckbox\"]',\n '[role=\"option\"]',\n '[role=\"switch\"]',\n '[role=\"checkbox\"]',\n '[role=\"radio\"]',\n '[tabindex=\"0\"]'\n];\nvar touchManipulationCss = `:where(${pressableSelectors.join(\", \")}),\nbutton {\n touch-action: manipulation;\n}`;\nexport {\n pressableSelectors,\n touchManipulationCss\n};\n//# sourceMappingURL=touchManipulation.js.map\n"],"mappings":"AAAA,IAAIA,kBAAkB,GAAG,CACvB,SAAS,EACT,SAAS,EACT,YAAY,EACZ,iBAAiB,EACjB,eAAe,EACf,cAAc,EACd,mBAAmB,EACnB,wBAAwB,EACxB,2BAA2B,EAC3B,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,CACjB;AACD,IAAIC,oBAAoB,GAAG,UAAUD,kBAAkB,CAACE,IAAI,CAAC,IAAI,CAAC;AAClE;AACA;AACA,EAAE;AACF,SACEF,kBAAkB,EAClBC,oBAAoB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["createContext","useContext","useMemo","useThemeName","useTouchSurface","defaultKnobs","resolveKnobs","usePresetContext","defaultIntents","clampSurfaceSize","SurfaceContext","usePrefersReducedMotion","_type_of","obj","Symbol","constructor","IntentContext","useIntentContext","solidButtonIntents","Set","solidPaletteThemes","useResolvedKnobs","options","_ref","_ref1","_ref2","_ref3","_ref4","touch","presetCtx","contextIntent","prefersReducedMotion","themeName","scheme","startsWith","surfaceCtx","useStyledContext","surfaceSize","size","painted","intent","component","override","sizeOverride","baseKnobs","preset","knobs","overrides","merged","_ref5","intentOverrides","intents","knobOverrides","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_iterator","Object","entries","iterator","_step","next","done","key","value","err","return","componentOverride"],"sources":["../../../src/theme/useResolv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MAAA,CAAA6C,QAAA,KAAAC,KAAA,IAAAP,yBAAA,IAAAO,KAAA,GAAAJ,SAAA,CAAAK,IAAA,IAAAC,IAAA,GAAAT,yBAAA;YACA,KAAWU,GAAA,EAAAC,KAAA,IAAcJ,KAAA,CAAAI,KAAU;YACnC,WAAAA,KAAA;cACDZ,aAAA,CAAAW,GAAA,IAAAC,KAAA;YAEG;UACF;QACA,SAAOC,GAAA;UACLX,iBAAG;UACHC,cAAW,GAAAU,GAAA;QAAA,UACN;UACH;YACF,KAAAZ,yBAAA,IAAAG,SAAA,CAAAU,MAAA;cACFV,SAAA,CAAAU,MAAA;YACF;UAEA,CAAO;YACN,IAAAZ,iBAAA;cACD,MAAAC,cAAA;YACA;UACA;QACA;QACAP,MAAA;UACA,GAAAA,MAAA;UACA,GAAAI;QACA;QACA,IAAAX,SAAA;UACA,IAAA0B,iBAAA,GAAAjB,eAAA,CAAAT,SAAA;UACD,IAAA0B,iBAAA,YAAAA,iBAAA,iCAAAvD,QAAA,CAAAuD,iBAAA;YACHnB,MAAA","ignoreList":[]}
1
+ {"version":3,"names":["createContext","useContext","useMemo","useThemeName","useTouchSurface","defaultKnobs","resolveKnobs","usePresetContext","defaultIntents","clampSurfaceSize","SurfaceContext","usePrefersReducedMotion","_type_of","obj","Symbol","constructor","IntentContext","useIntentContext","solidButtonIntents","Set","solidPaletteThemes","useResolvedKnobs","options","_ref","_ref1","_ref2","_ref3","_ref4","touch","presetCtx","contextIntent","prefersReducedMotion","themeName","scheme","startsWith","surfaceCtx","useStyledContext","surfaceSize","size","painted","intent","component","override","sizeOverride","baseKnobs","preset","knobs","overrides","merged","_ref5","intentOverrides","intents","knobOverrides","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_iterator","Object","entries","iterator","_step","next","done","key","value","err","return","componentOverride","animation","sizeToken","resolved","String","has","labelColor","fillStyle","knobProps","body","color"],"sources":["useResolvedKnobs.native.js"],"sourcesContent":["import { createContext, useContext, useMemo } from \"react\";\nimport { useThemeName } from \"tamagui\";\nimport { useTouchSurface } from \"./useTouchSurface\";\nimport { defaultKnobs } from \"./knobs\";\nimport { resolveKnobs } from \"./resolveKnobs\";\nimport { usePresetContext } from \"./PresetContext\";\nimport { defaultIntents } from \"./intents\";\nimport { clampSurfaceSize, SurfaceContext } from \"./Surface\";\nimport { usePrefersReducedMotion } from \"./reducedMotion\";\nfunction _type_of(obj) {\n \"@swc/helpers - typeof\";\n return obj && typeof Symbol !== \"undefined\" && obj.constructor === Symbol ? \"symbol\" : typeof obj;\n}\nvar IntentContext = createContext(null);\nfunction useIntentContext() {\n return useContext(IntentContext);\n}\nvar solidButtonIntents = /* @__PURE__ */ new Set([\n \"error\",\n \"warning\",\n \"success\"\n]);\nvar solidPaletteThemes = /* @__PURE__ */ new Set([\n \"accent\"\n]);\nfunction useResolvedKnobs(options) {\n var _ref, _ref1, _ref2, _ref3, _ref4;\n var touch = useTouchSurface();\n var presetCtx = usePresetContext();\n var contextIntent = useIntentContext();\n var prefersReducedMotion = usePrefersReducedMotion();\n var themeName = useThemeName();\n var scheme = (themeName === null || themeName === void 0 ? void 0 : themeName.startsWith(\"dark\")) ? \"dark\" : \"light\";\n var surfaceCtx = SurfaceContext.useStyledContext();\n var surfaceSize = (_ref = surfaceCtx === null || surfaceCtx === void 0 ? void 0 : surfaceCtx.size) !== null && _ref !== void 0 ? _ref : \"unset\";\n var painted = (_ref1 = (_ref2 = options === null || options === void 0 ? void 0 : options.painted) !== null && _ref2 !== void 0 ? _ref2 : surfaceCtx === null || surfaceCtx === void 0 ? void 0 : surfaceCtx.painted) !== null && _ref1 !== void 0 ? _ref1 : false;\n var intent = (_ref3 = (_ref4 = options === null || options === void 0 ? void 0 : options.intent) !== null && _ref4 !== void 0 ? _ref4 : contextIntent) !== null && _ref3 !== void 0 ? _ref3 : void 0;\n var component = options === null || options === void 0 ? void 0 : options.component;\n var override = options === null || options === void 0 ? void 0 : options.override;\n var sizeOverride = options === null || options === void 0 ? void 0 : options.size;\n return useMemo(function() {\n var baseKnobs = presetCtx ? {\n ...presetCtx.preset.knobs,\n ...presetCtx.overrides\n } : {\n ...defaultKnobs\n };\n var merged = baseKnobs;\n if (intent) {\n var _ref5;\n var intentOverrides = (_ref5 = presetCtx === null || presetCtx === void 0 ? void 0 : presetCtx.preset.intents[intent]) !== null && _ref5 !== void 0 ? _ref5 : defaultIntents[intent];\n if (intentOverrides) {\n var knobOverrides = {};\n var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n try {\n for (var _iterator = Object.entries(intentOverrides)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n var [key, value] = _step.value;\n if (typeof value === \"string\") {\n knobOverrides[key] = value;\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 merged = {\n ...merged,\n ...knobOverrides\n };\n if (component) {\n var componentOverride = intentOverrides[component];\n if (componentOverride && (typeof componentOverride === \"undefined\" ? \"undefined\" : _type_of(componentOverride)) === \"object\") {\n merged = {\n ...merged,\n ...componentOverride\n };\n }\n }\n }\n }\n if (prefersReducedMotion) {\n merged = {\n ...merged,\n animation: \"none\"\n };\n }\n var sizeToken = clampSurfaceSize(sizeOverride !== null && sizeOverride !== void 0 ? sizeOverride : \"unset\", surfaceSize);\n var resolved = resolveKnobs(merged, override, scheme, {\n touch,\n sizeToken: sizeToken === \"unset\" ? void 0 : String(sizeToken),\n painted\n });\n if (intent && component === \"Button\" && solidButtonIntents.has(intent)) {\n var labelColor = merged.fillStyle === \"filled\" ? \"$color\" : \"$color11\";\n return {\n ...resolved,\n knobProps: {\n ...resolved.knobProps,\n body: {\n ...resolved.knobProps.body,\n color: labelColor\n }\n }\n };\n }\n return resolved;\n }, [\n presetCtx,\n intent,\n component,\n override,\n sizeOverride,\n prefersReducedMotion,\n surfaceSize,\n painted,\n scheme,\n touch\n ]);\n}\nexport {\n IntentContext,\n solidButtonIntents,\n solidPaletteThemes,\n useIntentContext,\n useResolvedKnobs\n};\n//# sourceMappingURL=useResolvedKnobs.js.map\n"],"mappings":"AAAA,SAASA,aAAa,EAAEC,UAAU,EAAEC,OAAO,QAAQ,OAAO;AAC1D,SAASC,YAAY,QAAQ,SAAS;AACtC,SAASC,eAAe,QAAQ,6BAAmB;AACnD,SAASC,YAAY,QAAQ,mBAAS;AACtC,SAASC,YAAY,QAAQ,0BAAgB;AAC7C,SAASC,gBAAgB,QAAQ,2BAAiB;AAClD,SAASC,cAAc,QAAQ,qBAAW;AAC1C,SAASC,gBAAgB,EAAEC,cAAc,QAAQ,qBAAW;AAC5D,SAASC,uBAAuB,QAAQ,2BAAiB;AACzD,SAASC,QAAQA,CAACC,GAAG,EAAE;EACrB,uBAAuB;;EACvB,OAAOA,GAAG,IAAI,OAAOC,MAAM,KAAK,WAAW,IAAID,GAAG,CAACE,WAAW,KAAKD,MAAM,GAAG,QAAQ,GAAG,OAAOD,GAAG;AACnG;AACA,IAAIG,aAAa,GAAGhB,aAAa,CAAC,IAAI,CAAC;AACvC,SAASiB,gBAAgBA,CAAA,EAAG;EAC1B,OAAOhB,UAAU,CAACe,aAAa,CAAC;AAClC;AACA,IAAIE,kBAAkB,GAAG,eAAgB,IAAIC,GAAG,CAAC,CAC/C,OAAO,EACP,SAAS,EACT,SAAS,CACV,CAAC;AACF,IAAIC,kBAAkB,GAAG,eAAgB,IAAID,GAAG,CAAC,CAC/C,QAAQ,CACT,CAAC;AACF,SAASE,gBAAgBA,CAACC,OAAO,EAAE;EACjC,IAAIC,IAAI,EAAEC,KAAK,EAAEC,KAAK,EAAEC,KAAK,EAAEC,KAAK;EACpC,IAAIC,KAAK,GAAGxB,eAAe,CAAC,CAAC;EAC7B,IAAIyB,SAAS,GAAGtB,gBAAgB,CAAC,CAAC;EAClC,IAAIuB,aAAa,GAAGb,gBA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,MAAM,EAAE;MACpDL,KAAK;MACLyC,SAAS,EAAEA,SAAS,KAAK,OAAO,GAAG,KAAK,CAAC,GAAGE,MAAM,CAACF,SAAS,CAAC;MAC7D9B;IACF,CAAC,CAAC;IACF,IAAIC,MAAM,IAAIC,SAAS,KAAK,QAAQ,IAAIvB,kBAAkB,CAACsD,GAAG,CAAChC,MAAM,CAAC,EAAE;MACtE,IAAIiC,UAAU,GAAGzB,MAAM,CAAC0B,SAAS,KAAK,QAAQ,GAAG,QAAQ,GAAG,UAAU;MACtE,OAAO;QACL,GAAGJ,QAAQ;QACXK,SAAS,EAAE;UACT,GAAGL,QAAQ,CAACK,SAAS;UACrBC,IAAI,EAAE;YACJ,GAAGN,QAAQ,CAACK,SAAS,CAACC,IAAI;YAC1BC,KAAK,EAAEJ;UACT;QACF;MACF,CAAC;IACH;IACA,OAAOH,QAAQ;EACjB,CAAC,EAAE,CACDzC,SAAS,EACTW,MAAM,EACNC,SAAS,EACTC,QAAQ,EACRC,YAAY,EACZZ,oBAAoB,EACpBM,WAAW,EACXE,OAAO,EACPN,MAAM,EACNL,KAAK,CACN,CAAC;AACJ;AACA,SACEZ,aAAa,EACbE,kBAAkB,EAClBE,kBAAkB,EAClBH,gBAAgB,EAChBI,gBAAgB","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["isTouchable","isWeb","isWebTouchable","useDidFinishSSR","useTouchSurface","didFinishSSR"],"sources":["../../../src/theme/useTouchSurface.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,WAAA,EAAaC,KAAA,EAAOC,cAAA,QAAsB;AACnD,SAASC,eAAA,QAAuB;AAGzB,SAASC,gBAAA,EAA2B;EACzC,IAAAC,YAAM,GAAAF,eAAe;EACrB,QAAQ,CAACF,KAAA,IAASI,YAAA,MAAkBL,WAAA,IAAeE,cAAA;AACrD","ignoreList":[]}
1
+ {"version":3,"names":["isTouchable","isWeb","isWebTouchable","useDidFinishSSR","useTouchSurface","didFinishSSR"],"sources":["useTouchSurface.native.js"],"sourcesContent":["import { isTouchable, isWeb, isWebTouchable } from \"@multiplatform.one/platform\";\nimport { useDidFinishSSR } from \"tamagui\";\nfunction useTouchSurface() {\n var didFinishSSR = useDidFinishSSR();\n return (!isWeb || didFinishSSR) && (isTouchable || isWebTouchable);\n}\nexport {\n useTouchSurface\n};\n//# sourceMappingURL=useTouchSurface.js.map\n"],"mappings":"AAAA,SAASA,WAAW,EAAEC,KAAK,EAAEC,cAAc,QAAQ,6BAA6B;AAChF,SAASC,eAAe,QAAQ,SAAS;AACzC,SAASC,eAAeA,CAAA,EAAG;EACzB,IAAIC,YAAY,GAAGF,eAAe,CAAC,CAAC;EACpC,OAAO,CAAC,CAACF,KAAK,IAAII,YAAY,MAAML,WAAW,IAAIE,cAAc,CAAC;AACpE;AACA,SACEE,eAAe","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["v3TokenRoles","backgroundChrome","backgroundStrong","backgroundSunk","backgroundScrim","hairline","hairlineStrong","colorSubtle","colorMuted","colorInverse","grabColor","good","goodSoft","warning","warningSoft","critical","criticalSoft","info","idle","accentSoft","accentOn","accentText","accentBorder","spark","wall1","wall2","wall3","wall4","plate","plateBorder","plateInk","platePaper","platePewter","plateRingHi","plateRingLo","stoppedWash"],"sources":["../../../src/theme/v3TokenRoles.ts"],"sourcesContent":[null],"mappings":"AAYO,IAAAA,YAAM;EACXC,gBAAA,EAAkB;EAClBC,gBAAA,EAAkB;EAClBC,cAAA,EAAgB;EAChBC,eAAA,EAAiB;EACjBC,QAAA,EAAU;EACVC,cAAA,EAAgB;EAChBC,WAAA,EAAa;EACbC,UAAA,EAAY;EACZC,YAAA,EAAc;EACdC,SAAA,EAAW;EACXC,IAAA,EAAM;EACNC,QAAA,EAAU;EACVC,OAAA,EAAS;EACTC,WAAA,EAAa;EACbC,QAAA,EAAU;EACVC,YAAA,EAAc;EACdC,IAAA,EAAM;EACNC,IAAA,EAAM;EACNC,UAAA,EAAY;EACZC,QAAA,EAAU;EACVC,UAAA,EAAY;EACZC,YAAA,EAAc;EACdC,KAAA,EAAO;EACPC,KAAA,EAAO;EACPC,KAAA,EAAO;EACPC,KAAA,EAAO;EACPC,KAAA,EAAO;EACPC,KAAA,EAAO;EACPC,WAAA,EAAa;EACbC,QAAA,EAAU;EACVC,UAAA,EAAY;EACZC,WAAA,EAAa;EACbC,WAAA,EAAa;EACbC,WAAA,EAAa;EACbC,WAAA,EAAa;AACf","ignoreList":[]}
1
+ {"version":3,"names":["v3TokenRoles","backgroundChrome","backgroundStrong","backgroundSunk","backgroundScrim","hairline","hairlineStrong","colorSubtle","colorMuted","colorInverse","grabColor","good","goodSoft","warning","warningSoft","critical","criticalSoft","info","idle","accentSoft","accentOn","accentText","accentBorder","spark","wall1","wall2","wall3","wall4","plate","plateBorder","plateInk","platePaper","platePewter","plateRingHi","plateRingLo","stoppedWash"],"sources":["v3TokenRoles.native.js"],"sourcesContent":["var v3TokenRoles = {\n backgroundChrome: \"background\",\n backgroundStrong: \"color3\",\n backgroundSunk: \"color3\",\n backgroundScrim: \"shadow4\",\n hairline: \"borderColorHairline\",\n hairlineStrong: \"borderColor\",\n colorSubtle: \"textMuted\",\n colorMuted: \"textMuted\",\n colorInverse: \"color1\",\n grabColor: \"color8\",\n good: \"green9\",\n goodSoft: \"green3\",\n warning: \"yellow9\",\n warningSoft: \"yellow3\",\n critical: \"red9\",\n criticalSoft: \"red3\",\n info: \"blue9\",\n idle: \"textMuted\",\n accentSoft: \"selectedBackground\",\n accentOn: \"accentColor\",\n accentText: \"selectedColor\",\n accentBorder: \"accentBackground\",\n spark: \"accentBackground\",\n wall1: \"springboard\",\n wall2: \"springboard\",\n wall3: \"springboard\",\n wall4: \"springboard\",\n plate: \"springboard\",\n plateBorder: \"springboard\",\n plateInk: \"springboard\",\n platePaper: \"springboard\",\n platePewter: \"springboard\",\n plateRingHi: \"springboard\",\n plateRingLo: \"springboard\",\n stoppedWash: \"springboard\"\n};\nexport {\n v3TokenRoles\n};\n//# sourceMappingURL=v3TokenRoles.js.map\n"],"mappings":"AAAA,IAAIA,YAAY,GAAG;EACjBC,gBAAgB,EAAE,YAAY;EAC9BC,gBAAgB,EAAE,QAAQ;EAC1BC,cAAc,EAAE,QAAQ;EACxBC,eAAe,EAAE,SAAS;EAC1BC,QAAQ,EAAE,qBAAqB;EAC/BC,cAAc,EAAE,aAAa;EAC7BC,WAAW,EAAE,WAAW;EACxBC,UAAU,EAAE,WAAW;EACvBC,YAAY,EAAE,QAAQ;EACtBC,SAAS,EAAE,QAAQ;EACnBC,IAAI,EAAE,QAAQ;EACdC,QAAQ,EAAE,QAAQ;EAClBC,OAAO,EAAE,SAAS;EAClBC,WAAW,EAAE,SAAS;EACtBC,QAAQ,EAAE,MAAM;EAChBC,YAAY,EAAE,MAAM;EACpBC,IAAI,EAAE,OAAO;EACbC,IAAI,EAAE,WAAW;EACjBC,UAAU,EAAE,oBAAoB;EAChCC,QAAQ,EAAE,aAAa;EACvBC,UAAU,EAAE,eAAe;EAC3BC,YAAY,EAAE,kBAAkB;EAChCC,KAAK,EAAE,kBAAkB;EACzBC,KAAK,EAAE,aAAa;EACpBC,KAAK,EAAE,aAAa;EACpBC,KAAK,EAAE,aAAa;EACpBC,KAAK,EAAE,aAAa;EACpBC,KAAK,EAAE,aAAa;EACpBC,WAAW,EAAE,aAAa;EAC1BC,QAAQ,EAAE,aAAa;EACvBC,UAAU,EAAE,aAAa;EACzBC,WAAW,EAAE,aAAa;EAC1BC,WAAW,EAAE,aAAa;EAC1BC,WAAW,EAAE,aAAa;EAC1BC,WAAW,EAAE;AACf,CAAC;AACD,SACEnC,YAAY","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@multiplatform.one/theme",
3
- "version": "9.0.2",
3
+ "version": "9.0.3",
4
4
  "description": "Tamagui theme system for multiplatform.one",
5
5
  "keywords": [
6
6
  "multiplatform",
@@ -163,8 +163,8 @@
163
163
  "access": "public"
164
164
  },
165
165
  "dependencies": {
166
- "@multiplatform.one/platform": "^9.0.2",
167
- "@multiplatform.one/store": "^9.0.2",
166
+ "@multiplatform.one/platform": "^9.0.3",
167
+ "@multiplatform.one/store": "^9.0.3",
168
168
  "@tamagui/animations-react-native": "2.7.6",
169
169
  "@tamagui/colors": "2.7.6",
170
170
  "@tamagui/config": "2.7.6",
@@ -180,8 +180,8 @@
180
180
  },
181
181
  "devDependencies": {
182
182
  "@expo/prebuild-config": "55.0.18",
183
- "@multiplatform.one/config": "9.0.2",
184
- "@multiplatform.one/test-utils": "9.0.2",
183
+ "@multiplatform.one/config": "9.0.3",
184
+ "@multiplatform.one/test-utils": "9.0.3",
185
185
  "@tamagui/animations-css": "2.7.6",
186
186
  "@tamagui/animations-reanimated": "2.7.6",
187
187
  "@tamagui/build": "2.7.6",
@@ -447,55 +447,79 @@ function holdSelectionSurface(
447
447
  * change moves them with it. Edge states keep their offsets from the medium
448
448
  * edge. Light keeps v5's edges.
449
449
  */
450
+ function ownerScope(scopes: string[], name: string): string {
451
+ return scopes
452
+ .filter((scope) => name === scope || name.startsWith(`${scope}_`))
453
+ .reduce((longest, scope) => (scope.length > longest.length ? scope : longest), "");
454
+ }
455
+
456
+ function clearsDarkGrounds(color: string | undefined, grounds: number[]): boolean {
457
+ const brightest = Math.max(...grounds);
458
+ const luminance = luminanceOf(color);
459
+ return (
460
+ luminance !== null &&
461
+ luminance > brightest &&
462
+ grounds.every((ground) => contrastRatio(luminance, ground) >= darkHairlineContrast)
463
+ );
464
+ }
465
+
466
+ interface DarkHairline {
467
+ ramp: (string | undefined)[];
468
+ hairline: number;
469
+ }
470
+
471
+ function darkHairlineOf(scope: Record<string, string>): DarkHairline | undefined {
472
+ const ramp = Array.from({ length: 12 }, (_, index) => scope[`color${index + 1}`]);
473
+ const grounds = [scope.background, scope.color4].map((color) => luminanceOf(color));
474
+ if (grounds.some((ground) => ground === null)) return undefined;
475
+ const hairline = ramp.findIndex(
476
+ (color, index) => index < 11 && clearsDarkGrounds(color, grounds as number[]),
477
+ );
478
+ return hairline < 0 ? undefined : { ramp, hairline };
479
+ }
480
+
481
+ const darkEdgeStateKeys = [
482
+ "borderColor",
483
+ "borderColorHover",
484
+ "borderColorFocus",
485
+ "borderColorPress",
486
+ ];
487
+
488
+ function darkEdgesOf(
489
+ name: string,
490
+ theme: Record<string, string>,
491
+ scopeName: string,
492
+ scope: Record<string, string>,
493
+ { ramp, hairline }: DarkHairline,
494
+ ): Record<string, string> {
495
+ const medium = hairline + 1;
496
+ const surface = name === scopeName || theme.background === scope.color4;
497
+ const step = ramp.indexOf(theme.borderColor);
498
+ const shift = surface && step >= 0 ? medium - step : 0;
499
+ const moved: Record<string, string> = {};
500
+ if ("borderColorHairline" in theme || name === scopeName)
501
+ moved.borderColorHairline = ramp[hairline]!;
502
+ if (shift <= 0) return moved;
503
+ for (const key of darkEdgeStateKeys) {
504
+ const at = ramp.indexOf(theme[key]);
505
+ if (at >= 0) moved[key] = ramp[Math.min(11, at + shift)]!;
506
+ }
507
+ return moved;
508
+ }
509
+
450
510
  function holdDarkEdges(
451
511
  themes: Record<string, Record<string, string>>,
452
512
  ): Record<string, Record<string, string>> {
453
513
  const out: Record<string, Record<string, string>> = { ...themes };
454
514
  const scopes = Object.keys(themes).filter((name) => /^dark(_[a-z]+)?$/.test(name));
455
- const ownerOf = (name: string) =>
456
- scopes
457
- .filter((scope) => name === scope || name.startsWith(`${scope}_`))
458
- .reduce((longest, scope) => (scope.length > longest.length ? scope : longest), "");
459
515
  for (const scopeName of scopes) {
460
516
  if (/_(accent|active)$/.test(scopeName)) continue;
461
517
  const scope = themes[scopeName]!;
462
- const ramp = Array.from({ length: 12 }, (_, index) => scope[`color${index + 1}`]);
463
- const grounds = [scope.background, scope.color4].map((color) => luminanceOf(color));
464
- if (grounds.some((ground) => ground === null)) continue;
465
- const brightest = Math.max(...(grounds as number[]));
466
- const clears = (color: string | undefined) => {
467
- const luminance = luminanceOf(color);
468
- return (
469
- luminance !== null &&
470
- luminance > brightest &&
471
- (grounds as number[]).every(
472
- (ground) => contrastRatio(luminance, ground) >= darkHairlineContrast,
473
- )
474
- );
475
- };
476
- const hairline = ramp.findIndex((color, index) => index < 11 && clears(color));
477
- if (hairline < 0) continue;
478
- const medium = hairline + 1;
518
+ const pick = darkHairlineOf(scope);
519
+ if (!pick) continue;
479
520
  for (const [name, theme] of Object.entries(themes)) {
480
- if (ownerOf(name) !== scopeName) continue;
481
- const surface = name === scopeName || theme.background === scope.color4;
482
- const step = ramp.indexOf(theme.borderColor);
483
- const shift = surface && step >= 0 ? medium - step : 0;
484
- const moved: Record<string, string> = {};
485
- if ("borderColorHairline" in theme || name === scopeName)
486
- moved.borderColorHairline = ramp[hairline]!;
487
- if (shift > 0) {
488
- for (const key of [
489
- "borderColor",
490
- "borderColorHover",
491
- "borderColorFocus",
492
- "borderColorPress",
493
- ]) {
494
- const at = ramp.indexOf(theme[key]);
495
- if (at >= 0) moved[key] = ramp[Math.min(11, at + shift)]!;
496
- }
497
- }
498
- out[name] = { ...out[name], ...moved };
521
+ if (ownerScope(scopes, name) !== scopeName) continue;
522
+ out[name] = { ...out[name], ...darkEdgesOf(name, theme, scopeName, scope, pick) };
499
523
  }
500
524
  }
501
525
  return out;
@@ -512,63 +536,132 @@ function holdDarkEdges(
512
536
  * Picks sit on the scheme roots and a scope overrides only where its own
513
537
  * differs: one copy per component sub-theme overruns the CSS budget.
514
538
  */
539
+ function firstClearing(neutral: string[], grounds: (string | undefined)[]): number {
540
+ const lums = grounds.map((ground) => luminanceOf(ground));
541
+ if (lums.some((lum) => lum === null)) return -1;
542
+ const darkest = Math.min(...(lums as number[]));
543
+ const brightest = Math.max(...(lums as number[]));
544
+ const light = isLightGround(grounds[0]!);
545
+ return neutral.findIndex((color) => {
546
+ const lum = luminanceOf(color);
547
+ return (
548
+ lum !== null &&
549
+ (light ? lum < darkest : lum > brightest) &&
550
+ (lums as number[]).every((ground) => contrastRatio(lum, ground) >= minContrastRatio)
551
+ );
552
+ });
553
+ }
554
+
555
+ function inheritedValue(
556
+ out: Record<string, Record<string, string>>,
557
+ themes: Record<string, Record<string, string>>,
558
+ name: string,
559
+ key: string,
560
+ ): string | undefined {
561
+ for (let at = name; at; at = at.slice(0, Math.max(0, at.lastIndexOf("_")))) {
562
+ const value = (out[at] ?? themes[at])?.[key];
563
+ if (value !== undefined) return value;
564
+ if (!at.includes("_")) break;
565
+ }
566
+ return undefined;
567
+ }
568
+
569
+ function nearestStep(ramp: (string | undefined)[], color: string | undefined): number {
570
+ const lum = luminanceOf(color);
571
+ if (lum === null) return -1;
572
+ return ramp.reduce(
573
+ (best, step, index) =>
574
+ Math.abs((luminanceOf(step) ?? 2) - lum) < Math.abs((luminanceOf(ramp[best]) ?? 2) - lum)
575
+ ? index
576
+ : best,
577
+ 0,
578
+ );
579
+ }
580
+
581
+ interface FieldEdges {
582
+ borderColorField: string;
583
+ borderColorFieldHover: string;
584
+ }
585
+
586
+ function fieldEdgesOf(
587
+ themes: Record<string, Record<string, string>>,
588
+ out: Record<string, Record<string, string>>,
589
+ neutral: string[],
590
+ scopeName: string,
591
+ ): FieldEdges | undefined {
592
+ const scope = themes[scopeName]!;
593
+ const field = `${scopeName}_Input`;
594
+ const edge = firstClearing(neutral, [
595
+ scope.background,
596
+ inheritedValue(out, themes, field, "background"),
597
+ ]);
598
+ if (edge < 0) return undefined;
599
+ const ramp = Array.from({ length: 12 }, (_, index) => scope[`color${index + 1}`]);
600
+ const rest = nearestStep(ramp, inheritedValue(out, themes, field, "borderColor"));
601
+ const hover = nearestStep(ramp, inheritedValue(out, themes, field, "borderColorHover"));
602
+ return {
603
+ borderColorField: neutral[edge]!,
604
+ borderColorFieldHover: neutral[Math.min(11, Math.max(edge, edge + hover - rest))]!,
605
+ };
606
+ }
607
+
608
+ function intentFieldEdges(
609
+ themes: Record<string, Record<string, string>>,
610
+ out: Record<string, Record<string, string>>,
611
+ scopeName: string,
612
+ pages: (string | undefined)[],
613
+ ): FieldEdges {
614
+ const scope = themes[scopeName]!;
615
+ const field = `${scopeName}_Input`;
616
+ const ramp = Array.from({ length: 12 }, (_, index) => scope[`color${index + 1}`]!);
617
+ const edge = firstClearing(ramp, [...pages, inheritedValue(out, themes, field, "background")]);
618
+ if (edge < 0)
619
+ return {
620
+ borderColorField: inheritedValue(out, themes, field, "borderColor")!,
621
+ borderColorFieldHover: inheritedValue(out, themes, field, "borderColorHover")!,
622
+ };
623
+ return { borderColorField: ramp[edge]!, borderColorFieldHover: ramp[Math.min(11, edge + 1)]! };
624
+ }
625
+
626
+ interface ControlEdgeRoot {
627
+ scheme: "light" | "dark";
628
+ neutral: string[];
629
+ pages: (string | undefined)[];
630
+ rootFields: FieldEdges;
631
+ rootControl: number;
632
+ }
633
+
634
+ function controlEdgePatch(
635
+ themes: Record<string, Record<string, string>>,
636
+ out: Record<string, Record<string, string>>,
637
+ scopeName: string,
638
+ { scheme, neutral, pages, rootFields, rootControl }: ControlEdgeRoot,
639
+ ): Record<string, string> {
640
+ const scope = themes[scopeName]!;
641
+ const patch: Record<string, string> = {};
642
+ if (scheme === "dark" && "switchTrackOff" in scope)
643
+ patch.switchTrackOffBorder = scope.switchTrackOff!;
644
+ if (semanticIntentNames.has(scopeName.slice(scheme.length + 1)))
645
+ return Object.assign(patch, intentFieldEdges(themes, out, scopeName, pages));
646
+ const fields = fieldEdgesOf(themes, out, neutral, scopeName);
647
+ if (fields) {
648
+ for (const [key, value] of Object.entries(fields))
649
+ if (value !== rootFields[key as keyof FieldEdges]) patch[key] = value;
650
+ }
651
+ const control = firstClearing(neutral, [scope.background]);
652
+ if (control >= 0 && control !== rootControl) patch.borderColorControl = neutral[control]!;
653
+ return patch;
654
+ }
655
+
515
656
  function holdControlEdges(
516
657
  themes: Record<string, Record<string, string>>,
517
658
  ): Record<string, Record<string, string>> {
518
659
  const out: Record<string, Record<string, string>> = { ...themes };
519
- const firstClearing = (neutral: string[], grounds: (string | undefined)[]) => {
520
- const lums = grounds.map((ground) => luminanceOf(ground));
521
- if (lums.some((lum) => lum === null)) return -1;
522
- const darkest = Math.min(...(lums as number[]));
523
- const brightest = Math.max(...(lums as number[]));
524
- const light = isLightGround(grounds[0]!);
525
- return neutral.findIndex((color) => {
526
- const lum = luminanceOf(color);
527
- return (
528
- lum !== null &&
529
- (light ? lum < darkest : lum > brightest) &&
530
- (lums as number[]).every((ground) => contrastRatio(lum, ground) >= minContrastRatio)
531
- );
532
- });
533
- };
534
- const resolved = (name: string, key: string): string | undefined => {
535
- for (let at = name; at; at = at.slice(0, Math.max(0, at.lastIndexOf("_")))) {
536
- const value = (out[at] ?? themes[at])?.[key];
537
- if (value !== undefined) return value;
538
- if (!at.includes("_")) break;
539
- }
540
- return undefined;
541
- };
542
660
  for (const scheme of ["light", "dark"] as const) {
543
661
  const root = themes[scheme];
544
662
  if (!root) continue;
545
663
  const neutral = Array.from({ length: 12 }, (_, index) => root[`color${index + 1}`]!);
546
- const fieldEdges = (scopeName: string) => {
547
- const scope = themes[scopeName]!;
548
- const field = `${scopeName}_Input`;
549
- const edge = firstClearing(neutral, [scope.background, resolved(field, "background")]);
550
- if (edge < 0) return undefined;
551
- const ramp = Array.from({ length: 12 }, (_, index) => scope[`color${index + 1}`]);
552
- const stepOf = (color: string | undefined) => {
553
- const lum = luminanceOf(color);
554
- if (lum === null) return -1;
555
- return ramp.reduce(
556
- (best, step, index) =>
557
- Math.abs((luminanceOf(step) ?? 2) - lum) <
558
- Math.abs((luminanceOf(ramp[best]) ?? 2) - lum)
559
- ? index
560
- : best,
561
- 0,
562
- );
563
- };
564
- const rest = stepOf(resolved(field, "borderColor"));
565
- const hover = stepOf(resolved(field, "borderColorHover"));
566
- return {
567
- borderColorField: neutral[edge]!,
568
- borderColorFieldHover: neutral[Math.min(11, Math.max(edge, edge + hover - rest))]!,
569
- };
570
- };
571
- const rootFields = fieldEdges(scheme);
664
+ const rootFields = fieldEdgesOf(themes, out, neutral, scheme);
572
665
  const rootControl = firstClearing(neutral, [root.background]);
573
666
  if (!rootFields || rootControl < 0) continue;
574
667
  out[scheme] = {
@@ -586,27 +679,9 @@ function holdControlEdges(
586
679
  .filter((name) => !semanticIntentNames.has(name.slice(scheme.length + 1)))
587
680
  .map((name) => themes[name]!.background),
588
681
  ];
682
+ const context: ControlEdgeRoot = { scheme, neutral, pages, rootFields, rootControl };
589
683
  for (const scopeName of scopes) {
590
- const scope = themes[scopeName]!;
591
- const patch: Record<string, string> = {};
592
- if (scheme === "dark" && "switchTrackOff" in scope)
593
- patch.switchTrackOffBorder = scope.switchTrackOff!;
594
- if (semanticIntentNames.has(scopeName.slice(scheme.length + 1))) {
595
- const field = `${scopeName}_Input`;
596
- const ramp = Array.from({ length: 12 }, (_, index) => scope[`color${index + 1}`]!);
597
- const edge = firstClearing(ramp, [...pages, resolved(field, "background")]);
598
- patch.borderColorField = edge < 0 ? resolved(field, "borderColor")! : ramp[edge]!;
599
- patch.borderColorFieldHover =
600
- edge < 0 ? resolved(field, "borderColorHover")! : ramp[Math.min(11, edge + 1)]!;
601
- } else {
602
- const fields = fieldEdges(scopeName);
603
- if (fields) {
604
- for (const [key, value] of Object.entries(fields))
605
- if (value !== rootFields[key as keyof typeof rootFields]) patch[key] = value;
606
- }
607
- const control = firstClearing(neutral, [scope.background]);
608
- if (control >= 0 && control !== rootControl) patch.borderColorControl = neutral[control]!;
609
- }
684
+ const patch = controlEdgePatch(themes, out, scopeName, context);
610
685
  if (Object.keys(patch).length > 0) out[scopeName] = { ...out[scopeName], ...patch };
611
686
  }
612
687
  }
@@ -753,26 +828,33 @@ function holdSwitchTrack(
753
828
  // root's off track leaves the band or the plate floor there.
754
829
  for (const intent of semanticIntentNames) {
755
830
  const scope = themes[`${scheme}_${intent}`];
756
- const off = luminanceOf(paint.switchTrackOff);
757
- if (!scope?.color4 || !scope.color5 || off === null) continue;
758
- const holds =
759
- inSwitchOffBand(paint.switchTrackOff, scope.color4) &&
760
- [scope.color4, scope.color5].every(
761
- (ground) => contrastRatio(off, luminanceOf(ground) ?? off) >= plateContrastRatio,
762
- );
763
- if (holds) continue;
764
- const track = switchTrackPaint(
765
- base,
766
- scope.accentBackground ?? base.accentBackground,
767
- scope.color4,
768
- [base.color4, scope.color4, scope.color5],
769
- );
831
+ const track = intentSwitchTrack(base, scope, paint);
770
832
  if (track) out[`${scheme}_${intent}`] = { ...scope, ...track };
771
833
  }
772
834
  }
773
835
  return out;
774
836
  }
775
837
 
838
+ function intentSwitchTrack(
839
+ base: Record<string, string>,
840
+ scope: Record<string, string> | undefined,
841
+ paint: Record<string, string>,
842
+ ): Record<string, string> | undefined {
843
+ const off = luminanceOf(paint.switchTrackOff);
844
+ if (!scope?.color4 || !scope.color5 || off === null) return undefined;
845
+ const holds =
846
+ inSwitchOffBand(paint.switchTrackOff, scope.color4) &&
847
+ [scope.color4, scope.color5].every(
848
+ (ground) => contrastRatio(off, luminanceOf(ground) ?? off) >= plateContrastRatio,
849
+ );
850
+ if (holds) return undefined;
851
+ return switchTrackPaint(base, scope.accentBackground ?? base.accentBackground, scope.color4, [
852
+ base.color4,
853
+ scope.color4,
854
+ scope.color5,
855
+ ]);
856
+ }
857
+
776
858
  interface SwitchTrackCandidate {
777
859
  color: string;
778
860
  lum: number;
@@ -1234,25 +1316,37 @@ function holdHouseIdentityInk(
1234
1316
  const base = themes[scheme];
1235
1317
  const blueInk = themes[`${scheme}_blue`]?.identityInk;
1236
1318
  if (!base?.identityInk || !blueInk || base.identityInk === blueInk) continue;
1237
- const held = Array.from({ length: 12 }, (_, index) => index + 1).every(
1238
- (step) =>
1239
- base[`accent${step}`] !== undefined && base[`accent${step}`] === base[`blue${step}`],
1240
- );
1241
- if (!held) continue;
1319
+ if (!accentIsBlue(base)) continue;
1242
1320
  for (const [name, theme] of Object.entries(themes)) {
1243
- if (name !== scheme && !name.startsWith(`${scheme}_`)) continue;
1244
- const scope = name.split("_")[1];
1245
- if (scope === "accent" || (childrenHues as readonly string[]).includes(scope)) continue;
1246
- if (theme.identityInk !== base.identityInk) continue;
1247
- const values = resolveThemeThroughParents(themes, name);
1248
- if (pickIdentityInk([blueInk], pageSurfaces(name, values)) === blueInk) {
1321
+ if (takesBlueInk(themes, scheme, name, theme, base, blueInk))
1249
1322
  out[name] = { ...theme, identityInk: blueInk };
1250
- }
1251
1323
  }
1252
1324
  }
1253
1325
  return out;
1254
1326
  }
1255
1327
 
1328
+ function accentIsBlue(base: Record<string, string>): boolean {
1329
+ return Array.from({ length: 12 }, (_, index) => index + 1).every(
1330
+ (step) => base[`accent${step}`] !== undefined && base[`accent${step}`] === base[`blue${step}`],
1331
+ );
1332
+ }
1333
+
1334
+ function takesBlueInk(
1335
+ themes: Record<string, Record<string, string>>,
1336
+ scheme: "light" | "dark",
1337
+ name: string,
1338
+ theme: Record<string, string>,
1339
+ base: Record<string, string>,
1340
+ blueInk: string,
1341
+ ): boolean {
1342
+ if (name !== scheme && !name.startsWith(`${scheme}_`)) return false;
1343
+ const scope = name.split("_")[1];
1344
+ if (scope === "accent" || (childrenHues as readonly string[]).includes(scope)) return false;
1345
+ if (theme.identityInk !== base.identityInk) return false;
1346
+ const values = resolveThemeThroughParents(themes, name);
1347
+ return pickIdentityInk([blueInk], pageSurfaces(name, values)) === blueInk;
1348
+ }
1349
+
1256
1350
  const defaultLightShadows: Shadows = {
1257
1351
  shadow1: "rgba(0,0,0,0.04)",
1258
1352
  shadow2: "rgba(0,0,0,0.08)",
@@ -1 +1 @@
1
- {"version":3,"file":"createThemes.d.ts","sourceRoot":"","sources":["../../src/theme/createThemes.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,YAAY,IAAI,mBAAmB,EACpC,MAAM,wBAAwB,CAAC;AAwBhC,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE1C,OAAO,EAAE,YAAY,EAAE,CAAC;AAwGxB,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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