@dbml/parse 11.0.0-alpha.0 → 11.0.0-alpha.2

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 (34) hide show
  1. package/LICENSE +0 -0
  2. package/dist/dbml-parse.js +38 -28
  3. package/dist/dbml-parse.mjs +5770 -4665
  4. package/dist/src/compiler/index.d.ts +39 -6
  5. package/dist/src/compiler/projectLayout/layout.d.ts +2 -0
  6. package/dist/src/compiler/queries/files/fileKind.d.ts +18 -0
  7. package/dist/src/compiler/queries/transform/index.d.ts +2 -1
  8. package/dist/src/compiler/queries/transform/renameElement.d.ts +13 -0
  9. package/dist/src/compiler/queries/transform/types.d.ts +10 -1
  10. package/dist/src/compiler/queries/transform/utils/arch.d.ts +6 -0
  11. package/dist/src/core/arch/icons.d.ts +5 -0
  12. package/dist/src/core/arch/read.d.ts +51 -0
  13. package/dist/src/core/arch/vocabulary.d.ts +11 -0
  14. package/dist/src/core/global_modules/arch/index.d.ts +2 -0
  15. package/dist/src/core/global_modules/arch/interpret.d.ts +11 -0
  16. package/dist/src/core/global_modules/arch/utils.d.ts +7 -0
  17. package/dist/src/core/global_modules/index.d.ts +15 -1
  18. package/dist/src/core/global_modules/metadata/utils.d.ts +3 -1
  19. package/dist/src/core/global_modules/program/bind.d.ts +1 -0
  20. package/dist/src/core/global_modules/program/interpret.d.ts +2 -0
  21. package/dist/src/core/lexer/lexer.d.ts +23 -1
  22. package/dist/src/core/local_modules/arch/index.d.ts +2 -0
  23. package/dist/src/core/local_modules/index.d.ts +1 -0
  24. package/dist/src/core/parser/parser.d.ts +18 -1
  25. package/dist/src/core/types/errors.d.ts +17 -1
  26. package/dist/src/core/types/filepath.d.ts +2 -2
  27. package/dist/src/core/types/nodes.d.ts +1 -0
  28. package/dist/src/core/types/schemaJson/types.d.ts +64 -2
  29. package/dist/src/core/types/symbol/metadata.d.ts +12 -1
  30. package/dist/src/core/types/symbol/symbols.d.ts +18 -0
  31. package/dist/src/core/types/tokens.d.ts +2 -0
  32. package/dist/src/index.d.ts +18 -2
  33. package/dist/src/services/suggestions/provider.d.ts +1 -1
  34. package/package.json +2 -2
@@ -11,13 +11,29 @@ export { SyntaxToken, SyntaxTokenKind, isTriviaToken, isOp, isOpToken, } from '.
11
11
  export { CompileError, CompileErrorCode, } from './core/types/errors';
12
12
  export type { Position, } from './core/types';
13
13
  export { ScopeKind, splitQualifiedIdentifier, unescapeString, escapeString, formatRecordValue, isValidIdentifier, addDoubleQuoteIfNeeded, normalizeQualifiedName, } from './compiler/index';
14
- export { type Database, type MasterDatabase, type Table, type Note, type Column, type ColumnType, type Index, type Check, type InlineRef, type Ref, type RefEndpointPair, type RefEndpoint, type Enum, type EnumField, type TableGroup, type TableGroupField, type Alias, type AliasKind, type TablePartial, type TablePartialInjection, type RecordValue, type RecordValueType, type TableRecord, type Project, type SchemaElement, type TokenPosition, type ElementRef, type FilterConfig, type DiagramView, type CustomMetadata, } from './core/types/schemaJson';
14
+ export { type Database, type MasterDatabase, type Table, type Note, type Column, type ColumnType, type Index, type Check, type InlineRef, type Ref, type RefEndpointPair, type RefEndpoint, type Enum, type EnumField, type TableGroup, type TableGroupField, type Alias, type AliasKind, type TablePartial, type TablePartialInjection, type RecordValue, type RecordValueType, type TableRecord, type Project, type SchemaElement, type TokenPosition, type ElementRef, type FilterConfig, type DiagramView, type CustomMetadata, type Node, type Group, type NoteBox, type Link, type LinkOp, type Kind, type KindCategory, type ArchSettings, type ArchSettingValue, } from './core/types/schemaJson';
15
+ export { type FileKind, ARCH_DIAGRAM_TYPES, isArchDiagramType } from './compiler/queries/files/fileKind';
16
+ export { BUILTIN_KINDS, RESERVED, isReserved, suggestKind, suggestIcon, type KindSpec, } from './core/arch/vocabulary';
17
+ export { ICON_ALIAS, ICON_NAMES, isIconName, resolveIcon, } from './core/arch/icons';
15
18
  export { type RelationCardinality, type RelationshipOp, getRelationshipOp, getMultiplicities, parseCardinality, makeCardinalityRequired, makeCardinalityOptional, makeRelationshipRequired, isEndpointOneSide, isEndpointManySide, isEndpointOptional, isEndpointRequired, CARDINALITY_ONE, CARDINALITY_MAYBE, CARDINALITY_SOME, CARDINALITY_MANY, } from './core/types/relation';
