@vireo-ai/trellis-ui 0.1.48 → 0.1.49

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 (103) hide show
  1. package/package.json +5 -5
  2. package/packages/client/src/styles/generated/theme-fonts.css +1 -1
  3. package/packages/client/src/styles/generated/theme-palette.css +1 -1
  4. package/packages/client/src/styles/generated/theme-runtime.css +13 -13
  5. package/packages/client/types/component-api.d.ts +3 -1
  6. package/packages/client/types/components/data-grid/contract.d.ts +1 -0
  7. package/packages/client/types/components/data-grid/index.d.ts +28 -4
  8. package/packages/client/types/components/runtime.d.ts +1 -1
  9. package/packages/client/types/components/virtualizer/contract.d.ts +1 -29
  10. package/packages/client/types/components/virtualizer/cursor.d.ts +1 -0
  11. package/packages/client/types/components/virtualizer/index.d.ts +2 -28
  12. package/packages/client/types/runtime/cursor-data-source.d.ts +45 -0
  13. package/packages/client/types/runtime/focus-handoff.d.ts +11 -0
  14. package/packages/client/types/runtime/virtualizer-schema.d.ts +29 -0
  15. package/packages/client/types/runtime/virtualizer.d.ts +41 -0
  16. package/packages/server/trellis_ui/static/trellis_ui/assets/css/trellis.css +12 -12
  17. package/packages/server/trellis_ui/static/trellis_ui/assets/css/trellis.min.css +1 -1
  18. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/build-metadata.json +306 -289
  19. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/motion.js +1 -1
  20. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/shortcut.js +1 -1
  21. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/capabilities/sortable.js +1 -1
  22. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{capability-motion-C8JwDQHB.js → capability-motion-DoZROkFD.js} +2 -2
  23. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{capability-motion-C8JwDQHB.js.map → capability-motion-DoZROkFD.js.map} +1 -1
  24. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-shortcut-BoDF_wQX.js +2 -0
  25. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-shortcut-BoDF_wQX.js.map +1 -0
  26. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{capability-sortable-Ms02uATJ.js → capability-sortable-DtSghTO8.js} +2 -2
  27. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{capability-sortable-Ms02uATJ.js.map → capability-sortable-DtSghTO8.js.map} +1 -1
  28. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{controller-BOf7dxV2.js → controller-qWtZCkAC.js} +2 -2
  29. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{controller-BOf7dxV2.js.map → controller-qWtZCkAC.js.map} +1 -1
  30. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{core-D_APohl9.js → core-BgbZXaDN.js} +2 -2
  31. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{core-D_APohl9.js.map → core-BgbZXaDN.js.map} +1 -1
  32. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-1meMFJbq.js +2 -0
  33. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-1meMFJbq.js.map +1 -0
  34. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{entry.generated-DckTWjSU.js → entry.generated-B-wVMxe6.js} +2 -2
  35. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{entry.generated-DckTWjSU.js.map → entry.generated-B-wVMxe6.js.map} +1 -1
  36. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{entry.generated-BNM7EWpC.js → entry.generated-BYDBzadH.js} +2 -2
  37. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{entry.generated-BNM7EWpC.js.map → entry.generated-BYDBzadH.js.map} +1 -1
  38. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{entry.generated-DRZyI4u3.js → entry.generated-B_q7LVNv.js} +2 -2
  39. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{entry.generated-DRZyI4u3.js.map → entry.generated-B_q7LVNv.js.map} +1 -1
  40. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{entry.generated-DcCdeWRk.js → entry.generated-BhtgeSTa.js} +2 -2
  41. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{entry.generated-DcCdeWRk.js.map → entry.generated-BhtgeSTa.js.map} +1 -1
  42. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{entry.generated-6GztwKjx.js → entry.generated-CJuVLJw9.js} +2 -2
  43. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{entry.generated-6GztwKjx.js.map → entry.generated-CJuVLJw9.js.map} +1 -1
  44. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{entry2.generated-jxSblEo7.js → entry.generated-CQGhCt9y.js} +2 -2
  45. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-CQGhCt9y.js.map +1 -0
  46. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{entry.generated-RR5GZAgO.js → entry.generated-CRhvZ0DI.js} +2 -2
  47. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{entry.generated-RR5GZAgO.js.map → entry.generated-CRhvZ0DI.js.map} +1 -1
  48. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{entry.generated-C5kjUnFe.js → entry.generated-CkBblBv9.js} +2 -2
  49. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{entry.generated-C5kjUnFe.js.map → entry.generated-CkBblBv9.js.map} +1 -1
  50. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{entry.generated-Bl38ruYD.js → entry.generated-Des-gEaR.js} +2 -2
  51. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-Des-gEaR.js.map +1 -0
  52. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-ZcYuKSSI.js +2 -0
  53. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-ZcYuKSSI.js.map +1 -0
  54. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{entry.generated-BK8q8vxJ.js → entry.generated-u0Ueamvw.js} +2 -2
  55. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{entry.generated-BK8q8vxJ.js.map → entry.generated-u0Ueamvw.js.map} +1 -1
  56. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{entry.generated-CPbvsglm.js → entry2.generated-CPbvsglm.js} +1 -1
  57. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry2.generated-CPbvsglm.js.map +1 -0
  58. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry2.generated-Dzq4GSqn.js +2 -0
  59. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry2.generated-Dzq4GSqn.js.map +1 -0
  60. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/focus-handoff-DzEyK-Fp.js +2 -0
  61. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/focus-handoff-DzEyK-Fp.js.map +1 -0
  62. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{motion-BlyJpJAE.js → motion-BQk-uLaI.js} +2 -2
  63. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{motion-BlyJpJAE.js.map → motion-BQk-uLaI.js.map} +1 -1
  64. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/ui-DuGUQhxd.js +4 -0
  65. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/{ui-CfByjNaO.js.map → ui-DuGUQhxd.js.map} +1 -1
  66. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/virtualizer-CSk2RJEN.js +2 -0
  67. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/virtualizer-CSk2RJEN.js.map +1 -0
  68. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/accordion.js +1 -1
  69. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/data-grid.js +1 -1
  70. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/date-picker.js +1 -1
  71. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/dropdown.js +1 -1
  72. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/index.js +1 -1
  73. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/index.js.map +1 -1
  74. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/keybinding.js +1 -1
  75. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/modal.js +1 -1
  76. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/panels.js +1 -1
  77. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/scroll-area.js +1 -1
  78. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/select.js +1 -1
  79. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/sidebar.js +1 -1
  80. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/tabs.js +1 -1
  81. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/toast.js +1 -1
  82. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/tooltip.js +1 -1
  83. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/components/virtualizer.js +1 -1
  84. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/core.js +1 -1
  85. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/index.js +1 -1
  86. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/index.js.map +1 -1
  87. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/logical-entry-manifest.json +112 -106
  88. package/packages/server/trellis_ui/static/trellis_ui/assets/js/trellis.js +9 -9
  89. package/packages/server/trellis_ui/static/trellis_ui/assets/js/trellis.min.js +9 -9
  90. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-shortcut-Z-__iteD.js +0 -2
  91. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/capability-shortcut-Z-__iteD.js.map +0 -1
  92. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-B2rTvkxi.js +0 -2
  93. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-B2rTvkxi.js.map +0 -1
  94. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-Bl38ruYD.js.map +0 -1
  95. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-C0kdsGqX.js +0 -2
  96. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-C0kdsGqX.js.map +0 -1
  97. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-CPbvsglm.js.map +0 -1
  98. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-DldFffYN.js +0 -2
  99. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry.generated-DldFffYN.js.map +0 -1
  100. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/entry2.generated-jxSblEo7.js.map +0 -1
  101. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/ui-CfByjNaO.js +0 -4
  102. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/virtual-window-BHdOw3Pi.js +0 -2
  103. package/packages/server/trellis_ui/static/trellis_ui/assets/js/esm/chunks/virtual-window-BHdOw3Pi.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vireo-ai/trellis-ui",
