@inixiative/json-rules 3.0.0 → 3.1.0
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/README.md +41 -0
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +15 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -538,14 +538,26 @@ type SourceSpec = {
|
|
|
538
538
|
where: Condition;
|
|
539
539
|
label?: string;
|
|
540
540
|
groupBy?: string | string[];
|
|
541
|
+
from?: never;
|
|
541
542
|
} | {
|
|
542
543
|
where?: Condition;
|
|
543
544
|
label: string;
|
|
544
545
|
groupBy?: string | string[];
|
|
546
|
+
from?: never;
|
|
545
547
|
} | {
|
|
546
548
|
where?: Condition;
|
|
547
549
|
label?: string;
|
|
548
550
|
groupBy: string | string[];
|
|
551
|
+
from?: never;
|
|
552
|
+
}
|
|
553
|
+
/** A path source that offers its model's own source — `mapDefaults[map].models[model]
|
|
554
|
+
* .sources[field]` for the map and model this path reaches — instead of the rows reachable
|
|
555
|
+
* down the path. Its label and axes are the model source's; its `where` can only narrow. */
|
|
556
|
+
| {
|
|
557
|
+
from: 'mapDefaults';
|
|
558
|
+
where?: Condition;
|
|
559
|
+
label?: never;
|
|
560
|
+
groupBy?: never;
|
|
549
561
|
};
|
|
550
562
|
/** A `sources` entry: a bare eligibility `Condition`, or a richer `SourceSpec`. */
|
|
551
563
|
type SourceEntry = Condition | SourceSpec;
|
|
@@ -685,6 +697,9 @@ type ProjectedVisit = {
|
|
|
685
697
|
sourceLabels: Record<string, string>;
|
|
686
698
|
/** Per-field option-partition axes for a sourced field (from a SourceSpec's `groupBy`). */
|
|
687
699
|
sourceGroupBys: Record<string, string[]>;
|
|
700
|
+
/** Sourced fields that offer their model's own source (`from: 'mapDefaults'`) rather than
|
|
701
|
+
* the rows reachable down this path. */
|
|
702
|
+
sourceFrom: Record<string, 'mapDefaults'>;
|
|
688
703
|
};
|
|
689
704
|
/** Each declared path's projected visit, keyed by dotted path from the lens model. */
|
|
690
705
|
type PathProjection = Record<string, ProjectedVisit>;
|
package/dist/index.d.ts
CHANGED
|
@@ -538,14 +538,26 @@ type SourceSpec = {
|
|
|
538
538
|
where: Condition;
|
|
539
539
|
label?: string;
|
|
540
540
|
groupBy?: string | string[];
|
|
541
|
+
from?: never;
|
|
541
542
|
} | {
|
|
542
543
|
where?: Condition;
|
|
543
544
|
label: string;
|
|
544
545
|
groupBy?: string | string[];
|
|
546
|
+
from?: never;
|
|
545
547
|
} | {
|
|
546
548
|
where?: Condition;
|
|
547
549
|
label?: string;
|
|
548
550
|
groupBy: string | string[];
|
|
551
|
+
from?: never;
|
|
552
|
+
}
|
|
553
|
+
/** A path source that offers its model's own source — `mapDefaults[map].models[model]
|
|
554
|
+
* .sources[field]` for the map and model this path reaches — instead of the rows reachable
|
|
555
|
+
* down the path. Its label and axes are the model source's; its `where` can only narrow. */
|
|
556
|
+
| {
|
|
557
|
+
from: 'mapDefaults';
|
|
558
|
+
where?: Condition;
|
|
559
|
+
label?: never;
|
|
560
|
+
groupBy?: never;
|
|
549
561
|
};
|
|
550
562
|
/** A `sources` entry: a bare eligibility `Condition`, or a richer `SourceSpec`. */
|
|
551
563
|
type SourceEntry = Condition | SourceSpec;
|
|
@@ -685,6 +697,9 @@ type ProjectedVisit = {
|
|
|
685
697
|
sourceLabels: Record<string, string>;
|
|
686
698
|
/** Per-field option-partition axes for a sourced field (from a SourceSpec's `groupBy`). */
|
|
687
699
|
sourceGroupBys: Record<string, string[]>;
|
|
700
|
+
/** Sourced fields that offer their model's own source (`from: 'mapDefaults'`) rather than
|
|
701
|
+
* the rows reachable down this path. */
|
|
702
|
+
sourceFrom: Record<string, 'mapDefaults'>;
|
|
688
703
|
};
|
|
689
704
|
/** Each declared path's projected visit, keyed by dotted path from the lens model. */
|
|
690
705
|
type PathProjection = Record<string, ProjectedVisit>;
|