react-native-webrtc-kaleidoscope 2.7.10 → 2.7.13

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 (107) hide show
  1. package/android/build.gradle +8 -3
  2. package/dist/catalog/composites/clouds/clouds.controls.d.ts +1 -1
  3. package/dist/catalog/composites/clouds/clouds.controls.d.ts.map +1 -1
  4. package/dist/catalog/composites/corporate-blobs/corporate-blobs.controls.d.ts +1 -1
  5. package/dist/catalog/composites/corporate-blobs/corporate-blobs.controls.d.ts.map +1 -1
  6. package/dist/catalog/composites/fairy-cave/fairy-cave.controls.d.ts +1 -1
  7. package/dist/catalog/composites/fairy-cave/fairy-cave.controls.d.ts.map +1 -1
  8. package/dist/catalog/composites/fairy-grotto/fairy-grotto.controls.d.ts +1 -1
  9. package/dist/catalog/composites/fairy-grotto/fairy-grotto.controls.d.ts.map +1 -1
  10. package/dist/catalog/composites/fairy-hollow/fairy-hollow.controls.d.ts +1 -1
  11. package/dist/catalog/composites/fairy-hollow/fairy-hollow.controls.d.ts.map +1 -1
  12. package/dist/catalog/composites/nebula/nebula.controls.d.ts +1 -1
  13. package/dist/catalog/composites/nebula/nebula.controls.d.ts.map +1 -1
  14. package/dist/catalog/composites/observation-deck/observation-deck.controls.d.ts +1 -1
  15. package/dist/catalog/composites/observation-deck/observation-deck.controls.d.ts.map +1 -1
  16. package/dist/catalog/composites/simianlights/simianlights.controls.d.ts +1 -1
  17. package/dist/catalog/composites/simianlights/simianlights.controls.d.ts.map +1 -1
  18. package/dist/catalog/composites/underwater/underwater.controls.d.ts +1 -1
  19. package/dist/catalog/composites/underwater/underwater.controls.d.ts.map +1 -1
  20. package/dist/catalog/composites/wizard-tower/wizard-tower.controls.d.ts +1 -1
  21. package/dist/catalog/composites/wizard-tower/wizard-tower.controls.d.ts.map +1 -1
  22. package/dist/catalog/composites/wizard-tower-night/wizard-tower-night.controls.d.ts +1 -1
  23. package/dist/catalog/composites/wizard-tower-night/wizard-tower-night.controls.d.ts.map +1 -1
  24. package/dist/catalog/shaders/anamorphic-lensflare/anamorphic-lensflare.form.d.ts +1 -1
  25. package/dist/catalog/shaders/anamorphic-lensflare/anamorphic-lensflare.form.d.ts.map +1 -1
  26. package/dist/catalog/shaders/aurora-silk/aurora-silk.form.d.ts +1 -1
  27. package/dist/catalog/shaders/aurora-silk/aurora-silk.form.d.ts.map +1 -1
  28. package/dist/catalog/shaders/blur/blur.form.d.ts +1 -1
  29. package/dist/catalog/shaders/blur/blur.form.d.ts.map +1 -1
  30. package/dist/catalog/shaders/clouds/clouds.form.d.ts +1 -1
  31. package/dist/catalog/shaders/clouds/clouds.form.d.ts.map +1 -1
  32. package/dist/catalog/shaders/corporate-blobs/corporate-blobs.form.d.ts +1 -1
  33. package/dist/catalog/shaders/corporate-blobs/corporate-blobs.form.d.ts.map +1 -1
  34. package/dist/catalog/shaders/data-mesh/data-mesh.form.d.ts +1 -1
  35. package/dist/catalog/shaders/data-mesh/data-mesh.form.d.ts.map +1 -1
  36. package/dist/catalog/shaders/fireflies/fireflies.form.d.ts +1 -1
  37. package/dist/catalog/shaders/fireflies/fireflies.form.d.ts.map +1 -1
  38. package/dist/catalog/shaders/godrays/godrays.form.d.ts +1 -1
  39. package/dist/catalog/shaders/godrays/godrays.form.d.ts.map +1 -1
  40. package/dist/catalog/shaders/halftone-waves/halftone-waves.form.d.ts +1 -1
  41. package/dist/catalog/shaders/halftone-waves/halftone-waves.form.d.ts.map +1 -1
  42. package/dist/catalog/shaders/kaleidoscope/kaleidoscope.form.d.ts +1 -1
  43. package/dist/catalog/shaders/kaleidoscope/kaleidoscope.form.d.ts.map +1 -1
  44. package/dist/catalog/shaders/light-beams-and-motes/light-beams-and-motes.form.d.ts +1 -1
  45. package/dist/catalog/shaders/light-beams-and-motes/light-beams-and-motes.form.d.ts.map +1 -1
  46. package/dist/catalog/shaders/nebula/nebula.form.d.ts +1 -1
  47. package/dist/catalog/shaders/nebula/nebula.form.d.ts.map +1 -1
  48. package/dist/catalog/shaders/neo-memphis/neo-memphis.form.d.ts +1 -1
  49. package/dist/catalog/shaders/neo-memphis/neo-memphis.form.d.ts.map +1 -1
  50. package/dist/catalog/shaders/outrun-grid/outrun-grid.form.d.ts +1 -1
  51. package/dist/catalog/shaders/outrun-grid/outrun-grid.form.d.ts.map +1 -1
  52. package/dist/catalog/shaders/plasma/plasma.form.d.ts +1 -1
  53. package/dist/catalog/shaders/plasma/plasma.form.d.ts.map +1 -1
  54. package/dist/catalog/shaders/simianlights/simianlights.form.d.ts +1 -1
  55. package/dist/catalog/shaders/simianlights/simianlights.form.d.ts.map +1 -1
  56. package/dist/src/components/form/control-form.d.ts +1 -1
  57. package/dist/src/components/form/control-form.d.ts.map +1 -1
  58. package/dist/src/components/preset-book-menu/index.d.ts +1 -1
  59. package/dist/src/components/preset-book-menu/index.d.ts.map +1 -1
  60. package/dist/src/components/preset-book-menu/index.js +3 -4
  61. package/dist/src/components/preset-book-menu/index.js.map +1 -1
  62. package/dist/src/components/preset-book-menu/layout.d.ts +1 -1
  63. package/dist/src/components/preset-book-menu/layout.d.ts.map +1 -1
  64. package/dist/src/components/preset-book-menu/preset-grid.d.ts +1 -1
  65. package/dist/src/components/preset-book-menu/preset-grid.d.ts.map +1 -1
  66. package/dist/src/components/preset-book-menu/thumbnail-source.d.ts +2 -0
  67. package/dist/src/components/preset-book-menu/thumbnail-source.d.ts.map +1 -0
  68. package/dist/src/components/preset-book-menu/thumbnail-source.js +19 -0
  69. package/dist/src/components/preset-book-menu/thumbnail-source.js.map +1 -0
  70. package/dist/src/components/preset-control-panel/composite-layer-control-panel.d.ts +1 -1
  71. package/dist/src/components/preset-control-panel/composite-layer-control-panel.d.ts.map +1 -1
  72. package/dist/src/components/preset-control-panel/control-section.d.ts +1 -1
  73. package/dist/src/components/preset-control-panel/control-section.d.ts.map +1 -1
  74. package/dist/src/components/preset-control-panel/mask-control-panel.d.ts +1 -1
  75. package/dist/src/components/preset-control-panel/mask-control-panel.d.ts.map +1 -1
  76. package/dist/src/components/preset-control-panel/transform-control-panel.d.ts +1 -1
  77. package/dist/src/components/preset-control-panel/transform-control-panel.d.ts.map +1 -1
  78. package/dist/src/components/preset-control-panel/transform-control-panel.js +2 -2
  79. package/dist/src/components/preset-control-panel/transform-control-panel.js.map +1 -1
  80. package/dist/src/components/preset-tile/index.d.ts +1 -1
  81. package/dist/src/components/preset-tile/index.d.ts.map +1 -1
  82. package/dist/src/components/preset-tile/index.js +7 -5
  83. package/dist/src/components/preset-tile/index.js.map +1 -1
  84. package/dist/src/components/theme/provider.d.ts +1 -1
  85. package/dist/src/components/theme/provider.d.ts.map +1 -1
  86. package/dist/src/components/ui/button.d.ts +1 -1
  87. package/dist/src/components/ui/button.d.ts.map +1 -1
  88. package/dist/src/components/ui/color-picker.d.ts +1 -1
  89. package/dist/src/components/ui/color-picker.d.ts.map +1 -1
  90. package/dist/src/components/ui/label.d.ts +1 -1
  91. package/dist/src/components/ui/label.d.ts.map +1 -1
  92. package/dist/src/components/ui/point.d.ts +1 -1
  93. package/dist/src/components/ui/point.d.ts.map +1 -1
  94. package/dist/src/components/ui/polygon-field.d.ts +1 -1
  95. package/dist/src/components/ui/polygon-field.d.ts.map +1 -1
  96. package/dist/src/components/ui/readout.d.ts +1 -1
  97. package/dist/src/components/ui/readout.d.ts.map +1 -1
  98. package/dist/src/components/ui/slider.d.ts +1 -1
  99. package/dist/src/components/ui/slider.d.ts.map +1 -1
  100. package/dist/src/components/ui/switch.d.ts +1 -1
  101. package/dist/src/components/ui/switch.d.ts.map +1 -1
  102. package/llms.txt +15 -2
  103. package/package.json +13 -15
  104. package/src/components/preset-book-menu/index.tsx +3 -4
  105. package/src/components/preset-book-menu/thumbnail-source.ts +16 -0
  106. package/src/components/preset-control-panel/transform-control-panel.tsx +3 -1
  107. package/src/components/preset-tile/index.tsx +8 -4
