@visactor/vbi 0.4.16 → 0.4.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/dist/builder/features/dimensions/dim-builder.d.ts +10 -10
  2. package/dist/builder/features/dimensions/dim-node-builder.d.ts +4 -0
  3. package/dist/builder/features/dimensions/dimension-utils.d.ts +4 -0
  4. package/dist/builder/features/havingFilter/having-builder.d.ts +3 -3
  5. package/dist/builder/features/measures/mea-builder.d.ts +9 -9
  6. package/dist/builder/features/measures/mea-node-builder.d.ts +4 -0
  7. package/dist/builder/features/measures/measure-utils.d.ts +4 -0
  8. package/dist/builder/features/whereFilter/where-builder.d.ts +3 -3
  9. package/dist/builder/index.d.ts +1 -1
  10. package/dist/builder/modules/apply-update.d.ts +2 -0
  11. package/dist/builder/modules/build-vquery.d.ts +4 -0
  12. package/dist/builder/modules/build-vseed.d.ts +8 -0
  13. package/dist/builder/modules/build.d.ts +3 -0
  14. package/dist/builder/modules/create-builder-features.d.ts +14 -0
  15. package/dist/builder/modules/encode-state-as-update.d.ts +2 -0
  16. package/dist/builder/modules/get-schema.d.ts +5 -0
  17. package/dist/builder/modules/index.d.ts +8 -0
  18. package/dist/builder/modules/is-empty.d.ts +2 -0
  19. package/dist/builder/vbi-builder.d.ts +7 -6
  20. package/dist/index.cjs +548 -412
  21. package/dist/index.d.ts +2 -1
  22. package/dist/index.js +546 -410
  23. package/dist/types/builder/VBIInterface.d.ts +1 -0
  24. package/dist/types/dsl/dimensions/dimensions.d.ts +2 -0
  25. package/dist/types/dsl/measures/measures.d.ts +2 -0
  26. package/dist/types/dsl/vbi/vbi.d.ts +2 -0
  27. package/dist/vbi/create-vbi.d.ts +14 -0
  28. package/dist/vbi/from/from-vbi-dsl-input.d.ts +3 -0
  29. package/dist/vbi/from/set-base-dsl-fields.d.ts +3 -0
  30. package/dist/vbi/generate-empty-dsl.d.ts +3 -0
  31. package/dist/vbi/normalize/ensure-having-group.d.ts +2 -0
  32. package/dist/vbi/normalize/ensure-where-group.d.ts +2 -0
  33. package/dist/vbi/normalize/ensure-y-array.d.ts +3 -0
  34. package/dist/vbi/normalize/to-y-map.d.ts +3 -0
  35. package/dist/vbi/normalize/types.d.ts +5 -0
  36. package/dist/vbi.d.ts +14 -0
  37. package/package.json +5 -5
  38. package/dist/builder/vbi.d.ts +0 -16
@@ -20,4 +20,5 @@ export interface VBIBuilderInterface {
20
20
  buildVSeed: () => Promise<VSeedDSL>;
21
21
  buildVQuery: () => VQueryDSL;
22
22
  build: () => VBIDSL;
23
+ isEmpty: () => boolean;
23
24
  }
@@ -1,10 +1,12 @@
1
1
  import { z } from 'zod';
2
2
  export declare const zVBIDimensionSchema: z.ZodObject<{
3
+ id: z.ZodString;
3
4
  field: z.ZodString;
4
5
  alias: z.ZodString;
5
6
  }, z.core.$strip>;
6
7
  export declare const zVBIDimensionGroupSchema: z.ZodType<VBIDimensionGroup>;
7
8
  export declare const zVBIDimensionTree: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
9
+ id: z.ZodString;
8
10
  field: z.ZodString;
9
11
  alias: z.ZodString;
10
12
  }, z.core.$strip>, z.ZodType<VBIDimensionGroup, unknown, z.core.$ZodTypeInternals<VBIDimensionGroup, unknown>>]>>;
