react-semaphor 0.1.326 → 0.1.328
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/analytics-protocol/index.cjs +1 -1
- package/dist/analytics-protocol/index.js +1 -1
- package/dist/brand-studio/index.cjs +5 -5
- package/dist/brand-studio/index.js +23 -24
- package/dist/chunks/_commonjsHelpers-BVfed4GL.js +28 -0
- package/dist/chunks/_commonjsHelpers-DwTZ_eVU.js +1 -0
- package/dist/chunks/{braces-DVaMJoCd.js → braces-CG8viaD2.js} +1 -1
- package/dist/chunks/{braces-dHeaioTd.js → braces-DSaa_4Oc.js} +1 -1
- package/dist/chunks/{calendar-preferences-dialog-mqU_uOmY.js → calendar-preferences-dialog-DD_qAthL.js} +1 -1
- package/dist/chunks/{calendar-preferences-dialog--2jD-eKu.js → calendar-preferences-dialog-JRmNJptJ.js} +3 -3
- package/dist/chunks/{chevrons-up-down-DNQE-uEp.js → chevrons-up-down-CBa0uh0X.js} +1 -1
- package/dist/chunks/{chevrons-up-down-CLbzBHoI.js → chevrons-up-down-ChDNqVP7.js} +1 -1
- package/dist/chunks/dashboard-briefing-launcher-BKdJFwH5.js +106 -0
- package/dist/chunks/{dashboard-briefing-launcher-DsjXUPFq.js → dashboard-briefing-launcher-BfyNkd8i.js} +1106 -1108
- package/dist/chunks/{dashboard-controls-DgNkM1yT.js → dashboard-controls-0pZDLvFL.js} +218 -218
- package/dist/chunks/{dashboard-controls-XCa9PZuU.js → dashboard-controls-C0xm1QMR.js} +10 -10
- package/dist/chunks/dashboard-json-BW5OVZ6m.js +1 -0
- package/dist/chunks/{dashboard-json-DkA6Bf0Y.js → dashboard-json-DsruhRPD.js} +14 -13
- package/dist/chunks/date-formatter-B4EBSe9C.js +1 -0
- package/dist/chunks/date-formatter-CzcPZx39.js +416 -0
- package/dist/chunks/edit-dashboard-visual-DQyJ7SSv.js +178 -0
- package/dist/chunks/{edit-dashboard-visual-Q5hW5MXk.js → edit-dashboard-visual-g5SZZahJ.js} +8242 -7784
- package/dist/chunks/index-1JWDPCun.js +1935 -0
- package/dist/chunks/index-BdjXTQt4.js +1444 -0
- package/dist/chunks/{index-DwfDwtv2.js → index-BmKr-K7J.js} +117670 -113627
- package/dist/chunks/index-C1l78BIx.js +3247 -0
- package/dist/chunks/lib-Ce3zosXY.js +38 -0
- package/dist/chunks/lib-DFvr9fM4.js +5500 -0
- package/dist/chunks/{palette-DtmNws9a.js → palette-D0YmAqBS.js} +1 -1
- package/dist/chunks/{palette-DpcvHAiY.js → palette-DQgq3edH.js} +1 -1
- package/dist/chunks/{resource-management-panel-CGwWKZOP.js → resource-management-panel-CIfBh46E.js} +1 -1
- package/dist/chunks/{resource-management-panel-D2oAQkKi.js → resource-management-panel-Cj19pw9M.js} +145 -145
- package/dist/chunks/switch-BvTzw2AW.js +173 -0
- package/dist/chunks/{switch-j3AThLFk.js → switch-De31SR3q.js} +2752 -2717
- package/dist/chunks/typescript-Cmizj1hi.js +446 -0
- package/dist/chunks/typescript-H1EwZsOb.js +159820 -0
- package/dist/chunks/use-create-flow-overlay-state-BTQiKRD1.js +26 -0
- package/dist/chunks/{use-create-flow-overlay-state-CP6GDQAX.js → use-create-flow-overlay-state-IcHP0l39.js} +150 -151
- package/dist/chunks/{use-visual-utils-CSXU-96k.js → use-visual-utils-DQ5zGYD2.js} +13 -13
- package/dist/chunks/{use-visual-utils-NpOW5uZ1.js → use-visual-utils-XF-AqV8o.js} +1 -1
- package/dist/chunks/{validators-DvTxl9i0.js → validators-DDAweCzB.js} +67 -48
- package/dist/chunks/validators-odlRJblR.js +2 -0
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/dashboard-authoring/index.cjs +3 -3
- package/dist/dashboard-authoring/index.js +907 -527
- package/dist/data-app-builder/index.cjs +1 -0
- package/dist/data-app-builder/index.js +4 -0
- package/dist/data-app-builder-browser-runtime/index.cjs +1 -0
- package/dist/data-app-builder-browser-runtime/index.js +10 -0
- package/dist/data-app-sdk/index.cjs +1 -1
- package/dist/data-app-sdk/index.js +208 -196
- package/dist/format-utils/index.cjs +4 -4
- package/dist/format-utils/index.js +22 -21
- package/dist/index.cjs +1 -1
- package/dist/index.js +14 -14
- package/dist/style.css +1 -1
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/analytics-protocol.d.ts +1 -0
- package/dist/types/dashboard-authoring.d.ts +79 -2
- package/dist/types/dashboard.d.ts +17 -2
- package/dist/types/data-app-builder-browser-runtime.d.ts +185 -0
- package/dist/types/data-app-builder.d.ts +630 -0
- package/dist/types/data-app-sdk.d.ts +15 -1
- package/dist/types/format-utils.d.ts +25 -0
- package/dist/types/main.d.ts +67 -10
- package/dist/types/shared.d.ts +17 -2
- package/dist/types/surfboard.d.ts +17 -2
- package/dist/types/types.d.ts +32 -3
- package/package.json +11 -1
- package/dist/chunks/dashboard-briefing-launcher-DguNfFr8.js +0 -106
- package/dist/chunks/dashboard-json-DiBd65Xf.js +0 -1
- package/dist/chunks/date-formatter-D9Bvw5Qk.js +0 -1
- package/dist/chunks/date-formatter-DyIOb6uC.js +0 -333
- package/dist/chunks/edit-dashboard-visual-BC9eOc4U.js +0 -178
- package/dist/chunks/index-B1-46PoR.js +0 -1303
- package/dist/chunks/save-BY7WF62U.js +0 -21
- package/dist/chunks/save-Cv_XRb94.js +0 -6
- package/dist/chunks/switch-5aQ_jcLH.js +0 -168
- package/dist/chunks/use-create-flow-overlay-state-BQPXP0AM.js +0 -26
- package/dist/chunks/validators-DJUMR5An.js +0 -2
package/dist/surfboard/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../chunks/index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../chunks/index-BdjXTQt4.js"),e=require("../chunks/common-types-C73-Ud1-.js"),a=require("../chunks/calendar-preferences-dialog-DD_qAthL.js");exports.Surfboard=r.DashboardPlus;exports.CONTROL_CARD_DEFAULT_VALUE=e.CONTROL_CARD_DEFAULT_VALUE;exports.EMPTY_SELECTION=e.EMPTY_SELECTION;exports.CalendarPreferencesDialog=a.CalendarPreferencesDialog;
|
package/dist/surfboard/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as e } from "../chunks/index-
|
|
1
|
+
import { a as e } from "../chunks/index-BmKr-K7J.js";
|
|
2
2
|
import { C, E } from "../chunks/common-types-4bjoIgvm.js";
|
|
3
|
-
import { C as s } from "../chunks/calendar-preferences-dialog
|
|
3
|
+
import { C as s } from "../chunks/calendar-preferences-dialog-JRmNJptJ.js";
|
|
4
4
|
export {
|
|
5
5
|
C as CONTROL_CARD_DEFAULT_VALUE,
|
|
6
6
|
s as CalendarPreferencesDialog,
|
|
@@ -294,6 +294,7 @@ export declare type SemaphorFieldRef = {
|
|
|
294
294
|
label?: string;
|
|
295
295
|
role?: 'dimension' | 'measure' | 'date' | 'id' | 'unknown';
|
|
296
296
|
dataType?: 'string' | 'number' | 'boolean' | 'date' | 'datetime' | 'unknown';
|
|
297
|
+
source?: SemaphorSourceRef;
|
|
297
298
|
};
|
|
298
299
|
|
|
299
300
|
export declare type SemaphorInputBinding = {
|
|
@@ -496,6 +496,8 @@ declare type DashboardAIContextMode = 'auto' | 'fixed';
|
|
|
496
496
|
|
|
497
497
|
export declare type DashboardAuthoringBreakpoint = (typeof DASHBOARD_AUTHORING_BREAKPOINTS)[number];
|
|
498
498
|
|
|
499
|
+
export declare function dashboardAuthoringDatasetMatchesSource(dataset: unknown, source: SemaphorSourceRef | undefined): boolean;
|
|
500
|
+
|
|
499
501
|
export declare type DashboardAuthoringDatasetRef = {
|
|
500
502
|
kind: 'semantic';
|
|
501
503
|
domainId: string;
|
|
@@ -512,6 +514,17 @@ export declare type DashboardAuthoringDatasetRef = {
|
|
|
512
514
|
label?: string;
|
|
513
515
|
};
|
|
514
516
|
|
|
517
|
+
export declare type DashboardAuthoringDatasetScopeIssue = 'invalid_dataset_count' | 'invalid_multi_dataset_scope';
|
|
518
|
+
|
|
519
|
+
export declare type DashboardAuthoringDatasetScopeResult = {
|
|
520
|
+
ok: true;
|
|
521
|
+
} | {
|
|
522
|
+
ok: false;
|
|
523
|
+
issue: DashboardAuthoringDatasetScopeIssue;
|
|
524
|
+
};
|
|
525
|
+
|
|
526
|
+
export declare function dashboardAuthoringFieldsReferToSameTarget(left: SemaphorFieldRef | undefined, right: SemaphorFieldRef | undefined): boolean;
|
|
527
|
+
|
|
515
528
|
export declare type DashboardAuthoringIdFactory = {
|
|
516
529
|
dashboardId?: () => string;
|
|
517
530
|
sheetId?: () => string;
|
|
@@ -519,18 +532,31 @@ export declare type DashboardAuthoringIdFactory = {
|
|
|
519
532
|
cardId: (seed?: string) => string;
|
|
520
533
|
};
|
|
521
534
|
|
|
535
|
+
export declare function dashboardAuthoringSourceFromField(field: SemaphorFieldRef | undefined, fallback?: SemaphorSourceRef): MaterializableDashboardAuthoringSource | undefined;
|
|
536
|
+
|
|
537
|
+
export declare function dashboardAuthoringSourceKey(source: SemaphorSourceRef): string;
|
|
538
|
+
|
|
539
|
+
export declare function dashboardAuthoringSourcesReferToSameDataset(left: SemaphorSourceRef, right: SemaphorSourceRef): boolean;
|
|
540
|
+
|
|
522
541
|
export declare type DashboardAuthoringValidationResult = {
|
|
523
542
|
ok: boolean;
|
|
524
543
|
errors: DashboardPlanWarning[];
|
|
525
544
|
warnings: DashboardPlanWarning[];
|
|
526
545
|
};
|
|
527
546
|
|
|
547
|
+
export declare type DashboardCardQueryFieldRef = {
|
|
548
|
+
name: string;
|
|
549
|
+
source?: DashboardAuthoringDatasetRef;
|
|
550
|
+
};
|
|
551
|
+
|
|
528
552
|
export declare type DashboardCardQueryIntent = {
|
|
529
553
|
metric?: string;
|
|
530
554
|
metrics?: string[];
|
|
531
555
|
dateField?: string;
|
|
556
|
+
dateFieldRef?: DashboardCardQueryFieldRef;
|
|
532
557
|
timeGrain?: 'day' | 'week' | 'month' | 'quarter' | 'year';
|
|
533
558
|
dimensions?: string[];
|
|
559
|
+
dimensionRefs?: DashboardCardQueryFieldRef[];
|
|
534
560
|
limit?: number;
|
|
535
561
|
};
|
|
536
562
|
|
|
@@ -774,6 +800,11 @@ export declare type DashboardSuggestion = {
|
|
|
774
800
|
cardCount: number;
|
|
775
801
|
filterCount: number;
|
|
776
802
|
prompt: string;
|
|
803
|
+
datasets?: Array<{
|
|
804
|
+
name: string;
|
|
805
|
+
label?: string;
|
|
806
|
+
}>;
|
|
807
|
+
relationshipHints?: string[];
|
|
777
808
|
};
|
|
778
809
|
|
|
779
810
|
export declare type DashboardSuggestionPreviewKind = 'kpi' | 'line' | 'bar' | 'donut' | 'table';
|
|
@@ -1401,6 +1432,8 @@ declare type FilterSemanticContext = {
|
|
|
1401
1432
|
|
|
1402
1433
|
declare type FilterValue = string | number | boolean | Date | null | [number, number] | [string, string] | string[] | number[];
|
|
1403
1434
|
|
|
1435
|
+
export declare function findDashboardAuthoringDatasetForSource(datasets: readonly DashboardAuthoringDatasetRef[], source: SemaphorSourceRef | undefined): DashboardAuthoringDatasetRef | undefined;
|
|
1436
|
+
|
|
1404
1437
|
/**
|
|
1405
1438
|
* Absolute fixed month/year default used by Month Picker defaults.
|
|
1406
1439
|
* - `month` is 0-indexed (0=January, 11=December) to align with MonthPicker.
|
|
@@ -1434,6 +1467,16 @@ declare type FormatSpec = {
|
|
|
1434
1467
|
sourceTimezone?: string;
|
|
1435
1468
|
prefix?: string;
|
|
1436
1469
|
suffix?: string;
|
|
1470
|
+
} | {
|
|
1471
|
+
type: 'duration';
|
|
1472
|
+
inputUnit?: 'millisecond' | 'second' | 'minute' | 'hour' | 'day';
|
|
1473
|
+
outputStyle?: 'compact' | 'digital' | 'long';
|
|
1474
|
+
largestUnit?: 'millisecond' | 'second' | 'minute' | 'hour' | 'day';
|
|
1475
|
+
smallestUnit?: 'millisecond' | 'second' | 'minute' | 'hour' | 'day';
|
|
1476
|
+
maxUnits?: number;
|
|
1477
|
+
prefix?: string;
|
|
1478
|
+
suffix?: string;
|
|
1479
|
+
negativeStyle?: 'minus' | 'parentheses';
|
|
1437
1480
|
} | {
|
|
1438
1481
|
type: 'string';
|
|
1439
1482
|
prefix?: string;
|
|
@@ -1448,6 +1491,8 @@ export declare type GeneratedDashboardCardArtifact = {
|
|
|
1448
1491
|
warnings?: DashboardPlanWarning[];
|
|
1449
1492
|
};
|
|
1450
1493
|
|
|
1494
|
+
export declare function getDashboardAuthoringCardSource(card: Pick<DashboardPlanCard, 'analyticsIntent'>): SemaphorSourceRef | undefined;
|
|
1495
|
+
|
|
1451
1496
|
declare type Granularity = 'day' | 'week' | 'month' | 'quarter' | 'year' | 'hour' | 'minute' | 'second';
|
|
1452
1497
|
|
|
1453
1498
|
declare interface GroupByColumn extends BaseColumn {
|
|
@@ -1545,6 +1590,10 @@ declare interface InteractionTrigger {
|
|
|
1545
1590
|
field: Field;
|
|
1546
1591
|
}
|
|
1547
1592
|
|
|
1593
|
+
export declare function isMaterializableDashboardAuthoringSource(value: unknown): value is MaterializableDashboardAuthoringSource;
|
|
1594
|
+
|
|
1595
|
+
export declare function isSemaphorSourceRef(value: unknown): value is SemaphorSourceRef;
|
|
1596
|
+
|
|
1548
1597
|
declare interface Join {
|
|
1549
1598
|
id: string;
|
|
1550
1599
|
source: DatabaseEntityReference;
|
|
@@ -1585,6 +1634,12 @@ declare interface LinkFormat {
|
|
|
1585
1634
|
|
|
1586
1635
|
declare type LogicalOperator = 'AND' | 'OR';
|
|
1587
1636
|
|
|
1637
|
+
export declare type MaterializableDashboardAuthoringSource = Extract<SemaphorSourceRef, {
|
|
1638
|
+
kind: 'semantic' | 'physical';
|
|
1639
|
+
}>;
|
|
1640
|
+
|
|
1641
|
+
export declare function mergeDashboardAuthoringSources(sources: readonly SemaphorSourceRef[]): SemaphorSourceRef[];
|
|
1642
|
+
|
|
1588
1643
|
declare interface MetricColumn extends BaseColumn {
|
|
1589
1644
|
role: 'metric';
|
|
1590
1645
|
aggregate: AggregateFunction;
|
|
@@ -1716,6 +1771,10 @@ declare interface PivotByField extends Field {
|
|
|
1716
1771
|
role: 'pivotby';
|
|
1717
1772
|
}
|
|
1718
1773
|
|
|
1774
|
+
export declare function preferDashboardAuthoringSourceMetadata(current: SemaphorSourceRef, next: SemaphorSourceRef): SemaphorSourceRef;
|
|
1775
|
+
|
|
1776
|
+
export declare function preferredDashboardAuthoringSource(sources: readonly SemaphorSourceRef[]): SemaphorSourceRef | undefined;
|
|
1777
|
+
|
|
1719
1778
|
declare interface QueryConfig {
|
|
1720
1779
|
groupByColumns?: GroupByColumn[];
|
|
1721
1780
|
pivotColumns?: GroupByColumn[];
|
|
@@ -1757,6 +1816,13 @@ declare type RelativeDateFilter = {
|
|
|
1757
1816
|
to: number;
|
|
1758
1817
|
};
|
|
1759
1818
|
|
|
1819
|
+
export declare function resolveDashboardAuthoringSource({ explicitSource, field, defaultSource, fallbackSources, }: {
|
|
1820
|
+
explicitSource?: unknown;
|
|
1821
|
+
field?: SemaphorFieldRef;
|
|
1822
|
+
defaultSource?: SemaphorSourceRef;
|
|
1823
|
+
fallbackSources?: readonly SemaphorSourceRef[];
|
|
1824
|
+
}): MaterializableDashboardAuthoringSource | undefined;
|
|
1825
|
+
|
|
1760
1826
|
declare type SelectedEntities = SelectedEntity[];
|
|
1761
1827
|
|
|
1762
1828
|
declare type SelectedEntity = DatabaseEntityReference | DataModelEntityReference | DatasetEntityReference | FileEntityReference;
|
|
@@ -1795,6 +1861,7 @@ declare type SemaphorFieldRef = {
|
|
|
1795
1861
|
label?: string;
|
|
1796
1862
|
role?: 'dimension' | 'measure' | 'date' | 'id' | 'unknown';
|
|
1797
1863
|
dataType?: 'string' | 'number' | 'boolean' | 'date' | 'datetime' | 'unknown';
|
|
1864
|
+
source?: SemaphorSourceRef;
|
|
1798
1865
|
};
|
|
1799
1866
|
|
|
1800
1867
|
declare type SemaphorInputBinding = {
|
|
@@ -2485,7 +2552,7 @@ declare type TDataLabelsConfig = {
|
|
|
2485
2552
|
display?: 'auto' | boolean;
|
|
2486
2553
|
formatMode?: 'inherit' | 'override';
|
|
2487
2554
|
/** @deprecated Use formatMode + formatOptions.type */
|
|
2488
|
-
format?: 'auto' | 'number' | 'currency' | 'percent' | 'date' | 'scientific' | 'none';
|
|
2555
|
+
format?: 'auto' | 'number' | 'currency' | 'percent' | 'date' | 'scientific' | 'duration' | 'none';
|
|
2489
2556
|
formatOptions?: TFormatOptions;
|
|
2490
2557
|
font?: {
|
|
2491
2558
|
size?: number;
|
|
@@ -2623,7 +2690,7 @@ declare type TFilter = {
|
|
|
2623
2690
|
declare type TFilterValue = FilterForString | FilterForEqual | FilterForCompare | FilterForBetween | FilterForIn | FilterForNull | FilterForDate;
|
|
2624
2691
|
|
|
2625
2692
|
declare type TFormatOptions = {
|
|
2626
|
-
type?: 'auto' | 'number' | 'currency' | 'percent' | 'scientific' | 'date';
|
|
2693
|
+
type?: 'auto' | 'number' | 'currency' | 'percent' | 'scientific' | 'date' | 'duration';
|
|
2627
2694
|
decimalPlaces?: number;
|
|
2628
2695
|
minimumFractionDigits?: number;
|
|
2629
2696
|
maximumFractionDigits?: number;
|
|
@@ -2640,6 +2707,11 @@ declare type TFormatOptions = {
|
|
|
2640
2707
|
timezone?: string;
|
|
2641
2708
|
sourceTimezone?: string;
|
|
2642
2709
|
relative?: boolean;
|
|
2710
|
+
durationInputUnit?: 'millisecond' | 'second' | 'minute' | 'hour' | 'day';
|
|
2711
|
+
durationDisplayStyle?: 'compact' | 'digital' | 'long';
|
|
2712
|
+
durationLargestUnit?: 'millisecond' | 'second' | 'minute' | 'hour' | 'day';
|
|
2713
|
+
durationSmallestUnit?: 'millisecond' | 'second' | 'minute' | 'hour' | 'day';
|
|
2714
|
+
durationMaxUnits?: number;
|
|
2643
2715
|
};
|
|
2644
2716
|
|
|
2645
2717
|
declare type TFrame = {
|
|
@@ -2820,6 +2892,11 @@ declare interface URLParameter {
|
|
|
2820
2892
|
field?: Field;
|
|
2821
2893
|
}
|
|
2822
2894
|
|
|
2895
|
+
export declare function validateDashboardAuthoringDatasetScope({ datasets, requireAtLeastOne, }: {
|
|
2896
|
+
datasets: readonly unknown[];
|
|
2897
|
+
requireAtLeastOne: boolean;
|
|
2898
|
+
}): DashboardAuthoringDatasetScopeResult;
|
|
2899
|
+
|
|
2823
2900
|
export declare function validateDashboardChangePlan(plan: DashboardChangePlan): DashboardAuthoringValidationResult;
|
|
2824
2901
|
|
|
2825
2902
|
export declare function validateDashboardPlan(plan: DashboardPlan): DashboardAuthoringValidationResult;
|
|
@@ -1469,6 +1469,16 @@ declare type FormatSpec = {
|
|
|
1469
1469
|
sourceTimezone?: string;
|
|
1470
1470
|
prefix?: string;
|
|
1471
1471
|
suffix?: string;
|
|
1472
|
+
} | {
|
|
1473
|
+
type: 'duration';
|
|
1474
|
+
inputUnit?: 'millisecond' | 'second' | 'minute' | 'hour' | 'day';
|
|
1475
|
+
outputStyle?: 'compact' | 'digital' | 'long';
|
|
1476
|
+
largestUnit?: 'millisecond' | 'second' | 'minute' | 'hour' | 'day';
|
|
1477
|
+
smallestUnit?: 'millisecond' | 'second' | 'minute' | 'hour' | 'day';
|
|
1478
|
+
maxUnits?: number;
|
|
1479
|
+
prefix?: string;
|
|
1480
|
+
suffix?: string;
|
|
1481
|
+
negativeStyle?: 'minus' | 'parentheses';
|
|
1472
1482
|
} | {
|
|
1473
1483
|
type: 'string';
|
|
1474
1484
|
prefix?: string;
|
|
@@ -2520,7 +2530,7 @@ export declare type TDataLabelsConfig = {
|
|
|
2520
2530
|
display?: 'auto' | boolean;
|
|
2521
2531
|
formatMode?: 'inherit' | 'override';
|
|
2522
2532
|
/** @deprecated Use formatMode + formatOptions.type */
|
|
2523
|
-
format?: 'auto' | 'number' | 'currency' | 'percent' | 'date' | 'scientific' | 'none';
|
|
2533
|
+
format?: 'auto' | 'number' | 'currency' | 'percent' | 'date' | 'scientific' | 'duration' | 'none';
|
|
2524
2534
|
formatOptions?: TFormatOptions;
|
|
2525
2535
|
font?: {
|
|
2526
2536
|
size?: number;
|
|
@@ -2671,7 +2681,7 @@ declare type TFilter = {
|
|
|
2671
2681
|
declare type TFilterValue = FilterForString | FilterForEqual | FilterForCompare | FilterForBetween | FilterForIn | FilterForNull | FilterForDate;
|
|
2672
2682
|
|
|
2673
2683
|
export declare type TFormatOptions = {
|
|
2674
|
-
type?: 'auto' | 'number' | 'currency' | 'percent' | 'scientific' | 'date';
|
|
2684
|
+
type?: 'auto' | 'number' | 'currency' | 'percent' | 'scientific' | 'date' | 'duration';
|
|
2675
2685
|
decimalPlaces?: number;
|
|
2676
2686
|
minimumFractionDigits?: number;
|
|
2677
2687
|
maximumFractionDigits?: number;
|
|
@@ -2688,6 +2698,11 @@ export declare type TFormatOptions = {
|
|
|
2688
2698
|
timezone?: string;
|
|
2689
2699
|
sourceTimezone?: string;
|
|
2690
2700
|
relative?: boolean;
|
|
2701
|
+
durationInputUnit?: 'millisecond' | 'second' | 'minute' | 'hour' | 'day';
|
|
2702
|
+
durationDisplayStyle?: 'compact' | 'digital' | 'long';
|
|
2703
|
+
durationLargestUnit?: 'millisecond' | 'second' | 'minute' | 'hour' | 'day';
|
|
2704
|
+
durationSmallestUnit?: 'millisecond' | 'second' | 'minute' | 'hour' | 'day';
|
|
2705
|
+
durationMaxUnits?: number;
|
|
2691
2706
|
};
|
|
2692
2707
|
|
|
2693
2708
|
export declare type TFrame = {
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
export declare type BrowserRuntimeLoader = <TModule = BrowserRuntimeModule>(specifier?: string) => Promise<TModule>;
|
|
2
|
+
|
|
3
|
+
export declare type BrowserRuntimeModule = BrowserSandboxRuntimeModule;
|
|
4
|
+
|
|
5
|
+
export declare type BrowserSandboxFile = {
|
|
6
|
+
path: string;
|
|
7
|
+
contents: string;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export declare type BrowserSandboxFilePlan = {
|
|
11
|
+
intent: string;
|
|
12
|
+
files: Array<{
|
|
13
|
+
path: string;
|
|
14
|
+
purpose: string;
|
|
15
|
+
action: 'create' | 'edit';
|
|
16
|
+
}>;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export declare type BrowserSandboxResult = {
|
|
20
|
+
ok: boolean;
|
|
21
|
+
projectRoot?: string;
|
|
22
|
+
provider?: string;
|
|
23
|
+
validation?: 'typecheck' | 'build' | 'write-policy-validation' | 'import-validation' | 'data-api-validation';
|
|
24
|
+
changedFiles?: string[];
|
|
25
|
+
summary?: string;
|
|
26
|
+
changes?: BrowserSandboxRevision['changes'];
|
|
27
|
+
files?: Array<{
|
|
28
|
+
path: string;
|
|
29
|
+
size: number;
|
|
30
|
+
}>;
|
|
31
|
+
generationMeta?: BrowserSandboxRevision['generationMeta'];
|
|
32
|
+
attempts?: Array<{
|
|
33
|
+
label: string;
|
|
34
|
+
ok: boolean;
|
|
35
|
+
command: {
|
|
36
|
+
command: string;
|
|
37
|
+
durationMs: number;
|
|
38
|
+
exitCode: number;
|
|
39
|
+
ok: boolean;
|
|
40
|
+
stdout: string;
|
|
41
|
+
stderr: string;
|
|
42
|
+
};
|
|
43
|
+
}>;
|
|
44
|
+
command?: {
|
|
45
|
+
command: string;
|
|
46
|
+
durationMs: number;
|
|
47
|
+
exitCode: number;
|
|
48
|
+
ok: boolean;
|
|
49
|
+
stdout: string;
|
|
50
|
+
stderr: string;
|
|
51
|
+
};
|
|
52
|
+
importValidation?: {
|
|
53
|
+
ok: boolean;
|
|
54
|
+
diagnostics: string[];
|
|
55
|
+
};
|
|
56
|
+
writePolicyValidation?: {
|
|
57
|
+
ok: boolean;
|
|
58
|
+
diagnostics: string[];
|
|
59
|
+
};
|
|
60
|
+
dataApiValidation?: {
|
|
61
|
+
ok: boolean;
|
|
62
|
+
diagnostics: string[];
|
|
63
|
+
};
|
|
64
|
+
telemetry?: {
|
|
65
|
+
contextFileCount?: number;
|
|
66
|
+
contextChars?: number;
|
|
67
|
+
generatedFileCount?: number;
|
|
68
|
+
generatedChars?: number;
|
|
69
|
+
repairAttempts?: number;
|
|
70
|
+
};
|
|
71
|
+
error?: string;
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
export declare type BrowserSandboxRevision = {
|
|
75
|
+
provider?: string;
|
|
76
|
+
summary?: string;
|
|
77
|
+
changes?: Array<{
|
|
78
|
+
kind: 'add' | 'edit' | 'remove';
|
|
79
|
+
label: string;
|
|
80
|
+
}>;
|
|
81
|
+
files: BrowserSandboxFile[];
|
|
82
|
+
plan?: BrowserSandboxFilePlan;
|
|
83
|
+
replaceExistingFiles?: boolean;
|
|
84
|
+
generationMeta?: {
|
|
85
|
+
model: string;
|
|
86
|
+
strategy: string;
|
|
87
|
+
reasoningEffort?: string;
|
|
88
|
+
durationMs: number;
|
|
89
|
+
outputChars?: number;
|
|
90
|
+
fallbackFrom?: {
|
|
91
|
+
strategy: string;
|
|
92
|
+
reason: string;
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
attemptLabel?: string;
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
export declare type BrowserSandboxRuntimeManifest = {
|
|
99
|
+
id: string;
|
|
100
|
+
name: string;
|
|
101
|
+
execution: 'browser-sandbox';
|
|
102
|
+
moduleSystem: string;
|
|
103
|
+
cssPipeline: {
|
|
104
|
+
mode: string;
|
|
105
|
+
status: string;
|
|
106
|
+
};
|
|
107
|
+
packages: Array<{
|
|
108
|
+
name: string;
|
|
109
|
+
source: 'host' | 'runtime' | 'shim' | 'fallback';
|
|
110
|
+
status: 'supported' | 'partial';
|
|
111
|
+
}>;
|
|
112
|
+
components: Array<{
|
|
113
|
+
name: string;
|
|
114
|
+
importPath: string;
|
|
115
|
+
sourceFile: string;
|
|
116
|
+
implementation: 'source' | 'shim';
|
|
117
|
+
dependencies: string[];
|
|
118
|
+
}>;
|
|
119
|
+
limits: {
|
|
120
|
+
writeScope: string[];
|
|
121
|
+
editableGlobs: string[];
|
|
122
|
+
unsupported: string[];
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
export declare type BrowserSandboxRuntimeModule = {
|
|
127
|
+
resetBrowserSandbox: (templateId?: string) => void;
|
|
128
|
+
readBrowserSandboxWorkspaceContext: () => BrowserSandboxWorkspaceContext;
|
|
129
|
+
readBrowserSandboxFiles: (paths: string[]) => BrowserSandboxFile[];
|
|
130
|
+
listBrowserSandboxFiles: () => Array<{
|
|
131
|
+
path: string;
|
|
132
|
+
size: number;
|
|
133
|
+
}>;
|
|
134
|
+
applyBrowserSandboxRevision: (revision: BrowserSandboxRevision) => BrowserSandboxResult;
|
|
135
|
+
compileBrowserSandboxPreviewHtml: () => Promise<{
|
|
136
|
+
html: string;
|
|
137
|
+
diagnostics: string[];
|
|
138
|
+
warnings?: string[];
|
|
139
|
+
cssMode?: 'tailwind' | 'fallback';
|
|
140
|
+
}>;
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
export declare type BrowserSandboxWorkspaceContext = {
|
|
144
|
+
projectRoot?: string;
|
|
145
|
+
framework?: string;
|
|
146
|
+
packageManager?: string;
|
|
147
|
+
runtimeManifest?: BrowserSandboxRuntimeManifest;
|
|
148
|
+
packageJson?: {
|
|
149
|
+
dependencies?: Record<string, string>;
|
|
150
|
+
devDependencies?: Record<string, string>;
|
|
151
|
+
scripts?: Record<string, string>;
|
|
152
|
+
};
|
|
153
|
+
componentsJson?: unknown;
|
|
154
|
+
tsconfig?: {
|
|
155
|
+
baseUrl?: string | null;
|
|
156
|
+
paths?: Record<string, string[]>;
|
|
157
|
+
jsx?: string | null;
|
|
158
|
+
strict?: boolean | null;
|
|
159
|
+
noUnusedLocals?: boolean | null;
|
|
160
|
+
noUnusedParameters?: boolean | null;
|
|
161
|
+
};
|
|
162
|
+
files?: {
|
|
163
|
+
source?: string[];
|
|
164
|
+
root?: string[];
|
|
165
|
+
editable?: string[];
|
|
166
|
+
editableGlobs?: string[];
|
|
167
|
+
approvalRequiredGlobs?: string[];
|
|
168
|
+
styleEntries?: string[];
|
|
169
|
+
localModules?: string[];
|
|
170
|
+
};
|
|
171
|
+
validation?: {
|
|
172
|
+
typecheck?: string | null;
|
|
173
|
+
build?: string | null;
|
|
174
|
+
};
|
|
175
|
+
capabilities?: unknown;
|
|
176
|
+
};
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Lazily loads the browser execution runtime only when the user chooses
|
|
180
|
+
* in-browser app building. Keep this behind a dedicated subpath so ordinary
|
|
181
|
+
* dashboard and Analytics Hub consumers do not pay for runtime code.
|
|
182
|
+
*/
|
|
183
|
+
export declare const loadSemaphorBrowserRuntime: BrowserRuntimeLoader;
|
|
184
|
+
|
|
185
|
+
export { }
|