@sheetxl/utils-react 0.8.0-beta.7 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/LICENSE.md +17 -7
  2. package/browser/esm/{Bw28AK_GmLacWQL9.mjs → B40op1SaLNqvFHlg.mjs} +2 -2
  3. package/browser/esm/{i81p_jZjY1WbfES8.mjs → BIiHroifM2tesCns.mjs} +22 -21
  4. package/browser/esm/DKfTbMgV21FBnNOl.mjs +100 -0
  5. package/browser/esm/index.mjs +2668 -2134
  6. package/licenses/dependencies.txt +1 -39
  7. package/node/esm/DGnB_ajTnvY63CO9.mjs +100 -0
  8. package/node/esm/{DTFDut0Eizkfjl77.mjs → DmRJGz37SB1KXyjc.mjs} +2 -2
  9. package/node/esm/index.mjs +2352 -1826
  10. package/package.json +9 -12
  11. package/types/src/animation/useAnimatedMeasure.d.ts +2 -3
  12. package/types/src/command/CommandButtonRegistry.d.ts +3 -1
  13. package/types/src/command/CommandScope.d.ts +23 -2
  14. package/types/src/components/RenderSlot.d.ts +32 -0
  15. package/types/src/components/index.d.ts +1 -1
  16. package/types/src/float/FloatPanel.d.ts +7 -6
  17. package/types/src/float/FloatPopper.d.ts +84 -10
  18. package/types/src/float/FloatPopup.d.ts +1 -1
  19. package/types/src/float/FloatProvider.d.ts +3 -2
  20. package/types/src/float/FloatStackContext.d.ts +8 -0
  21. package/types/src/float/FloatUtils.d.ts +3 -2
  22. package/types/src/float/_FloatTheme.d.ts +16 -0
  23. package/types/src/float/_FloatUtils.d.ts +6 -0
  24. package/types/src/float/index.d.ts +0 -1
  25. package/types/src/float/useFloatStack.d.ts +6 -5
  26. package/types/src/hooks/index.d.ts +4 -0
  27. package/types/src/hooks/useCallbackRef.d.ts +19 -6
  28. package/types/src/hooks/useEditMode.d.ts +26 -6
  29. package/types/src/hooks/useInputModality.d.ts +26 -0
  30. package/types/src/hooks/useLocationSearch.d.ts +9 -0
  31. package/types/src/hooks/useMeasure.d.ts +32 -0
  32. package/types/src/hooks/useNotifier.d.ts +35 -34
  33. package/types/src/hooks/useSynchronizedPointerHandler.d.ts +3 -7
  34. package/types/src/hooks/useVisualViewportRect.d.ts +40 -0
  35. package/types/src/icons/packs/Base.json.d.ts +3624 -0
  36. package/types/src/index.d.ts +2 -0
  37. package/types/src/lazy/lazyComponent.d.ts +9 -2
  38. package/types/src/persistence/Types.d.ts +4 -2
  39. package/types/src/persistence/usePersistentState.d.ts +3 -0
  40. package/types/src/render/PendingRender.d.ts +43 -0
  41. package/types/src/render/index.d.ts +2 -0
  42. package/types/src/scroll/AxisViewport.d.ts +6 -2
  43. package/types/src/scroll/IScrollPane.d.ts +17 -4
  44. package/types/src/scroll/IScrollbar.d.ts +5 -2
  45. package/types/src/scroll/ScrollButton.d.ts +3 -3
  46. package/types/src/scroll/Utils.d.ts +1 -0
  47. package/types/src/scroll/Viewport.d.ts +50 -2
  48. package/types/src/scroll/VirtualScrollbar.d.ts +2 -1
  49. package/types/src/scroll/scrollbarTheming.d.ts +2 -23
  50. package/types/src/scroll/touchOwner.d.ts +19 -0
  51. package/types/src/scroll/useWheelScroll.d.ts +15 -2
  52. package/types/src/scroll/wheelOwner.d.ts +18 -0
  53. package/types/src/scroller/Scroller.d.ts +44 -5
  54. package/types/src/splitPane/SplitPane.d.ts +3 -1
  55. package/types/src/theme/ThemeStyle.d.ts +22 -0
  56. package/types/src/theme/TokenTheme.d.ts +10 -1
  57. package/types/src/theme/buildThemeCSS.d.ts +9 -0
  58. package/types/src/theme/defaultTheme.d.ts +6 -0
  59. package/types/src/theme/index.d.ts +3 -1
  60. package/types/src/theme/themeAttrs.d.ts +5 -4
  61. package/types/src/theme/tokenVar.d.ts +20 -0
  62. package/types/src/theme/useResolvedThemeMode.d.ts +27 -5
  63. package/types/src/theme/zIndex.d.ts +24 -0
  64. package/types/src/utils/index.d.ts +1 -0
  65. package/types/src/utils/measureUIText.d.ts +24 -0
  66. package/types/src/virtualKeyboard/KeyboardAccessory.d.ts +73 -0
  67. package/types/src/virtualKeyboard/VirtualKeyboard.d.ts +128 -0
  68. package/types/src/virtualKeyboard/_keyboardApi.d.ts +13 -0
  69. package/types/src/virtualKeyboard/index.d.ts +4 -0
  70. package/types/src/virtualKeyboard/useKeyboardResize.d.ts +41 -0
  71. package/browser/cjs/DZSvmqU8nRas1uz6.cjs +0 -1
  72. package/browser/cjs/YFvC9nIpxy3b5ZTk.cjs +0 -1
  73. package/browser/cjs/index.cjs +0 -5
  74. package/browser/cjs/wW5CllvkH2ZVrahP.cjs +0 -1
  75. package/browser/esm/B5GygXf0YyM0P3w6.mjs +0 -2231
  76. package/node/esm/Cwt7wlb1TEVLnVZr.mjs +0 -2231
  77. package/types/src/components/ITooltip.d.ts +0 -38
  78. package/types/src/float/FloatTooltip.d.ts +0 -22
  79. package/types/src/theme/TokenThemeProvider.d.ts +0 -97
  80. package/types/src/utils/PinchZoom.d.ts +0 -3