3
- "version": "0.1.48",
3
+ "version": "0.1.49",
4
4
  "type": "module",
5
5
  "description": "Django-native UI toolkit for building realtime and interactive web apps.",
6
6
  "license": "MIT",
@@ -105,8 +105,8 @@
105
105
  "verify:packed-consumer": "node scripts/verify_packed_consumer.mjs",
106
106
  "typecheck": "pnpm run generate:component-entries && tsc --noEmit",
107
107
  "test:unit": "pnpm run generate:component-entries && vitest run --no-file-parallelism",
108
- "test:python": "uv run pytest tests/server || test $? -eq 5",
109
- "test:browser": "playwright test --pass-with-no-tests",
108
+ "test:python": "uv run pytest tests/server",
109
+ "test:browser": "playwright test",
110
110
  "test": "pnpm run test:unit && pnpm run test:python && pnpm run test:browser",
111
111
  "test:watch": "pnpm run generate:component-entries && vitest",
112
112
  "prek": "uv run prek",
@@ -126,9 +126,9 @@
126
126
  "check:packages": "pnpm run check:runtime-boundary && pnpm run verify:packed-consumer && uv build --sdist --wheel",
127
127
  "check:release": "pnpm run check && pnpm run check:packages",
128
128
  "release": "node scripts/release.mjs",