@@ -1,5 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  export declare const zVBIMeasure: z.ZodObject<{
3
+ id: z.ZodString;
3
4
  field: z.ZodString;
4
5
  alias: z.ZodString;
5
6
  encoding: z.ZodEnum<{
@@ -19,6 +20,7 @@ export declare const zVBIMeasure: z.ZodObject<{
19
20
  }, z.core.$strip>;
20
21
  export declare const zVBIMeasureGroup: z.ZodType<VBIMeasureGroup>;
21
22
  export declare const zVBIMeasureTree: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
23
+ id: z.ZodString;
22
24
  field: z.ZodString;
23
25
  alias: z.ZodString;
24
26
  encoding: z.ZodEnum<{
@@ -3,10 +3,12 @@ export declare const zVBIDSL: z.ZodObject<{
3
3
  connectorId: z.ZodString;
4
4
  chartType: z.ZodCustom<any, any>;
5
5
  dimensions: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
6
+ id: z.ZodString;
6
7
  field: z.ZodString;
7
8
  alias: z.ZodString;
8
9
  }, z.core.$strip>, z.ZodType<import("..").VBIDimensionGroup, unknown, z.core.$ZodTypeInternals<import("..").VBIDimensionGroup, unknown>>]>>;
9
10
  measures: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
11
+ id: z.ZodString;
10
12
  field: z.ZodString;
11
13
  alias: z.ZodString;
12
14
  encoding: z.ZodEnum<{
@@ -0,0 +1,14 @@
1
+ export declare const createVBI: () => {
2
+ connectorMap: Map<string, {
3
+ discoverSchema: () => Promise<import("..").VBISchema>;
4
+ query: (queryProps: import("..").VBIQueryProps) => Promise<import("..").VBIQueryResult>;
5
+ } | (() => Promise<import("..").VBIConnector>)>;
6
+ registerConnector: (id: import("../types/connector/connector").VBIConnectorId, connector: import("..").VBIConnector | (() => Promise<import("..").VBIConnector>)) => void;
7
+ getConnector: (id: import("../types/connector/connector").VBIConnectorId) => Promise<{
8
+ discoverSchema: () => Promise<import("..").VBISchema>;
9
+ query: (queryProps: import("..").VBIQueryProps) => Promise<import("..").VBIQueryResult>;
10
+ }>;
11
+ generateEmptyDSL: (connectorId: import("../types/connector/connector").VBIConnectorId) => import("..").VBIDSL;
12
+ from: (vbi: import("..").VBIDSLInput) => import("..").VBIBuilder;
13
+ create: (vbi: import("..").VBIDSLInput) => import("..").VBIBuilder;
14
+ };
@@ -0,0 +1,3 @@
1
+ import type { VBIDSLInput } from '../../types';
2
+ import { VBIBuilder } from '../../builder';
3
+ export declare const fromVBIDSLInput: (vbi: VBIDSLInput) => VBIBuilder;
@@ -0,0 +1,3 @@
1
+ import * as Y from 'yjs';
2
+ import type { VBIDSLInput } from '../../types';
3
+ export declare const setBaseDSLFields: (dsl: Y.Map<any>, vbi: VBIDSLInput) => void;
@@ -0,0 +1,3 @@
1
+ import type { VBIConnectorId } from '../types/connector/connector';
2
+ import type { VBIDSL } from '../types';
3
+ export declare const generateEmptyDSL: (connectorId: VBIConnectorId) => VBIDSL;
@@ -0,0 +1,2 @@
1
+ import * as Y from 'yjs';
2
+ export declare const ensureHavingGroup: (havingFilter?: unknown) => Y.Map<any>;
@@ -0,0 +1,2 @@
1
+ import * as Y from 'yjs';
2
+ export declare const ensureWhereGroup: (whereFilter?: unknown) => Y.Map<any>;
@@ -0,0 +1,3 @@
1
+ import * as Y from 'yjs';
2
+ import { type EnsureIdMode } from './to-y-map';
3
+ export declare const ensureYArray: (arr: any, ensureId?: EnsureIdMode) => Y.Array<any>;
@@ -0,0 +1,3 @@
1
+ import * as Y from 'yjs';
2
+ export type EnsureIdMode = boolean | 'field';
3
+ export declare const toYMap: (obj: Record<string, any>, ensureId?: EnsureIdMode) => Y.Map<any>;
@@ -0,0 +1,5 @@
1
+ export interface FilterGroupInput {
2
+ id?: string;
3
+ op?: 'and' | 'or';
4
+ conditions?: any[];
5
+ }
package/dist/vbi.d.ts ADDED
@@ -0,0 +1,14 @@
1
+ export declare const VBI: {
2
+ connectorMap: Map<string, {
3
+ discoverSchema: () => Promise<import("./types").VBISchema>;
4
+ query: (queryProps: import("./types").VBIQueryProps) => Promise<import("./types").VBIQueryResult>;
5
+ } | (() => Promise<import("./types").VBIConnector>)>;
6
+ registerConnector: (id: import("./types/connector/connector").VBIConnectorId, connector: import("./types").VBIConnector | (() => Promise<import("./types").VBIConnector>)) => void;
7
+ getConnector: (id: import("./types/connector/connector").VBIConnectorId) => Promise<{
8
+ discoverSchema: () => Promise<import("./types").VBISchema>;
9
+ query: (queryProps: import("./types").VBIQueryProps) => Promise<import("./types").VBIQueryResult>;
10
+ }>;
11
+ generateEmptyDSL: (connectorId: import("./types/connector/connector").VBIConnectorId) => import("./types").VBIDSL;
12
+ from: (vbi: import("./types").VBIDSLInput) => import("./builder").VBIBuilder;
13
+ create: (vbi: import("./types").VBIDSLInput) => import("./builder").VBIBuilder;
14
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visactor/vbi",
3
- "version": "0.4.16",
3
+ "version": "0.4.17",
4
4
  "license": "MIT",
5
5
  "homepage": "https://visactor.github.io/VBI",
6
6
  "bugs": "https://github.com/VisActor/VBI/issues",
@@ -33,11 +33,11 @@
33
33
  "uuid": "13.0.0",
34
34
  "yjs": "13.6.28",
35
35
  "zod": "4.0.17",
36
- "@visactor/vseed": "0.4.16"
36
+ "@visactor/vseed": "0.4.17"
37
37
  },
38
38
  "optionalDependencies": {
39
- "@visactor/vseed": "0.4.16",
40
- "@visactor/vquery": "0.4.16"
39
+ "@visactor/vquery": "0.4.17",
40
+ "@visactor/vseed": "0.4.17"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@eslint/js": "9.39.0",
@@ -51,7 +51,7 @@
51
51
  "ts-morph": "26.0.0",
52
52
  "typescript": "5.9.3",
53
53
  "typescript-eslint": "8.48.0",
54
- "@visactor/vquery": "0.4.16"
54
+ "@visactor/vquery": "0.4.17"
55
55
  },
56
56
  "scripts": {
57
57
  "build": "rslib build",
@@ -1,16 +0,0 @@
1
- import { VBIConnectorId } from '../types/connector/connector';
2
- import { VBIDSL, VBIDSLInput } from '../types';
3
- import { VBIBuilder } from './vbi-builder';
4
- export declare const VBI: {
5
- connectorMap: Map<string, {
6
- discoverSchema: () => Promise<import("../types").VBISchema>;
7
- query: (queryProps: import("../types").VBIQueryProps) => Promise<import("../types").VBIQueryResult>;
8
- } | (() => Promise<import("../types").VBIConnector>)>;
9
- registerConnector: (id: VBIConnectorId, connector: import("../types").VBIConnector | (() => Promise<import("../types").VBIConnector>)) => void;
10
- getConnector: (id: VBIConnectorId) => Promise<{
11
- discoverSchema: () => Promise<import("../types").VBISchema>;
12
- query: (queryProps: import("../types").VBIQueryProps) => Promise<import("../types").VBIQueryResult>;
13
- }>;
14
- generateEmptyDSL: (connectorId: VBIConnectorId) => VBIDSL;
15
- from: (vbi: VBIDSLInput) => VBIBuilder;
16
- };