package/LICENSE.md CHANGED
@@ -1,11 +1,21 @@
1
- # Repository Licensing
1
+ MIT License
2
2
 
3
- SheetXL contains a mix of open-source and commercially licensed packages. Each package is individually licensed and contains its own license file.
3
+ Copyright (c) 2026-present SheetXL Inc. & Michael T. Ford
4
4
 
5
- For the specific terms and conditions applicable to a package, please see the `LICENSE.md` file located in that package's root directory.
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
6
11
 
7
- Generally, packages intended for public distribution (such as CLIs, adapters, and vanilla wrappers) are licensed under the MIT license. All other core packages are proprietary and require a commercial license for use.
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
8
14
 
9
- For more details on commercial licensing, please visit our website:
10
-
11
- https://www.sheetxl.com/docs/guides/licensing-pricing
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -1,8 +1,8 @@
1
1
  /**
2
- * @license @sheetxl/utils-react - Utils React - Utilities for React capabilities needed for all SheetXL components. - v0.8.0-beta.7
2
+ * @license @sheetxl/utils-react - Utils React - Utilities for React capabilities needed for all SheetXL components. - v1.0.0
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
- * License: The license can be found at https://www.sheetxl.com/license.
5
+ * License: MIT
6
6
  */
7
7
  var e = (e) => Math.round(100 * e) / 100, t = (t) => t.map(([t, n], r) => `${r ? "L" : "M"}${e(t)} ${e(n)}`).join(" ") + "Z", n = (e, t) => {
8
8
  let n = t * Math.PI / 180, r = Math.cos(n), i = Math.sin(n);
@@ -1,8 +1,8 @@
1
1
  /**
2
- * @license @sheetxl/utils-react - Utils React - Utilities for React capabilities needed for all SheetXL components. - v0.8.0-beta.7
2
+ * @license @sheetxl/utils-react - Utils React - Utilities for React capabilities needed for all SheetXL components. - v1.0.0
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
- * License: The license can be found at https://www.sheetxl.com/license.
5
+ * License: MIT
6
6
  */
7
7
  import { CommonUtils as e } from "@sheetxl/utils";
8
8
  import { memo as t, useEffect as n, useMemo as r, useState as i } from "react";
@@ -277,35 +277,36 @@ function d() {
277
277
  };
278
278
  }
