@aglyn/shared-ui-jsx 1.0.0-beta.230 → 1.0.0-beta.232

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/package.json +5 -5
  2. package/src/lib/components/copy-field.component.d.ts +25 -0
  3. package/src/lib/components/copy-field.component.js +77 -0
  4. package/src/lib/components/copy-field.component.js.map +1 -0
  5. package/src/lib/components/download-cost-badge.component.d.ts +37 -0
  6. package/src/lib/components/download-cost-badge.component.js +89 -0
  7. package/src/lib/components/download-cost-badge.component.js.map +1 -0
  8. package/src/lib/components/file-drop-zone.component.d.ts +48 -0
  9. package/src/lib/components/file-drop-zone.component.js +173 -0
  10. package/src/lib/components/file-drop-zone.component.js.map +1 -0
  11. package/src/lib/components/list-query-notices.component.d.ts +1 -18
  12. package/src/lib/components/list-query-notices.component.js +1 -11
  13. package/src/lib/components/list-query-notices.component.js.map +1 -1
  14. package/src/lib/components/list-table.component.d.ts +12 -0
  15. package/src/lib/components/list-table.component.js +30 -4
  16. package/src/lib/components/list-table.component.js.map +1 -1
  17. package/src/lib/components/option-card-grid.component.d.ts +46 -0
  18. package/src/lib/components/option-card-grid.component.js +139 -0
  19. package/src/lib/components/option-card-grid.component.js.map +1 -0
  20. package/src/lib/components/searchable-virtual-list.component.d.ts +72 -0
  21. package/src/lib/components/searchable-virtual-list.component.js +212 -0
  22. package/src/lib/components/searchable-virtual-list.component.js.map +1 -0
  23. package/src/lib/components/site-live-notice.component.d.ts +39 -0
  24. package/src/lib/components/site-live-notice.component.js +95 -0
  25. package/src/lib/components/site-live-notice.component.js.map +1 -0
  26. package/src/lib/components/status-chip.component.d.ts +26 -0
  27. package/src/lib/components/status-chip.component.js +48 -0
  28. package/src/lib/components/status-chip.component.js.map +1 -0
  29. package/src/lib/const/list-filter-sentence.d.ts +1 -24
  30. package/src/lib/const/list-filter-sentence.js +3 -105
  31. package/src/lib/const/list-filter-sentence.js.map +1 -1
  32. package/src/lib/const/list-filter.d.ts +1 -219
  33. package/src/lib/const/list-filter.js +4 -282
  34. package/src/lib/const/list-filter.js.map +1 -1
  35. package/src/lib/const/list-grid-filter.d.ts +4 -25
  36. package/src/lib/const/list-grid-filter.js +20 -44
  37. package/src/lib/const/list-grid-filter.js.map +1 -1
  38. package/src/lib/const/list-query-plan.d.ts +1 -154
  39. package/src/lib/const/list-query-plan.js +4 -610
  40. package/src/lib/const/list-query-plan.js.map +1 -1
  41. package/src/lib/hooks/use-client-pagination.d.ts +25 -0
  42. package/src/lib/hooks/use-client-pagination.js +65 -0
  43. package/src/lib/hooks/use-client-pagination.js.map +1 -0
  44. package/src/lib/hooks/use-in-view.d.ts +16 -0
  45. package/src/lib/hooks/use-in-view.js +66 -0
  46. package/src/lib/hooks/use-in-view.js.map +1 -0
  47. package/src/lib/hooks/use-list-column-sort.d.ts +57 -0
  48. package/src/lib/hooks/use-list-column-sort.js +156 -0
  49. package/src/lib/hooks/use-list-column-sort.js.map +1 -0
  50. package/src/lib/hooks/use-viewport-fill.d.ts +39 -0
  51. package/src/lib/hooks/use-viewport-fill.js +64 -0
  52. package/src/lib/hooks/use-viewport-fill.js.map +1 -0
