react-native-webrtc-kaleidoscope 2.7.12 → 2.8.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 (120) hide show
  1. package/README.md +1 -1
  2. package/android/build.gradle +35 -18
  3. package/android/src/main/java/com/simiancraft/kaleidoscope/effects/CompositeFactory.kt +9 -7
  4. package/android/src/main/java/com/simiancraft/kaleidoscope/effects/TransformFactory.kt +9 -7
  5. package/android/src/main/webrtc/prefixed/com/simiancraft/kaleidoscope/webrtc/WebRtc.kt +13 -0
  6. package/android/src/main/webrtc/unprefixed/com/simiancraft/kaleidoscope/webrtc/WebRtc.kt +13 -0
  7. package/catalog/images/README.md +1 -1
  8. package/dist/catalog/composites/clouds/clouds.controls.d.ts +1 -1
  9. package/dist/catalog/composites/clouds/clouds.controls.d.ts.map +1 -1
  10. package/dist/catalog/composites/corporate-blobs/corporate-blobs.controls.d.ts +1 -1
  11. package/dist/catalog/composites/corporate-blobs/corporate-blobs.controls.d.ts.map +1 -1
  12. package/dist/catalog/composites/fairy-cave/fairy-cave.controls.d.ts +1 -1
  13. package/dist/catalog/composites/fairy-cave/fairy-cave.controls.d.ts.map +1 -1
  14. package/dist/catalog/composites/fairy-grotto/fairy-grotto.controls.d.ts +1 -1
  15. package/dist/catalog/composites/fairy-grotto/fairy-grotto.controls.d.ts.map +1 -1
  16. package/dist/catalog/composites/fairy-hollow/fairy-hollow.controls.d.ts +1 -1
  17. package/dist/catalog/composites/fairy-hollow/fairy-hollow.controls.d.ts.map +1 -1
  18. package/dist/catalog/composites/nebula/nebula.controls.d.ts +1 -1
  19. package/dist/catalog/composites/nebula/nebula.controls.d.ts.map +1 -1
  20. package/dist/catalog/composites/observation-deck/observation-deck.controls.d.ts +1 -1
  21. package/dist/catalog/composites/observation-deck/observation-deck.controls.d.ts.map +1 -1
  22. package/dist/catalog/composites/simianlights/simianlights.controls.d.ts +1 -1
  23. package/dist/catalog/composites/simianlights/simianlights.controls.d.ts.map +1 -1
  24. package/dist/catalog/composites/underwater/underwater.controls.d.ts +1 -1
  25. package/dist/catalog/composites/underwater/underwater.controls.d.ts.map +1 -1
  26. package/dist/catalog/composites/wizard-tower/wizard-tower.controls.d.ts +1 -1
  27. package/dist/catalog/composites/wizard-tower/wizard-tower.controls.d.ts.map +1 -1
  28. package/dist/catalog/composites/wizard-tower-night/wizard-tower-night.controls.d.ts +1 -1
  29. package/dist/catalog/composites/wizard-tower-night/wizard-tower-night.controls.d.ts.map +1 -1
  30. package/dist/catalog/shaders/anamorphic-lensflare/anamorphic-lensflare.form.d.ts +1 -1
  31. package/dist/catalog/shaders/anamorphic-lensflare/anamorphic-lensflare.form.d.ts.map +1 -1
  32. package/dist/catalog/shaders/aurora-silk/aurora-silk.form.d.ts +1 -1
  33. package/dist/catalog/shaders/aurora-silk/aurora-silk.form.d.ts.map +1 -1
  34. package/dist/catalog/shaders/blur/blur.form.d.ts +1 -1
  35. package/dist/catalog/shaders/blur/blur.form.d.ts.map +1 -1
  36. package/dist/catalog/shaders/clouds/clouds.form.d.ts +1 -1
  37. package/dist/catalog/shaders/clouds/clouds.form.d.ts.map +1 -1
  38. package/dist/catalog/shaders/corporate-blobs/corporate-blobs.form.d.ts +1 -1
  39. package/dist/catalog/shaders/corporate-blobs/corporate-blobs.form.d.ts.map +1 -1
  40. package/dist/catalog/shaders/data-mesh/data-mesh.form.d.ts +1 -1
  41. package/dist/catalog/shaders/data-mesh/data-mesh.form.d.ts.map +1 -1
  42. package/dist/catalog/shaders/fireflies/fireflies.form.d.ts +1 -1
  43. package/dist/catalog/shaders/fireflies/fireflies.form.d.ts.map +1 -1
  44. package/dist/catalog/shaders/godrays/godrays.form.d.ts +1 -1
  45. package/dist/catalog/shaders/godrays/godrays.form.d.ts.map +1 -1
  46. package/dist/catalog/shaders/halftone-waves/halftone-waves.form.d.ts +1 -1
  47. package/dist/catalog/shaders/halftone-waves/halftone-waves.form.d.ts.map +1 -1
  48. package/dist/catalog/shaders/kaleidoscope/kaleidoscope.form.d.ts +1 -1
  49. package/dist/catalog/shaders/kaleidoscope/kaleidoscope.form.d.ts.map +1 -1
  50. package/dist/catalog/shaders/light-beams-and-motes/light-beams-and-motes.form.d.ts +1 -1
  51. package/dist/catalog/shaders/light-beams-and-motes/light-beams-and-motes.form.d.ts.map +1 -1
  52. package/dist/catalog/shaders/nebula/nebula.form.d.ts +1 -1
  53. package/dist/catalog/shaders/nebula/nebula.form.d.ts.map +1 -1
  54. package/dist/catalog/shaders/neo-memphis/neo-memphis.form.d.ts +1 -1
  55. package/dist/catalog/shaders/neo-memphis/neo-memphis.form.d.ts.map +1 -1
  56. package/dist/catalog/shaders/outrun-grid/outrun-grid.form.d.ts +1 -1
  57. package/dist/catalog/shaders/outrun-grid/outrun-grid.form.d.ts.map +1 -1
  58. package/dist/catalog/shaders/plasma/plasma.form.d.ts +1 -1
  59. package/dist/catalog/shaders/plasma/plasma.form.d.ts.map +1 -1
  60. package/dist/catalog/shaders/simianlights/simianlights.form.d.ts +1 -1
  61. package/dist/catalog/shaders/simianlights/simianlights.form.d.ts.map +1 -1
  62. package/dist/src/components/form/control-form.d.ts +1 -1
  63. package/dist/src/components/form/control-form.d.ts.map +1 -1
  64. package/dist/src/components/preset-book-menu/index.d.ts +1 -1
  65. package/dist/src/components/preset-book-menu/index.d.ts.map +1 -1
  66. package/dist/src/components/preset-book-menu/index.js +3 -4
  67. package/dist/src/components/preset-book-menu/index.js.map +1 -1
  68. package/dist/src/components/preset-book-menu/layout.d.ts +1 -1
  69. package/dist/src/components/preset-book-menu/layout.d.ts.map +1 -1
  70. package/dist/src/components/preset-book-menu/preset-grid.d.ts +1 -1
  71. package/dist/src/components/preset-book-menu/preset-grid.d.ts.map +1 -1
  72. package/dist/src/components/preset-book-menu/thumbnail-source.d.ts +2 -0
  73. package/dist/src/components/preset-book-menu/thumbnail-source.d.ts.map +1 -0
  74. package/dist/src/components/preset-book-menu/thumbnail-source.js +19 -0
  75. package/dist/src/components/preset-book-menu/thumbnail-source.js.map +1 -0
  76. package/dist/src/components/preset-control-panel/composite-layer-control-panel.d.ts +1 -1
  77. package/dist/src/components/preset-control-panel/composite-layer-control-panel.d.ts.map +1 -1
  78. package/dist/src/components/preset-control-panel/control-section.d.ts +1 -1
  79. package/dist/src/components/preset-control-panel/control-section.d.ts.map +1 -1
  80. package/dist/src/components/preset-control-panel/mask-control-panel.d.ts +1 -1
  81. package/dist/src/components/preset-control-panel/mask-control-panel.d.ts.map +1 -1
  82. package/dist/src/components/preset-control-panel/transform-control-panel.d.ts +1 -1
  83. package/dist/src/components/preset-control-panel/transform-control-panel.d.ts.map +1 -1
  84. package/dist/src/components/preset-control-panel/transform-control-panel.js +2 -2
  85. package/dist/src/components/preset-control-panel/transform-control-panel.js.map +1 -1
  86. package/dist/src/components/preset-tile/index.d.ts +1 -1
  87. package/dist/src/components/preset-tile/index.d.ts.map +1 -1
  88. package/dist/src/components/preset-tile/index.js +7 -5
  89. package/dist/src/components/preset-tile/index.js.map +1 -1
  90. package/dist/src/components/theme/provider.d.ts +1 -1
  91. package/dist/src/components/theme/provider.d.ts.map +1 -1
  92. package/dist/src/components/ui/button.d.ts +1 -1
  93. package/dist/src/components/ui/button.d.ts.map +1 -1
  94. package/dist/src/components/ui/color-picker.d.ts +1 -1
  95. package/dist/src/components/ui/color-picker.d.ts.map +1 -1
  96. package/dist/src/components/ui/label.d.ts +1 -1
  97. package/dist/src/components/ui/label.d.ts.map +1 -1
  98. package/dist/src/components/ui/point.d.ts +1 -1
  99. package/dist/src/components/ui/point.d.ts.map +1 -1
  100. package/dist/src/components/ui/polygon-field.d.ts +1 -1
  101. package/dist/src/components/ui/polygon-field.d.ts.map +1 -1
  102. package/dist/src/components/ui/readout.d.ts +1 -1
  103. package/dist/src/components/ui/readout.d.ts.map +1 -1
  104. package/dist/src/components/ui/slider.d.ts +1 -1
  105. package/dist/src/components/ui/slider.d.ts.map +1 -1
  106. package/dist/src/components/ui/switch.d.ts +1 -1
  107. package/dist/src/components/ui/switch.d.ts.map +1 -1
  108. package/ios/Kaleidoscope.podspec +16 -9
  109. package/ios/KaleidoscopeModule/Registration.swift +8 -3
  110. package/ios/KaleidoscopeModule/WebRTCTypes.swift +15 -0
  111. package/ios/KaleidoscopeModule/effects/CompositeProcessor.swift +5 -1
  112. package/ios/KaleidoscopeModule/effects/FrameBridge.swift +5 -1
  113. package/ios/KaleidoscopeModule/effects/TransformProcessor.swift +5 -1
  114. package/llms.txt +5 -5
  115. package/package.json +8 -7
  116. package/plugin/build/lib/preset-book.js +1 -1
  117. package/src/components/preset-book-menu/index.tsx +3 -4
  118. package/src/components/preset-book-menu/thumbnail-source.ts +16 -0
  119. package/src/components/preset-control-panel/transform-control-panel.tsx +3 -1
  120. package/src/components/preset-tile/index.tsx +8 -4
@@ -15,6 +15,7 @@ const react_native_1 = require("react-native");
15
15
  const test_id_1 = require("../../lib/test-id");
16
16
  const layout_1 = require("./layout");
17
17
  const preset_grid_1 = require("./preset-grid");