129
- "publish:npm": "pnpm run check:release && pnpm publish --access public",
129
+ "publish:npm": "pnpm run check:release && pnpm publish dist/trellis-ui.tgz --access public --ignore-scripts",
130
130
  "publish:pypi": "pnpm run build:package && uv build --sdist --wheel && uv publish dist/django_trellis-${npm_package_version}.tar.gz dist/django_trellis-${npm_package_version}-py3-none-any.whl",
131
- "publish:all": "pnpm run check:release && pnpm publish --access public && uv publish dist/django_trellis-${npm_package_version}.tar.gz dist/django_trellis-${npm_package_version}-py3-none-any.whl",
131
+ "publish:all": "pnpm run check:release && pnpm publish dist/trellis-ui.tgz --access public --ignore-scripts && uv publish dist/django_trellis-${npm_package_version}.tar.gz dist/django_trellis-${npm_package_version}-py3-none-any.whl",
132
132
  "dev:css": "pnpm run build:sources && tailwindcss -i ./packages/client/src/styles/static.css -o ./packages/server/trellis_ui/static/trellis_ui/assets/css/trellis.min.css --minify --watch"
133
133
  }
134
134
  }
@@ -1,5 +1,5 @@
1
1
  /* Generated by packages/theme-engine/scripts/generate-default-css.mjs. */
2
- /* Theme 77478918fc2bdc5b; CSS 9bd56c40eb5861dd. */
2
+ /* Theme a17049e0574b1ae4; CSS 9bd56c40eb5861dd. */
3
3
  @import url("https://fonts.bunny.net/css?family=inter:400,500,600,700&display=swap");
4
4
 
5
5
  @import url("https://fonts.bunny.net/css?family=fira-code:400,500,600,700&display=swap");
@@ -1,5 +1,5 @@
1
1
  /* Generated by packages/theme-engine/scripts/generate-default-css.mjs. */