@@ -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,MAAM,GAAG,CAAC,EACV,QAAQ,EACR,QAAQ,GAAG,KAAK,EAChB,YAAY,GAAG,iCAAuB,GACX;IAC3B,MAAM,CAAC,GAAG,IAAI,EAAE,CAAC,IAAI,KAAK,CAAC;IAC3B,MAAM,CAAC,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,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,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,Y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,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,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IAC1C,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACxC,QAAQ,C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K,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,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;AAE7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,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,QAAQ,EAAE,kBACrC,QAAQ,EACtB,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE;YACL,MAAM,CAAC,IAAI;YACX,YAAY,CAAC,CAAC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ACpB,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"}
package/llms.txt CHANGED
@@ -16,11 +16,11 @@ It is **not** a fork of `react-native-webrtc`, **not** a managed-cloud SaaS, and
16
16
 
17
17
  ```sh
18
18
  bun add react-native-webrtc react-native-webrtc-kaleidoscope
19
- bunx expo install expo-build-properties expo-dev-client
19
+ bunx expo install expo-asset expo-build-properties expo-dev-client
20
20
  # or npm install / yarn add / pnpm add
21
21
  ```
22
22
 
23
- Peer dependencies: `expo` (>=51), `expo-asset` (>=10, already a dependency of `expo`), `react` (>=18.2), `react-native` (>=0.74). `react-native-webrtc` (>=124) is an **optional** peer you supply (or `@livekit/react-native-webrtc` + `livekit-client` if you use the `/livekit` adapter; pick ONE fork, never both). `nativewind` (>=4) and `@react-native-community/slider` (>=4.5) are **optional** peers, only needed for the styled UI / live-controls extras.
23
+ Peer dependencies: `expo` (>=51), `expo-asset` (>=10; install it directly with `expo install` even though `expo` depends on it: `expo-doctor` requires native-module peers to be direct dependencies and warns the app may crash outside Expo Go otherwise), `react` (>=18.2), `react-native` (>=0.74). `react-native-webrtc` (>=124) is an **optional** peer you supply (or `@livekit/react-native-webrtc` + `livekit-client` if you use the `/livekit` adapter; pick ONE fork, never both). `nativewind` (>=4) and `@react-native-community/slider` (>=4.5) are **optional** peers, only needed for the styled UI / live-controls extras.
24
24
 
