@revolist/ui 4.0.4-rc → 4.0.4
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.
- package/MIGRATION.md +36 -0
- package/OWNERSHIP.md +36 -36
- package/README.md +65 -392
- package/_button.scss +6 -2
- package/_chunks/arrow-up-Cw8hW9vp.js +4 -0
- package/_chunks/calculator-CDWOuAcp.js +4 -0
- package/_chunks/{calendar-xpZ0v3xf.js → calendar-BQYQLu8Q.js} +23 -23
- package/_chunks/{cell-visuals-E-2oEKHg.js → cell-visuals-r6DOOhGh.js} +7 -7
- package/_chunks/chart-frame-GprenwEg.js +145 -0
- package/_chunks/{chevron-right-sxHQMSkq.js → check-BwI7iCAm.js} +2 -2
- package/_chunks/{chevron-left-D0nc4Z5S.js → chevron-right-CM3ljziP.js} +2 -2
- package/_chunks/choice-chips-C5OxD0GV.js +126 -0
- package/_chunks/{color-palette-D8vyPfld.js → color-palette-7siNch__.js} +22 -24
- package/_chunks/color-picker-Cfc9eqZb.js +143 -0
- package/_chunks/{component-C_T2VN5u.js → component-C3k_8uIq.js} +290 -275
- package/_chunks/{component-metadata-BMOOmqx5.js → component-metadata-DlVkpW3h.js} +1 -9
- package/_chunks/configurator-actions-vRnI54mO.js +155 -0
- package/_chunks/configurator-field-icon-CmcM_sPs.js +53 -0
- package/_chunks/control-BRfF5DWQ.js +118 -0
- package/_chunks/{controller-hRBm_Lfz.js → controller-BbiQuRt-.js} +5 -5
- package/_chunks/controls-B3EgM_DS.js +650 -0
- package/_chunks/{date-control-DrVFX13g.js → date-control-87dcA5br.js} +5 -5
- package/_chunks/{date-time-qIhp5vaX.js → date-time-CfiFYodx.js} +332 -293
- package/_chunks/{delete-button-CW9vjLnk.js → delete-button-jneO24wa.js} +1 -1
- package/_chunks/dialog.parts-NqEEVc9P.js +131 -0
- package/_chunks/{duration-CL68Em0o.js → duration-BGZ_qJ99.js} +10 -10
- package/_chunks/{editor-commit-Bq3wSgvr.js → editor-commit-Dyo-FMgD.js} +1 -1
- package/_chunks/editor-popup-NNP9Fh9U.js +82 -0
- package/_chunks/field-configurator-DPulsY3l.js +288 -0
- package/_chunks/{field-context-D57PnBbH.js → field-context-C4_WrO2z.js} +1 -1
- package/_chunks/{framework-mount--RTLIqE-.js → framework-mount-D4I8HpVp.js} +2 -2
- package/_chunks/icon-toolbar-BAAdEvr9.js +134 -0
- package/_chunks/{icons-Ci5mADVc.js → icons-B4qN13Yj.js} +1 -1
- package/_chunks/{iso-B0YHBK7m.js → iso-CJQl2kmq.js} +1 -1
- package/_chunks/magnifying-glass-CvrTDSkB.js +4 -0
- package/_chunks/minus-BOAR3A1C.js +4 -0
- package/_chunks/{model-mPO2tG2f.js → model-CFrBgRHm.js} +3 -3
- package/_chunks/mount-C8CnIW9k.js +267 -0
- package/_chunks/{native.view-ByyZ1CT5.js → native-CJm3eq3-.js} +1 -1
- package/_chunks/native-control-um1L1wgZ.js +649 -0
- package/_chunks/{number-input-BKwA5FnM.js → number-input-CKiA4d1N.js} +9 -9
- package/_chunks/{picker-h1P5RUgp.js → picker-igNshTRC.js} +5 -5
- package/_chunks/plus-CbGRkIGl.js +4 -0
- package/_chunks/{popup-CT2uD3go.js → popup-DECYM9FI.js} +116 -105
- package/_chunks/{rating-choice-DZgmaic0.js → rating-choice-CepVfGUq.js} +2 -2
- package/_chunks/{render-m5eMMwFR.js → render-bTk3curw.js} +2 -2
- package/_chunks/{reorder-list-CSlqAGHw.js → reorder-list-B4w3aARt.js} +2 -2
- package/_chunks/request-trail-B1zVRPEf.js +762 -0
- package/_chunks/rich-text-Ci4d6dHn.js +842 -0
- package/_chunks/rotate-left-BF6G883o.js +4 -0
- package/_chunks/selection-list-tooltips-m00U3L6z.js +42 -0
- package/_chunks/title-tooltip-ncldbUwS.js +11 -0
- package/_chunks/tooltip-h-Z8yFBY.js +54 -0
- package/_chunks/tooltip-owner-BYho-vJl.js +19 -0
- package/_chunks/tooltip-session-CBtRMBPr.js +110 -0
- package/_chunks/tooltip-text-BN5WdGHn.js +12 -0
- package/_chunks/top-layer-popup-CKJ7VJOF.js +59 -0
- package/_dialog.scss +57 -22
- package/_form.scss +71 -21
- package/_legend.scss +25 -7
- package/_variables.scss +34 -32
- package/_view-switcher.scss +6 -0
- package/activity-message.d.ts +1 -1
- package/activity-message.js +1 -1
- package/ai/_chat.scss +35 -3
- package/ai/_style.scss +76 -16
- package/ai/chat.d.ts +3 -1
- package/ai/components.d.ts +16 -3
- package/ai/index.d.ts +1 -0
- package/ai/index.js +3 -3
- package/ai/mount.d.ts +30 -6
- package/ai/request-trail.d.ts +9 -3
- package/ai/results/_style.scss +83 -0
- package/ai/results/index.d.ts +11 -0
- package/ai/results/metrics.d.ts +5 -0
- package/ai/results/table.d.ts +5 -0
- package/ai/results/text.d.ts +5 -0
- package/ai/results/types.d.ts +29 -0
- package/ai/transcript.d.ts +2 -0
- package/ai/translations.d.ts +1 -1
- package/angular/angular.d.ts +1 -1
- package/angular/angular.js +13 -7
- package/assignee/assignee.scss +28 -6
- package/assignee/index.js +6 -6
- package/avatar/avatar.style.scss +23 -6
- package/avatar/index.d.ts +25 -2
- package/avatar/index.js +33 -32
- package/badge.d.ts +1 -1
- package/badge.js +1 -1
- package/badge.view.d.ts +8 -0
- package/brush-range/_brush-range.scss +55 -49
- package/brush-range/component.d.ts +1 -3
- package/brush-range/component.js +28 -28
- package/buttons/delete-button.js +1 -1
- package/buttons/delete-button.style.scss +6 -2
- package/buttons/remove-button.d.ts +1 -1
- package/buttons/remove-button.js +2 -2
- package/buttons/remove-button.style.scss +1 -1
- package/buttons/svg-button.d.ts +1 -1
- package/buttons/svg-button.js +17 -17
- package/calendar/_calendar.scss +21 -25
- package/calendar/calendar.js +1 -1
- package/calendar/day.js +2 -2
- package/calendar/header.js +2 -3
- package/calendar/index.js +3 -3
- package/calendar/model.js +1 -1
- package/calendar/month-grid.js +2 -2
- package/calendar/translations.js +1 -1
- package/calendar/year-grid.js +2 -2
- package/cell-input.js +1 -1
- package/cell-input.scss +3 -7
- package/cell-visuals/badge.style.scss +6 -3
- package/cell-visuals/bar-chart.style.scss +2 -1
- package/cell-visuals/column-type.style.css +12 -0
- package/cell-visuals/index.js +1 -1
- package/cell-visuals/progress-line-value.renderer.style.scss +4 -2
- package/cell-visuals/progress-line.style.scss +1 -4
- package/cell-visuals/sparkline.style.scss +2 -1
- package/cell-visuals/timeline.style.css +4 -2
- package/checkbox/checkbox.scss +6 -24
- package/checkbox/index.js +1 -1
- package/choice-chips/index.d.ts +3 -1
- package/choice-chips/index.js +1 -1
- package/color-palette/built-in-palettes.js +1 -1
- package/color-palette/chart-palettes.js +1 -1
- package/color-palette/color-palette.js +1 -1
- package/color-palette/color-palette.style.scss +88 -25
- package/color-palette/color-picker.constants.js +1 -1
- package/color-palette/color-picker.js +2 -2
- package/color-palette/color-picker.style.scss +23 -10
- package/color-palette/common-palettes.d.ts +1 -1
- package/color-palette/common-palettes.js +2 -2
- package/color-palette/gantt-palettes.js +1 -1
- package/color-palette/native.d.ts +15 -2
- package/color-palette/palette.js +1 -1
- package/color-palette/pivot-palettes.js +1 -1
- package/color-palette/platform-palettes.js +1 -1
- package/color-palette/pro-palettes.js +1 -1
- package/color-palette/scheduler-palettes.js +1 -1
- package/component-catalog.d.ts +9 -7
- package/configurator-actions.d.ts +67 -0
- package/configurator-actions.js +1 -0
- package/configurator-aggregation-list.d.ts +14 -0
- package/configurator-aggregation-list.js +63 -0
- package/configurator-drop-zone.d.ts +39 -0
- package/configurator-drop-zone.js +66 -0
- package/configurator-field-icon.d.ts +10 -0
- package/configurator-field-icon.js +1 -0
- package/configurator-focus.d.ts +4 -0
- package/configurator-focus.js +39 -0
- package/configurator-sections.d.ts +42 -0
- package/configurator-sections.js +71 -0
- package/control-attributes.js +1 -1
- package/control-presentation.d.ts +8 -2
- package/control-presentation.js +25 -20
- package/controls.d.ts +12 -2
- package/controls.js +4 -3
- package/core/anchored-popover.js +1 -1
- package/core/control-id.js +1 -1
- package/core/editor-popup-position.d.ts +6 -2
- package/core/editor-popup.d.ts +4 -0
- package/core/editor-popup.js +1 -1
- package/core/motion.js +1 -1
- package/core/popover-controller.d.ts +35 -0
- package/core/popover-controller.js +102 -0
- package/core/popup-ownership.d.ts +2 -0
- package/core/selection-list-tooltips.d.ts +2 -0
- package/core/title-tooltip.d.ts +2 -0
- package/core/tooltip-session.d.ts +29 -0
- package/core/tooltip-surface.d.ts +13 -0
- package/core/tooltip-text.d.ts +6 -0
- package/core/tooltip.d.ts +35 -0
- package/core/top-layer-popup.d.ts +4 -0
- package/core/top-layer-popup.js +1 -23
- package/date-time/attach.d.ts +1 -1
- package/date-time/date-control.d.ts +1 -1
- package/date-time/field.d.ts +4 -2
- package/date-time/index.js +1 -1
- package/date-time/style.scss +239 -36
- package/date-time/time-selection.d.ts +3 -1
- package/date-time/types.d.ts +5 -1
- package/dialog/dialog-action-footer.d.ts +17 -2
- package/dialog/dialog.dom.d.ts +15 -2
- package/dialog/dialog.dom.js +9 -9
- package/dialog/dialog.drag.js +1 -1
- package/dialog/dialog.parts.d.ts +1 -1
- package/dialog/dialog.parts.js +1 -1
- package/dialog/dialog.preact.js +1 -1
- package/distribution-chart/_distribution-chart.scss +113 -77
- package/distribution-chart/area-chart.js +2 -2
- package/distribution-chart/bar-chart.js +2 -2
- package/distribution-chart/chart-frame.d.ts +1 -1
- package/distribution-chart/index.d.ts +1 -1
- package/distribution-chart/index.js +1 -1
- package/distribution-chart/line-chart.js +2 -2
- package/dropdown/content.js +1 -1
- package/dropdown/control.js +1 -1
- package/dropdown/dropdown.service.js +1 -1
- package/dropdown/dropdown.types.d.ts +1 -1
- package/dropdown/editor-dropdown.style.scss +19 -9
- package/dropdown/index.js +2 -2
- package/dropdown/lookup-field.d.ts +5 -0
- package/dropdown/lookup-field.js +4 -3
- package/dropdown/popup.d.ts +2 -2
- package/dropdown/popup.js +1 -1
- package/duration/index.js +1 -1
- package/editor-actions.js +2 -2
- package/editor-layout/index.d.ts +4 -4
- package/editor-layout/index.js +40 -35
- package/editor-layout/style.scss +82 -18
- package/favicon.svg +9 -0
- package/field-configurator.d.ts +39 -1
- package/field-configurator.js +4 -170
- package/field-expansion.d.ts +9 -0
- package/field-reorder.hook.js +1 -1
- package/field-reorder.js +1 -1
- package/filter/filters/slider/_single-slider.scss +57 -38
- package/filter/filters/slider/_slider.scss +41 -33
- package/filter/filters/slider/component.js +1 -1
- package/filter/filters/slider/control.js +3 -1
- package/filter/filters/slider/inputs.js +1 -1
- package/filter/filters/slider/logic.js +1 -1
- package/filter/filters/slider/preact.js +1 -1
- package/filter/filters/slider/runtime.js +50 -23
- package/filter/filters/slider/single.js +2 -2
- package/filter-badge.js +2 -2
- package/filter-controls.d.ts +0 -1
- package/filter-controls.js +6 -7
- package/form-controls/index.d.ts +10 -2
- package/form-controls/index.js +7 -7
- package/form-controls/presentation.d.ts +1 -1
- package/form-controls/presentation.js +13 -13
- package/formatting/index.d.ts +1 -1
- package/formatting/index.js +26 -25
- package/formatting/styles.scss +14 -57
- package/framework.js +228 -225
- package/history-controls.js +27 -1
- package/html-controls.js +1 -1
- package/icon-toolbar.d.ts +62 -0
- package/icon-toolbar.js +1 -0
- package/icons/icon.d.ts +1 -1
- package/icons/icon.js +1 -1
- package/legend.d.ts +1 -1
- package/legend.js +1 -1
- package/masked-input/index.js +4 -4
- package/native-control.d.ts +1 -2
- package/native-control.js +1 -1
- package/native-controls.d.ts +54 -2
- package/native-styles.css +1 -1
- package/native-styles.scss +6 -2
- package/native.d.ts +3 -3
- package/native.js +48 -45
- package/number-input/index.d.ts +1 -1
- package/number-input/index.js +1 -1
- package/package.json +84 -1
- package/pagination.js +12 -12
- package/pdf-viewer/controller.js +1 -1
- package/pdf-viewer/header.d.ts +1 -1
- package/pdf-viewer/index.d.ts +2 -2
- package/pdf-viewer/index.js +3 -3
- package/pdf-viewer/search-bar.d.ts +1 -1
- package/pdf-viewer/status.d.ts +1 -1
- package/pdf-viewer/style.scss +203 -42
- package/pickers.d.ts +5 -1
- package/preact-mount.js +1 -1
- package/preact.d.ts +13 -10
- package/preact.js +109 -64
- package/progress/_bar.scss +9 -3
- package/progress/_circular.scss +2 -1
- package/progress/bar.js +1 -1
- package/progress/circular.js +1 -1
- package/progress/range.js +1 -1
- package/rating-choice.js +1 -1
- package/react-adapter.d.ts +4 -2
- package/react-control.d.ts +2 -0
- package/react-control.js +3 -3
- package/react.d.ts +7 -8
- package/react.js +69 -68
- package/reorder-list.d.ts +1 -1
- package/reorder-list.js +1 -1
- package/reorder-list.scss +59 -17
- package/resource-picker/resource-picker-avatar.js +1 -1
- package/resource-picker/resource-picker-option.js +1 -1
- package/resource-picker/resource-picker-popup.js +2 -2
- package/resource-picker/resource-picker.js +75 -73
- package/resource-picker/resource-picker.scss +62 -34
- package/resource-picker/resource-picker.utils.js +1 -1
- package/rich-text/engine.d.ts +1 -0
- package/rich-text/format-html.d.ts +2 -0
- package/rich-text/index.d.ts +4 -0
- package/rich-text/index.js +1 -1
- package/rich-text/model.d.ts +2 -0
- package/rich-text/style.scss +293 -44
- package/rich-text/syntax.d.ts +5 -0
- package/rich-text/toolbar.d.ts +1 -1
- package/rich-text/translations.d.ts +2 -0
- package/robots.txt +4 -0
- package/search-input/index.js +2 -2
- package/search-input/native.d.ts +21 -2
- package/segmented-switch/index.js +1 -1
- package/select.d.ts +3 -1
- package/select.js +1 -1
- package/selection-list.d.ts +1 -0
- package/selection-list.js +3 -1
- package/status-feedback/badge.js +2 -2
- package/status-feedback/exit-snapshot.js +5 -5
- package/status-feedback/header.js +2 -2
- package/status-feedback/icons.js +1 -1
- package/status-feedback/index.js +1 -1
- package/status-feedback/item.js +2 -2
- package/status-feedback/motion.js +1 -1
- package/status-feedback/placement.js +1 -1
- package/status-feedback/popover.js +5 -5
- package/status-feedback/render.js +1 -1
- package/status-feedback/status-feedback.scss +124 -35
- package/styles/_activity-message.scss +24 -7
- package/styles/_alert.scss +78 -17
- package/styles/_cell-editor-frame.scss +11 -0
- package/styles/_compositions.scss +400 -80
- package/styles/_control.scss +30 -8
- package/styles/_disclosure.scss +15 -5
- package/styles/_editor-counter.scss +16 -6
- package/styles/_editor-slider.scss +8 -4
- package/styles/_field-configurator.scss +321 -23
- package/styles/_fields-grid.scss +49 -0
- package/styles/_filter-controls.scss +10 -2
- package/styles/_icon-action.scss +48 -15
- package/styles/_loading.scss +12 -3
- package/styles/_motion.scss +32 -9
- package/styles/_palette.scss +0 -24
- package/styles/_primitives.scss +369 -110
- package/styles/_theme.scss +130 -86
- package/styles/_thresholds.scss +28 -25
- package/styles/_time-grid.scss +8 -3
- package/styles/_tokens.scss +6 -1
- package/styles/color-roles.js +1 -1
- package/styles/configurator-actions.scss +241 -0
- package/styles/pagination.css +213 -0
- package/styles/{legacy-rating.css → rating.css} +8 -3
- package/styles.css +1 -1
- package/styles.scss +3 -5
- package/surfaces.d.ts +38 -2
- package/surfaces.js +37 -134
- package/svelte/UiComponent.svelte +44 -11
- package/svelte-control.js +1 -1
- package/svelte.d.ts +1 -1
- package/svelte.js +5 -5
- package/switch/index.js +16 -15
- package/time-grid.d.ts +0 -1
- package/time-grid.js +39 -38
- package/timeline-track/_style.scss +96 -24
- package/timeline-track/index.js +3 -3
- package/timeline-track/model.js +1 -1
- package/ui.css +1 -1
- package/view-switcher.d.ts +23 -0
- package/vue-badge.js +1 -1
- package/vue-control.js +1 -1
- package/vue-segmented-switch.js +1 -1
- package/vue.d.ts +29 -32
- package/vue.js +118 -123
- package/_chunks/chart-frame-Cmc7xU1i.js +0 -130
- package/_chunks/choice-chips-CHQTUdLs.js +0 -110
- package/_chunks/color-picker-CudqPYZo.js +0 -138
- package/_chunks/control-AHKXD5Eu.js +0 -93
- package/_chunks/control-tooltip-uscKfAnV.js +0 -100
- package/_chunks/controls-DsNi8V8I.js +0 -630
- package/_chunks/dialog.parts-CKGkC5zP.js +0 -134
- package/_chunks/editor-popup-WDdtVDNA.js +0 -81
- package/_chunks/history-controls-B3u3INEK.js +0 -27
- package/_chunks/mount-DQ1cpppK.js +0 -257
- package/_chunks/native-control-C_yok8_-.js +0 -605
- package/_chunks/request-trail-DSlFix6i.js +0 -618
- package/_chunks/rich-text-CH7gIqOS.js +0 -636
- package/_shared/data-query/binding.d.ts +0 -30
- package/_shared/data-query/blocks.d.ts +0 -30
- package/_shared/data-query/commands.d.ts +0 -47
- package/_shared/data-query/contracts.d.ts +0 -106
- package/_shared/data-query/cursor-reader.d.ts +0 -25
- package/_shared/data-query/direct-binding.d.ts +0 -3
- package/_shared/data-query/index.d.ts +0 -23
- package/_shared/data-query/infinite-binding.d.ts +0 -18
- package/_shared/data-query/keys.d.ts +0 -9
- package/_shared/data-query/limiter.d.ts +0 -12
- package/_shared/data-query/load-options.d.ts +0 -25
- package/_shared/data-query/materialize.d.ts +0 -2
- package/_shared/data-query/policy.d.ts +0 -14
- package/_shared/data-query/provider-queries.d.ts +0 -22
- package/_shared/data-query/reader.d.ts +0 -23
- package/_shared/data-query/remote-load.d.ts +0 -7
- package/_shared/data-query/source.d.ts +0 -40
- package/avatar/index.view.d.ts +0 -25
- package/color-palette/native.view.d.ts +0 -15
- package/control-presentation.view.d.ts +0 -8
- package/dialog/dialog-action-footer.view.d.ts +0 -20
- package/dialog/dialog.dom.view.d.ts +0 -15
- package/form-controls/index.view.d.ts +0 -10
- package/formatting/control-tooltip.d.ts +0 -27
- package/native-controls.view.d.ts +0 -54
- package/search-input/native.view.d.ts +0 -21
- package/styles/legacy-pagination.css +0 -112
- package/surfaces.view.d.ts +0 -63
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { RemoteBlockController, RemoteBlockPort } from './contracts.js';
|
|
2
|
-
import type { ReadProvider, ReadStatus } from './contracts.js';
|
|
3
|
-
import type { DataQueryScope } from './source.js';
|
|
4
|
-
import type { NativeReadOptions } from './load-options.js';
|
|
5
|
-
/** Providers must order offsets deterministically, with a unique tie-breaker. */
|
|
6
|
-
export type BlockConsistency<Result> = {
|
|
7
|
-
readonly mode: 'eventual';
|
|
8
|
-
readonly reload: 'sequence' | 'route';
|
|
9
|
-
} | {
|
|
10
|
-
readonly mode: 'snapshot';
|
|
11
|
-
readonly revision: string;
|
|
12
|
-
readonly getRevision: (result: Result) => string;
|
|
13
|
-
};
|
|
14
|
-
export interface BlockQueryOptions<Request, Result> {
|
|
15
|
-
readonly source?: DataQueryScope;
|
|
16
|
-
/** Internal uncached transport mode; no QueryClient or observers. */
|
|
17
|
-
readonly uncached?: boolean;
|
|
18
|
-
readonly concurrency?: number;
|
|
19
|
-
readonly read: ReadProvider<Request, Result>;
|
|
20
|
-
readonly consistency: BlockConsistency<Result>;
|
|
21
|
-
readonly resource?: string;
|
|
22
|
-
readonly observerOptions?: NativeReadOptions;
|
|
23
|
-
/** Semantic key normalization only. The provider still receives its original typed request. */
|
|
24
|
-
readonly keyRequest?: (request: Request) => unknown;
|
|
25
|
-
/** Application-owned pending proposals, applied only to detached data. */
|
|
26
|
-
readonly reconcile?: (result: Result, request: Request) => Result;
|
|
27
|
-
readonly onStatus?: (request: Request, status: ReadStatus) => void;
|
|
28
|
-
}
|
|
29
|
-
/** Subscription registry: cached reads use Query; bypass keeps only live operations. */
|
|
30
|
-
export declare function createBlockQueries<Request, Result>(port: RemoteBlockPort<Request, Result>, options: BlockQueryOptions<Request, Result>, operation: string): RemoteBlockController<Request>;
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import type { CommandEnvelope, CommandReceipt } from './contracts.js';
|
|
2
|
-
export type CommandProvider<Command, Changes, Revision = string, Conflict = Changes> = (envelope: CommandEnvelope<Command, Revision>, context: {
|
|
3
|
-
readonly signal: AbortSignal;
|
|
4
|
-
}) => CommandReceipt<Changes, Revision, Conflict> | Promise<CommandReceipt<Changes, Revision, Conflict>>;
|
|
5
|
-
export interface CommandState<Changes, Revision = string, Conflict = Changes> {
|
|
6
|
-
readonly status: 'idle' | 'submitting' | 'recovering' | 'accepted' | 'rejected' | 'conflict' | 'unknown' | 'disposed';
|
|
7
|
-
readonly attempt: number;
|
|
8
|
-
readonly receipt?: CommandReceipt<Changes, Revision, Conflict>;
|
|
9
|
-
/** Local application/refetch errors never change a definitive server receipt. */
|
|
10
|
-
readonly error?: unknown;
|
|
11
|
-
}
|
|
12
|
-
/** Write policy and domain hooks.
|
|
13
|
-
* @see https://pro.rv-grid.com/guides/server-data-commands/#configuration-types
|
|
14
|
-
*/
|
|
15
|
-
export interface CommandOptions<Command, Changes, Revision = string, Conflict = Changes> {
|
|
16
|
-
/** Restore a previously submitted envelope as unknown; execute() must not resubmit it. */
|
|
17
|
-
readonly resume?: boolean;
|
|
18
|
-
readonly submit: CommandProvider<Command, Changes, Revision, Conflict>;
|
|
19
|
-
/** Read a durable receipt by operation ID. Never resubmit from this callback. */
|
|
20
|
-
readonly recover?: CommandProvider<Command, Changes, Revision, Conflict>;
|
|
21
|
-
/** Explicit backend guarantee: identical operation IDs/payloads cannot execute twice. */
|
|
22
|
-
readonly idempotent?: boolean;
|
|
23
|
-
/** Validate product-specific revision, completeness and canonical-change semantics. */
|
|
24
|
-
readonly validateReceipt?: (receipt: CommandReceipt<Changes, Revision, Conflict>) => boolean;
|
|
25
|
-
/** Apply canonical changes atomically; domain pending/history state remains product-owned. */
|
|
26
|
-
readonly applyAccepted?: (changes: Changes, receipt: CommandReceipt<Changes, Revision, Conflict>) => void | Promise<void>;
|
|
27
|
-
readonly source?: {
|
|
28
|
-
accepted(): Promise<void>;
|
|
29
|
-
};
|
|
30
|
-
readonly onStatus?: (state: CommandState<Changes, Revision, Conflict>) => void;
|
|
31
|
-
}
|
|
32
|
-
export interface CommandExecution<Command, Changes, Revision = string, Conflict = Changes> {
|
|
33
|
-
/** A detached snapshot. Mutating it cannot change a submitted command. */
|
|
34
|
-
readonly envelope: CommandEnvelope<Command, Revision>;
|
|
35
|
-
getState(): CommandState<Changes, Revision, Conflict>;
|
|
36
|
-
execute(): Promise<CommandReceipt<Changes, Revision, Conflict>>;
|
|
37
|
-
recover(): Promise<CommandReceipt<Changes, Revision, Conflict>>;
|
|
38
|
-
retry(): Promise<CommandReceipt<Changes, Revision, Conflict>>;
|
|
39
|
-
/** Retry local canonical application/refetch after acceptance, without another write. */
|
|
40
|
-
reconcile(): Promise<void>;
|
|
41
|
-
cancel(): void;
|
|
42
|
-
dispose(): void;
|
|
43
|
-
}
|
|
44
|
-
/** One logical write. Keep this handle for recovery/retry; backend receipts provide durability.
|
|
45
|
-
* @see https://pro.rv-grid.com/guides/server-data-commands/
|
|
46
|
-
*/
|
|
47
|
-
export declare function createCommandExecution<Command, Changes, Revision = string, Conflict = Changes>(envelope: CommandEnvelope<Command, Revision>, options: CommandOptions<Command, Changes, Revision, Conflict>): CommandExecution<Command, Changes, Revision, Conflict>;
|
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
/** Library-independent contracts. Product packages need not depend on this package. */
|
|
2
|
-
export interface SourceIdentity {
|
|
3
|
-
readonly sourceId: string;
|
|
4
|
-
readonly schemaId: string;
|
|
5
|
-
readonly tenantId: string;
|
|
6
|
-
/** Non-secret principal/permission identity. Never put credentials here. */
|
|
7
|
-
readonly authorizationScope: string;
|
|
8
|
-
}
|
|
9
|
-
export type ReadProvider<Request, Result> = (request: Request, context: {
|
|
10
|
-
readonly signal: AbortSignal;
|
|
11
|
-
}) => Promise<Result> | Result;
|
|
12
|
-
export interface ReadStatus {
|
|
13
|
-
readonly status: 'pending' | 'success' | 'error';
|
|
14
|
-
readonly fetching: boolean;
|
|
15
|
-
readonly paused: boolean;
|
|
16
|
-
readonly error: unknown;
|
|
17
|
-
/** Infinite bindings expose Query's pagination state without a second page ledger. */
|
|
18
|
-
readonly hasNextPage?: boolean;
|
|
19
|
-
readonly hasPreviousPage?: boolean;
|
|
20
|
-
readonly fetchingNextPage?: boolean;
|
|
21
|
-
readonly fetchingPreviousPage?: boolean;
|
|
22
|
-
}
|
|
23
|
-
/** Synchronous domain-aware application; preserve pending changes/history here. */
|
|
24
|
-
export interface ReadPort<Result> {
|
|
25
|
-
/** Used to reject a second remote controller for the same mounted view. */
|
|
26
|
-
readonly owner: object;
|
|
27
|
-
/** Release old projection/row references on scope/request change and disposal. */
|
|
28
|
-
clear(): void;
|
|
29
|
-
hydrate(result: Result, context: {
|
|
30
|
-
readonly origin: 'remote';
|
|
31
|
-
}): void;
|
|
32
|
-
status(status: ReadStatus): void;
|
|
33
|
-
}
|
|
34
|
-
/** Subscription seam a product can implement without importing Query. */
|
|
35
|
-
export interface ReadIntent<Request> {
|
|
36
|
-
current(): Request;
|
|
37
|
-
subscribe(listener: (request: Request) => void): () => void;
|
|
38
|
-
}
|
|
39
|
-
export interface ReadBinding<Request> {
|
|
40
|
-
setRequest(request: Request): void;
|
|
41
|
-
refresh(): Promise<void>;
|
|
42
|
-
dispose(): void;
|
|
43
|
-
}
|
|
44
|
-
export type ReadConsistency<Revision> = {
|
|
45
|
-
readonly mode: 'snapshot';
|
|
46
|
-
readonly revision: Revision;
|
|
47
|
-
} | {
|
|
48
|
-
readonly mode: 'eventual';
|
|
49
|
-
readonly reload: 'sequence' | 'route';
|
|
50
|
-
};
|
|
51
|
-
export interface CommandEnvelope<Command, Revision = string> {
|
|
52
|
-
readonly operationId: string;
|
|
53
|
-
readonly resourceId: string;
|
|
54
|
-
readonly expectedRevision?: Revision;
|
|
55
|
-
readonly command: Command;
|
|
56
|
-
}
|
|
57
|
-
/** Payloads/revisions remain product-specific; transport failures are not rejections. */
|
|
58
|
-
export type CommandReceipt<Changes, Revision = string, Conflict = Changes> = {
|
|
59
|
-
readonly operationId: string;
|
|
60
|
-
readonly status: 'accepted';
|
|
61
|
-
readonly changes: Changes;
|
|
62
|
-
readonly revision: Revision;
|
|
63
|
-
} | {
|
|
64
|
-
readonly operationId: string;
|
|
65
|
-
readonly status: 'rejected';
|
|
66
|
-
readonly message: string;
|
|
67
|
-
} | {
|
|
68
|
-
readonly operationId: string;
|
|
69
|
-
readonly status: 'conflict';
|
|
70
|
-
readonly message: string;
|
|
71
|
-
readonly authoritative: Conflict;
|
|
72
|
-
readonly revision: Revision;
|
|
73
|
-
} | {
|
|
74
|
-
readonly operationId: string;
|
|
75
|
-
readonly status: 'unknown';
|
|
76
|
-
readonly message?: string;
|
|
77
|
-
};
|
|
78
|
-
/** Compatibility only: cannot cancel a transport that ignores signals. */
|
|
79
|
-
export declare function fromLegacyRead<Request, Result>(read: (request: Request) => Promise<Result> | Result): ReadProvider<Request, Result>;
|
|
80
|
-
export interface RemoteBlockStatus {
|
|
81
|
-
readonly status: 'pending' | 'success' | 'error';
|
|
82
|
-
readonly fetching: boolean;
|
|
83
|
-
readonly paused: boolean;
|
|
84
|
-
readonly error: unknown;
|
|
85
|
-
}
|
|
86
|
-
export interface RemoteBlockPort<Request, Result> {
|
|
87
|
-
readonly owner: object;
|
|
88
|
-
hydrate(request: Request, result: Result, context: {
|
|
89
|
-
readonly origin: 'remote';
|
|
90
|
-
}): void;
|
|
91
|
-
status(request: Request, state: RemoteBlockStatus): void;
|
|
92
|
-
/** Release editable row references while preserving logical slot/route identity. */
|
|
93
|
-
evict(request: Request): void;
|
|
94
|
-
}
|
|
95
|
-
export interface RemoteBlockController<Request> {
|
|
96
|
-
observe(request: Request, force?: boolean): Promise<boolean>;
|
|
97
|
-
retain(keep: (request: Request) => boolean): void;
|
|
98
|
-
reset(): void;
|
|
99
|
-
/** Optional aggregate physical-attempt diagnostics for the shared source. */
|
|
100
|
-
getRequestState?(): {
|
|
101
|
-
activeRequests: number;
|
|
102
|
-
queuedRequests: number;
|
|
103
|
-
};
|
|
104
|
-
refresh(): Promise<void>;
|
|
105
|
-
dispose(): void;
|
|
106
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { LoadQueryOptions } from './load-options.js';
|
|
2
|
-
import type { ReadStatus } from './contracts.js';
|
|
3
|
-
export interface CursorData<Page, Param> {
|
|
4
|
-
pages: Page[];
|
|
5
|
-
pageParams: Param[];
|
|
6
|
-
}
|
|
7
|
-
export interface CursorSubscription<Page, Param> {
|
|
8
|
-
readonly ready: Promise<CursorData<Page, Param>>;
|
|
9
|
-
fetchNextPage(): Promise<void>;
|
|
10
|
-
refresh(): Promise<void>;
|
|
11
|
-
dispose(): void;
|
|
12
|
-
}
|
|
13
|
-
/** Cursor sequences use Query's page ownership; no product transport/page cache is required. */
|
|
14
|
-
export declare function createCursorReader<Request, Page, Param>(operation: string, read: (request: Request, pageParam: Param, signal: AbortSignal) => Promise<Page> | Page, keyRequest: (request: Request) => unknown, initialPageParam: Param, getNextPageParam: (last: Page, pages: Page[], lastParam: Param) => Param | undefined, options?: Omit<LoadQueryOptions<never>, 'consistency' | 'reconcile'> | false): {
|
|
15
|
-
observe(request: Request, settings?: {
|
|
16
|
-
signal?: AbortSignal;
|
|
17
|
-
force?: boolean;
|
|
18
|
-
onData?: (data: CursorData<Page, Param>) => void;
|
|
19
|
-
onStatus?: (status: ReadStatus) => void;
|
|
20
|
-
}): CursorSubscription<Page, Param>;
|
|
21
|
-
/** Explicit product refresh starts a new sequence; mounted peers follow the reset. */
|
|
22
|
-
reset(request: Request): void;
|
|
23
|
-
invalidate(): void;
|
|
24
|
-
dispose(): void;
|
|
25
|
-
};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { ReadBinding, ReadPort } from './contracts.js';
|
|
2
|
-
/** One uncached subscription. Product block ownership guards delivery after reset. */
|
|
3
|
-
export declare function bindDirectRead<Result>(read: (signal: AbortSignal) => Promise<Result>, port: ReadPort<Result>, materialize?: (data: Result) => Result): Pick<ReadBinding<unknown>, 'refresh' | 'dispose'>;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export * from './contracts.js';
|
|
2
|
-
export * from './keys.js';
|
|
3
|
-
export * from './policy.js';
|
|
4
|
-
export { createDataQueryContext, getDataQuerySource } from './source.js';
|
|
5
|
-
export type { DataQuerySource, DataQueryScope, SourceOptions } from './source.js';
|
|
6
|
-
export { bindQuery, bindQueryIntent } from './binding.js';
|
|
7
|
-
export type { BindingOptions, QueryRead } from './binding.js';
|
|
8
|
-
export { bindInfiniteQuery } from './infinite-binding.js';
|
|
9
|
-
export type { InfiniteRead, InfiniteBinding } from './infinite-binding.js';
|
|
10
|
-
export { materializeData } from './materialize.js';
|
|
11
|
-
export { createBlockQueries } from './blocks.js';
|
|
12
|
-
export type { BlockQueryOptions, BlockConsistency } from './blocks.js';
|
|
13
|
-
export type { LoadQueryOptions, NativeReadOptions } from './load-options.js';
|
|
14
|
-
export { createRemoteLoad } from './remote-load.js';
|
|
15
|
-
export type { RemoteLoadController } from './remote-load.js';
|
|
16
|
-
export { createCommandExecution } from './commands.js';
|
|
17
|
-
export type { CommandProvider, CommandOptions, CommandState, CommandExecution } from './commands.js';
|
|
18
|
-
export { createQueryReader } from './reader.js';
|
|
19
|
-
export type { QueryReader, QueryReadSubscription } from './reader.js';
|
|
20
|
-
export { createCursorReader } from './cursor-reader.js';
|
|
21
|
-
export type { CursorData, CursorSubscription } from './cursor-reader.js';
|
|
22
|
-
export { createProviderQueries } from './provider-queries.js';
|
|
23
|
-
export type { ProviderQueryOptions } from './provider-queries.js';
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { InfiniteData } from '@tanstack/query-core';
|
|
2
|
-
import type { ReadBinding, ReadProvider } from './contracts.js';
|
|
3
|
-
import { type BindingOptions, type QueryRead } from './binding.js';
|
|
4
|
-
export interface InfiniteRead<Request, Page, PageParam> extends Omit<QueryRead<Request, Page>, 'read' | 'materialize'> {
|
|
5
|
-
readonly read: ReadProvider<{
|
|
6
|
-
readonly request: Request;
|
|
7
|
-
readonly pageParam: PageParam;
|
|
8
|
-
}, Page>;
|
|
9
|
-
readonly initialPageParam: PageParam;
|
|
10
|
-
readonly getNextPageParam: (lastPage: Page, pages: Page[], lastParam: PageParam) => PageParam | null | undefined;
|
|
11
|
-
readonly maxPages?: number;
|
|
12
|
-
readonly getPreviousPageParam?: (firstPage: Page, pages: Page[], firstParam: PageParam) => PageParam | null | undefined;
|
|
13
|
-
}
|
|
14
|
-
export interface InfiniteBinding<Request, Page, PageParam> extends ReadBinding<InfiniteRead<Request, Page, PageParam>> {
|
|
15
|
-
fetchNextPage(): Promise<void>;
|
|
16
|
-
fetchPreviousPage(): Promise<void>;
|
|
17
|
-
}
|
|
18
|
-
export declare function bindInfiniteQuery<Request, Page, PageParam>(initial: InfiniteRead<Request, Page, PageParam>, options: BindingOptions<InfiniteData<Page, PageParam>>): InfiniteBinding<Request, Page, PageParam>;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { SourceIdentity } from './contracts.js';
|
|
2
|
-
/** Tagged encoding avoids collisions between undefined/null, strings/numbers and -0. */
|
|
3
|
-
export type KeyValue = string | number | boolean | null | readonly KeyValue[];
|
|
4
|
-
export declare function encodeRequest(value: unknown, ancestors?: Set<object>): KeyValue;
|
|
5
|
-
export declare function sourceKey(scope: SourceIdentity): readonly ["revo", 1, string[]];
|
|
6
|
-
export declare function resultKey(scope: SourceIdentity, resource: string, operation: string, request: unknown): readonly ["revo", 1, string[], string, string, "result", KeyValue];
|
|
7
|
-
export declare function infiniteResultKey(scope: SourceIdentity, resource: string, operation: string, request: unknown): readonly ["revo", 1, string[], string, string, "infinite", KeyValue];
|
|
8
|
-
/** Record insertion order expresses current grid multi-sort precedence. */
|
|
9
|
-
export declare function orderedSort(sort: Readonly<Record<string, 'asc' | 'desc' | undefined>> | undefined): [string, "asc" | "desc"][];
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/** One physical-attempt budget per source runtime, not a request/result cache. */
|
|
2
|
-
export declare class SourceLimiter {
|
|
3
|
-
readonly concurrency: number;
|
|
4
|
-
private active;
|
|
5
|
-
private readonly queue;
|
|
6
|
-
constructor(concurrency: number);
|
|
7
|
-
getRequestState(): {
|
|
8
|
-
activeRequests: number;
|
|
9
|
-
queuedRequests: number;
|
|
10
|
-
};
|
|
11
|
-
run<T>(signal: AbortSignal, read: () => Promise<T> | T): Promise<T>;
|
|
12
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { DataQueryScope } from './source.js';
|
|
2
|
-
import type { ReadStatus } from './contracts.js';
|
|
3
|
-
import type { BlockConsistency } from './blocks.js';
|
|
4
|
-
import type { QueryObserverOptions } from '@tanstack/query-core';
|
|
5
|
-
/** Read policy only: identity, transport, acceptance framing and projection stay engine-owned. */
|
|
6
|
-
export declare const nativeReadOptionKeys: readonly ["enabled", "staleTime", "gcTime", "refetchInterval", "refetchIntervalInBackground", "refetchOnMount", "refetchOnWindowFocus", "refetchOnReconnect", "retry", "retryDelay", "retryOnMount", "networkMode", "meta"];
|
|
7
|
-
/** Native callbacks receive the native Query; its cached data is engine-owned/opaque. */
|
|
8
|
-
export type NativeReadOptions = Pick<QueryObserverOptions<unknown, unknown>, typeof nativeReadOptionKeys[number]>;
|
|
9
|
-
/** Also protects JavaScript callers from overriding keys, queryFn or acceptance framing. */
|
|
10
|
-
export declare function nativeReadOptions<FnData, Data = FnData>(options?: NativeReadOptions): Pick<QueryObserverOptions<FnData, unknown, Data, Data>, typeof nativeReadOptionKeys[number]>;
|
|
11
|
-
/**
|
|
12
|
-
* Optional native read policies plus shared scope, consistency and product reconciliation.
|
|
13
|
-
* Native options: enabled, staleTime, gcTime, refetchInterval, refetchIntervalInBackground,
|
|
14
|
-
* refetchOnMount, refetchOnWindowFocus, refetchOnReconnect, retry, retryDelay,
|
|
15
|
-
* retryOnMount, networkMode and meta. All existing loader callbacks stay unchanged.
|
|
16
|
-
* @see [Usage, configuration types and defaults](https://pro.rv-grid.com/guides/server-data-queries/#configuration-types)
|
|
17
|
-
*/
|
|
18
|
-
export interface LoadQueryOptions<Result> extends NativeReadOptions {
|
|
19
|
-
readonly source?: DataQueryScope;
|
|
20
|
-
readonly resource?: string;
|
|
21
|
-
readonly consistency?: BlockConsistency<Result>;
|
|
22
|
-
/** Application-owned pending proposals. The input is detached from the cache. */
|
|
23
|
-
readonly reconcile?: (result: Result) => Result;
|
|
24
|
-
readonly onStatus?: (status: ReadStatus) => void;
|
|
25
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export interface ReadPolicy {
|
|
2
|
-
readonly staleTime: number;
|
|
3
|
-
readonly gcTime: number;
|
|
4
|
-
readonly refetchOnMount: boolean;
|
|
5
|
-
readonly refetchOnWindowFocus: boolean;
|
|
6
|
-
readonly refetchOnReconnect: boolean;
|
|
7
|
-
readonly retry: number;
|
|
8
|
-
readonly retryDelay: number;
|
|
9
|
-
}
|
|
10
|
-
/** Explicit pilot defaults. Bindings override host defaults locally, never globally. */
|
|
11
|
-
export declare const defaultReadPolicy: Readonly<ReadPolicy>;
|
|
12
|
-
/** HTTP providers may expose a status; validation/auth failures are not transient. */
|
|
13
|
-
export declare function isRetryableRead(error: unknown): boolean;
|
|
14
|
-
export declare function resolveReadPolicy(policy?: Partial<ReadPolicy>): ReadPolicy;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { NativeReadOptions } from './load-options.js';
|
|
2
|
-
import type { DataQueryScope } from './source.js';
|
|
3
|
-
import type { ReadStatus } from './contracts.js';
|
|
4
|
-
/** Policy for one-shot provider calls. Polling/enabled require a mounted product observer.
|
|
5
|
-
* @see https://pro.rv-grid.com/guides/server-data-queries/#ancillary-providers
|
|
6
|
-
*/
|
|
7
|
-
export interface ProviderQueryOptions extends Pick<NativeReadOptions, 'staleTime' | 'gcTime' | 'retry' | 'retryDelay' | 'networkMode' | 'meta'> {
|
|
8
|
-
readonly source?: DataQueryScope;
|
|
9
|
-
/** Include endpoint/project identity when it is hidden inside a callback. */
|
|
10
|
-
readonly resource?: string;
|
|
11
|
-
readonly onStatus?: (status: ReadStatus) => void;
|
|
12
|
-
}
|
|
13
|
-
/** Keeps live callback context out of keys; Query owns every physical attempt and cached result. */
|
|
14
|
-
export declare function createProviderQueries(options?: ProviderQueryOptions | false): {
|
|
15
|
-
read<T>(operation: string, key: unknown, execute: (signal: AbortSignal) => T | PromiseLike<T>, signal?: AbortSignal, settings?: {
|
|
16
|
-
fresh?: boolean;
|
|
17
|
-
}): Promise<T>;
|
|
18
|
-
accepted(): Promise<void>;
|
|
19
|
-
/** A cache failure must never turn an already accepted write into a retryable write failure. */
|
|
20
|
-
afterWrite(): Promise<void>;
|
|
21
|
-
dispose(): void;
|
|
22
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { LoadQueryOptions } from './load-options.js';
|
|
2
|
-
import type { ReadStatus } from './contracts.js';
|
|
3
|
-
export interface QueryReadSubscription<Result> {
|
|
4
|
-
readonly ready: Promise<Result>;
|
|
5
|
-
refresh(): Promise<void>;
|
|
6
|
-
dispose(): void;
|
|
7
|
-
}
|
|
8
|
-
export interface QueryReader<Request, Result> {
|
|
9
|
-
read(request: Request, signal?: AbortSignal, options?: {
|
|
10
|
-
fresh?: boolean;
|
|
11
|
-
}): Promise<Result>;
|
|
12
|
-
observe(request: Request, options?: {
|
|
13
|
-
signal?: AbortSignal;
|
|
14
|
-
force?: boolean;
|
|
15
|
-
onData?: (result: Result) => void;
|
|
16
|
-
onStatus?: (status: ReadStatus) => void;
|
|
17
|
-
}): QueryReadSubscription<Result>;
|
|
18
|
-
invalidate(): void;
|
|
19
|
-
accepted(): Promise<void>;
|
|
20
|
-
dispose(): void;
|
|
21
|
-
}
|
|
22
|
-
/** Promise providers and mounted consumers share the same validated read/cache lifecycle. */
|
|
23
|
-
export declare function createQueryReader<Request, Result>(operation: string, read: (request: Request, signal: AbortSignal) => Promise<Result> | Result, keyRequest: (request: Request) => unknown, options?: LoadQueryOptions<Result> | false, materialize?: (result: Result, request: Request) => Result): QueryReader<Request, Result>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { LoadQueryOptions } from './load-options.js';
|
|
2
|
-
import type { RemoteBlockController, RemoteBlockPort } from './contracts.js';
|
|
3
|
-
export type RemoteLoadController<Request> = RemoteBlockController<Request> & {
|
|
4
|
-
invalidate(): void;
|
|
5
|
-
};
|
|
6
|
-
/** Own a private context by default; supplied scopes remain owned by the caller. */
|
|
7
|
-
export declare function createRemoteLoad<Request, Result>(operation: string, port: RemoteBlockPort<Request, Result>, read: (request: Request, signal: AbortSignal) => Promise<Result> | Result, keyRequest: (request: Request) => unknown, options?: LoadQueryOptions<Result> | false, concurrency?: number, debounceMs?: number): RemoteLoadController<Request>;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { QueryClient } from '@tanstack/query-core';
|
|
2
|
-
import type { SourceIdentity } from './contracts.js';
|
|
3
|
-
import { SourceLimiter } from './limiter.js';
|
|
4
|
-
import { type ReadPolicy } from './policy.js';
|
|
5
|
-
/** Internal cache framing; products receive only detached value projections. */
|
|
6
|
-
export interface ReadValue<T> {
|
|
7
|
-
readonly acceptanceVersion: number;
|
|
8
|
-
readonly value: T;
|
|
9
|
-
}
|
|
10
|
-
export interface SourceOptions {
|
|
11
|
-
readonly concurrency?: number;
|
|
12
|
-
readonly policy?: Partial<ReadPolicy>;
|
|
13
|
-
}
|
|
14
|
-
export declare class DataQuerySource {
|
|
15
|
-
readonly client: QueryClient;
|
|
16
|
-
readonly identity: SourceIdentity;
|
|
17
|
-
readonly policy: ReadPolicy;
|
|
18
|
-
readonly limiter: SourceLimiter;
|
|
19
|
-
private version;
|
|
20
|
-
/** Use getDataQuerySource so equal scopes share the limiter and acceptance fence. */
|
|
21
|
-
constructor(client: QueryClient, identity: SourceIdentity, options: SourceOptions);
|
|
22
|
-
isCurrent(value: ReadValue<unknown>): boolean;
|
|
23
|
-
read<T>(signal: AbortSignal, provider: () => Promise<T> | T, materialize?: (value: T) => T): Promise<ReadValue<T>>;
|
|
24
|
-
/** Domain code applies canonical changes before calling this after acceptance. */
|
|
25
|
-
accepted(): Promise<void>;
|
|
26
|
-
/** Coarse, safe source-wide invalidation; product mappings can narrow it later. */
|
|
27
|
-
invalidate(): Promise<void>;
|
|
28
|
-
}
|
|
29
|
-
/** Structural public scope survives declaration bundling in consuming products. */
|
|
30
|
-
export type DataQueryScope = Omit<DataQuerySource, 'limiter'> & {
|
|
31
|
-
readonly limiter: Pick<SourceLimiter, keyof SourceLimiter>;
|
|
32
|
-
};
|
|
33
|
-
export declare function getDataQuerySource(client: QueryClient, identity: SourceIdentity, options?: SourceOptions): DataQuerySource;
|
|
34
|
-
/** Create once per application/session, or once per SSR request; never a global SSR client. */
|
|
35
|
-
export declare function createDataQueryContext(client?: QueryClient): {
|
|
36
|
-
client: QueryClient;
|
|
37
|
-
source(identity: SourceIdentity, options?: SourceOptions): DataQuerySource;
|
|
38
|
-
/** Dispose this context's bindings first. Injected caches are never cleared. */
|
|
39
|
-
dispose(): void;
|
|
40
|
-
};
|
package/avatar/index.view.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { h } from '../_vendor/preact/src/index';
|
|
2
|
-
export { AVATAR_CELL_BACKGROUNDS } from '../color-palette/common-palettes';
|
|
3
|
-
export type AvatarTemplateOptions = {
|
|
4
|
-
ariaLabel?: string;
|
|
5
|
-
className?: string;
|
|
6
|
-
index?: number;
|
|
7
|
-
initials?: string;
|
|
8
|
-
key?: string | number;
|
|
9
|
-
label?: string;
|
|
10
|
-
rectangular?: boolean;
|
|
11
|
-
size?: number;
|
|
12
|
-
style?: Record<string, string | number | null | undefined>;
|
|
13
|
-
value?: unknown;
|
|
14
|
-
};
|
|
15
|
-
/** Shared Preact avatar, including image-error fallback. */
|
|
16
|
-
export declare function AvatarElement({ options }: {
|
|
17
|
-
options?: AvatarTemplateOptions;
|
|
18
|
-
}): h.JSX.Element;
|
|
19
|
-
export declare function createAvatarElement(document: Document, options?: AvatarTemplateOptions): HTMLSpanElement;
|
|
20
|
-
export declare function getAvatarCellBackground(index?: number): "linear-gradient(135deg, #7dd3fc, #2563eb)" | "linear-gradient(135deg, #facc15, #b45309)" | "linear-gradient(135deg, #f9a8d4, #be185d)" | "linear-gradient(135deg, #a5b4fc, #4f46e5)" | "linear-gradient(135deg, #86efac, #15803d)" | "linear-gradient(135deg, #fda4af, #be123c)" | "linear-gradient(135deg, #c4b5fd, #7c3aed)" | "linear-gradient(135deg, #fdba74, #c2410c)";
|
|
21
|
-
export declare function getAvatarInitials(value: unknown): string;
|
|
22
|
-
export declare function getAvatarIndex(value: unknown): number;
|
|
23
|
-
export declare function avatarTemplate(h: any, options?: AvatarTemplateOptions): any;
|
|
24
|
-
/** Shared avatar-and-label presentation; resource/row lookup stays with consumers. */
|
|
25
|
-
export declare function avatarWithTextTemplate(h: any, options?: AvatarTemplateOptions): any;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export interface NativeColorPickerProps {
|
|
2
|
-
label: string;
|
|
3
|
-
value?: string;
|
|
4
|
-
disabled?: boolean;
|
|
5
|
-
optional?: boolean;
|
|
6
|
-
defaultLabel: string;
|
|
7
|
-
customLabel: string;
|
|
8
|
-
invalidColor?: string;
|
|
9
|
-
colorLabels: Readonly<Record<string, string>>;
|
|
10
|
-
onChange(value: string | undefined): void;
|
|
11
|
-
}
|
|
12
|
-
/** Compatibility mount API; palette markup and interaction belong to ColorPicker. */
|
|
13
|
-
export declare function mountColorPicker(host: HTMLElement, props: NativeColorPickerProps): {
|
|
14
|
-
destroy(): void;
|
|
15
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ControlTag, ControlAttributes } from './control-attributes';
|
|
2
|
-
export * from './control-attributes';
|
|
3
|
-
export declare function renderControl<H extends (...args: any[]) => any>(h: H, tag: ControlTag, attributes?: ControlAttributes | null, ...children: any[]): ReturnType<H>;
|
|
4
|
-
export declare function createControl<K extends ControlTag>(document: Document, tag: K, attributes?: ControlAttributes): HTMLElementTagNameMap[K];
|
|
5
|
-
export declare function registerControl<T extends object>(component: T, tag: ControlTag): T;
|
|
6
|
-
export declare function nativeControlTag(type: unknown): string | undefined;
|
|
7
|
-
/** Decorate a native icon control after installing its trusted bundled SVG. */
|
|
8
|
-
export declare function decorateIconAction(element: HTMLElement, label: string): void;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { h } from '../_vendor/preact/src/index';
|
|
2
|
-
import { ElementFactory } from '../native-controls';
|
|
3
|
-
export interface NativeDialogAction {
|
|
4
|
-
label?: string;
|
|
5
|
-
disabled?: boolean;
|
|
6
|
-
onClick?: () => void;
|
|
7
|
-
}
|
|
8
|
-
export interface NativeDialogActionFooterProps {
|
|
9
|
-
cancel?: NativeDialogAction | false;
|
|
10
|
-
save?: NativeDialogAction | false;
|
|
11
|
-
deleteAction?: NativeDialogAction | false;
|
|
12
|
-
reset?: NativeDialogAction | false;
|
|
13
|
-
}
|
|
14
|
-
/** One TSX composition for Preact consumers and element-returning host adapters. */
|
|
15
|
-
export declare function ActionFooterView({ cancel, save, deleteAction, reset, start, end, children, actionsClass, class: className, ...props }: Record<string, any>): h.JSX.Element;
|
|
16
|
-
/** Compatibility signature retained for existing Preact consumers. */
|
|
17
|
-
export declare function renderDialogActionFooter<H extends ElementFactory>(_h: H, props: Record<string, any>): ReturnType<H>;
|
|
18
|
-
export declare function mountDialogActionFooter(host: HTMLElement, props: NativeDialogActionFooterProps): {
|
|
19
|
-
destroy(): void;
|
|
20
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { DialogButtonVariant, DialogOpenOptions } from './dialog.types';
|
|
2
|
-
export interface DialogElements {
|
|
3
|
-
readonly root: HTMLElement;
|
|
4
|
-
readonly surface: HTMLElement;
|
|
5
|
-
readonly header: HTMLElement;
|
|
6
|
-
readonly body: HTMLElement;
|
|
7
|
-
readonly footer: HTMLElement;
|
|
8
|
-
readonly actions: HTMLElement;
|
|
9
|
-
}
|
|
10
|
-
/** Element-returning compatibility API; shared TSX owns the entire dialog chrome. */
|
|
11
|
-
export declare function createDialogElements(document: Document, options: DialogOpenOptions, close: () => void): DialogElements;
|
|
12
|
-
export declare function createDialogCloseButton(document: Document, label: string, close: () => void): HTMLButtonElement;
|
|
13
|
-
export declare function createDialogButton(document: Document, label: string, action: () => void, variant?: DialogButtonVariant): HTMLButtonElement;
|
|
14
|
-
export declare function trapDialogFocus(root: HTMLElement, event: KeyboardEvent): void;
|
|
15
|
-
export declare function getDialogFocusableElements(root: HTMLElement): HTMLElement[];
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export interface FormFieldOptions {
|
|
2
|
-
readonly label: string;
|
|
3
|
-
readonly control: HTMLElement;
|
|
4
|
-
readonly hint?: string;
|
|
5
|
-
readonly className?: string;
|
|
6
|
-
}
|
|
7
|
-
export declare function createFormField(document: Document, options: FormFieldOptions): HTMLLabelElement;
|
|
8
|
-
export declare function createTextControl(document: Document, placeholder: string): HTMLInputElement;
|
|
9
|
-
/** DOM counterpart of Dropdown; callers own its lifetime. */
|
|
10
|
-
export { createDropdownControl } from '../dropdown/control';
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { h, TargetedEvent } from '../_vendor/preact/src/index';
|
|
2
|
-
export declare function useControlTooltip(text: string, floating?: boolean, presentation?: {
|
|
3
|
-
className?: string;
|
|
4
|
-
placement?: 'above';
|
|
5
|
-
}): {
|
|
6
|
-
readonly id: string;
|
|
7
|
-
readonly hide: () => void;
|
|
8
|
-
readonly triggerProps: {
|
|
9
|
-
readonly 'aria-describedby': string;
|
|
10
|
-
readonly onFocus: (event: TargetedEvent<HTMLElement>) => void;
|
|
11
|
-
readonly onBlur: () => void;
|
|
12
|
-
readonly onMouseEnter: (event: TargetedEvent<HTMLElement>) => void;
|
|
13
|
-
readonly onMouseLeave: () => void;
|
|
14
|
-
readonly onPointerDown: (event: TargetedEvent<HTMLElement>) => void;
|
|
15
|
-
readonly onPointerCancel: () => void;
|
|
16
|
-
readonly onKeyDown: (event: KeyboardEvent) => void;
|
|
17
|
-
};
|
|
18
|
-
readonly tooltip: h.JSX.Element;
|
|
19
|
-
};
|
|
20
|
-
export declare function ControlTooltip({ id, text, visible, anchor, className, placement, }: {
|
|
21
|
-
readonly id: string;
|
|
22
|
-
readonly text: string;
|
|
23
|
-
readonly visible: boolean;
|
|
24
|
-
readonly anchor?: HTMLElement | null;
|
|
25
|
-
readonly className?: string;
|
|
26
|
-
readonly placement?: 'above';
|
|
27
|
-
}): h.JSX.Element;
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
/** Renderer-neutral controls shared by native DOM, Stencil and Preact hosts. */
|
|
2
|
-
export type ElementFactory = (...args: any[]) => any;
|
|
3
|
-
export declare function renderLoadingIndicator<H extends ElementFactory>(h: H, options: {
|
|
4
|
-
className?: string;
|
|
5
|
-
label?: string;
|
|
6
|
-
ref?: (element?: HTMLElement) => void;
|
|
7
|
-
showSpinner?: boolean;
|
|
8
|
-
}): ReturnType<H>;
|
|
9
|
-
export declare function createButtonElement(document: Document, options: {
|
|
10
|
-
label: string;
|
|
11
|
-
text?: string;
|
|
12
|
-
disabled?: boolean;
|
|
13
|
-
className?: string;
|
|
14
|
-
onClick?: (event: MouseEvent) => void;
|
|
15
|
-
}): HTMLButtonElement;
|
|
16
|
-
export declare function renderMenuItem<H extends ElementFactory>(h: H, options: {
|
|
17
|
-
label: string;
|
|
18
|
-
disabled: boolean;
|
|
19
|
-
submenu: boolean;
|
|
20
|
-
onActivate: () => void;
|
|
21
|
-
style?: string;
|
|
22
|
-
}): ReturnType<H>;
|
|
23
|
-
export declare function renderRatingStars<H extends ElementFactory>(h: H, value: number, maximum?: number): ReturnType<H>[];
|
|
24
|
-
export interface ScalarSliderOptions {
|
|
25
|
-
min: number;
|
|
26
|
-
max: number;
|
|
27
|
-
step: number;
|
|
28
|
-
value: number;
|
|
29
|
-
hideValue?: boolean;
|
|
30
|
-
displayValue?: string | number;
|
|
31
|
-
formatValue?: (value: number) => string | number;
|
|
32
|
-
thresholdClassNames?: string;
|
|
33
|
-
thresholds?: readonly {
|
|
34
|
-
value: number;
|
|
35
|
-
className: string;
|
|
36
|
-
}[];
|
|
37
|
-
label?: string;
|
|
38
|
-
onChange: (value: number, event: Event) => void;
|
|
39
|
-
onMouseDown?: (event: MouseEvent) => void;
|
|
40
|
-
}
|
|
41
|
-
/** Shared scalar slider presentation; edit commits and threshold policy are caller-owned. */
|
|
42
|
-
export declare function renderScalarSlider<H extends ElementFactory>(h: H, options: ScalarSliderOptions): ReturnType<H>;
|
|
43
|
-
export interface CounterOptions {
|
|
44
|
-
value: number;
|
|
45
|
-
min: number;
|
|
46
|
-
max: number;
|
|
47
|
-
step: number;
|
|
48
|
-
hideValue?: boolean;
|
|
49
|
-
onChange: (value: number, event: MouseEvent) => void;
|
|
50
|
-
decreaseLabel?: string;
|
|
51
|
-
increaseLabel?: string;
|
|
52
|
-
onMouseDown?: (event: MouseEvent) => void;
|
|
53
|
-
}
|
|
54
|
-
export declare function renderCounter<H extends ElementFactory>(h: H, options: CounterOptions): ReturnType<H>;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export interface SearchPresentation {
|
|
2
|
-
rootClassName?: string;
|
|
3
|
-
inputClassName?: string;
|
|
4
|
-
iconClassName?: string;
|
|
5
|
-
shortcutClassName?: string;
|
|
6
|
-
hideIcon?: boolean;
|
|
7
|
-
icon?: any;
|
|
8
|
-
shortcut?: any;
|
|
9
|
-
leading?: any;
|
|
10
|
-
trailing?: any;
|
|
11
|
-
testId?: string;
|
|
12
|
-
inputAttributes?: Record<string, any>;
|
|
13
|
-
}
|
|
14
|
-
/** One search composition for native, grid and Preact rendering. */
|
|
15
|
-
export declare function renderSearchInput<H extends (...args: any[]) => any>(h: H, options: SearchPresentation): ReturnType<H>;
|
|
16
|
-
export declare function createSearchInput(document: Document, options: Omit<SearchPresentation, 'icon'> & {
|
|
17
|
-
iconSvg: string;
|
|
18
|
-
}): {
|
|
19
|
-
root: HTMLElement;
|
|
20
|
-
input: HTMLInputElement;
|
|
21
|
-
};
|