18
+ const thumbnail_source_1 = require("./thumbnail-source");
18
19
  /**
19
20
  * Tabbed, preset-book-driven picker. Controlled selection; emits the chosen id
20
21
  * and the host applies it.
@@ -69,9 +70,7 @@ function usePresetBookMenu(presets, labelFor) {
69
70
  label: labelFor?.(id) ?? preset.name,
70
71
  family,
71
72
  category,
72
- source: typeof preset.thumbnail === 'string' || typeof preset.thumbnail === 'number'
73
- ? preset.thumbnail
74
- : undefined,
73
+ source: (0, thumbnail_source_1.thumbnailSource)(preset.thumbnail),
75
74
  };
76
75
  if (!viewsByFamily.has(family)) {
77
76
  families.push(family);
@@ -109,7 +108,7 @@ function usePresetBookMenu(presets, labelFor) {
109
108
  };
110
109
  }
111
110
  function Tab({ label, active, disabled, onPress, testID }) {
112
- return ((0, jsx_runtime_1.jsx)(react_native_1.Pressable, { accessibilityRole: "tab", accessibilityState: { selected: active, disabled }, testID: testID, disabled: disabled, onPress: onPress, style: [styles.tab, active && styles.tabActive, disabled && styles.tabDisabled], children: (0, jsx_runtime_1.jsx)(react_native_1.Text, { style: [styles.tabLabel, active && styles.tabLabelActive], children: label }) }));
111
+ return ((0, jsx_runtime_1.jsx)(react_native_1.Pressable, { accessibilityRole: "tab", accessibilityState: { selected: active, disabled }, "aria-selected": active, testID: testID, disabled: disabled, onPress: onPress, style: [styles.tab, active && styles.tabActive, disabled && styles.tabDisabled], children: (0, jsx_runtime_1.jsx)(react_native_1.Text, { style: [styles.tabLabel, active && styles.tabLabelActive], children: label }) }));
113
112
  }
114
113
  function CategoryItem({ label, active, disabled, onPress, testID }) {
115
114
  return ((0, jsx_runtime_1.jsx)(react_native_1.Pressable, { accessibilityRole: "menuitem", accessibilityState: { selected: active, disabled }, testID: testID, disabled: disabled, onPress: onPress, style: [
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/preset-book-menu/index.tsx"],"names":[],"mappings":";;;;;;AAAA,gFAAgF;AAChF,gFAAgF;AAChF,gFAAgF;AAChF,+EAA+E;AAC/E,4EAA4E;AAC5E,WAAW;AAEX,iCAAiC;AACjC,+CAA2D;AAE3D,+CAAiE;AACjE,qCAAgD;AAEhD,+CAA2C;AA0B3C;;;;;;;;;;GAUG;AACH,wBAAiE,KAA6B;IAC5F,uFAAuF;IACvF,2EAA2E;IAC3E,kEAAkE;IAClE,MAAM,EACJ,OAAO,EACP,KAAK,EACL,QAAQ,EACR,QAAQ,GAAG,KAAK,EAChB,UAAU,EACV,QAAQ,EACR,WAAW,EACX,gBAAgB,EAChB,KAAK,GACN,GAAG,KAAK,CAAC;IACV,MAAM,EACJ,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,UAAU,EACV,cAAc,EACd,iBAAiB,EACjB,KAAK,GACN,GAAG,iBAAiB,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IAEzC,IAAI,CAAC,SAAS;QAAE,OAAO,IAAI,CAAC;IAC5B,yEAAyE;IACzE,2EAA2E;IAC3E,wDAAwD;IACxD,MAAM,YAAY,GAAG,C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;CACvC,CAAC,CAAC;AAEH,8CAA4C;AAAnC,yGAAA,UAAU,OAAA;AACnB,iFAAiF;AACjF,kDAAkD;AAClD,mCAAgD;AAAvC,8GAAA,oBAAoB,OAAA;AAW7B,6CAA2C;AAAlC,yGAAA,UAAU,OAAA","sourcesContent":["// The drop-in composite picker (#28): tabs over the consumer's preset families,\n// a left-hand category menu under the tabs, and a uniform tile grid filtered by\n// the active family and category. Controlled selection; emit the chosen id, the\n// host applies it. `usePresetBookMenu` is the orchestration (group the book by\n// family/category, own the active tab and category) and is exported for BYO\n// layouts.\n\nimport { useState } from 'react';\nimport { Pressable, StyleSheet, Text } from 'react-native';\nimport type { KaleidoscopePresetBook } from '../../kaleidoscope.preset-book.types';\nimport { categoryTestId, familyTestId } from '../../lib/test-id';\nimport { PresetBookMenuLayout } from './layout';\nimport type { Category, Family, PresetBookMenuProps, PresetView } from './preset-book-menu.types';\nimport { PresetGrid } from './preset-grid';\n\n/** The grouping usePresetBookMenu returns; named so BYO-layout consumers can type it. */\nexport interface PresetBookMenuModel {\n /** Distinct families present in the book, in first-appearance order. */\n readonly families: ReadonlyArray<Family>;\n /** The reconciled active family (survives a changed book; falls back to the first). */\n readonly activeTab: Family | undefined;\n /** Set the active family tab. */\n readonly setActiveTab: (family: Family) => void;\n /**\n * Categories (taxonomy[1]) within the active family, first-appearance order.\n * Empty when the family is flat (every preset is depth-1).\n */\n readonly categories: ReadonlyArray<Category>;\n /** The reconciled active category, or undefined when the family is flat. */\n readonly activeCategory: Category | undefined;\n /** Set the active category. */\n readonly setActiveCategory: (category: Category) => void;\n /**\n * Presets to display: the active family narrowed to the active category, or\n * every preset in the family when it is flat.\n */\n readonly views: ReadonlyArray<PresetView>;\n}\n\n/**\n * Tabbed, preset-book-driven picker. Controlled selection; emits the chosen id\n * and the host applies it.\n *\n * @example\n * <PresetBookMenu\n * presets={presets}\n * value={art}\n * onSelect={setArt}\n * />\n */\nexport function PresetBookMenu<P extends KaleidoscopePresetBook>(props: PresetBookMenuProps<P>) {\n // `className` (declared on PresetBookMenuProps) is intentionally not destructured: the\n // ./nativewind cssInterop registration consumes it at the JSX boundary and\n // merges the resolved classes into `style` before this body runs.\n const {\n presets,\n value,\n onSelect,\n disabled = false,\n renderTile,\n labelFor,\n tabLabelFor,\n categoryLabelFor,\n style,\n } = props;\n const {\n families,\n activeTab,\n setActiveTab,\n categories,\n activeCategory,\n setActiveCategory,\n views,\n } = usePresetBookMenu(presets, labelFor);\n\n if (!activeTab) return null;\n // The renderers speak string ids (PresetView.id); the public onSelect is\n // narrowed to keyof P. Adapt once here so consumers need no cast (every id\n // came from Object.keys(presets), so it is a real key).\n const handleSelect = (id: string | null) => onSelect(id as (keyof P & string) | null);\n\n return (\n <PresetBookMenuLayout\n style={style}\n tabsZone={families.map((family) => (\n <Tab\n key={family}\n label={tabLabelFor?.(family) ?? titleCase(family)}\n active={family === activeTab}\n disabled={disabled}\n onPress={() => setActiveTab(family)}\n testID={familyTestId(family)}\n />\n ))}\n sidebarZone={\n categories.length > 0\n ? categories.map((category) => (\n <CategoryItem\n key={category}\n label={categoryLabelFor?.(category) ?? category}\n active={category === activeCategory}\n disabled={disabled}\n onPress={() => setActiveCategory(category)}\n testID={categoryTestId(activeTab, category)}\n />\n ))\n : undefined\n }\n bodyZone={\n <PresetGrid\n presets={views}\n value={value}\n onSelect={handleSelect}\n disabled={disabled}\n renderTile={renderTile}\n />\n }\n />\n );\n}\n\n/**\n * Group a preset book by family and category, and own the active tab and\n * category. The grouping is plain; no hand-rolled memo: React Compiler memoizes\n * it when the library is compiled, and it is cheap to recompute otherwise. The\n * active tab and category are reconciled every render: each survives as long as\n * it is still in the book, else it falls back to the first; so swapping\n * `presets`, or switching to a family that lacks the prior category, can't strand\n * a dead selection.\n */\nexport function usePresetBookMenu<P extends KaleidoscopePresetBook>(\n presets: P,\n labelFor?: (id: keyof P & string) => string,\n): PresetBookMenuModel {\n const families: Family[] = [];\n const viewsByFamily = new Map<Family, PresetView[]>();\n const categoriesByFamily = new Map<Family, Category[]>();\n const viewsByFamilyCategory = new Map<Family, Map<Category, PresetView[]>>();\n for (const id of Object.keys(presets)) {\n const preset = presets[id];\n if (!preset) continue;\n // taxonomy[0] is the family (tab); taxonomy[1], when present, is the\n // category (left-hand menu). A depth-1 preset has no category.\n const family = preset.taxonomy[0];\n const category = preset.taxonomy[1];\n const view: PresetView = {\n id,\n label: labelFor?.(id as keyof P & string) ?? preset.name,\n family,\n category,\n source:\n typeof preset.thumbnail === 'string' || typeof preset.thumbnail === 'number'\n ? preset.thumbnail\n : undefined,\n };\n if (!viewsByFamily.has(family)) {\n families.push(family);\n viewsByFamily.set(family, []);\n categoriesByFamily.set(family, []);\n viewsByFamilyCategory.set(family, new Map());\n }\n viewsByFamily.get(family)?.push(view);\n if (category !== undefined) {\n const cats = categoriesByFamily.get(family);\n const catViews = viewsByFamilyCategory.get(family);\n if (cats && catViews && !catViews.has(category)) {\n cats.push(category);\n catViews.set(category, []);\n }\n catViews?.get(category)?.push(view);\n }\n }\n\n const [activeTab, setActiveTab] = useState<Family | undefined>(undefined);\n const family = activeTab && families.includes(activeTab) ? activeTab : families[0];\n const categories = (family && categoriesByFamily.get(family)) || [];\n\n const [activeCategory, setActiveCategory] = useState<Category | undefined>(undefined);\n const category =\n activeCategory && categories.includes(activeCategory) ? activeCategory : categories[0];\n\n const views = category\n ? (family && viewsByFamilyCategory.get(family)?.get(category)) || []\n : (family && viewsByFamily.get(family)) || [];\n\n return {\n families,\n activeTab: family,\n setActiveTab,\n categories,\n activeCategory: category,\n setActiveCategory,\n views,\n };\n}\n\ninterface TabProps {\n readonly label: string;\n readonly active: boolean;\n readonly disabled: boolean;\n readonly onPress: () => void;\n readonly testID: string;\n}\n\nfunction Tab({ label, active, disabled, onPress, testID }: TabProps) {\n return (\n <Pressable\n accessibilityRole=\"tab\"\n accessibilityState={{ selected: active, disabled }}\n testID={testID}\n disabled={disabled}\n onPress={onPress}\n style={[styles.tab, active && styles.tabActive, disabled && styles.tabDisabled]}\n >\n <Text style={[styles.tabLabel, active && styles.tabLabelActive]}>{label}</Text>\n </Pressable>\n );\n}\n\ninterface CategoryItemProps {\n readonly label: string;\n readonly active: boolean;\n readonly disabled: boolean;\n readonly onPress: () => void;\n readonly testID: string;\n}\n\nfunction CategoryItem({ label, active, disabled, onPress, testID }: CategoryItemProps) {\n return (\n <Pressable\n accessibilityRole=\"menuitem\"\n accessibilityState={{ selected: active, disabled }}\n testID={testID}\n disabled={disabled}\n onPress={onPress}\n style={[\n styles.category,\n active && styles.categoryActive,\n disabled && styles.categoryDisabled,\n ]}\n >\n <Text style={[styles.categoryLabel, active && styles.categoryLabelActive]}>{label}</Text>\n </Pressable>\n );\n}\n\nfunction titleCase(s: string): string {\n return s\n .split('-')\n .map((w) => (w ? w.charAt(0).toUpperCase() + w.slice(1) : w))\n .join(' ');\n}\n\nconst styles = StyleSheet.create({\n tab: { paddingVertical: 6, paddingHorizontal: 12, borderRadius: 999, backgroundColor: '#1f1f1f' },\n tabActive: { backgroundColor: '#333' },\n tabDisabled: { opacity: 0.5 },\n tabLabel: { color: '#999', fontSize: 12, fontWeight: '600' },\n tabLabelActive: { color: '#fff' },\n category: {\n paddingVertical: 6,\n paddingHorizontal: 10,\n borderRadius: 8,\n backgroundColor: '#1a1a1a',\n },\n categoryActive: { backgroundColor: '#2c2c2c' },\n categoryDisabled: { opacity: 0.5 },\n categoryLabel: { color: '#9a9a9a', fontSize: 12, fontWeight: '500' },\n categoryLabelActive: { color: '#fff' },\n});\n\nexport { PresetTile } from '../preset-tile';\n// The `./picker` subpath barrel: the chassis above plus the composable parts and\n// types a consumer can use to build a BYO layout.\nexport { PresetBookMenuLayout } from './layout';\nexport type {\n Category,\n Family,\n PresetBookMenuProps,\n PresetBookMenuSelection,\n PresetBookMenuStyleProps,\n PresetItemState,\n PresetView,\n RenderTile,\n} from './preset-book-menu.types';\nexport { PresetGrid } from './preset-grid';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../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,GAAG,EAAE,eAAe,EAAE,SAAS,EAAE;IACjG,SAAS,EAAE,EAAE,eAAe,EAAE,MAAM,EAAE;IACtC,WAAW,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE;IAC7B,QAAQ,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE;IAC5D,cAAc,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE;IACjC,QAAQ,EAAE;QACR,eAAe,EAAE,CAAC;QAClB,iBAAiB,EAAE,EAAE;QACrB,YAAY,EAAE,CAAC;QACf,eAAe,EAAE,SAAS;KAC3B;IACD,cAAc,EAAE,EAAE,eAAe,EAAE,SAAS,EAAE;IAC9C,gBAAgB,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE;IAClC,aAAa,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE;IACpE,mBAAmB,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE;CACvC,CAAC,CAAC;AAEH,8CAA4C;AAAnC,yGAAA,UAAU,OAAA;AACnB,iFAAiF;AACjF,kDAAkD;AAClD,mCAAgD;AAAvC,8GAAA,oBAAoB,OAAA;AAW7B,6CAA2C;AAAlC,yGAAA,UAAU,OAAA","sourcesContent":["// The drop-in composite picker (#28): tabs over the consumer's preset families,\n// a left-hand category menu under the tabs, and a uniform tile grid filtered by\n// the active family and category. Controlled selection; emit the chosen id, the\n// host applies it. `usePresetBookMenu` is the orchestration (group the book by\n// family/category, own the active tab and category) and is exported for BYO\n// layouts.\n\nimport { useState } from 'react';\nimport { Pressable, StyleSheet, Text } from 'react-native';\nimport type { KaleidoscopePresetBook } from '../../kaleidoscope.preset-book.types';\nimport { categoryTestId, familyTestId } from '../../lib/test-id';\nimport { PresetBookMenuLayout } from './layout';\nimport type { Category, Family, PresetBookMenuProps, PresetView } from './preset-book-menu.types';\nimport { PresetGrid } from './preset-grid';\nimport { thumbnailSource } from './thumbnail-source';\n\n/** The grouping usePresetBookMenu returns; named so BYO-layout consumers can type it. */\nexport interface PresetBookMenuModel {\n /** Distinct families present in the book, in first-appearance order. */\n readonly families: ReadonlyArray<Family>;\n /** The reconciled active family (survives a changed book; falls back to the first). */\n readonly activeTab: Family | undefined;\n /** Set the active family tab. */\n readonly setActiveTab: (family: Family) => void;\n /**\n * Categories (taxonomy[1]) within the active family, first-appearance order.\n * Empty when the family is flat (every preset is depth-1).\n */\n readonly categories: ReadonlyArray<Category>;\n /** The reconciled active category, or undefined when the family is flat. */\n readonly activeCategory: Category | undefined;\n /** Set the active category. */\n readonly setActiveCategory: (category: Category) => void;\n /**\n * Presets to display: the active family narrowed to the active category, or\n * every preset in the family when it is flat.\n */\n readonly views: ReadonlyArray<PresetView>;\n}\n\n/**\n * Tabbed, preset-book-driven picker. Controlled selection; emits the chosen id\n * and the host applies it.\n *\n * @example\n * <PresetBookMenu\n * presets={presets}\n * value={art}\n * onSelect={setArt}\n * />\n */\nexport function PresetBookMenu<P extends KaleidoscopePresetBook>(props: PresetBookMenuProps<P>) {\n // `className` (declared on PresetBookMenuProps) is intentionally not destructured: the\n // ./nativewind cssInterop registration consumes it at the JSX boundary and\n // merges the resolved classes into `style` before this body runs.\n const {\n presets,\n value,\n onSelect,\n disabled = false,\n renderTile,\n labelFor,\n tabLabelFor,\n categoryLabelFor,\n style,\n } = props;\n const {\n families,\n activeTab,\n setActiveTab,\n categories,\n activeCategory,\n setActiveCategory,\n views,\n } = usePresetBookMenu(presets, labelFor);\n\n if (!activeTab) return null;\n // The renderers speak string ids (PresetView.id); the public onSelect is\n // narrowed to keyof P. Adapt once here so consumers need no cast (every id\n // came from Object.keys(presets), so it is a real key).\n const handleSelect = (id: string | null) => onSelect(id as (keyof P & string) | null);\n\n return (\n <PresetBookMenuLayout\n style={style}\n tabsZone={families.map((family) => (\n <Tab\n key={family}\n label={tabLabelFor?.(family) ?? titleCase(family)}\n active={family === activeTab}\n disabled={disabled}\n onPress={() => setActiveTab(family)}\n testID={familyTestId(family)}\n />\n ))}\n sidebarZone={\n categories.length > 0\n ? categories.map((category) => (\n <CategoryItem\n key={category}\n label={categoryLabelFor?.(category) ?? category}\n active={category === activeCategory}\n disabled={disabled}\n onPress={() => setActiveCategory(category)}\n testID={categoryTestId(activeTab, category)}\n />\n ))\n : undefined\n }\n bodyZone={\n <PresetGrid\n presets={views}\n value={value}\n onSelect={handleSelect}\n disabled={disabled}\n renderTile={renderTile}\n />\n }\n />\n );\n}\n\n/**\n * Group a preset book by family and category, and own the active tab and\n * category. The grouping is plain; no hand-rolled memo: React Compiler memoizes\n * it when the library is compiled, and it is cheap to recompute otherwise. The\n * active tab and category are reconciled every render: each survives as long as\n * it is still in the book, else it falls back to the first; so swapping\n * `presets`, or switching to a family that lacks the prior category, can't strand\n * a dead selection.\n */\nexport function usePresetBookMenu<P extends KaleidoscopePresetBook>(\n presets: P,\n labelFor?: (id: keyof P & string) => string,\n): PresetBookMenuModel {\n const families: Family[] = [];\n const viewsByFamily = new Map<Family, PresetView[]>();\n const categoriesByFamily = new Map<Family, Category[]>();\n const viewsByFamilyCategory = new Map<Family, Map<Category, PresetView[]>>();\n for (const id of Object.keys(presets)) {\n const preset = presets[id];\n if (!preset) continue;\n // taxonomy[0] is the family (tab); taxonomy[1], when present, is the\n // category (left-hand menu). A depth-1 preset has no category.\n const family = preset.taxonomy[0];\n const category = preset.taxonomy[1];\n const view: PresetView = {\n id,\n label: labelFor?.(id as keyof P & string) ?? preset.name,\n family,\n category,\n source: thumbnailSource(preset.thumbnail),\n };\n if (!viewsByFamily.has(family)) {\n families.push(family);\n viewsByFamily.set(family, []);\n categoriesByFamily.set(family, []);\n viewsByFamilyCategory.set(family, new Map());\n }\n viewsByFamily.get(family)?.push(view);\n if (category !== undefined) {\n const cats = categoriesByFamily.get(family);\n const catViews = viewsByFamilyCategory.get(family);\n if (cats && catViews && !catViews.has(category)) {\n cats.push(category);\n catViews.set(category, []);\n }\n catViews?.get(category)?.push(view);\n }\n }\n\n const [activeTab, setActiveTab] = useState<Family | undefined>(undefined);\n const family = activeTab && families.includes(activeTab) ? activeTab : families[0];\n const categories = (family && categoriesByFamily.get(family)) || [];\n\n const [activeCategory, setActiveCategory] = useState<Category | undefined>(undefined);\n const category =\n activeCategory && categories.includes(activeCategory) ? activeCategory : categories[0];\n\n const views = category\n ? (family && viewsByFamilyCategory.get(family)?.get(category)) || []\n : (family && viewsByFamily.get(family)) || [];\n\n return {\n families,\n activeTab: family,\n setActiveTab,\n categories,\n activeCategory: category,\n setActiveCategory,\n views,\n };\n}\n\ninterface TabProps {\n readonly label: string;\n readonly active: boolean;\n readonly disabled: boolean;\n readonly onPress: () => void;\n readonly testID: string;\n}\n\nfunction Tab({ label, active, disabled, onPress, testID }: TabProps) {\n return (\n <Pressable\n accessibilityRole=\"tab\"\n accessibilityState={{ selected: active, disabled }}\n aria-selected={active}\n testID={testID}\n disabled={disabled}\n onPress={onPress}\n style={[styles.tab, active && styles.tabActive, disabled && styles.tabDisabled]}\n >\n <Text style={[styles.tabLabel, active && styles.tabLabelActive]}>{label}</Text>\n </Pressable>\n );\n}\n\ninterface CategoryItemProps {\n readonly label: string;\n readonly active: boolean;\n readonly disabled: boolean;\n readonly onPress: () => void;\n readonly testID: string;\n}\n\nfunction CategoryItem({ label, active, disabled, onPress, testID }: CategoryItemProps) {\n return (\n <Pressable\n accessibilityRole=\"menuitem\"\n accessibilityState={{ selected: active, disabled }}\n testID={testID}\n disabled={disabled}\n onPress={onPress}\n style={[\n styles.category,\n active && styles.categoryActive,\n disabled && styles.categoryDisabled,\n ]}\n >\n <Text style={[styles.categoryLabel, active && styles.categoryLabelActive]}>{label}</Text>\n </Pressable>\n );\n}\n\nfunction titleCase(s: string): string {\n return s\n .split('-')\n .map((w) => (w ? w.charAt(0).toUpperCase() + w.slice(1) : w))\n .join(' ');\n}\n\nconst styles = StyleSheet.create({\n tab: { paddingVertical: 6, paddingHorizontal: 12, borderRadius: 999, backgroundColor: '#1f1f1f' },\n tabActive: { backgroundColor: '#333' },\n tabDisabled: { opacity: 0.5 },\n tabLabel: { color: '#999', fontSize: 12, fontWeight: '600' },\n tabLabelActive: { color: '#fff' },\n category: {\n paddingVertical: 6,\n paddingHorizontal: 10,\n borderRadius: 8,\n backgroundColor: '#1a1a1a',\n },\n categoryActive: { backgroundColor: '#2c2c2c' },\n categoryDisabled: { opacity: 0.5 },\n categoryLabel: { color: '#9a9a9a', fontSize: 12, fontWeight: '500' },\n categoryLabelActive: { color: '#fff' },\n});\n\nexport { PresetTile } from '../preset-tile';\n// The `./picker` subpath barrel: the chassis above plus the composable parts and\n// types a consumer can use to build a BYO layout.\nexport { PresetBookMenuLayout } from './layout';\nexport type {\n Category,\n Family,\n PresetBookMenuProps,\n PresetBookMenuSelection,\n PresetBookMenuStyleProps,\n PresetItemState,\n PresetView,\n RenderTile,\n} from './preset-book-menu.types';\nexport { PresetGrid } from './preset-grid';\n"]}
@@ -20,6 +20,6 @@ interface PresetBookMenuLayoutProps {
20
20
  readonly className?: string | undefined;
21
21
  readonly style?: StyleProp<ViewStyle> | undefined;
22
22
  }
23
- export declare function PresetBookMenuLayout({ tabsZone, sidebarZone, bodyZone, style, }: PresetBookMenuLayoutProps): import("react/jsx-runtime").JSX.Element;
23
+ export declare function PresetBookMenuLayout({ tabsZone, sidebarZone, bodyZone, style, }: PresetBookMenuLayoutProps): import("react").JSX.Element;
24
24
  export {};
25
25
  //# sourceMappingURL=layout.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../../src/components/preset-book-menu/layout.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,KAAK,SAAS,EAAoB,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAEhF,UAAU,yBAAyB;IACjC;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;IAC7B;;;;;OAKG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,SAAS,CAAC;IACjC,0EAA0E;IAC1E,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;IAC7B,mFAAmF;IACnF,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC;CACnD;AAID,wBAAgB,oBAAoB,CAAC,EACnC,QAAQ,EACR,WAAW,EACX,QAAQ,EACR,KAAK,GACN,EAAE,yBAAyB,2CAkB3B"}
1
+ {"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../../src/components/preset-book-menu/layout.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,KAAK,SAAS,EAAoB,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAEhF,UAAU,yBAAyB;IACjC;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;IAC7B;;;;;OAKG;IACH,QAAQ,CAAC,WAAW,CAAC,EAAE,SAAS,CAAC;IACjC,0EAA0E;IAC1E,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;IAC7B,mFAAmF;IACnF,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC;CACnD;AAID,wBAAgB,oBAAoB,CAAC,EACnC,QAAQ,EACR,WAAW,EACX,QAAQ,EACR,KAAK,GACN,EAAE,yBAAyB,+BAkB3B"}
@@ -11,6 +11,6 @@ interface PresetGridProps {
11
11
  readonly className?: string | undefined;
12
12
  readonly style?: StyleProp<ViewStyle> | undefined;
13
13
  }
14
- export declare function PresetGrid(props: PresetGridProps): import("react/jsx-runtime").JSX.Element;
14
+ export declare function PresetGrid(props: PresetGridProps): import("react").JSX.Element;
15
15
  export {};
16
16
  //# sourceMappingURL=preset-grid.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"preset-grid.d.ts","sourceRoot":"","sources":["../../../../src/components/preset-book-menu/preset-grid.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,KAAK,SAAS,EAAoB,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAGhF,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAGvE,UAAU,eAAe;IACvB,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;IAC5C,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,QAAQ,CAAC,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAC/C,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACxC,mEAAmE;IACnE,QAAQ,CAAC,UAAU,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IAC7C,wFAAwF;IACxF,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC;CACnD;AAaD,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,2CAmChD"}
1
+ {"version":3,"file":"preset-grid.d.ts","sourceRoot":"","sources":["../../../../src/components/preset-book-menu/preset-grid.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,KAAK,SAAS,EAAoB,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAGhF,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAGvE,UAAU,eAAe;IACvB,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;IAC5C,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,QAAQ,CAAC,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAC/C,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACxC,mEAAmE;IACnE,QAAQ,CAAC,UAAU,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IAC7C,wFAAwF;IACxF,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC;CACnD;AAaD,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,+BAmChD"}
@@ -0,0 +1,2 @@
1
+ export declare function thumbnailSource(thumbnail: unknown): string | number | undefined;
2
+ //# sourceMappingURL=thumbnail-source.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"thumbnail-source.d.ts","sourceRoot":"","sources":["../../../../src/components/preset-book-menu/thumbnail-source.ts"],"names":[],"mappings":"AAIA,wBAAgB,eAAe,CAAC,SAAS,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,CAW/E"}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.thumbnailSource = thumbnailSource;
4
+ // Normalize a preset's `thumbnail` into the source the picker renders: a string
5
+ // (web URL or native preset name) or a number (a Metro asset module id). From
6
+ // Expo SDK 57, a web `require('./x.webp')` yields an asset object
7
+ // `{ uri, width, height }` rather than a URL string; its `uri` is the URL.
8
+ function thumbnailSource(thumbnail) {
9
+ if (typeof thumbnail === 'string' || typeof thumbnail === 'number')
10
+ return thumbnail;
11
+ if (thumbnail !== null &&
12
+ typeof thumbnail === 'object' &&
13
+ 'uri' in thumbnail &&
14
+ typeof thumbnail.uri === 'string') {
15
+ return thumbnail.uri;
16
+ }
17
+ return undefined;
18
+ }
19
+ //# sourceMappingURL=thumbnail-source.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"thumbnail-source.js","sourceRoot":"","sources":["../../../../src/components/preset-book-menu/thumbnail-source.ts"],"names":[],"mappings":";;;AAAA,gFAAgF;AAChF,8EAA8E;AAC9E,kEAAkE;AAClE,2EAA2E;AAC3E,yBAAgC,SAAkB;IAChD,IAAI,OAAO,SAAS,KAAK,QAAQ,IAAI,OAAO,SAAS,KAAK,QAAQ;QAAE,OAAO,SAAS,CAAC;IACrF,IACE,SAAS,KAAK,IAAI;QAClB,OAAO,SAAS,KAAK,QAAQ;QAC7B,KAAK,IAAI,SAAS;QAClB,OAAO,SAAS,CAAC,GAAG,KAAK,QAAQ,EACjC,CAAC;QACD,OAAO,SAAS,CAAC,GAAG,CAAC;IACvB,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC","sourcesContent":["// Normalize a preset's `thumbnail` into the source the picker renders: a string\n// (web URL or native preset name) or a number (a Metro asset module id). From\n// Expo SDK 57, a web `require('./x.webp')` yields an asset object\n// `{ uri, width, height }` rather than a URL string; its `uri` is the URL.\nexport function thumbnailSource(thumbnail: unknown): string | number | undefined {\n if (typeof thumbnail === 'string' || typeof thumbnail === 'number') return thumbnail;\n if (\n thumbnail !== null &&\n typeof thumbnail === 'object' &&\n 'uri' in thumbnail &&\n typeof thumbnail.uri === 'string'\n ) {\n return thumbnail.uri;\n }\n return undefined;\n}\n"]}
@@ -10,5 +10,5 @@ export type CompositeLayerControlPanelProps = {
10
10
  readonly controls: readonly UniformControl[];
11
11
  readonly overrides?: Readonly<Record<string, ControlOverride>>;
12
12
  };
13
- export declare function CompositeLayerControlPanel({ controls, overrides, }: CompositeLayerControlPanelProps): import("react/jsx-runtime").JSX.Element;
13
+ export declare function CompositeLayerControlPanel({ controls, overrides, }: CompositeLayerControlPanelProps): import("react").JSX.Element;
14
14
  //# sourceMappingURL=composite-layer-control-panel.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"composite-layer-control-panel.d.ts","sourceRoot":"","sources":["../../../../src/components/preset-control-panel/composite-layer-control-panel.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAG/D,+DAA+D;AAC/D,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,+BAA+B,GAAG;IAC5C,QAAQ,CAAC,QAAQ,EAAE,SAAS,cAAc,EAAE,CAAC;IAC7C,QAAQ,CAAC,SAAS,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC;CAChE,CAAC;AAkBF,wBAAgB,0BAA0B,CAAC,EACzC,QAAQ,EACR,SAAS,GACV,EAAE,+BAA+B,2CAQjC"}
1
+ {"version":3,"file":"composite-layer-control-panel.d.ts","sourceRoot":"","sources":["../../../../src/components/preset-control-panel/composite-layer-control-panel.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAG/D,+DAA+D;AAC/D,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,+BAA+B,GAAG;IAC5C,QAAQ,CAAC,QAAQ,EAAE,SAAS,cAAc,EAAE,CAAC;IAC7C,QAAQ,CAAC,SAAS,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC;CAChE,CAAC;AAkBF,wBAAgB,0BAA0B,CAAC,EACzC,QAAQ,EACR,SAAS,GACV,EAAE,+BAA+B,+BAQjC"}
@@ -5,5 +5,5 @@ export type ControlSectionProps = {
5
5
  readonly children: ReactNode;
6
6
  readonly style?: StyleProp<ViewStyle>;
7
7
  };
8
- export declare function ControlSection({ title, children, style }: ControlSectionProps): import("react/jsx-runtime").JSX.Element;
8
+ export declare function ControlSection({ title, children, style }: ControlSectionProps): import("react").JSX.Element;
9
9
  //# sourceMappingURL=control-section.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"control-section.d.ts","sourceRoot":"","sources":["../../../../src/components/preset-control-panel/control-section.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AA+BzD,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;IAC7B,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CACvC,CAAC;AAEF,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,mBAAmB,2CAwB7E"}
1
+ {"version":3,"file":"control-section.d.ts","sourceRoot":"","sources":["../../../../src/components/preset-control-panel/control-section.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AA+BzD,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;IAC7B,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CACvC,CAAC;AAEF,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,mBAAmB,+BAwB7E"}
@@ -7,5 +7,5 @@ export type MaskControlPanelProps = {
7
7
  /** Root for this instance's test ids; override when a screen mounts two. */
8
8
  readonly testIDPrefix?: string;
9
9
  };
10
- export declare function MaskControlPanel({ hardness, threshold, onChange, disabled, testIDPrefix, }: MaskControlPanelProps): import("react/jsx-runtime").JSX.Element;
10
+ export declare function MaskControlPanel({ hardness, threshold, onChange, disabled, testIDPrefix, }: MaskControlPanelProps): import("react").JSX.Element;
11
11
  //# sourceMappingURL=mask-control-panel.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mask-control-panel.d.ts","sourceRoot":"","sources":["../../../../src/components/preset-control-panel/mask-control-panel.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAO1D,MAAM,MAAM,qBAAqB,GAAG;IAClC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;IAC7C,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,4EAA4E;IAC5E,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;CAChC,CAAC;AAwCF,wBAAgB,gBAAgB,CAAC,EAC/B,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,QAAgB,EAChB,YAAiC,GAClC,EAAE,qBAAqB,2CAmBvB"}
1
+ {"version":3,"file":"mask-control-panel.d.ts","sourceRoot":"","sources":["../../../../src/components/preset-control-panel/mask-control-panel.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAO1D,MAAM,MAAM,qBAAqB,GAAG;IAClC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;IAC7C,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,4EAA4E;IAC5E,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;CAChC,CAAC;AAwCF,wBAAgB,gBAAgB,CAAC,EAC/B,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,QAAgB,EAChB,YAAiC,GAClC,EAAE,qBAAqB,+BAmBvB"}
@@ -10,5 +10,5 @@ export type TransformControlPanelProps = {
10
10
  /** Root for this instance's test ids; override when a screen mounts two. */
11
11
  readonly testIDPrefix?: string;
12
12
  };
13
- export declare function TransformControlPanel({ flip, rotate, onChange, disabled, testIDPrefix, }: TransformControlPanelProps): import("react/jsx-runtime").JSX.Element;
13
+ export declare function TransformControlPanel({ flip, rotate, onChange, disabled, testIDPrefix, }: TransformControlPanelProps): import("react").JSX.Element;
14
14
  //# sourceMappingURL=transform-control-panel.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"transform-control-panel.d.ts","sourceRoot":"","sources":["../../../../src/components/preset-control-panel/transform-control-panel.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAO/D,MAAM,MAAM,0BAA0B,GAAG;IACvC,QAAQ,CAAC,IAAI,CAAC,EAAE;QAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC;QAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;IAC/D,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,cAAc,KAAK,IAAI,CAAC;IACvD,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,4EAA4E;IAC5E,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;CAChC,CAAC;AAyCF,wBAAgB,qBAAqB,CAAC,EACpC,IAAI,EACJ,MAAU,EACV,QAAQ,EACR,QAAgB,EAChB,YAAsC,GACvC,EAAE,0BAA0B,2CAoD5B"}
1
+ {"version":3,"file":"transform-control-panel.d.ts","sourceRoot":"","sources":["../../../../src/components/preset-control-panel/transform-control-panel.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAO/D,MAAM,MAAM,0BAA0B,GAAG;IACvC,QAAQ,CAAC,IAAI,CAAC,EAAE;QAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC;QAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;IAC/D,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,cAAc,KAAK,IAAI,CAAC;IACvD,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,4EAA4E;IAC5E,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;CAChC,CAAC;AA0CF,wBAAgB,qBAAqB,CAAC,EACpC,IAAI,EACJ,MAAU,EACV,QAAQ,EACR,QAAgB,EAChB,YAAsC,GACvC,EAAE,0BAA0B,+BAqD5B"}
@@ -9,7 +9,7 @@ const control_section_1 = require("./control-section");
9
9
  const ROTATIONS = [0, 90, 180, 270];
10
10
  function FlipToggle({ label, icon, on, disabled, onPress, testID, accessibilityLabel, }) {
11
11
  const { style: activeStyle } = (0, provider_1.useThemeSlot)('active');
12
- return ((0, jsx_runtime_1.jsxs)(react_native_1.Pressable, { accessibilityRole: "switch", accessibilityLabel: accessibilityLabel, accessibilityState: { checked: on, disabled }, testID: testID, disabled: disabled, onPress: onPress, style: [
12
+ return ((0, jsx_runtime_1.jsxs)(react_native_1.Pressable, { accessibilityRole: "switch", accessibilityLabel: accessibilityLabel, accessibilityState: { checked: on, disabled }, "aria-checked": on, testID: testID, disabled: disabled, onPress: onPress, style: [
13
13
  styles.flip,
14
14
  on && styles.on,
15
15
  on && activeStyle,
@@ -22,7 +22,7 @@ function TransformControlPanel({ flip, rotate = 0, onChange, disabled = false, t
22
22
  const { style: activeStyle } = (0, provider_1.useThemeSlot)('active');
23
23
  return ((0, jsx_runtime_1.jsxs)(control_section_1.ControlSection, { title: "transform", children: [(0, jsx_runtime_1.jsxs)(react_native_1.View, { style: styles.flipRow, children: [(0, jsx_runtime_1.jsx)(FlipToggle, { label: "X", icon: "\u2194", on: x, disabled: disabled, onPress: () => onChange({ flip: { x: !x, y }, rotate }), testID: (0, test_id_1.flipTestId)(testIDPrefix, 'x'), accessibilityLabel: "Flip horizontal" }), (0, jsx_runtime_1.jsx)(FlipToggle, { label: "Y", icon: "\u2195", on: y, disabled: disabled, onPress: () => onChange({ flip: { x, y: !y }, rotate }), testID: (0, test_id_1.flipTestId)(testIDPrefix, 'y'), accessibilityLabel: "Flip vertical" })] }), (0, jsx_runtime_1.jsx)(react_native_1.View, { style: styles.rotRow, children: ROTATIONS.map((deg) => {
24
24
  const on = rotate === deg;
25
- return ((0, jsx_runtime_1.jsx)(react_native_1.Pressable, { accessibilityRole: "radio", accessibilityLabel: deg === 0 ? 'No rotation' : `Rotate ${deg} degrees`, accessibilityState: { selected: on, disabled }, testID: (0, test_id_1.rotateTestId)(testIDPrefix, deg), disabled: disabled, onPress: () => onChange({ flip: { x, y }, rotate: deg }), style: [
25
+ return ((0, jsx_runtime_1.jsx)(react_native_1.Pressable, { accessibilityRole: "radio", accessibilityLabel: deg === 0 ? 'No rotation' : `Rotate ${deg} degrees`, accessibilityState: { checked: on, disabled }, "aria-checked": on, testID: (0, test_id_1.rotateTestId)(testIDPrefix, deg), disabled: disabled, onPress: () => onChange({ flip: { x, y }, rotate: deg }), style: [
26
26
  styles.rot,
27
27
  on && styles.on,
28
28
  on && activeStyle,
@@ -1 +1 @@
1
- {"version":3,"file":"transform-control-panel.js","sourceRoot":"","sources":["../../../../src/components/preset-control-panel/transform-control-panel.tsx"],"names":[],"mappings":";;;;AAKA,+CAAiE;AAEjE,+CAAsF;AACtF,gDAAiD;AACjD,uDAAmD;AAEnD,MAAM,SAAS,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,CAAU,CAAC;AAW7C,SAAS,UAAU,CAAC,EAClB,KAAK,EACL,IAAI,EACJ,EAAE,EACF,QAAQ,EACR,OAAO,EACP,MAAM,EACN,kBAAkB,GASnB;IACC,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,IAAA,uBAAY,EAAC,QAAQ,CAAC,CAAC;IACtD,OAAO,CACL,wBAAC,wBAAS,IACR,iBAAiB,EAAC,QAAQ,EAC1B,kBAAkB,EAAE,kBAAkB,EACtC,kBAAkB,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,QAAQ,EAAE,EAC7C,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE;YACL,MAAM,CAAC,IAAI;YACX,EAAE,IAAI,MAAM,CAAC,EAAE;YACf,EAAE,IAAK,WAAoC;YAC3C,QAAQ,IAAI,MAAM,CAAC,QAAQ;SAC5B,aAED,uBAAC,mBAAI,IAAC,KAAK,EAAE,MAAM,CAAC,QAAQ,YAAG,IAAI,GAAQ,EAC3C,uBAAC,mBAAI,IAAC,KAAK,EAAE,MAAM,CAAC,SAAS,YAAG,KAAK,GAAQ,IACnC,CACb,CAAC;AACJ,CAAC;AAED,+BAAsC,EACpC,IAAI,EACJ,M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AE,EAAE;QACZ,eAAe,EAAE,EAAE;QACnB,eAAe,EAAE,SAAS;QAC1B,YAAY,EAAE,CAAC;QACf,UAAU,EAAE,QAAQ;KACrB;IACD,EAAE,EAAE,EAAE,eAAe,EAAE,SAAS,EAAE;IAClC,QAAQ,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE;IAC1B,QAAQ,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE;IACzD,SAAS,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC7D,OAAO,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE;CAC5D,CAAC,CAAC","sourcesContent":["// TransformControlPanel: absolute flip + 90-degree rotation, themed and\n// controlled. Every change emits the full TransformInput (the transform verb is\n// absolute). Toggles read the `active` theme slot for their on state.\n\nimport type { StyleProp, ViewStyle } from 'react-native';\nimport { Pressable, StyleSheet, Text, View } from 'react-native';\nimport type { TransformInput } from '../../kaleidoscope/types';\nimport { flipTestId, rotateTestId, TRANSFORM_TESTID_PREFIX } from '../../lib/test-id';\nimport { useThemeSlot } from '../theme/provider';\nimport { ControlSection } from './control-section';\n\nconst ROTATIONS = [0, 90, 180, 270] as const;\n\nexport type TransformControlPanelProps = {\n readonly flip?: { readonly x?: boolean; readonly y?: boolean };\n readonly rotate?: number;\n readonly onChange: (transform: TransformInput) => void;\n readonly disabled?: boolean;\n /** Root for this instance's test ids; override when a screen mounts two. */\n readonly testIDPrefix?: string;\n};\n\nfunction FlipToggle({\n label,\n icon,\n on,\n disabled,\n onPress,\n testID,\n accessibilityLabel,\n}: {\n readonly label: string;\n readonly icon: string;\n readonly on: boolean;\n readonly disabled: boolean;\n readonly onPress: () => void;\n readonly testID: string;\n readonly accessibilityLabel: string;\n}) {\n const { style: activeStyle } = useThemeSlot('active');\n return (\n <Pressable\n accessibilityRole=\"switch\"\n accessibilityLabel={accessibilityLabel}\n accessibilityState={{ checked: on, disabled }}\n testID={testID}\n disabled={disabled}\n onPress={onPress}\n style={[\n styles.flip,\n on && styles.on,\n on && (activeStyle as StyleProp<ViewStyle>),\n disabled && styles.disabled,\n ]}\n >\n <Text style={styles.flipIcon}>{icon}</Text>\n <Text style={styles.flipLabel}>{label}</Text>\n </Pressable>\n );\n}\n\nexport function TransformControlPanel({\n flip,\n rotate = 0,\n onChange,\n disabled = false,\n testIDPrefix = TRANSFORM_TESTID_PREFIX,\n}: TransformControlPanelProps) {\n const x = flip?.x ?? false;\n const y = flip?.y ?? false;\n const { style: activeStyle } = useThemeSlot('active');\n return (\n <ControlSection title=\"transform\">\n <View style={styles.flipRow}>\n <FlipToggle\n label=\"X\"\n icon=\"↔\"\n on={x}\n disabled={disabled}\n onPress={() => onChange({ flip: { x: !x, y }, rotate })}\n testID={flipTestId(testIDPrefix, 'x')}\n accessibilityLabel=\"Flip horizontal\"\n />\n <FlipToggle\n label=\"Y\"\n icon=\"↕\"\n on={y}\n disabled={disabled}\n onPress={() => onChange({ flip: { x, y: !y }, rotate })}\n testID={flipTestId(testIDPrefix, 'y')}\n accessibilityLabel=\"Flip vertical\"\n />\n </View>\n <View style={styles.rotRow}>\n {ROTATIONS.map((deg) => {\n const on = rotate === deg;\n return (\n <Pressable\n key={deg}\n accessibilityRole=\"radio\"\n accessibilityLabel={deg === 0 ? 'No rotation' : `Rotate ${deg} degrees`}\n accessibilityState={{ selected: on, disabled }}\n testID={rotateTestId(testIDPrefix, deg)}\n disabled={disabled}\n onPress={() => onChange({ flip: { x, y }, rotate: deg })}\n style={[\n styles.rot,\n on && styles.on,\n on && (activeStyle as StyleProp<ViewStyle>),\n disabled && styles.disabled,\n ]}\n >\n <Text style={styles.rotText}>{deg}°</Text>\n </Pressable>\n );\n })}\n </View>\n </ControlSection>\n );\n}\n\nconst styles = StyleSheet.create({\n flipRow: { flexDirection: 'row', gap: 8 },\n rotRow: { flexDirection: 'row', flexWrap: 'wrap', gap: 8 },\n flip: {\n flex: 1,\n paddingVertical: 12,\n backgroundColor: '#2a2a2a',\n borderRadius: 6,\n alignItems: 'center',\n gap: 2,\n },\n rot: {\n flexGrow: 1,\n minWidth: 56,\n paddingVertical: 10,\n backgroundColor: '#2a2a2a',\n borderRadius: 6,\n alignItems: 'center',\n },\n on: { backgroundColor: '#4a8f3f' },\n disabled: { opacity: 0.5 },\n flipIcon: { color: '#fff', fontSize: 22, lineHeight: 26 },\n flipLabel: { color: '#fff', fontWeight: '500', fontSize: 13 },\n rotText: { color: '#fff', fontWeight: '600', fontSize: 13 },\n});\n"]}
1
+ {"version":3,"file":"transform-control-panel.js","sourceRoot":"","sources":["../../../../src/components/preset-control-panel/transform-control-panel.tsx"],"names":[],"mappings":";;;;AAKA,+CAAiE;AAEjE,+CAAsF;AACtF,gDAAiD;AACjD,uDAAmD;AAEnD,MAAM,SAAS,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,CAAU,CAAC;AAW7C,SAAS,UAAU,CAAC,EAClB,KAAK,EACL,IAAI,EACJ,EAAE,EACF,QAAQ,EACR,OAAO,EACP,MAAM,EACN,kBAAkB,GASnB;IACC,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,IAAA,uBAAY,EAAC,QAAQ,CAAC,CAAC;IACtD,OAAO,CACL,wBAAC,wBAAS,IACR,iBAAiB,EAAC,QAAQ,EAC1B,kBAAkB,EAAE,kBAAkB,EACtC,kBAAkB,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,QAAQ,EAAE,kBAC/B,EAAE,EAChB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE;YACL,MAAM,CAAC,IAAI;YACX,EAAE,IAAI,MAAM,CAAC,EAAE;YACf,EAAE,IAAK,WAAoC;YAC3C,QAAQ,IA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AM,EAAE,GAAG,EAAE,CAAC,EAAE;IAC1D,IAAI,EAAE;QACJ,IAAI,EAAE,CAAC;QACP,eAAe,EAAE,EAAE;QACnB,eAAe,EAAE,SAAS;QAC1B,YAAY,EAAE,CAAC;QACf,UAAU,EAAE,QAAQ;QACpB,GAAG,EAAE,CAAC;KACP;IACD,GAAG,EAAE;QACH,QAAQ,EAAE,CAAC;QACX,QAAQ,EAAE,EAAE;QACZ,eAAe,EAAE,EAAE;QACnB,eAAe,EAAE,SAAS;QAC1B,YAAY,EAAE,CAAC;QACf,UAAU,EAAE,QAAQ;KACrB;IACD,EAAE,EAAE,EAAE,eAAe,EAAE,SAAS,EAAE;IAClC,QAAQ,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE;IAC1B,QAAQ,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE;IACzD,SAAS,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC7D,OAAO,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE;CAC5D,CAAC,CAAC","sourcesContent":["// TransformControlPanel: absolute flip + 90-degree rotation, themed and\n// controlled. Every change emits the full TransformInput (the transform verb is\n// absolute). Toggles read the `active` theme slot for their on state.\n\nimport type { StyleProp, ViewStyle } from 'react-native';\nimport { Pressable, StyleSheet, Text, View } from 'react-native';\nimport type { TransformInput } from '../../kaleidoscope/types';\nimport { flipTestId, rotateTestId, TRANSFORM_TESTID_PREFIX } from '../../lib/test-id';\nimport { useThemeSlot } from '../theme/provider';\nimport { ControlSection } from './control-section';\n\nconst ROTATIONS = [0, 90, 180, 270] as const;\n\nexport type TransformControlPanelProps = {\n readonly flip?: { readonly x?: boolean; readonly y?: boolean };\n readonly rotate?: number;\n readonly onChange: (transform: TransformInput) => void;\n readonly disabled?: boolean;\n /** Root for this instance's test ids; override when a screen mounts two. */\n readonly testIDPrefix?: string;\n};\n\nfunction FlipToggle({\n label,\n icon,\n on,\n disabled,\n onPress,\n testID,\n accessibilityLabel,\n}: {\n readonly label: string;\n readonly icon: string;\n readonly on: boolean;\n readonly disabled: boolean;\n readonly onPress: () => void;\n readonly testID: string;\n readonly accessibilityLabel: string;\n}) {\n const { style: activeStyle } = useThemeSlot('active');\n return (\n <Pressable\n accessibilityRole=\"switch\"\n accessibilityLabel={accessibilityLabel}\n accessibilityState={{ checked: on, disabled }}\n aria-checked={on}\n testID={testID}\n disabled={disabled}\n onPress={onPress}\n style={[\n styles.flip,\n on && styles.on,\n on && (activeStyle as StyleProp<ViewStyle>),\n disabled && styles.disabled,\n ]}\n >\n <Text style={styles.flipIcon}>{icon}</Text>\n <Text style={styles.flipLabel}>{label}</Text>\n </Pressable>\n );\n}\n\nexport function TransformControlPanel({\n flip,\n rotate = 0,\n onChange,\n disabled = false,\n testIDPrefix = TRANSFORM_TESTID_PREFIX,\n}: TransformControlPanelProps) {\n const x = flip?.x ?? false;\n const y = flip?.y ?? false;\n const { style: activeStyle } = useThemeSlot('active');\n return (\n <ControlSection title=\"transform\">\n <View style={styles.flipRow}>\n <FlipToggle\n label=\"X\"\n icon=\"↔\"\n on={x}\n disabled={disabled}\n onPress={() => onChange({ flip: { x: !x, y }, rotate })}\n testID={flipTestId(testIDPrefix, 'x')}\n accessibilityLabel=\"Flip horizontal\"\n />\n <FlipToggle\n label=\"Y\"\n icon=\"↕\"\n on={y}\n disabled={disabled}\n onPress={() => onChange({ flip: { x, y: !y }, rotate })}\n testID={flipTestId(testIDPrefix, 'y')}\n accessibilityLabel=\"Flip vertical\"\n />\n </View>\n <View style={styles.rotRow}>\n {ROTATIONS.map((deg) => {\n const on = rotate === deg;\n return (\n <Pressable\n key={deg}\n accessibilityRole=\"radio\"\n accessibilityLabel={deg === 0 ? 'No rotation' : `Rotate ${deg} degrees`}\n accessibilityState={{ checked: on, disabled }}\n aria-checked={on}\n testID={rotateTestId(testIDPrefix, deg)}\n disabled={disabled}\n onPress={() => onChange({ flip: { x, y }, rotate: deg })}\n style={[\n styles.rot,\n on && styles.on,\n on && (activeStyle as StyleProp<ViewStyle>),\n disabled && styles.disabled,\n ]}\n >\n <Text style={styles.rotText}>{deg}°</Text>\n </Pressable>\n );\n })}\n </View>\n </ControlSection>\n );\n}\n\nconst styles = StyleSheet.create({\n flipRow: { flexDirection: 'row', gap: 8 },\n rotRow: { flexDirection: 'row', flexWrap: 'wrap', gap: 8 },\n flip: {\n flex: 1,\n paddingVertical: 12,\n backgroundColor: '#2a2a2a',\n borderRadius: 6,\n alignItems: 'center',\n gap: 2,\n },\n rot: {\n flexGrow: 1,\n minWidth: 56,\n paddingVertical: 10,\n backgroundColor: '#2a2a2a',\n borderRadius: 6,\n alignItems: 'center',\n },\n on: { backgroundColor: '#4a8f3f' },\n disabled: { opacity: 0.5 },\n flipIcon: { color: '#fff', fontSize: 22, lineHeight: 26 },\n flipLabel: { color: '#fff', fontWeight: '500', fontSize: 13 },\n rotText: { color: '#fff', fontWeight: '600', fontSize: 13 },\n});\n"]}
@@ -19,6 +19,6 @@ interface PresetTileProps {
19
19
  /** Deterministic `accessibilityIdentifier` (`kld.preset.<id>`). */
20
20
  readonly testID?: string | undefined;
21
21
  }
22
- export declare function PresetTile(props: PresetTileProps): import("react/jsx-runtime").JSX.Element;
22
+ export declare function PresetTile(props: PresetTileProps): import("react").JSX.Element;
23
23
  export {};
24
24
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/preset-tile/index.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAGL,KAAK,SAAS,EAId,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAEtB,UAAU,eAAe;IACvB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,QAAQ,CAAC,GAAG,E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CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC;IAClD,mEAAmE;IACnE,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACtC;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,+BA8ChD"}
@@ -24,7 +24,7 @@ const react_native_1 = require("react-native");
24
24
  function PresetTile(props) {
25
25
  const { label, uri, selected, disabled = false, onPress, badge, style, testID } = props;
26
26
  const hasWallpaper = !!uri;
27
- return ((0, jsx_runtime_1.jsx)(react_native_1.Pressable, { accessibilityRole: "radio", accessibilityState: { checked: selected, disabled }, testID: testID, disabled: disabled, onPress: onPress, style: [
27
+ return ((0, jsx_runtime_1.jsx)(react_native_1.Pressable, { accessibilityRole: "radio", accessibilityState: { checked: selected, disabled }, "aria-checked": selected, testID: testID, disabled: disabled, onPress: onPress, style: [
28
28
  styles.tile,
29
29
  hasWallpaper ? styles.wallpaper : styles.recessed,
30
30
  selected && styles.selected,
@@ -32,6 +32,8 @@ function PresetTile(props) {
32
32
  style,
33
33
  ], children: ({ pressed, hovered = false }) => ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [hasWallpaper ? ((0, jsx_runtime_1.jsx)(react_native_1.Image, { source: typeof uri === 'number' ? uri : { uri }, style: styles.thumb, resizeMode: "cover" })) : null, hasWallpaper ? (0, jsx_runtime_1.jsx)(react_native_1.View, { style: styles.scrim }) : null, badge ? ((0, jsx_runtime_1.jsx)(react_native_1.View, { style: styles.badge, children: (0, jsx_runtime_1.jsx)(react_native_1.Text, { style: styles.badgeText, children: badge }) })) : null, (0, jsx_runtime_1.jsx)(react_native_1.View, { style: styles.labelWrap, children: (0, jsx_runtime_1.jsx)(react_native_1.Text, { numberOfLines: 2, style: styles.label, children: label }) }), hovered || pressed ? ((0, jsx_runtime_1.jsx)(react_native_1.View, { pointerEvents: "none", style: [styles.glow, pressed && styles.glowPressed] })) : null] })) }));
34
34
  }
35
+ // Inline fill; StyleSheet.absoluteFillObject was removed in React Native 0.85.
36
+ const fill = { position: 'absolute', top: 0, right: 0, bottom: 0, left: 0 };
35
37
  const styles = react_native_1.StyleSheet.create({
36
38
  tile: {
37
39
  aspectRatio: 16 / 9,
@@ -67,8 +69,8 @@ const styles = react_native_1.StyleSheet.create({
67
69
  recessed: { backgroundColor: '#242424', borderColor: '#333' },
68
70
  selected: { borderColor: '#4a8f3f' },
69
71
  disabled: { opacity: 0.5 },
70
- thumb: { ...react_native_1.StyleSheet.absoluteFillObject },
71
- scrim: { ...react_native_1.StyleSheet.absoluteFillObject, backgroundColor: 'rgba(0, 0, 0, 0.35)' },
72
+ thumb: { ...fill },
73
+ scrim: { ...fill, backgroundColor: 'rgba(0, 0, 0, 0.35)' },
72
74
  badge: {
73
75
  position: 'absolute',
74
76
  top: 4,
@@ -80,7 +82,7 @@ const styles = react_native_1.StyleSheet.create({
80
82
  },
81
83
  badgeText: { color: '#fff', fontSize: 9, fontWeight: '700' },
82
84
  labelWrap: {
83
- ...react_native_1.StyleSheet.absoluteFillObject,
85
+ ...fill,
84
86
  alignItems: 'center',
85
87
  justifyContent: 'center',
86
88
  },
@@ -92,7 +94,7 @@ const styles = react_native_1.StyleSheet.create({
92
94
  paddingHorizontal: 6,
93
95
  },
94
96
  // Hover/press "lights up": a translucent sheet over the whole tile.
95
- glow: { ...react_native_1.StyleSheet.absoluteFillObject, backgroundColor: 'rgba(255, 255, 255, 0.12)' },
97
+ glow: { ...fill, backgroundColor: 'rgba(255, 255, 255, 0.12)' },
96
98
  glowPressed: { backgroundColor: 'rgba(255, 255, 255, 0.04)' },
97
99
  });
98
100
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/preset-tile/index.tsx"],"names":[],"mappings":";;;;AAAA,+EAA+E;AAC/E,8EAA8E;AAC9E,+EAA+E;AAC/E,+EAA+E;AAC/E,6EAA6E;AAC7E,uEAAuE;AACvE,kCA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,SAAS,EAAE;IACzC,2EAA2E;IAC3E,QAAQ,EAAE,EAAE,eAAe,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE;IAC7D,QAAQ,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE;IACpC,QAAQ,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE;IAC1B,KAAK,EAAE,EAAE,GAAG,yBAAU,CAAC,kBAAkB,EAAE;IAC3C,KAAK,EAAE,EAAE,GAAG,yBAAU,CAAC,kBAAkB,EAAE,eAAe,EAAE,qBAAqB,EAAE;IACnF,KAAK,EAAE;QACL,QAAQ,EAAE,UAAU;QACpB,GAAG,EAAE,CAAC;QACN,IAAI,EAAE,CAAC;QACP,eAAe,EAAE,yBAAyB;QAC1C,YAAY,EAAE,CAAC;QACf,iBAAiB,EAAE,CAAC;QACpB,eAAe,EAAE,CAAC;KACnB;IACD,SAAS,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,EAAE,UAAU,EAAE,KAAK,EAAE;IAC5D,SAAS,EAAE;QACT,GAAG,yBAAU,CAAC,kBAAkB;QAChC,UAAU,EAAE,QAAQ;QACpB,cAAc,EAAE,QAAQ;KACzB;IACD,KAAK,EAAE;QACL,KAAK,EAAE,MAAM;QACb,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,KAAK;QACjB,SAAS,EAAE,QAAQ;QACnB,iBAAiB,EAAE,CAAC;KACrB;IACD,oEAAoE;IACpE,IAAI,EAAE,EAAE,GAAG,yBAAU,CAAC,kBAAkB,EAAE,eAAe,EAAE,2BAA2B,EAAE;IACxF,WAAW,EAAE,EAAE,eAAe,EAAE,2BAA2B,EAAE;CAC9D,CAAC,CAAC","sourcesContent":["// Leaf: one preset tile. The single item shape for every family; it prints the\n// label and, if the preset has a resolved thumbnail, paints it as a wallpaper\n// behind the label; with no thumbnail it is a recessed pressable button of the\n// SAME footprint, so a thumbnail-less preset never breaks the grid's flow. The\n// variant is chosen per preset by `uri` presence, not by family. Hover/press\n// \"light up\" via an overlay sheet (web hover is inert on native, where\n// `hovered` is simply undefined).\n//\n// The tile is a fixed 16:9 box (`aspectRatio`), matching the 1280x720 images and\n// 320x180 thumbnails, so cover-fit shows the whole image and every tile is the\n// same shape regardless of how wide a column resolves to. Width comes from the\n// flex row (`flexBasis`/`maxWidth`); `aspectRatio` derives the height from it.\n// (Historical note: an earlier attempt rendered thin strips when Yoga failed to\n// derive height from a percentage `flexBasis` + `aspectRatio`; if that recurs on\n// a target, restore an explicit `height` floor here.)\n//\n// Styling is headless: defaults + `style` (wins) + `className` (consumed by the\n// `./nativewind` interop, inert without it).\n\nimport {\n Image,\n Pressable,\n type StyleProp,\n StyleSheet,\n Text,\n View,\n type ViewStyle,\n} from 'react-native';\n\ninterface PresetTileProps {\n readonly label: string;\n /**\n * Resolved thumbnail source. A `string` is a URL (web) or file:// URI (native\n * preset-name lookup); a `number` is a Metro asset module id consumed directly\n * by `<Image source={number}>`. Undefined renders the recessed button.\n */\n readonly uri: string | number | undefined;\n readonly selected: boolean;\n readonly disabled?: boolean | undefined;\n readonly onPress: () => void;\n /** Optional corner badge, e.g. \"demo-owned\". */\n readonly badge?: string | undefined;\n /** NativeWind class; resolved via the `./nativewind` interop registration. */\n readonly className?: string | undefined;\n /** RN style override; applied after the defaults. */\n readonly style?: StyleProp<ViewStyle> | undefined;\n /** Deterministic `accessibilityIdentifier` (`kld.preset.<id>`). */\n readonly testID?: string | undefined;\n}\n\nexport function PresetTile(props: PresetTileProps) {\n const { label, uri, selected, disabled = false, onPress, badge, style, testID } = props;\n const hasWallpaper = !!uri;\n return (\n <Pressable\n accessibilityRole=\"radio\"\n accessibilityState={{ checked: selected, disabled }}\n testID={testID}\n disabled={disabled}\n onPress={onPress}\n style={[\n styles.tile,\n hasWallpaper ? styles.wallpaper : styles.recessed,\n selected && styles.selected,\n disabled && styles.disabled,\n style,\n ]}\n >\n {({ pressed, hovered = false }: { pressed: boolean; hovered?: boolean }) => (\n <>\n {hasWallpaper ? (\n <Image\n source={typeof uri === 'number' ? uri : { uri }}\n style={styles.thumb}\n resizeMode=\"cover\"\n />\n ) : null}\n {hasWallpaper ? <View style={styles.scrim} /> : null}\n {badge ? (\n <View style={styles.badge}>\n <Text style={styles.badgeText}>{badge}</Text>\n </View>\n ) : null}\n <View style={styles.labelWrap}>\n <Text numberOfLines={2} style={styles.label}>\n {label}\n </Text>\n </View>\n {hovered || pressed ? (\n <View pointerEvents=\"none\" style={[styles.glow, pressed && styles.glowPressed]} />\n ) : null}\n </>\n )}\n </Pressable>\n );\n}\n\nconst styles = StyleSheet.create({\n tile: {\n aspectRatio: 16 / 9,\n minWidth: 96,\n // GENERAL React Native gotcha worth naming, because it bites LLM-generated\n // layouts in particular: Yoga (RN's flex engine) will silently collapse a\n // view to zero height when the layout describes height purely by derivation\n // (a percentage `flexBasis` plus an `aspectRatio`, or content that has not\n // measured yet) without an explicit floor. It smashes shut like an\n // unbroken IE6 `<div>`. If a row of tiles ever renders as thin strips, the\n // first thing to check is whether each tile has a `height` or `minHeight`\n // anywhere in its chain.\n //\n // THIS SITE: declared `flexBasis: '30%'` + `aspectRatio: 16/9` and no\n // height floor; each tile resolved to 118 x 4 px on iOS (Maestro hierarchy\n // bounds), turning every wallpaper tile into a thin gray strip. The\n // recessed variant survived only because its visible 2px border made the\n // 4px collapse read as a deliberate divider. 54 = 96 * 9 / 16 (the\n // minWidth's aspect-derived height), so a tile whose width grows past the\n // floor still tracks the 16:9 ratio via `aspectRatio`.\n minHeight: 54,\n flexGrow: 1,\n flexBasis: '30%',\n maxWidth: '32%',\n borderRadius: 6,\n overflow: 'hidden',\n borderWidth: 2,\n borderColor: 'transparent',\n },\n // Wallpaper variant: the thumbnail fills the tile, label over a legibility scrim.\n wallpaper: { backgroundColor: '#1a1a1a' },\n // Recessed variant (no thumbnail): a pressable inset area, same footprint.\n recessed: { backgroundColor: '#242424', borderColor: '#333' },\n selected: { borderColor: '#4a8f3f' },\n disabled: { opacity: 0.5 },\n thumb: { ...StyleSheet.absoluteFillObject },\n scrim: { ...StyleSheet.absoluteFillObject, backgroundColor: 'rgba(0, 0, 0, 0.35)' },\n badge: {\n position: 'absolute',\n top: 4,\n left: 4,\n backgroundColor: 'rgba(217, 119, 6, 0.92)',\n borderRadius: 4,\n paddingHorizontal: 5,\n paddingVertical: 2,\n },\n badgeText: { color: '#fff', fontSize: 9, fontWeight: '700' },\n labelWrap: {\n ...StyleSheet.absoluteFillObject,\n alignItems: 'center',\n justifyContent: 'center',\n },\n label: {\n color: '#fff',\n fontSize: 12,\n fontWeight: '700',\n textAlign: 'center',\n paddingHorizontal: 6,\n },\n // Hover/press \"lights up\": a translucent sheet over the whole tile.\n glow: { ...StyleSheet.absoluteFillObject, backgroundColor: 'rgba(255, 255, 255, 0.12)' },\n glowPressed: { backgroundColor: 'rgba(255, 255, 255, 0.04)' },\n});\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/preset-tile/index.tsx"],"names":[],"mappings":";;;;AAAA,+EAA+E;AAC/E,8EAA8E;AAC9E,+EAA+E;AAC/E,+EAA+E;AAC/E,6EAA6E;AAC7E,uEAAuE;AACvE,kCAAkC;AAClC,EAAE;AACF,iFAAiF;AACjF,+EAA+E;AAC/E,+EAA+E;AAC/E,+EAA+E;AAC/E,gFAAgF;AAChF,iFAAiF;AACjF,sDAAsD;AACtD,EAAE;AACF,gFAAgF;AAChF,6CAA6C;AAE7C,+CAQsB;AAuBtB,oBAA2B,KAAsB;IAC/C,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAE,QAAQ,GAAG,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IACxF,MAAM,YAAY,GAAG,CAAC,CAAC,GAAG,CAAC;IAC3B,OAAO,CACL,uBAAC,wBAAS,IACR,iBAAiB,EAAC,OAAO,EACzB,kBAAkB,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE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C1D,KAAK,EAAE;QACL,QAAQ,EAAE,UAAU;QACpB,GAAG,EAAE,CAAC;QACN,IAAI,EAAE,CAAC;QACP,eAAe,EAAE,yBAAyB;QAC1C,YAAY,EAAE,CAAC;QACf,iBAAiB,EAAE,CAAC;QACpB,eAAe,EAAE,CAAC;KACnB;IACD,SAAS,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,EAAE,UAAU,EAAE,KAAK,EAAE;IAC5D,SAAS,EAAE;QACT,GAAG,IAAI;QACP,UAAU,EAAE,QAAQ;QACpB,cAAc,EAAE,QAAQ;KACzB;IACD,KAAK,EAAE;QACL,KAAK,EAAE,MAAM;QACb,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,KAAK;QACjB,SAAS,EAAE,QAAQ;QACnB,iBAAiB,EAAE,CAAC;KACrB;IACD,oEAAoE;IACpE,IAAI,EAAE,EAAE,GAAG,IAAI,EAAE,eAAe,EAAE,2BAA2B,EAAE;IAC/D,WAAW,EAAE,EAAE,eAAe,EAAE,2BAA2B,EAAE;CAC9D,CAAC,CAAC","sourcesContent":["// Leaf: one preset tile. The single item shape for every family; it prints the\n// label and, if the preset has a resolved thumbnail, paints it as a wallpaper\n// behind the label; with no thumbnail it is a recessed pressable button of the\n// SAME footprint, so a thumbnail-less preset never breaks the grid's flow. The\n// variant is chosen per preset by `uri` presence, not by family. Hover/press\n// \"light up\" via an overlay sheet (web hover is inert on native, where\n// `hovered` is simply undefined).\n//\n// The tile is a fixed 16:9 box (`aspectRatio`), matching the 1280x720 images and\n// 320x180 thumbnails, so cover-fit shows the whole image and every tile is the\n// same shape regardless of how wide a column resolves to. Width comes from the\n// flex row (`flexBasis`/`maxWidth`); `aspectRatio` derives the height from it.\n// (Historical note: an earlier attempt rendered thin strips when Yoga failed to\n// derive height from a percentage `flexBasis` + `aspectRatio`; if that recurs on\n// a target, restore an explicit `height` floor here.)\n//\n// Styling is headless: defaults + `style` (wins) + `className` (consumed by the\n// `./nativewind` interop, inert without it).\n\nimport {\n Image,\n Pressable,\n type StyleProp,\n StyleSheet,\n Text,\n View,\n type ViewStyle,\n} from 'react-native';\n\ninterface PresetTileProps {\n readonly label: string;\n /**\n * Resolved thumbnail source. A `string` is a URL (web) or file:// URI (native\n * preset-name lookup); a `number` is a Metro asset module id consumed directly\n * by `<Image source={number}>`. Undefined renders the recessed button.\n */\n readonly uri: string | number | undefined;\n readonly selected: boolean;\n readonly disabled?: boolean | undefined;\n readonly onPress: () => void;\n /** Optional corner badge, e.g. \"demo-owned\". */\n readonly badge?: string | undefined;\n /** NativeWind class; resolved via the `./nativewind` interop registration. */\n readonly className?: string | undefined;\n /** RN style override; applied after the defaults. */\n readonly style?: StyleProp<ViewStyle> | undefined;\n /** Deterministic `accessibilityIdentifier` (`kld.preset.<id>`). */\n readonly testID?: string | undefined;\n}\n\nexport function PresetTile(props: PresetTileProps) {\n const { label, uri, selected, disabled = false, onPress, badge, style, testID } = props;\n const hasWallpaper = !!uri;\n return (\n <Pressable\n accessibilityRole=\"radio\"\n accessibilityState={{ checked: selected, disabled }}\n aria-checked={selected}\n testID={testID}\n disabled={disabled}\n onPress={onPress}\n style={[\n styles.tile,\n hasWallpaper ? styles.wallpaper : styles.recessed,\n selected && styles.selected,\n disabled && styles.disabled,\n style,\n ]}\n >\n {({ pressed, hovered = false }: { pressed: boolean; hovered?: boolean }) => (\n <>\n {hasWallpaper ? (\n <Image\n source={typeof uri === 'number' ? uri : { uri }}\n style={styles.thumb}\n resizeMode=\"cover\"\n />\n ) : null}\n {hasWallpaper ? <View style={styles.scrim} /> : null}\n {badge ? (\n <View style={styles.badge}>\n <Text style={styles.badgeText}>{badge}</Text>\n </View>\n ) : null}\n <View style={styles.labelWrap}>\n <Text numberOfLines={2} style={styles.label}>\n {label}\n </Text>\n </View>\n {hovered || pressed ? (\n <View pointerEvents=\"none\" style={[styles.glow, pressed && styles.glowPressed]} />\n ) : null}\n </>\n )}\n </Pressable>\n );\n}\n\n// Inline fill; StyleSheet.absoluteFillObject was removed in React Native 0.85.\nconst fill = { position: 'absolute', top: 0, right: 0, bottom: 0, left: 0 } as const;\n\nconst styles = StyleSheet.create({\n tile: {\n aspectRatio: 16 / 9,\n minWidth: 96,\n // GENERAL React Native gotcha worth naming, because it bites LLM-generated\n // layouts in particular: Yoga (RN's flex engine) will silently collapse a\n // view to zero height when the layout describes height purely by derivation\n // (a percentage `flexBasis` plus an `aspectRatio`, or content that has not\n // measured yet) without an explicit floor. It smashes shut like an\n // unbroken IE6 `<div>`. If a row of tiles ever renders as thin strips, the\n // first thing to check is whether each tile has a `height` or `minHeight`\n // anywhere in its chain.\n //\n // THIS SITE: declared `flexBasis: '30%'` + `aspectRatio: 16/9` and no\n // height floor; each tile resolved to 118 x 4 px on iOS (Maestro hierarchy\n // bounds), turning every wallpaper tile into a thin gray strip. The\n // recessed variant survived only because its visible 2px border made the\n // 4px collapse read as a deliberate divider. 54 = 96 * 9 / 16 (the\n // minWidth's aspect-derived height), so a tile whose width grows past the\n // floor still tracks the 16:9 ratio via `aspectRatio`.\n minHeight: 54,\n flexGrow: 1,\n flexBasis: '30%',\n maxWidth: '32%',\n borderRadius: 6,\n overflow: 'hidden',\n borderWidth: 2,\n borderColor: 'transparent',\n },\n // Wallpaper variant: the thumbnail fills the tile, label over a legibility scrim.\n wallpaper: { backgroundColor: '#1a1a1a' },\n // Recessed variant (no thumbnail): a pressable inset area, same footprint.\n recessed: { backgroundColor: '#242424', borderColor: '#333' },\n selected: { borderColor: '#4a8f3f' },\n disabled: { opacity: 0.5 },\n thumb: { ...fill },\n scrim: { ...fill, backgroundColor: 'rgba(0, 0, 0, 0.35)' },\n badge: {\n position: 'absolute',\n top: 4,\n left: 4,\n backgroundColor: 'rgba(217, 119, 6, 0.92)',\n borderRadius: 4,\n paddingHorizontal: 5,\n paddingVertical: 2,\n },\n badgeText: { color: '#fff', fontSize: 9, fontWeight: '700' },\n labelWrap: {\n ...fill,\n alignItems: 'center',\n justifyContent: 'center',\n },\n label: {\n color: '#fff',\n fontSize: 12,\n fontWeight: '700',\n textAlign: 'center',\n paddingHorizontal: 6,\n },\n // Hover/press \"lights up\": a translucent sheet over the whole tile.\n glow: { ...fill, backgroundColor: 'rgba(255, 255, 255, 0.12)' },\n glowPressed: { backgroundColor: 'rgba(255, 255, 255, 0.04)' },\n});\n"]}
@@ -7,7 +7,7 @@ import type { KaleidoscopeThemeSlots, SlotStyle, ThemeSlot } from './slots';
7
7
  export declare function KaleidoscopeThemeProvider({ value, children, }: {
8
8
  readonly value?: KaleidoscopeThemeSlots;
9
9
  readonly children: ReactNode;
10
- }): import("react/jsx-runtime").JSX.Element;
10
+ }): import("react").JSX.Element;
11
11
  /** The full slot bank from context (empty when no provider is mounted). */
12
12
  export declare function useKaleidoscopeTheme(): KaleidoscopeThemeSlots;
13
13
  /** The `{ className, style }` pair for one slot, for a primitive to merge last. */
@@ -1 +1 @@
1
- {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../../../src/components/theme/provider.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,sBAAsB,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAM5E;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,EACxC,KAAK,EACL,QAAQ,GACT,EAAE;IACD,QAAQ,CAAC,KAAK,CAAC,EAAE,sBAAsB,CAAC;IACxC,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;CAC9B,2CAEA;AAED,2EAA2E;AAC3E,wBAAgB,oBAAoB,IAAI,sBAAsB,CAE7D;AAED,mFAAmF;AACnF,wBAAgB,YAAY,CAAC,IAAI,EAAE,SAAS,GAAG;IAC7C,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC;CAC5B,CAMA"}
1
+ {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../../../src/components/theme/provider.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,sBAAsB,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAM5E;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,EACxC,KAAK,EACL,QAAQ,GACT,EAAE;IACD,QAAQ,CAAC,KAAK,CAAC,EAAE,sBAAsB,CAAC;IACxC,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;CAC9B,+BAEA;AAED,2EAA2E;AAC3E,wBAAgB,oBAAoB,IAAI,sBAAsB,CAE7D;AAED,mFAAmF;AACnF,wBAAgB,YAAY,CAAC,IAAI,EAAE,SAAS,GAAG;IAC7C,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC;CAC5B,CAMA"}
@@ -10,5 +10,5 @@ export type ButtonProps = {
10
10
  /** Deterministic `accessibilityIdentifier` for the pressable. */
11
11
  readonly testID?: string;
12
12
  };
13
- export declare function Button({ children, onPress, disabled, style, testID }: ButtonProps): import("react/jsx-runtime").JSX.Element;
13
+ export declare function Button({ children, onPress, disabled, style, testID }: ButtonProps): import("react").JSX.Element;
14
14
  //# sourceMappingURL=button.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/button.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAIzD,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;IAC7B,QAAQ,CAAC,OAAO,EAAE,MAAM,IAAI,CAAC;IAC7B,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,iEAAiE;IACjE,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACtC,iEAAiE;IACjE,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,wBAAgB,MAAM,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAgB,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,WAAW,2CAqBzF"}
1
+ {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/button.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAIzD,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;IAC7B,QAAQ,CAAC,OAAO,EAAE,MAAM,IAAI,CAAC;IAC7B,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,iEAAiE;IACjE,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACtC,iEAAiE;IACjE,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,wBAAgB,MAAM,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAgB,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,WAAW,+BAqBzF"}
@@ -8,5 +8,5 @@ export type ColorPickerProps = {
8
8
  readonly className?: string;
9
9
  readonly style?: StyleProp<ViewStyle>;
10
10
  };
11
- export declare function ColorPicker({ uniform, label, style }: ColorPickerProps): import("react/jsx-runtime").JSX.Element;
11
+ export declare function ColorPicker({ uniform, label, style }: ColorPickerProps): import("react").JSX.Element;
12
12
  //# sourceMappingURL=color-picker.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"color-picker.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/color-picker.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAWzD,MAAM,MAAM,gBAAgB,GAAG;IAC7B,0DAA0D;IAC1D,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,iDAAiD;IACjD,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,mFAAmF;IACnF,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CACvC,CAAC;AAEF,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,gBAAgB,2CAuCtE"}
1
+ {"version":3,"file":"color-picker.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/color-picker.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAWzD,MAAM,MAAM,gBAAgB,GAAG;IAC7B,0DAA0D;IAC1D,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,iDAAiD;IACjD,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,mFAAmF;IACnF,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CACvC,CAAC;AAEF,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,gBAAgB,+BAuCtE"}
@@ -6,5 +6,5 @@ export type LabelProps = {
6
6
  readonly className?: string;
7
7
  readonly style?: StyleProp<TextStyle>;
8
8
  };
9
- export declare function Label({ children, style }: LabelProps): import("react/jsx-runtime").JSX.Element;
9
+ export declare function Label({ children, style }: LabelProps): import("react").JSX.Element;
10
10
  //# sourceMappingURL=label.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/label.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAIzD,MAAM,MAAM,UAAU,GAAG;IACvB,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;IAC7B,iEAAiE;IACjE,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CACvC,CAAC;AAEF,wBAAgB,KAAK,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,UAAU,2CAGpD"}
1
+ {"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/label.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAIzD,MAAM,MAAM,UAAU,GAAG;IACvB,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;IAC7B,iEAAiE;IACjE,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CACvC,CAAC;AAEF,wBAAgB,KAAK,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,UAAU,+BAGpD"}
@@ -15,5 +15,5 @@ export type PointProps = {
15
15
  /** Base test id; the x slider appends `.x`, the y slider `.y`. */
16
16
  readonly testID?: string;
17
17
  };
18
- export declare function Point({ x, y, min, max, step, onChange, label, disabled, testID, }: PointProps): import("react/jsx-runtime").JSX.Element;
18
+ export declare function Point({ x, y, min, max, step, onChange, label, disabled, testID, }: PointProps): import("react").JSX.Element;
19
19
  //# sourceMappingURL=point.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"point.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/point.tsx"],"names":[],"mappings":"AAmBA,MAAM,MAAM,UAAU,GAAG;IACvB,gCAAgC;IAChC,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IACnB,4DAA4D;IAC5D,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IACnB,kCAAkC;IAClC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,0DAA0D;IAC1D,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAClD,2DAA2D;IAC3D,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,kEAAkE;IAClE,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,wBAAgB,KAAK,CAAC,EACpB,CAAC,EACD,CAAC,EACD,GAAG,EACH,GAAG,EACH,IAAW,EACX,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,MAAM,GACP,EAAE,UAAU,2CA6CZ"}
1
+ {"version":3,"file":"point.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/point.tsx"],"names":[],"mappings":"AAmBA,MAAM,MAAM,UAAU,GAAG;IACvB,gCAAgC;IAChC,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IACnB,4DAA4D;IAC5D,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IACnB,kCAAkC;IAClC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,0DAA0D;IAC1D,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAClD,2DAA2D;IAC3D,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,kEAAkE;IAClE,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,wBAAgB,KAAK,CAAC,EACpB,CAAC,EACD,CAAC,EACD,GAAG,EACH,GAAG,EACH,IAAW,EACX,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,MAAM,GACP,EAAE,UAAU,+BA6CZ"}
@@ -6,5 +6,5 @@ export type PolygonFieldProps = {
6
6
  /** Display name; defaults to the uniform key. */
7
7
  readonly label?: string;
8
8
  };
9
- export declare function PolygonField({ uniform, points, label }: PolygonFieldProps): import("react/jsx-runtime").JSX.Element;
9
+ export declare function PolygonField({ uniform, points, label }: PolygonFieldProps): import("react").JSX.Element;
10
10
  //# sourceMappingURL=polygon-field.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"polygon-field.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/polygon-field.tsx"],"names":[],"mappings":"AAiBA,MAAM,MAAM,iBAAiB,GAAG;IAC9B,iFAAiF;IACjF,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,2EAA2E;IAC3E,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,iDAAiD;IACjD,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,wBAAgB,YAAY,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,iBAAiB,2CAmDzE"}
1
+ {"version":3,"file":"polygon-field.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/polygon-field.tsx"],"names":[],"mappings":"AAiBA,MAAM,MAAM,iBAAiB,GAAG;IAC9B,iFAAiF;IACjF,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,2EAA2E;IAC3E,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,iDAAiD;IACjD,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,wBAAgB,YAAY,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,iBAAiB,+BAmDzE"}
@@ -6,5 +6,5 @@ export type ReadoutProps = {
6
6
  readonly className?: string;
7
7
  readonly style?: StyleProp<TextStyle>;
8
8
  };
9
- export declare function Readout({ children, style }: ReadoutProps): import("react/jsx-runtime").JSX.Element;
9
+ export declare function Readout({ children, style }: ReadoutProps): import("react").JSX.Element;
10
10
  //# sourceMappingURL=readout.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"readout.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/readout.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAIzD,MAAM,MAAM,YAAY,GAAG;IACzB,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;IAC7B,iEAAiE;IACjE,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CACvC,CAAC;AAEF,wBAAgB,OAAO,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,YAAY,2CAKxD"}
1
+ {"version":3,"file":"readout.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/readout.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAIzD,MAAM,MAAM,YAAY,GAAG;IACzB,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;IAC7B,iEAAiE;IACjE,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CACvC,CAAC;AAEF,wBAAgB,OAAO,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,YAAY,+BAKxD"}
@@ -11,5 +11,5 @@ export type SliderProps = {
11
11
  readonly className?: string;
12
12
  readonly style?: StyleProp<ViewStyle>;
13
13
  };
14
- export declare function Slider({ uniform, min, max, step, label, style }: SliderProps): import("react/jsx-runtime").JSX.Element;
14
+ export declare function Slider({ uniform, min, max, step, label, style }: SliderProps): import("react").JSX.Element;
15
15
  //# sourceMappingURL=slider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"slider.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/slider.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AASzD,MAAM,MAAM,WAAW,GAAG;IACxB,qDAAqD;IACrD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,iDAAiD;IACjD,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,mFAAmF;IACnF,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CACvC,CAAC;AAEF,wBAAgB,MAAM,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,IAAW,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,WAAW,2CAkDnF"}
1
+ {"version":3,"file":"slider.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/slider.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AASzD,MAAM,MAAM,WAAW,GAAG;IACxB,qDAAqD;IACrD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,iDAAiD;IACjD,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,mFAAmF;IACnF,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CACvC,CAAC;AAEF,wBAAgB,MAAM,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,IAAW,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,WAAW,+BAkDnF"}
@@ -4,5 +4,5 @@ export type SwitchProps = {
4
4
  /** Display name; defaults to the uniform key. */
5
5
  readonly label?: string;
6
6
  };
7
- export declare function Switch({ uniform, label }: SwitchProps): import("react/jsx-runtime").JSX.Element;
7
+ export declare function Switch({ uniform, label }: SwitchProps): import("react").JSX.Element;
8
8
  //# sourceMappingURL=switch.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"switch.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/switch.tsx"],"names":[],"mappings":"AAOA,MAAM,MAAM,WAAW,GAAG;IACxB,4DAA4D;IAC5D,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,iDAAiD;IACjD,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,wBAAgB,MAAM,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,WAAW,2CAgBrD"}
1
+ {"version":3,"file":"switch.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/switch.tsx"],"names":[],"mappings":"AAOA,MAAM,MAAM,WAAW,GAAG;IACxB,4DAA4D;IAC5D,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,iDAAiD;IACjD,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,wBAAgB,MAAM,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,WAAW,+BAgBrD"}