25
25
  ## Configure (copy-paste; every entry here is load-bearing)
26
26
 
@@ -563,6 +563,19 @@ setMaskTuning({ hardness: 0.2, threshold: 0.85 }); // the mask verb's twin on th
563
563
  - **Android** native >= API 24; OpenGL ES 3.0 pipeline; MediaPipe Tasks segmentation.
564
564
  - **Web** Chromium browsers with `MediaStreamTrackProcessor`; WebGL2 compositor; MediaPipe Selfie Segmentation (WASM).
565
565
 
566
+ ## Upgrading dependencies: verify on Android, never on web alone
567
+
568
+ **Any dependency upgrade that can reach the binary MUST be verified with a real Android build before you ship it.** This is the fastest way to break a React Native app, and it is the failure mode web testing cannot see: the web pipeline fetches assets as URLs and runs entirely in JS, so it never exercises native autolinking, the Gradle build, native asset bundling, the manifest merger, or the ABI split. A change can be green on web and on every typecheck and unit test while the Android app fails to build or crashes on launch.
569
+
570
+ "Can reach the binary" covers more than it first appears: `react-native` and `expo` themselves, any package with an `android/` directory or a podspec (`react-native-webrtc`, `@react-native-async-storage/async-storage`, `@react-native-community/slider`, `react-native-webrtc-kaleidoscope`), anything an Expo config plugin touches (`expo-build-properties` and the SDK version that sets `minSdkVersion`, `compileSdkVersion`, and the iOS deployment target), and transitive native dependencies a lockfile refresh may move underneath you. A pure JS or types-only bump is the only safe exception, and a lockfile refresh can turn one of those into a native one without warning.
571
+
572
+ The verification, in order:
573
+
574
+ 1. **Check alignment first.** Run `bunx expo-doctor` and `bunx react-native doctor` (or the `npx` equivalents) and resolve what they report. Doctor catches SDK-to-package version drift, duplicate or mismatched native dependencies, and misconfigured build settings faster than reading a diff does, and version compatibility is not something to settle by inspection.
575
+ 2. **Build the Android app, do not just compile the module.** A Gradle module compile proves the Kotlin still typechecks; it does not prove the app links, packages, and starts. Produce an installable artifact (`npx expo run:android`, `./gradlew assembleRelease`, or an EAS build).
576
+ 3. **Run it and look at it.** Install on an emulator or a device, launch, exercise the effects, and confirm no crash and no blank render. Bundled images and thumbnails in particular resolve by a native path that only a standalone build exercises, so a web run or a Metro dev-client run can hide a broken asset entirely.
577
+ 4. **Then confirm on iOS and web.** Android is the first gate because it is where dependency drift surfaces soonest, not because the other two platforms are optional.
578
+
566
579
  ## The demo is the canonical working example
