@xenosystem/blocks 0.13.13 → 0.13.15
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/dist/{chunk-6XVFYPVH.js → chunk-PI5WOATA.js} +0 -1
- package/dist/data/index.d.ts +104 -19
- package/dist/data/index.js +315 -216
- package/dist/edit/index.js +1 -1
- package/dist/icons/index.js +1 -1
- package/dist/ops/index.js +1 -1
- package/dist/time/index.js +1 -1
- package/dist/trust/index.d.ts +119 -17
- package/dist/trust/index.js +334 -198
- package/package.json +3 -3
package/dist/data/index.d.ts
CHANGED
|
@@ -1151,7 +1151,7 @@ interface ChartViewOptions {
|
|
|
1151
1151
|
declare function chartViewState(c: ChartController, options?: ChartViewOptions): ChartViewModel;
|
|
1152
1152
|
declare function applyChartUi(c: ChartController, intent: ChartUiIntent): void;
|
|
1153
1153
|
declare const chartViewManifest: PanelManifest;
|
|
1154
|
-
declare const BEHAVIOURS$
|
|
1154
|
+
declare const BEHAVIOURS$3: {
|
|
1155
1155
|
'data/chartPanelView': (inputs: Record<string, unknown>) => ChartViewModel;
|
|
1156
1156
|
};
|
|
1157
1157
|
/** The runtime-bound unit: the plot surface the host renderer draws into. */
|
|
@@ -1519,7 +1519,7 @@ interface MetricsViewOptions {
|
|
|
1519
1519
|
declare function metricsViewState(c: MetricsController, options?: MetricsViewOptions): MetricsViewModel;
|
|
1520
1520
|
declare function applyMetricsUi(c: MetricsController, intent: MetricsUiIntent): void;
|
|
1521
1521
|
declare const metricsViewManifest: PanelManifest;
|
|
1522
|
-
declare const BEHAVIOURS$
|
|
1522
|
+
declare const BEHAVIOURS$2: {
|
|
1523
1523
|
'data/metricsPanelView': (inputs: Record<string, unknown>) => MetricsViewModel;
|
|
1524
1524
|
};
|
|
1525
1525
|
declare const METRICS_RUNTIME_UNITS: readonly [];
|
|
@@ -2005,7 +2005,7 @@ declare function fieldsViewState(c: FieldsController, options?: FieldsViewOption
|
|
|
2005
2005
|
/** Apply a `ui` intent to the controller. */
|
|
2006
2006
|
declare function applyFieldsUi(c: FieldsController, intent: FieldsUiIntent): void;
|
|
2007
2007
|
declare const fieldsViewManifest: PanelManifest;
|
|
2008
|
-
declare const BEHAVIOURS: {
|
|
2008
|
+
declare const BEHAVIOURS$1: {
|
|
2009
2009
|
'data/fieldsPanelView': (inputs: Record<string, unknown>) => FieldsViewModel;
|
|
2010
2010
|
};
|
|
2011
2011
|
/** No runtime-bound units: every intent is a `ui` emit. */
|
|
@@ -2085,6 +2085,8 @@ declare class ConnectorsController {
|
|
|
2085
2085
|
private lastQueries;
|
|
2086
2086
|
private selectedId;
|
|
2087
2087
|
private form;
|
|
2088
|
+
/** The form's draft values. In the controller, not React state, so the declaration can bind them — and cleared with the form. */
|
|
2089
|
+
private draft;
|
|
2088
2090
|
/** Newest outstanding request per `(connectionId, requestorPanelId)`. */
|
|
2089
2091
|
private readonly outstanding;
|
|
2090
2092
|
/** In-flight executions, keyed by cache key — the single-flight map. */
|
|
@@ -2151,6 +2153,10 @@ declare class ConnectorsController {
|
|
|
2151
2153
|
select(id: string | null): void;
|
|
2152
2154
|
/** The host asks for a credential. The panel renders the descriptor; it knows no platform names. */
|
|
2153
2155
|
requireCredential(spec: XenoCredentialFormSpec): void;
|
|
2156
|
+
/** The draft as typed so far. Never emitted except through {@link submitCredential}. */
|
|
2157
|
+
getCredentialDraft(): Record<string, string | number | boolean>;
|
|
2158
|
+
/** One field of the draft changed. */
|
|
2159
|
+
setCredentialDraft(key: string, value: string | number | boolean): void;
|
|
2154
2160
|
/**
|
|
2155
2161
|
* Submit a credential form.
|
|
2156
2162
|
*
|
|
@@ -3475,30 +3481,109 @@ interface RefreshCoordinator<T> {
|
|
|
3475
3481
|
declare function createRefreshCoordinator<T>(): RefreshCoordinator<T>;
|
|
3476
3482
|
|
|
3477
3483
|
/**
|
|
3478
|
-
* The Connectors panel
|
|
3484
|
+
* The Connectors panel AS A DECLARATION — the sixteenth declared block, and the first with a FORM
|
|
3485
|
+
* branch: the list of data sources, or — when the host asks for a credential — the credential form.
|
|
3479
3486
|
*
|
|
3480
|
-
*
|
|
3481
|
-
*
|
|
3482
|
-
*
|
|
3483
|
-
*
|
|
3484
|
-
*
|
|
3487
|
+
* Everything drawn is data: the list (a toolbar with Refresh all, a listbox of sources with their
|
|
3488
|
+
* kind and a health badge, the empty state, the status bar) and the form (the title, the host's
|
|
3489
|
+
* message, the redirect URI VERBATIM as a selectable `Code` block — rendering the real string is
|
|
3490
|
+
* what prevents a redirect-URI mismatch — one `Field` per visible field with the right control:
|
|
3491
|
+
* `Input` for text / password / number, `Select`, `Toggle`; the validation error as the hint; the
|
|
3492
|
+
* docs `Link`; Cancel / Submit) or the form's "cannot be set up" state. The draft lives in the
|
|
3493
|
+
* controller and is cleared with the form. No runtime-bound unit.
|
|
3494
|
+
*/
|
|
3495
|
+
|
|
3496
|
+
type Tone = 'neutral' | 'info' | 'success' | 'warning' | 'error';
|
|
3497
|
+
interface ConnectorsViewSource {
|
|
3498
|
+
id: string;
|
|
3499
|
+
name: string;
|
|
3500
|
+
kind: string;
|
|
3501
|
+
selected: boolean;
|
|
3502
|
+
disabled: boolean;
|
|
3503
|
+
title?: string;
|
|
3504
|
+
health: string;
|
|
3505
|
+
tone: Tone;
|
|
3506
|
+
}
|
|
3507
|
+
interface ConnectorsViewField {
|
|
3508
|
+
key: string;
|
|
3509
|
+
label: string;
|
|
3510
|
+
hint?: string;
|
|
3511
|
+
kind: 'text' | 'password' | 'number' | 'select' | 'boolean' | 'textarea';
|
|
3512
|
+
isText: boolean;
|
|
3513
|
+
isSelect: boolean;
|
|
3514
|
+
isBoolean: boolean;
|
|
3515
|
+
inputType: 'text' | 'password' | 'number';
|
|
3516
|
+
text: string;
|
|
3517
|
+
checked: boolean;
|
|
3518
|
+
placeholder?: string;
|
|
3519
|
+
options: {
|
|
3520
|
+
value: string;
|
|
3521
|
+
label: string;
|
|
3522
|
+
}[];
|
|
3523
|
+
}
|
|
3524
|
+
interface ConnectorsViewModel {
|
|
3525
|
+
listing: boolean;
|
|
3526
|
+
sources: ConnectorsViewSource[];
|
|
3527
|
+
empty: boolean;
|
|
3528
|
+
emptyHint: string;
|
|
3529
|
+
listed: boolean;
|
|
3530
|
+
countLabel: string;
|
|
3531
|
+
busyLabel?: string;
|
|
3532
|
+
form: boolean;
|
|
3533
|
+
formTitle: string;
|
|
3534
|
+
formBroken: boolean;
|
|
3535
|
+
formProblem?: string;
|
|
3536
|
+
formReady: boolean;
|
|
3537
|
+
formMessage?: string;
|
|
3538
|
+
redirectUri?: string;
|
|
3539
|
+
fields: ConnectorsViewField[];
|
|
3540
|
+
docsUrl?: string;
|
|
3541
|
+
submitDisabled: boolean;
|
|
3542
|
+
}
|
|
3543
|
+
type ConnectorsUiIntent = {
|
|
3544
|
+
kind: 'refreshAll';
|
|
3545
|
+
} | {
|
|
3546
|
+
kind: 'select';
|
|
3547
|
+
id: string;
|
|
3548
|
+
} | {
|
|
3549
|
+
kind: 'field';
|
|
3550
|
+
key: string;
|
|
3551
|
+
value: string | number | boolean;
|
|
3552
|
+
} | {
|
|
3553
|
+
kind: 'cancel';
|
|
3554
|
+
} | {
|
|
3555
|
+
kind: 'submit';
|
|
3556
|
+
};
|
|
3557
|
+
interface ConnectorsViewOptions {
|
|
3558
|
+
emptyHint?: string;
|
|
3559
|
+
}
|
|
3560
|
+
/** Derive the view from the live controller — the runtime calls this on every draw. */
|
|
3561
|
+
declare function connectorsViewState(c: ConnectorsController, options?: ConnectorsViewOptions): ConnectorsViewModel;
|
|
3562
|
+
declare function applyConnectorsUi(c: ConnectorsController, intent: ConnectorsUiIntent): void;
|
|
3563
|
+
declare const connectorsViewManifest: PanelManifest;
|
|
3564
|
+
declare const BEHAVIOURS: {
|
|
3565
|
+
'data/connectorsPanelView': (inputs: Record<string, unknown>) => ConnectorsViewModel;
|
|
3566
|
+
};
|
|
3567
|
+
declare const CONNECTORS_RUNTIME_UNITS: readonly [];
|
|
3568
|
+
declare const CONNECTORS_DECLARATION: BlockDeclaration;
|
|
3569
|
+
|
|
3570
|
+
/**
|
|
3571
|
+
* The Connectors panel view — the CODE VIEW of `CONNECTORS_DECLARATION`, drawing the same
|
|
3572
|
+
* `ConnectorsViewModel` byte-identical (the equivalence suite holds the two together). No
|
|
3573
|
+
* runtime-bound unit; every intent goes through `applyConnectorsUi`. The credential draft lives in
|
|
3574
|
+
* the controller and is cleared with the form — the values never sit in React state.
|
|
3485
3575
|
*
|
|
3486
|
-
*
|
|
3487
|
-
*
|
|
3488
|
-
* secret, so there is nothing to reveal.
|
|
3489
|
-
* - **No masked value round-trip.** A form field is uncontrolled-by-design local state that is
|
|
3490
|
-
* cleared at submit; nothing here reads a value back from a saved document.
|
|
3576
|
+
* Composes `@xenosystem/components/chrome`; the host must ensure `@xenosystem/workbench/primitives.css` is
|
|
3577
|
+
* present.
|
|
3491
3578
|
*
|
|
3492
3579
|
* @module
|
|
3493
3580
|
*/
|
|
3494
3581
|
|
|
3495
3582
|
/** Props for {@link ConnectorsPanelView}. */
|
|
3496
|
-
interface ConnectorsPanelViewProps {
|
|
3583
|
+
interface ConnectorsPanelViewProps extends ConnectorsViewOptions {
|
|
3497
3584
|
controller: ConnectorsController;
|
|
3498
|
-
/** Hint shown when no source is configured. */
|
|
3499
|
-
emptyHint?: string;
|
|
3500
3585
|
}
|
|
3501
3586
|
/** The Connectors panel view. */
|
|
3502
|
-
declare function ConnectorsPanelView({ controller, emptyHint
|
|
3587
|
+
declare function ConnectorsPanelView({ controller, emptyHint }: ConnectorsPanelViewProps): ReactNode;
|
|
3503
3588
|
|
|
3504
|
-
export { AGENT_HIDDEN_COMMANDS, ALL_AGGREGATES, ALL_CHART_TYPES, type BuildChartOptions, type BuildSelectOptions, type BuildSelectResult, BEHAVIOURS$
|
|
3589
|
+
export { AGENT_HIDDEN_COMMANDS, ALL_AGGREGATES, ALL_CHART_TYPES, type BuildChartOptions, type BuildSelectOptions, type BuildSelectResult, BEHAVIOURS$3 as CHART_BEHAVIOURS, CHART_DECLARATION, CHART_EMPTY_FILL, CHART_PALETTE_STEPS, CHART_PANEL_ID, CHART_RUNTIME_UNITS, CHART_TYPE_LABELS, BEHAVIOURS as CONNECTORS_BEHAVIOURS, CONNECTORS_DECLARATION, CONNECTORS_PANEL_ID, CONNECTORS_RUNTIME_UNITS, type CellAddress, ChartController, type ChartControllerOptions, type ChartHostBridge, type ChartPanelState, ChartPanelView, type ChartPanelViewProps, ChartPlot, type ChartRenderContext, type ChartRenderInput, type ChartRenderOptions, type ChartRenderer, type ChartUiIntent, type ChartViewModel, type ChartViewOptions, type ChartViewState, type ColumnLayout, type ColumnWindow, ConnectorExecuteInput, ConnectorExecuteOutput, ConnectorTransport, ConnectorsController, type ConnectorsControllerOptions, type ConnectorsHostBridge, ConnectorsPanelState, ConnectorsPanelView, type ConnectorsPanelViewProps, type ConnectorsRenderContext, type ConnectorsUiIntent, type ConnectorsViewField, type ConnectorsViewModel, type ConnectorsViewOptions, type ConnectorsViewSource, ConnectorsViewState, type CreateChartPanelOptions, type CreateConnectorExecutorOptions, type CreateConnectorsPanelOptions, type CreateFieldsPanelOptions, type CreateMetricsPanelOptions, type CreateTablePanelOptions, type CredentialDraft, type CredentialErrors, DEFAULT_CHART_OPTIONS, DEFAULT_COLUMN_WIDTH, DEFAULT_PAGE_SIZE, DEFAULT_RANGES, type DeltaDirection, EMPTY_LAYOUT, EXPIRY_SKEW_MS, type ExecuteError, BEHAVIOURS$1 as FIELDS_BEHAVIOURS, FIELDS_DECLARATION, FIELDS_PANEL_ID, FIELDS_RUNTIME_UNITS, FieldsController, type FieldsControllerOptions, type FieldsHostBridge, type FieldsPanelState, FieldsPanelView, type FieldsPanelViewProps, type FieldsRenderContext, type FieldsUiIntent, type FieldsViewColumn, type FieldsViewEntry, type FieldsViewFilter, type FieldsViewModel, type FieldsViewOptions, type FieldsViewShelf, type FieldsViewState, type HostSqlResolver, IMPLEMENTED_VIEW_MODES, type LoopbackRequest, type LoopbackVerdict, BEHAVIOURS$2 as METRICS_BEHAVIOURS, METRICS_DECLARATION, METRICS_PANEL_ID, METRICS_RUNTIME_UNITS, MIN_COLUMN_WIDTH, MONO_FILL_PALETTE, MONO_PALETTE, MetricsController, type MetricsControllerOptions, type MetricsHostBridge, type MetricsPanelState, MetricsPanelView, type MetricsPanelViewProps, type MetricsRenderContext, type MetricsUiIntent, type MetricsViewModel, type MetricsViewOptions, type MetricsViewState, type MetricsViewTile, type NumericConstraints, type OAuthStateRecord, type OAuthStateStore, type OAuthStateStoreOptions, type ParseCsvOptions, type ParseResult, type ParsedCsv, type PkcePair, PushdownSplit, type RefreshCoordinator, type ResolvedColumn, SHELF_PRESETS, type StoredOAuthToken, SubstrateFacilities, TABLE_PANEL_ID, TableController, type TableControllerOptions, type TableHostBridge, type TablePanelState, TablePanelView, type TablePanelViewProps, type TableRenderContext, type TableViewMode, type TableViewState, type TokenEndpointResponse, type VirtualWindow, type XenoAlertLevel, type XenoCalculatedFieldRequest, type XenoCellEdit, type XenoChartData, type XenoChartDrillDown, type XenoChartEncoding, type XenoChartExportRequest, type XenoChartHighlight, type XenoChartSeries, type XenoChartType, XenoConnection, XenoConnectionStatus, XenoConnectorFetch, XenoConnectorFileReader, XenoConnectorQueryRequest, XenoCredentialField, XenoCredentialFormSpec, XenoCredentialResult, type XenoFieldStat, type XenoMetricAlert, type XenoMetricRange, type XenoMetricSpec, type XenoMetricThreshold, type XenoMetricValue, XenoResolverErrorCode, XenoRestPaging, type XenoRowActivate, type XenoShelfEntry, type XenoShelfSpec, XenoSqlEngine, applyChartUi, applyConnectorsUi, applyFieldsUi, applyMetricsUi, applyPrecision, base64Url, breachSideOf, buildChartData, buildRestUrl, buildSelect, chartManifest, chartPanel, chartRuntimeComponents, chartViewManifest, chartViewState, clamp, classifyHttpStatus, coerceCsvValues, columnIndexAt, columnsOf, compileForHost, computeColumnWindow, computeWindow, connectorsManifest, connectorsPanel, connectorsViewManifest, connectorsViewState, constraintsOfColumn, createChartPanel, createConnectorExecutor, createConnectorsPanel, createFieldsPanel, createMetricsPanel, createOAuthStateStore, createPkcePair, createRefreshCoordinator, createTablePanel, credentialSpecProblem, defaultAggregateFor, defaultEncoding, deltaToneOf, emptyFilterGroup, entityOf, escapeLikePattern, executeCsvFile, executeDuckDb, executeGraphql, executeJsonFile, executeRest, executeSql, extractJsonPath, extractRows, fieldsManifest, fieldsPanel, fieldsViewManifest, fieldsViewState, firstGraphqlError, frozenWidth, getChartRenderer, isCategorical, isFieldVisible, isFilled, isLeafFilter, isLoopbackHost, isSafeTableName, mergeRefreshResponse, metricsManifest, metricsPanel, metricsViewManifest, metricsViewState, moveCell, moveColumn, needsRefresh, nextPageToken, normalizeLayout, normalizeNumeric, offerableAggregates, offerableFilterOps, parseCsv, parseJsonBody, parseJsonPath, parseLinkHeader, parseNumeric, pruneHiddenValues, queriesEqual, quoteIdent, quoteLiteral, redirectUriFor, renderFilterGroup, resolveChartColors, resolveColumns, rowsForMark, scrollLeftToReveal, scrollTopToReveal, setChartRenderer, setColumnVisible, setColumnWidth, setFrozenCount, sniffDelimiter, suggestedShelfFor, tableManifest, tablePanel, toChartJsConfig, toExecuteError, totalWidth, uniqueTableName, unsupportedMessage, validateCredentialDraft, validateEncoding, validateLoopbackRequest, visibleFields };
|