279
279
  var f = d();
280
- f.register("base", () => import("./B5GygXf0YyM0P3w6.mjs")), f.register("cf", () => import("./Bw28AK_GmLacWQL9.mjs"));
280
+ f.register("base", () => import("./DKfTbMgV21FBnNOl.mjs")), f.register("cf", () => import("./B40op1SaLNqvFHlg.mjs"));
281
281
  var p = (e) => a("svg", {
282
282
  ...e,
283
283
  children: a("path", {})
284
284
  }), m = {
285
- Icon: "_Icon_16f7r_10",
286
- "sxl-walk": "_sxl-walk_16f7r_1"
285
+ Icon: "_Icon_1cewm_10",
286
+ "sxl-walk": "_sxl-walk_1cewm_1"
287
287
  }, h = t((t) => {
288
288
  let { iconKey: o, packKey: s, className: c, style: l, role: u, title: d, size: h, ariaHidden: g, propsSource: _, children: v, ...y } = t, [b, x] = i(null);
289
289
  n(() => {
290
290
  let t = !0, n = s, r = o;
291
- if (!r) {
291
+ if (r) {
292
+ if (r.includes(":")) {
293
+ let [e, t] = r.split(":");
294
+ n = e, r = t;
295
+ }
296
+ return f.resolve(r, { packKey: n }).then((e) => {
297
+ t && x(e);
298
+ }).catch(() => {}), () => {
299
+ t = !1;
300
+ };
301
+ }
302
+ {
292
303
  let t = f.getPack(n);
293
304
  x({
294
305
  glyph: t ? { svg: e.EmptyArray } : void 0,
295
306
  pack: t ?? void 0,
296
307
  packKey: n ?? f.getActive()
297
308
  });
298
- return;
299
309
  }
300
- if (r.includes(":")) {
301
- let [e, t] = r.split(":");
302
- n = e, r = t;
303
- }
304
- return f.resolve(r, { packKey: n }).then((e) => {
305
- t && x(e);
306
- }).catch(() => {}), () => {
307
- t = !1;
308
- };
309
310
  }, [o, s]);
310
311
  let S = b?.pack, C = b?.glyph, w = b?.packKey, T = C ? C.svg : void 0, E = C && !T ? C.url : void 0, D = !C || T || E ? void 0 : C.emoji, O = h == null ? void 0 : typeof h == "number" ? `${h}px` : h, k = r(() => [
311
312
  m.Icon,
@@ -332,8 +333,7 @@ var p = (e) => a("svg", {
332
333
  alt: d ?? ""
333
334
  }));
334
335
  if (C && "react" in C) {
335
- let e = C.react;
336
- return N(a(e, {
336
+ let e = C.react, t = {
337
337
  className: k,
338
338
  style: A,
339
339
  role: j,
@@ -341,7 +341,8 @@ var p = (e) => a("svg", {
341
341
  title: d,
342
342
  ...y,
343
343
  ..._
344
- }));
344
+ };
345
+ return N(a(e, { ...t }));
345
346
  }
346
347
  let P = { viewBox: T?.viewBox ?? S?.meta.defaultViewBox ?? "0 0 24 24" };
347
348
  if (typeof T == "function") return N(T(P) ?? a(p, { ...P }));
@@ -375,11 +376,11 @@ function g(e) {
375
376
  o,
376
377
  s,
377
378
  n
378
- ]);
379
+ ]), m = r(() => t ? d + " walking" : d, [t, d]);
379
380
  return a(h, {
380
381
  iconKey: c,
381
382
  packKey: l,
382
- className: r(() => t ? d + " walking" : d, [t, d]),
383
+ className: m,
383
384
  style: {
384
385
  ...u,
385
386
  ...p