567
580
 
568
581
  The repo's `demo/` is a complete consuming app exercising everything above on all three platforms: `demo/app.config.js` (the config-plugin + build-properties + permissions wiring, with comments explaining each entry), `demo/kaleidoscope.preset-book.ts` (a full book including a consumer-owned `wolf-cave.webp` background and per-preset `controls`), `demo/src/use-loopback-stream{,.web}.ts` and `demo/src/video-preview{,.web}.tsx` (the platform-split wiring), and `demo/app/index.tsx` (picker + editor + verbs on one screen). When this file and the demo disagree, trust the demo and file an issue: https://github.com/simiancraft/react-native-webrtc-kaleidoscope
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-webrtc-kaleidoscope",
3
- "version": "2.7.10",
3
+ "version": "2.7.13",
4
4
  "description": "Live video effects (blur, background replacement, generative backgrounds, flip/rotate) for react-native-webrtc, packaged as a managed-Expo-friendly Expo Module. Working on web, Android, and iOS. Active development.",
5
5
  "keywords": [
6
6
  "react-native",
@@ -557,9 +557,9 @@
557
557
  ],
558
558
  "scripts": {
559
559
  "clean": "rm -rf dist",
560
- "build": "bun run clean && tsgo -p tsconfig.build.json && bun run copy:assets",
561
- "typecheck": "tsgo --noEmit",
562
- "typecheck:test": "tsgo --noEmit --project tsconfig.test.json",
560
+ "build": "bun run clean && tsc -p tsconfig.build.json && bun run copy:assets",
561
+ "typecheck": "tsc --noEmit",
562
+ "typecheck:test": "tsc --noEmit --project tsconfig.test.json",
563
563
  "typecheck:demo": "cd demo && bunx tsc --noEmit",
564
564
  "prepare": "command -v lefthook >/dev/null 2>&1 && lefthook install || true",
565
565
  "lint": "biome check",
@@ -570,7 +570,7 @@
570
570
  "check:assets": "bun run scripts/check-book-assets.ts",
571
571
  "check:package": "publint --strict",
572
572
  "check:knip": "knip",
573
- "check:react-compiler": "eslint src/components 'catalog/composites/**/*.controls.tsx' 'catalog/shaders/**/*.form.tsx'",
573
+ "check:react-compiler": "bun install --cwd tools/lint --frozen-lockfile --silent && eslint src/components 'catalog/composites/**/*.controls.tsx' 'catalog/shaders/**/*.form.tsx'",
574
574
  "check:kotlin": "bun run scripts/ktlint.ts",
575
575
  "format:kotlin": "bun run scripts/ktlint.ts --format",
576
576
  "check:swift": "bun run scripts/swift.ts",
@@ -635,31 +635,29 @@
635
635
  },