2
- /* Theme 77478918fc2bdc5b; CSS c3362e588265232d. */
2
+ /* Theme a17049e0574b1ae4; CSS c3362e588265232d. */
3
3
  @theme {
4
4
  --color-canvas: transparent;
5
5
  --color-accent-1: transparent;
@@ -1,5 +1,5 @@
1
1
  /* Generated by packages/theme-engine/scripts/generate-default-css.mjs. */
2
- /* Theme 77478918fc2bdc5b; CSS ff0d2cfb40f8567e. */
2
+ /* Theme a17049e0574b1ae4; CSS b7ac22be3a42e190. */
3
3
  @theme {
4
4
  --color-separator: transparent;
5
5
  --color-separator-muted: transparent;
@@ -551,12 +551,12 @@
551
551
  --color-surface-8: oklch(100% 0 none / 1);
552
552
  --color-surface-8-ink: oklch(22.74366% 0 none / 1);
553
553
  --color-surface-8-ink-muted: oklch(56.808564% 0 none / 1);
554
- --color-intent-accent-focus-width: 2px;
555
- --color-intent-danger-focus-width: 3px;
556
- --color-intent-information-focus-width: 3px;
557
- --color-intent-neutral-focus-width: 3px;
558
- --color-intent-success-focus-width: 3px;
559
- --color-intent-warning-focus-width: 3px;
554
+ --color-intent-accent-focus-width: 1px;
555
+ --color-intent-danger-focus-width: 1px;
556
+ --color-intent-information-focus-width: 1px;
557
+ --color-intent-neutral-focus-width: 1px;
558
+ --color-intent-success-focus-width: 1px;
559
+ --color-intent-warning-focus-width: 1px;
560
560
  --background-interaction-selection-accent: oklch(50.756307% 0.185449 257.696372 / 0.118811);
561
561
  --background-interaction-selection-accent-hover: oklch(50.756307% 0.185449 257.696372 / 0.167052);
562
562
  --background-interaction-selection-danger: oklch(50.734487% 0.20819 29.23388 / 0.120444);
@@ -851,12 +851,12 @@
851
851
  --color-surface-8: oklch(45.262653% 0.002896 251.779887 / 1);
852
852
  --color-surface-8-ink: oklch(99.80618% 0.000579 251.779887 / 1);
853
853
  --color-surface-8-ink-muted: oklch(85.441382% 0.000579 251.779887 / 1);
854
- --color-intent-accent-focus-width: 2px;
855
- --color-intent-danger-focus-width: 3px;
856
- --color-intent-information-focus-width: 3px;
857
- --color-intent-neutral-focus-width: 3px;
858
- --color-intent-success-focus-width: 3px;
859
- --color-intent-warning-focus-width: 3px;
854
+ --color-intent-accent-focus-width: 1px;
855
+ --color-intent-danger-focus-width: 1px;
856
+ --color-intent-information-focus-width: 1px;
857
+ --color-intent-neutral-focus-width: 1px;
858
+ --color-intent-success-focus-width: 1px;
859
+ --color-intent-warning-focus-width: 1px;
860
860
  --background-interaction-selection-accent: oklch(77.631661% 0.121666 245.605952 / 0.058873);
861
861
  --background-interaction-selection-accent-hover: oklch(77.631661% 0.121666 245.605952 / 0.087255);
862
862
  --background-interaction-selection-danger: oklch(78.425088% 0.125337 22.763785 / 0.056177);
@@ -6,6 +6,8 @@
6
6
  export type { AccordionTransition, UiAccordionApi } from './components/accordion';
7
7
  export type { CheckboxState, UiCheckboxApi } from './components/checkbox';
8
8
  export type { DatePickerTransition, UiDatePickerApi } from './components/date-picker';
9
+ export type { DataGridResetOptions, DataGridSetUrlOptions, UiDataGridApi, } from './components/data-grid';
10
+ export type { DataGridSelectionValue } from './components/data-grid/contract';
9
11
  export type { ModalTransition, UiModalApi, UiModalTriggerApi } from './components/modal';
10
12
  export type { PanelsTransition, UiPanelsApi } from './components/panels';
11
13
  export type { UiRadioGroupApi } from './components/radio';
@@ -19,4 +21,4 @@ export type { UiSliderApi } from './components/slider';
19
21
  export type { UiSwitchApi } from './components/switch';
20
22
  export type { TabsTransition, UiTabsApi } from './components/tabs';
21
23
  export type { ToastDetail, ToastTransition, UiToastApi, UiToastOutletApi } from './components/toast';
22
- export type { ResetOptions, SetUrlOptions, UiVirtualizerApi, VirtualScrollAlign, } from './components/virtualizer';
24
+ export type { CursorDataSource, CursorFirstArgs, CursorMoveArgs, CursorPage, CursorResponseAdapter, CursorRenderPayload, CursorSeekArgs, SoughtCursorPage, CursorVirtualizerOptions, ResetOptions, SetUrlOptions, UiVirtualizerApi, VirtualizerOptions, VirtualScrollAlign, } from './components/virtualizer';
@@ -17,6 +17,7 @@ type DataGridSelectionValue = {
17
17
  };
18
18
  declare const dataGridSchema: {
19
19
  fetchUrl: import("../../runtime/codecs").StringCodec;
20
+ cursor: import("../../runtime/codecs").BoolCodec;
20
21
  totalRows: import("../../runtime/codecs").NumberCodec;
21
22
  rowHeight: import("../../runtime/codecs").NumberCodec;
22
23
  bufferSize: import("../../runtime/codecs").NumberCodec;
@@ -1,26 +1,50 @@
1
1
  import type Alpine from 'alpinejs';
2
2
  import { type PropState, type TrellisAlpineComponent, type VirtualScrollAlign } from '../../runtime';
3
+ import { type CursorVirtualizerOptions } from '../../runtime/virtualizer';
3
4
  import { dataGridSchema, type DataGridSelectionValue } from './contract';
4
- type DataGridResetOptions = {
5
+ /** Options for resetting an indexed or cursor-backed Data Grid. @public */
6
+ interface DataGridResetOptions {
7
+ /** Scroll offset restored after the first page loads. */
5
8
  scrollTop?: number;
6
- };
7
- type DataGridSetUrlOptions = {
9
+ }
10
+ /** Options for replacing an indexed Data Grid endpoint. @public */
11
+ interface DataGridSetUrlOptions {
12
+ /** Whether to discard loaded rows and reload immediately. */
8
13
  reset?: boolean;
9
- };
14
+ }
10
15
  /** Public Alpine API for `ui.data-grid`. @public */
11
16
  interface UiDataGridApi {
17
+ /** Whether the active cursor data source supports server-side index seeking. */
18
+ readonly supportsSeek: boolean;
19
+ /** Discard loaded rows and request the current indexed range or first cursor page again. */
12
20
  reload(options?: DataGridResetOptions): void;
21
+ /** Return the grid to its initial indexed range or first cursor page. */
13
22
  reset(options?: DataGridResetOptions): void;
23
+ /** Scroll to a row and seek through the server when its cursor page is not loaded. */
14
24
  scrollToIndex(index: number, align?: VirtualScrollAlign): void;
25
+ /** Replace the indexed endpoint, optionally resetting loaded rows. */
15
26
  setUrl(url: string, options?: DataGridSetUrlOptions): void;
27
+ /** Update the independently managed total row count. */
16
28
  setTotalRows(count: number): void;
29
+ /** Replace cursor query parameters and reset to the first cursor page. */
30
+ setQuery<Query>(query: Query): void;
31
+ /** Activate cursor mode with a generic data source and response adapter. */
32
+ useCursor<Query, Content>(options: CursorVirtualizerOptions<Query, Content>): void;
33
+ /** Resize a column to a pixel width. */
17
34
  resizeColumn(key: string, width: number): void;
35
+ /** Move a column to a new zero-based position. */
18
36
  reorderColumn(key: string, toIndex: number): void;
37
+ /** Add a row key to the explicit selection. */
19
38
  selectRow(key: string): void;
39
+ /** Remove a row key from the explicit selection. */
20
40
  deselectRow(key: string): void;
41
+ /** Toggle a row key in the current selection. */
21
42
  toggleRow(key: string): void;
43
+ /** Replace the complete row selection value. */
22
44
  setSelection(value: DataGridSelectionValue): void;
45
+ /** Select all rows represented by a server-owned query token. */
23
46
  selectQuery(token: string, total: number, except?: string[]): void;
47
+ /** Clear explicit and query-backed row selection. */
24
48
  clearSelection(): void;
25
49
  }
26
50
  type DataGridData = UiDataGridApi & {
@@ -40,4 +40,4 @@ export type { ToastData, ToastDetail, ToastOutletData, ToastTransition } from '.
40
40
  export { registerTooltip, registerTooltipDirective, UiTooltip } from './tooltip';
41
41
  export type { TooltipData, TooltipTransition } from './tooltip';
42
42
  export { registerVirtualizer, UiVirtualizer } from './virtualizer';
43
- export type { ResetOptions, SetUrlOptions, UiVirtualizerApi, VirtualizerData, } from './virtualizer';
43
+ export type { CursorDataSource, CursorFirstArgs, CursorMoveArgs, CursorPage, CursorResponseAdapter, CursorRenderPayload, CursorSeekArgs, SoughtCursorPage, CursorVirtualizerOptions, ResetOptions, SetUrlOptions, UiVirtualizerApi, VirtualizerOptions, VirtualizerData, } from './virtualizer';
@@ -1,29 +1 @@
1
- import { type SchemaToProps } from '../../runtime';
2
- declare const VIRTUALIZER_AXES: readonly ["vertical"];
3
- type VirtualizerAxis = typeof VIRTUALIZER_AXES[number];
4
- declare const virtualizerSchema: {
5
- fetchUrl: import("../../runtime/codecs").StringCodec;
6
- totalItems: import("../../runtime/codecs").NumberCodec;
7
- itemSize: import("../../runtime/codecs").NumberCodec;
8
- bufferSize: import("../../runtime/codecs").NumberCodec;
9
- overscan: import("../../runtime/codecs").NumberCodec;
10
- axis: import("../../runtime/codecs").OneOfCodec<"vertical">;
11
- initialIndex: import("../../runtime/codecs").NumberCodec;
12
- startParam: import("../../runtime/codecs").StringCodec;
13
- countParam: import("../../runtime/codecs").StringCodec;
14
- totalParam: import("../../runtime/codecs").StringCodec;
15
- windowParam: import("../../runtime/codecs").StringCodec;
16
- totalHeader: import("../../runtime/codecs").StringCodec;
17
- assetsHeader: import("../../runtime/codecs").StringCodec;
18
- metaSelector: import("../../runtime/codecs").StringCodec;
19
- scrollArea: import("../../runtime/codecs").BoolCodec;
20
- fill: import("../../runtime/codecs").BoolCodec;
21
- class: import("../../runtime/codecs").StringCodec;
22
- scrollAreaClass: import("../../runtime/codecs").StringCodec;
23
- viewportClass: import("../../runtime/codecs").StringCodec;
24
- spacerClass: import("../../runtime/codecs").StringCodec;
25
- blockClass: import("../../runtime/codecs").StringCodec;
26
- };
27
- type VirtualizerProps = SchemaToProps<typeof virtualizerSchema>;
28
- export { VIRTUALIZER_AXES, virtualizerSchema };
29
- export type { VirtualizerAxis, VirtualizerProps };
1
+ export { VIRTUALIZER_AXES, virtualizerSchema, type VirtualizerAxis, type VirtualizerProps, } from '../../runtime/virtualizer-schema';
@@ -0,0 +1 @@
1
+ export type { CursorDataSource, CursorFirstArgs, CursorMoveArgs, CursorPage, CursorResponseAdapter, CursorRenderPayload, CursorSeekArgs, SoughtCursorPage, CursorVirtualizerOptions, } from '../../runtime/cursor-data-source';
@@ -1,31 +1,5 @@
1
1
  import type Alpine from 'alpinejs';
2
- import { type PropState, type TrellisAlpineComponent, type VirtualScrollAlign } from '../../runtime';
3
- import { virtualizerSchema } from './contract';
4
- type ResetOptions = {
5
- scrollTop?: number;
6
- };
7
- type SetUrlOptions = {
8
- reset?: boolean;
9
- };
10
- /** Public Alpine API for `ui.virtualizer`. @public */
11
- interface UiVirtualizerApi {
12
- /** Scrolls a logical item into the requested vertical alignment. */
13
- scrollToIndex(index: number, align?: VirtualScrollAlign): void;
14
- /** Replaces the known logical item count and reloads mounted ranges. */
15
- setTotalItems(count: number): void;
16
- /** Replaces the fragment endpoint and optionally resets to the top. */
17
- setUrl(url: string, options?: SetUrlOptions): void;
18
- /** Invalidates all blocks and reloads them around a scroll position. */
19
- reset(options?: ResetOptions): void;
20
- /** Reloads all blocks without changing the fragment endpoint. */
21
- reload(options?: ResetOptions): void;
22
- }
23
- type VirtualizerData = UiVirtualizerApi & {
24
- props: PropState<typeof virtualizerSchema>;
25
- init(): void;
26
- destroy(): void;
27
- };
28
- declare const UiVirtualizer: (AlpineInstance: Alpine.Alpine) => TrellisAlpineComponent<VirtualizerData>;
2
+ import { UiVirtualizer } from '../../runtime/virtualizer';
29
3
  declare const registerVirtualizer: (AlpineInstance: Alpine.Alpine) => void;
30
4
  export { registerVirtualizer, UiVirtualizer };
31
- export type { ResetOptions, SetUrlOptions, UiVirtualizerApi, VirtualizerData, VirtualScrollAlign, };
5
+ export type { CursorDataSource, CursorFirstArgs, CursorMoveArgs, CursorPage, CursorResponseAdapter, CursorRenderPayload, CursorSeekArgs, SoughtCursorPage, CursorVirtualizerOptions, ResetOptions, SetUrlOptions, UiVirtualizerApi, VirtualizerOptions, VirtualizerData, VirtualScrollAlign, } from '../../runtime/virtualizer';
@@ -0,0 +1,45 @@
1
+ type CursorPage<Content> = {
2
+ content: Content;
3
+ startCursor: string | null;
4
+ endCursor: string | null;
5
+ hasNext: boolean;
6
+ hasPrevious: boolean;
7
+ startIndex?: number;
8
+ };
9
+ type CursorRenderPayload = {
10
+ html: string;
11
+ assets: Array<{
12
+ id: string;
13
+ src: string;
14
+ preloads?: string[];
15
+ }>;
16
+ totalItems: number | null;
17
+ };
18
+ type SoughtCursorPage<Content> = CursorPage<Content> & {
19
+ startIndex: number;
20
+ };
21
+ type CursorFirstArgs<Query> = {
22
+ limit: number;
23
+ query: Query;
24
+ signal: AbortSignal;
25
+ };
26
+ type CursorMoveArgs<Query> = CursorFirstArgs<Query> & {
27
+ cursor: string;
28
+ };
29
+ type CursorSeekArgs<Query> = CursorFirstArgs<Query> & {
30
+ index: number;
31
+ };
32
+ type CursorDataSource<Query, Content> = {
33
+ first(args: CursorFirstArgs<Query>): Promise<CursorPage<Content>>;
34
+ next(args: CursorMoveArgs<Query>): Promise<CursorPage<Content>>;
35
+ previous(args: CursorMoveArgs<Query>): Promise<CursorPage<Content>>;
36
+ seek?(args: CursorSeekArgs<Query>): Promise<SoughtCursorPage<Content>>;
37
+ };
38
+ type CursorResponseAdapter<Content> = (content: Content, page: CursorPage<Content>) => CursorRenderPayload | Promise<CursorRenderPayload>;
39
+ type CursorVirtualizerOptions<Query, Content> = {
40
+ dataSource: CursorDataSource<Query, Content>;
41
+ query: Query;
42
+ responseAdapter: CursorResponseAdapter<Content>;
43
+ seekDebounce?: number;
44
+ };
45
+ export type { CursorDataSource, CursorFirstArgs, CursorMoveArgs, CursorPage, CursorResponseAdapter, CursorRenderPayload, CursorSeekArgs, SoughtCursorPage, CursorVirtualizerOptions, };
@@ -0,0 +1,11 @@
1
+ type FocusHandoffState = {
2
+ pointerDown: boolean;
3
+ pointerFocused: HTMLElement | null;
4
+ shortcut: boolean;
5
+ shortcutReset: number | undefined;
6
+ };
7
+ declare const ensureFocusHandoff: (document: Document) => FocusHandoffState;
8
+ declare const beginShortcutFocusHandoff: (document: Document) => void;
9
+ declare const isShortcutFocusHandoff: (document: Document) => boolean;
10
+ declare const focusWithoutIndicator: (element: HTMLElement) => void;
11
+ export { beginShortcutFocusHandoff, ensureFocusHandoff, focusWithoutIndicator, isShortcutFocusHandoff, };
@@ -0,0 +1,29 @@
1
+ import { type SchemaToProps } from './codecs';
2
+ declare const VIRTUALIZER_AXES: readonly ["vertical"];
3
+ type VirtualizerAxis = typeof VIRTUALIZER_AXES[number];
4
+ declare const virtualizerSchema: {
5
+ fetchUrl: import("./codecs").StringCodec;
6
+ totalItems: import("./codecs").NumberCodec;
7
+ itemSize: import("./codecs").NumberCodec;
8
+ bufferSize: import("./codecs").NumberCodec;
9
+ overscan: import("./codecs").NumberCodec;
10
+ axis: import("./codecs").OneOfCodec<"vertical">;
11
+ initialIndex: import("./codecs").NumberCodec;
12
+ startParam: import("./codecs").StringCodec;
13
+ countParam: import("./codecs").StringCodec;
14
+ totalParam: import("./codecs").StringCodec;
15
+ windowParam: import("./codecs").StringCodec;
16
+ totalHeader: import("./codecs").StringCodec;
17
+ assetsHeader: import("./codecs").StringCodec;
18
+ metaSelector: import("./codecs").StringCodec;
19
+ scrollArea: import("./codecs").BoolCodec;
20
+ fill: import("./codecs").BoolCodec;
21
+ class: import("./codecs").StringCodec;
22
+ scrollAreaClass: import("./codecs").StringCodec;
23
+ viewportClass: import("./codecs").StringCodec;
24
+ spacerClass: import("./codecs").StringCodec;
25
+ blockClass: import("./codecs").StringCodec;
26
+ };
27
+ type VirtualizerProps = SchemaToProps<typeof virtualizerSchema>;
28
+ export { VIRTUALIZER_AXES, virtualizerSchema };
29
+ export type { VirtualizerAxis, VirtualizerProps };
@@ -0,0 +1,41 @@
1
+ import type Alpine from 'alpinejs';
2
+ import { type PropState } from './codecs';
3
+ import type { TrellisAlpineComponent } from './index';
4
+ import { type VirtualScrollAlign } from './virtual-window';
5
+ import { virtualizerSchema } from './virtualizer-schema';
6
+ import type { CursorVirtualizerOptions } from './cursor-data-source';
7
+ type ResetOptions = {
8
+ scrollTop?: number;
9
+ };
10
+ type SetUrlOptions = {
11
+ reset?: boolean;
12
+ };
13
+ /** Public Alpine API for `ui.virtualizer`. @public */
14
+ interface UiVirtualizerApi<Query = unknown> {
15
+ /** Whether the configured cursor data source supports arbitrary index seeks. */
16
+ readonly supportsSeek: boolean;
17
+ /** Scrolls a logical item into the requested vertical alignment. */
18
+ scrollToIndex(index: number, align?: VirtualScrollAlign): void;
19
+ /** Replaces the known logical item count and reloads mounted ranges. */
20
+ setTotalItems(count: number): void;
21
+ /** Replaces the fragment endpoint and optionally resets to the top. */
22
+ setUrl(url: string, options?: SetUrlOptions): void;
23
+ /** Replaces cursor-mode query state and resets to the first cursor. */
24
+ setQuery(query: Query): void;
25
+ /** Invalidates all blocks and reloads them around a scroll position. */
26
+ reset(options?: ResetOptions): void;
27
+ /** Reloads all blocks without changing the fragment endpoint. */
28
+ reload(options?: ResetOptions): void;
29
+ }
30
+ type VirtualizerData<Query = unknown> = UiVirtualizerApi<Query> & {
31
+ props: PropState<typeof virtualizerSchema>;
32
+ init(): void;
33
+ destroy(): void;
34
+ };
35
+ type VirtualizerOptions<Query, Content> = {
36
+ cursor?: CursorVirtualizerOptions<Query, Content>;
37
+ };
38
+ declare const UiVirtualizer: <Query = unknown, Content = unknown>(AlpineInstance: Alpine.Alpine, options?: VirtualizerOptions<Query, Content>) => TrellisAlpineComponent<VirtualizerData<Query>>;
39
+ export { UiVirtualizer };
40
+ export type { CursorDataSource, CursorFirstArgs, CursorMoveArgs, CursorPage, CursorResponseAdapter, CursorRenderPayload, CursorSeekArgs, SoughtCursorPage, CursorVirtualizerOptions, } from './cursor-data-source';
41
+ export type { ResetOptions, SetUrlOptions, UiVirtualizerApi, VirtualizerOptions, VirtualizerData, VirtualScrollAlign, };
@@ -6399,12 +6399,12 @@
6399
6399
  --color-surface-8: oklch(100% 0 none / 1);
6400
6400
  --color-surface-8-ink: oklch(22.74366% 0 none / 1);
6401
6401
  --color-surface-8-ink-muted: oklch(56.808564% 0 none / 1);
6402
- --color-intent-accent-focus-width: 2px;
6403
- --color-intent-danger-focus-width: 3px;
6404
- --color-intent-information-focus-width: 3px;
6405
- --color-intent-neutral-focus-width: 3px;
6406
- --color-intent-success-focus-width: 3px;
6407
- --color-intent-warning-focus-width: 3px;
6402
+ --color-intent-accent-focus-width: 1px;
6403
+ --color-intent-danger-focus-width: 1px;
6404
+ --color-intent-information-focus-width: 1px;
6405
+ --color-intent-neutral-focus-width: 1px;
6406
+ --color-intent-success-focus-width: 1px;
6407
+ --color-intent-warning-focus-width: 1px;
6408
6408
  --background-interaction-selection-accent: oklch(50.756307% 0.185449 257.696372 / 0.118811);
6409
6409
  --background-interaction-selection-accent-hover: oklch(50.756307% 0.185449 257.696372 / 0.167052);
6410
6410
  --background-interaction-selection-danger: oklch(50.734487% 0.20819 29.23388 / 0.120444);
@@ -6698,12 +6698,12 @@
6698
6698
  --color-surface-8: oklch(45.262653% 0.002896 251.779887 / 1);
6699
6699
  --color-surface-8-ink: oklch(99.80618% 0.000579 251.779887 / 1);
6700
6700
  --color-surface-8-ink-muted: oklch(85.441382% 0.000579 251.779887 / 1);
6701
- --color-intent-accent-focus-width: 2px;
6702
- --color-intent-danger-focus-width: 3px;
6703
- --color-intent-information-focus-width: 3px;
6704
- --color-intent-neutral-focus-width: 3px;
6705
- --color-intent-success-focus-width: 3px;
6706
- --color-intent-warning-focus-width: 3px;
6701
+ --color-intent-accent-focus-width: 1px;
6702
+ --color-intent-danger-focus-width: 1px;
6703
+ --color-intent-information-focus-width: 1px;
6704
+ --color-intent-neutral-focus-width: 1px;
6705
+ --color-intent-success-focus-width: 1px;
6706
+ --color-intent-warning-focus-width: 1px;
6707
6707
  --background-interaction-selection-accent: oklch(77.631661% 0.121666 245.605952 / 0.058873);
6708
6708
  --background-interaction-selection-accent-hover: oklch(77.631661% 0.121666 245.605952 / 0.087255);
6709
6709
  --background-interaction-selection-danger: oklch(78.425088% 0.125337 22.763785 / 0.056177);