@@ -0,0 +1,64 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Aglyn LLC
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */ 'use client';
17
+ import { useCallback, useState } from "react";
18
+ import { useIsomorphicLayoutEffect } from "./use-isomorphic-layout-effect.js";
19
+ /**
20
+ * The height that takes an element from where it starts on the page to the
21
+ * bottom of the viewport.
22
+ *
23
+ * `100dvh` is the whole window, so a full-screen tool placed under the
24
+ * console's header, site nav, notices and page title came out taller than
25
+ * the screen by exactly that chrome, and the page scrolled to reach its own
26
+ * bottom (the POS register). This measures the element's top in DOCUMENT
27
+ * coordinates, which its own height never changes, so resizing to the
28
+ * answer cannot feed back into the measurement. It re-measures when the
29
+ * window resizes and when anything above it changes size (a notice
30
+ * dismissed, the nav wrapping).
31
+ *
32
+ * Until the first measurement (and on the server) it answers `fallback`.
33
+ */ export function useViewportFill(options = {}) {
34
+ const { min = 0, fallback = '100dvh' } = options;
35
+ const [element, setElement] = useState(null);
36
+ const [height, setHeight] = useState(null);
37
+ const ref = useCallback((node)=>setElement(node), []);
38
+ useIsomorphicLayoutEffect(()=>{
39
+ if (!element) return;
40
+ const measure = ()=>{
41
+ const top = element.getBoundingClientRect().top + window.scrollY;
42
+ const next = Math.max(min, Math.floor(window.innerHeight - top));
43
+ setHeight((current)=>current === next ? current : next);
44
+ };
45
+ measure();
46
+ window.addEventListener('resize', measure);
47
+ const observer = typeof ResizeObserver === 'undefined' ? null : new ResizeObserver(measure);
48
+ observer == null ? void 0 : observer.observe(document.body);
49
+ return ()=>{
50
+ window.removeEventListener('resize', measure);
51
+ observer == null ? void 0 : observer.disconnect();
52
+ };
53
+ }, [
54
+ element,
55
+ min
56
+ ]);
57
+ return {
58
+ ref,
59
+ height: height === null ? fallback : `${height}px`
60
+ };
61
+ }
62
+ export default useViewportFill;
63
+
64
+ //# sourceMappingURL=use-viewport-fill.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../../../../libs/shared/ui/jsx/src/lib/hooks/use-viewport-fill.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n'use client'\n\nimport { useCallback, useState } from 'react'\nimport { useIsomorphicLayoutEffect } from './use-isomorphic-layout-effect'\n\n/**\n * The height that takes an element from where it starts on the page to the\n * bottom of the viewport.\n *\n * `100dvh` is the whole window, so a full-screen tool placed under the\n * console's header, site nav, notices and page title came out taller than\n * the screen by exactly that chrome, and the page scrolled to reach its own\n * bottom (the POS register). This measures the element's top in DOCUMENT\n * coordinates, which its own height never changes, so resizing to the\n * answer cannot feed back into the measurement. It re-measures when the\n * window resizes and when anything above it changes size (a notice\n * dismissed, the nav wrapping).\n *\n * Until the first measurement (and on the server) it answers `fallback`.\n */\nexport function useViewportFill(options: { min?: number; fallback?: string } = {}) {\n const { min = 0, fallback = '100dvh' } = options\n const [element, setElement] = useState<HTMLElement | null>(null)\n const [height, setHeight] = useState<number | null>(null)\n const ref = useCallback((node: HTMLElement | null) => setElement(node), [])\n\n useIsomorphicLayoutEffect(() => {\n if (!element) return\n const measure = () => {\n const top = element.getBoundingClientRect().top + window.scrollY\n const next = Math.max(min, Math.floor(window.innerHeight - top))\n setHeight((current) => (current === next ? current : next))\n }\n measure()\n window.addEventListener('resize', measure)\n const observer =\n typeof ResizeObserver === 'undefined' ? null : new ResizeObserver(measure)\n observer?.observe(document.body)\n return () => {\n window.removeEventListener('resize', measure)\n observer?.disconnect()\n }\n }, [element, min])\n\n return { ref, height: height === null ? fallback : `${height}px` }\n}\n\nexport default useViewportFill\n"],"names":["useCallback","useState","useIsomorphicLayoutEffect","useViewportFill","options","min","fallback","element","setElement","height","setHeight","ref","node","measure","top","getBoundingClientRect","window","scrollY","next","Math","max","floor","innerHeight","current","addEventListener","observer","ResizeObserver","observe","document","body","removeEventListener","disconnect"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED;AAEA,SAASA,WAAW,EAAEC,QAAQ,QAAQ,QAAO;AAC7C,SAASC,yBAAyB,QAAQ,oCAAgC;AAE1E;;;;;;;;;;;;;;CAcC,GACD,OAAO,SAASC,gBAAgBC,UAA+C,CAAC,CAAC;IAC/E,MAAM,EAAEC,MAAM,CAAC,EAAEC,WAAW,QAAQ,EAAE,GAAGF;IACzC,MAAM,CAACG,SAASC,WAAW,GAAGP,SAA6B;IAC3D,MAAM,CAACQ,QAAQC,UAAU,GAAGT,SAAwB;IACpD,MAAMU,MAAMX,YAAY,CAACY,OAA6BJ,WAAWI,OAAO,EAAE;IAE1EV,0BAA0B;QACxB,IAAI,CAACK,SAAS;QACd,MAAMM,UAAU;YACd,MAAMC,MAAMP,QAAQQ,qBAAqB,GAAGD,GAAG,GAAGE,OAAOC,OAAO;YAChE,MAAMC,OAAOC,KAAKC,GAAG,CAACf,KAAKc,KAAKE,KAAK,CAACL,OAAOM,WAAW,GAAGR;YAC3DJ,UAAU,CAACa,UAAaA,YAAYL,OAAOK,UAAUL;QACvD;QACAL;QACAG,OAAOQ,gBAAgB,CAAC,UAAUX;QAClC,MAAMY,WACJ,OAAOC,mBAAmB,cAAc,OAAO,IAAIA,eAAeb;QACpEY,4BAAAA,SAAUE,OAAO,CAACC,SAASC,IAAI;QAC/B,OAAO;YACLb,OAAOc,mBAAmB,CAAC,UAAUjB;YACrCY,4BAAAA,SAAUM,UAAU;QACtB;IACF,GAAG;QAACxB;QAASF;KAAI;IAEjB,OAAO;QAAEM;QAAKF,QAAQA,WAAW,OAAOH,WAAW,GAAGG,OAAO,EAAE,CAAC;IAAC;AACnE;AAEA,eAAeN,gBAAe"}