636
636
  "devDependencies": {
637
637
  "@biomejs/biome": "^2.5.14",
638
- "@expo/config-plugins": "~56.0.16",
638
+ "@expo/config-plugins": "~57.0.10",
639
639
  "@react-native-async-storage/async-storage": "1.24.0",
640
640
  "@react-native-community/slider": "5.2.1",
641
641
  "@semantic-release/changelog": "^7.0.0",
642
642
  "@semantic-release/git": "^11.0.1",
643
643
  "@semantic-release/npm": "^13.1.5",
644
644
  "@types/bun": "^1.4.2",
645
- "@types/react": "~18.2.79",
646
- "@typescript-eslint/parser": "^8.70.0",
647
- "@typescript/native-preview": "7.0.0-dev.20260707.2",
645
+ "@types/react": "~19.2.10",
648
646
  "eslint": "^10.11.0",
649
- "eslint-plugin-react-compiler": "^19.1.0-rc.2",
650
- "expo": "^51.0.39",
651
- "expo-modules-core": "^56.0.26",
647
+ "expo": "^57.0.28",
648
+ "expo-asset": "~57.0.19",
649
+ "expo-modules-core": "~57.0.22",
652
650
  "knip": "^6.37.0",
653
651
  "lefthook": "^2.1.14",
654
652
  "livekit-client": "^2.22.3",
655
653
  "nativewind": "4.2.x",
656
654
  "playwright": "1.63.0",
657
655
  "publint": "^0.3.24",
658
- "react": "18.2.0",
659
- "react-native": "0.74.5",
656
+ "react": "19.2.3",
657
+ "react-native": "0.86.3",
660
658
  "react-native-webrtc": "^124.0.8",
661
659
  "semantic-release": "^25.0.9",
662
- "typescript": "^6.0.3"
660
+ "typescript": "^7.0.2"
663
661
  },
664
662
  "publishConfig": {
665
663
  "access": "public",
@@ -12,6 +12,7 @@ import { categoryTestId, familyTestId } from '../../lib/test-id';
12
12
  import { PresetBookMenuLayout } from './layout';
13
13
  import type { Category, Family, PresetBookMenuProps, PresetView } from './preset-book-menu.types';
14
14
  import { PresetGrid } from './preset-grid';
15
+ import { thumbnailSource } from './thumbnail-source';
15
16
 
16
17
  /** The grouping usePresetBookMenu returns; named so BYO-layout consumers can type it. */
17
18
  export interface PresetBookMenuModel {
@@ -148,10 +149,7 @@ export function usePresetBookMenu<P extends KaleidoscopePresetBook>(
148
149
  label: labelFor?.(id as keyof P & string) ?? preset.name,
149
150
  family,
150
151
  category,
151
- source:
152
- typeof preset.thumbnail === 'string' || typeof preset.thumbnail === 'number'
153
- ? preset.thumbnail
154
- : undefined,
152
+ source: thumbnailSource(preset.thumbnail),
155
153
  };
156
154
  if (!viewsByFamily.has(family)) {
157
155
  families.push(family);
@@ -207,6 +205,7 @@ function Tab({ label, active, disabled, onPress, testID }: TabProps) {
207
205
  <Pressable
208
206
  accessibilityRole="tab"
209
207
  accessibilityState={{ selected: active, disabled }}
208
+ aria-selected={active}
210
209
  testID={testID}
211
210
  disabled={disabled}
212
211
  onPress={onPress}
@@ -0,0 +1,16 @@
1
+ // Normalize a preset's `thumbnail` into the source the picker renders: a string
2
+ // (web URL or native preset name) or a number (a Metro asset module id). From
3
+ // Expo SDK 57, a web `require('./x.webp')` yields an asset object
4
+ // `{ uri, width, height }` rather than a URL string; its `uri` is the URL.
5
+ export function thumbnailSource(thumbnail: unknown): string | number | undefined {
6
+ if (typeof thumbnail === 'string' || typeof thumbnail === 'number') return thumbnail;
7
+ if (
8
+ thumbnail !== null &&
9
+ typeof thumbnail === 'object' &&
10
+ 'uri' in thumbnail &&
11
+ typeof thumbnail.uri === 'string'
12
+ ) {
13
+ return thumbnail.uri;
14
+ }
15
+ return undefined;
16
+ }
@@ -43,6 +43,7 @@ function FlipToggle({
43
43
  accessibilityRole="switch"
44
44
  accessibilityLabel={accessibilityLabel}
45
45
  accessibilityState={{ checked: on, disabled }}
46
+ aria-checked={on}
46
47
  testID={testID}
47
48
  disabled={disabled}
48
49
  onPress={onPress}
@@ -99,7 +100,8 @@ export function TransformControlPanel({
99
100
  key={deg}
100
101
  accessibilityRole="radio"
101
102
  accessibilityLabel={deg === 0 ? 'No rotation' : `Rotate ${deg} degrees`}
102
- accessibilityState={{ selected: on, disabled }}
103
+ accessibilityState={{ checked: on, disabled }}
104
+ aria-checked={on}
103
105
  testID={rotateTestId(testIDPrefix, deg)}
104
106
  disabled={disabled}
105
107
  onPress={() => onChange({ flip: { x, y }, rotate: deg })}