16
19
  export type { DiagramViewSyncOperation, DiagramViewBlock, TextEdit, } from './compiler/queries/transform';
17
20
  export { findDiagramViewBlocks } from './compiler/queries/transform';
18
21
  export type { DepSyncOperation, DepSyncEdge, DepEndpointRef } from './compiler/queries/transform';
19
- export type { ElementIdentifier, SchemaIdentifier, TableIdentifier, ColumnIdentifier, EnumIdentifier, EndpointRef, RefIdentifier, DepIdentifier, NoteIdentifier, TableGroupIdentifier, } from './compiler/queries/transform';
22
+ export type { ElementIdentifier, SchemaIdentifier, TableIdentifier, ColumnIdentifier, EnumIdentifier, EndpointRef, RefIdentifier, DepIdentifier, NoteIdentifier, TableGroupIdentifier, ArchElementIdentifier, ArchLinkIdentifier, } from './compiler/queries/transform';
20
23
  export { dbmlLanguageConfig, dbmlMonarchTokensProvider, } from './services/monarch';
21
24
  export * from './compiler/projectLayout/layout';
25
+ /**
26
+ * The dialect seam.
27
+ *
28
+ * A Compiler takes the element vocabulary and the grammar switches it should run with. Pass a
29
+ * different module list and the same lexer, parser, file graph, caching and diagnostics bind a
30
+ * different language. Nothing below this line changes DBML: `dbmlModules` is what a Compiler
31
+ * uses when nobody says otherwise, and every switch in `ParserOptions` is off by default.
32
+ */
33
+ export { dbmlModules } from './core/global_modules';
34
+ export type { GlobalModule } from './core/global_modules/types';
35
+ export type { ParserOptions } from './core/parser/parser';
36
+ export type { LexerOptions } from './core/lexer/lexer';
37
+ export type { DialectOptions } from './compiler/index';
22
38
  export { Compiler };
23
39
  export * from './services';
@@ -27,4 +27,4 @@ export default class DBMLCompletionItemProvider implements CompletionItemProvide
27
27
  constructor(compiler: Compiler, options?: DBMLCompletionItemProviderOptions);
28
28
  provideCompletionItems(model: TextModel, position: Position): CompletionList;
29
29
  }
30
- export declare const TOP_LEVEL_SUGGESTION_LABELS: ("Table" | "Enum" | "TableGroup" | "TablePartial" | "Note" | "DiagramView" | "Metadata" | "Ref" | "Dep" | "Project" | "Records")[];
30
+ export declare const TOP_LEVEL_SUGGESTION_LABELS: ("Table" | "Enum" | "TableGroup" | "TablePartial" | "Note" | "Metadata" | "Ref" | "Project" | "DiagramView" | "Dep" | "Records")[];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package",
3
3
  "name": "@dbml/parse",
4
- "version": "11.0.0-alpha.0",
4
+ "version": "11.0.0-alpha.2",
5
5
  "description": "DBML parser v2",
6
6
  "author": "Holistics <dev@holistics.io>",
7
7
  "license": "Apache-2.0",
@@ -51,5 +51,5 @@
51
51
  "engines": {
52
52
  "node": ">=18"
53
53
  },
54
- "gitHead": "ed4c7429ba4d98398086563e2dfd2e1b27938d1a"
54
+ "gitHead": "75a0e5bf55149fef937ec7d02e48c170421229ff"
55
55
  }