@optique/core 1.0.0-dev.908 → 1.0.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.
Files changed (109) hide show
  1. package/dist/annotation-state.cjs +425 -0
  2. package/dist/annotation-state.d.cts +24 -0
  3. package/dist/annotation-state.d.ts +24 -0
  4. package/dist/annotation-state.js +414 -0
  5. package/dist/annotations.cjs +2 -248
  6. package/dist/annotations.d.cts +2 -137
  7. package/dist/annotations.d.ts +2 -137
  8. package/dist/annotations.js +2 -238
  9. package/dist/completion.cjs +611 -100
  10. package/dist/completion.d.cts +1 -1
  11. package/dist/completion.d.ts +1 -1
  12. package/dist/completion.js +611 -100
  13. package/dist/constructs.cjs +3338 -827
  14. package/dist/constructs.d.cts +48 -7
  15. package/dist/constructs.d.ts +48 -7
  16. package/dist/constructs.js +3338 -827
  17. package/dist/context.cjs +0 -23
  18. package/dist/context.d.cts +119 -53
  19. package/dist/context.d.ts +119 -53
  20. package/dist/context.js +0 -22
  21. package/dist/dependency-metadata.cjs +139 -0
  22. package/dist/dependency-metadata.d.cts +112 -0
  23. package/dist/dependency-metadata.d.ts +112 -0
  24. package/dist/dependency-metadata.js +138 -0
  25. package/dist/dependency-runtime.cjs +698 -0
  26. package/dist/dependency-runtime.d.cts +149 -0
  27. package/dist/dependency-runtime.d.ts +149 -0
  28. package/dist/dependency-runtime.js +687 -0
  29. package/dist/dependency.cjs +7 -928
  30. package/dist/dependency.d.cts +2 -794
  31. package/dist/dependency.d.ts +2 -794
  32. package/dist/dependency.js +2 -899
  33. package/dist/displaywidth.cjs +44 -0
  34. package/dist/displaywidth.js +43 -0
  35. package/dist/doc.cjs +285 -23
  36. package/dist/doc.d.cts +57 -2
  37. package/dist/doc.d.ts +57 -2
  38. package/dist/doc.js +283 -25
  39. package/dist/execution-context.cjs +56 -0
  40. package/dist/execution-context.js +53 -0
  41. package/dist/extension.cjs +87 -0
  42. package/dist/extension.d.cts +97 -0
  43. package/dist/extension.d.ts +97 -0
  44. package/dist/extension.js +76 -0
  45. package/dist/facade.cjs +718 -523
  46. package/dist/facade.d.cts +87 -18
  47. package/dist/facade.d.ts +87 -18
  48. package/dist/facade.js +718 -523
  49. package/dist/index.cjs +14 -29
  50. package/dist/index.d.cts +10 -10
  51. package/dist/index.d.ts +10 -10
  52. package/dist/index.js +7 -7
  53. package/dist/input-trace.cjs +56 -0
  54. package/dist/input-trace.d.cts +77 -0
  55. package/dist/input-trace.d.ts +77 -0
  56. package/dist/input-trace.js +55 -0
  57. package/dist/internal/annotations.cjs +316 -0
  58. package/dist/internal/annotations.d.cts +140 -0
  59. package/dist/internal/annotations.d.ts +140 -0
  60. package/dist/internal/annotations.js +306 -0
  61. package/dist/internal/dependency.cjs +984 -0
  62. package/dist/internal/dependency.d.cts +539 -0
  63. package/dist/internal/dependency.d.ts +539 -0
  64. package/dist/internal/dependency.js +964 -0
  65. package/dist/{mode-dispatch.cjs → internal/mode-dispatch.cjs} +1 -3
  66. package/dist/{mode-dispatch.d.cts → internal/mode-dispatch.d.cts} +3 -7
  67. package/dist/{mode-dispatch.d.ts → internal/mode-dispatch.d.ts} +3 -7
  68. package/dist/{mode-dispatch.js → internal/mode-dispatch.js} +1 -3
  69. package/dist/internal/parser.cjs +728 -0
  70. package/dist/internal/parser.d.cts +947 -0
  71. package/dist/internal/parser.d.ts +947 -0
  72. package/dist/internal/parser.js +711 -0
  73. package/dist/message.cjs +84 -26
  74. package/dist/message.d.cts +49 -9
  75. package/dist/message.d.ts +49 -9
  76. package/dist/message.js +84 -27
  77. package/dist/modifiers.cjs +1023 -240
  78. package/dist/modifiers.d.cts +42 -1
  79. package/dist/modifiers.d.ts +42 -1
  80. package/dist/modifiers.js +1023 -240
  81. package/dist/parser.cjs +11 -463
  82. package/dist/parser.d.cts +3 -537
  83. package/dist/parser.d.ts +3 -537
  84. package/dist/parser.js +2 -433
  85. package/dist/phase2-seed.cjs +59 -0
  86. package/dist/phase2-seed.js +56 -0
  87. package/dist/primitives.cjs +557 -208
  88. package/dist/primitives.d.cts +10 -14
  89. package/dist/primitives.d.ts +10 -14
  90. package/dist/primitives.js +557 -208
  91. package/dist/program.cjs +5 -1
  92. package/dist/program.d.cts +5 -3
  93. package/dist/program.d.ts +5 -3
  94. package/dist/program.js +6 -1
  95. package/dist/suggestion.cjs +22 -8
  96. package/dist/suggestion.js +22 -8
  97. package/dist/usage-internals.cjs +3 -2
  98. package/dist/usage-internals.js +4 -2
  99. package/dist/usage.cjs +195 -40
  100. package/dist/usage.d.cts +92 -11
  101. package/dist/usage.d.ts +92 -11
  102. package/dist/usage.js +194 -41
  103. package/dist/validate.cjs +170 -0
  104. package/dist/validate.js +164 -0
  105. package/dist/valueparser.cjs +1278 -191
  106. package/dist/valueparser.d.cts +330 -20
  107. package/dist/valueparser.d.ts +330 -20
  108. package/dist/valueparser.js +1277 -192
  109. package/package.json +9 -9
@@ -0,0 +1,87 @@
1
+ const require_annotations = require('./internal/annotations.cjs');
2
+ const require_mode_dispatch = require('./internal/mode-dispatch.cjs');
3
+ const require_parser = require('./internal/parser.cjs');
4
+ const require_annotation_state = require('./annotation-state.cjs');
5
+
6
+ //#region src/extension.ts
7
+ const emptyTraits = Object.freeze({});
8
+ /**
9
+ * Defines stable extension traits on a parser object.
10
+ *
11
+ * @param parser The parser object to annotate.
12
+ * @param traits Traits to enable.
13
+ * @throws {TypeError} If a trait property cannot be defined on `parser`.
14
+ * @since 1.0.0
15
+ */
16
+ function defineTraits(parser, traits) {
17
+ if (traits.inheritsAnnotations === true) require_parser.defineInheritedAnnotationParser(parser);
18
+ if (traits.completesFromSource === true) Object.defineProperty(parser, require_parser.unmatchedNonCliDependencySourceStateMarker, {
19
+ value: true,
20
+ configurable: true,
21
+ enumerable: true
22
+ });
23
+ if (traits.requiresSourceBinding === true) Object.defineProperty(parser, require_parser.annotationWrapperRequiresSourceBindingKey, {
24
+ value: true,
25
+ configurable: true,
26
+ enumerable: false
27
+ });
28
+ }
29
+ /**
30
+ * Reads the stable extension traits defined on a parser object.
31
+ *
32
+ * @param parser The parser object to inspect.
33
+ * @returns The enabled traits. Returns an empty object when none are set.
34
+ * @since 1.0.0
35
+ */
36
+ function getTraits(parser) {
37
+ const traits = {
38
+ ...Reflect.get(parser, require_parser.inheritParentAnnotationsKey) === true ? { inheritsAnnotations: true } : {},
39
+ ...Reflect.get(parser, require_parser.unmatchedNonCliDependencySourceStateMarker) === true ? { completesFromSource: true } : {},
40
+ ...Reflect.get(parser, require_parser.annotationWrapperRequiresSourceBindingKey) === true ? { requiresSourceBinding: true } : {}
41
+ };
42
+ return Object.keys(traits).length > 0 ? traits : emptyTraits;
43
+ }
44
+ /**
45
+ * Delegates suggest-time runtime nodes to an inner parser while preserving an
46
+ * outer parser's own source metadata node.
47
+ *
48
+ * @param innerParser The wrapped parser that owns the underlying nodes.
49
+ * @param outerParser The outer parser that may contribute its own source node.
50
+ * @param state The outer parser state.
51
+ * @param path The parser path within the parse tree.
52
+ * @param innerState The state to use when collecting inner nodes.
53
+ * @param position Whether the outer node is appended or prepended.
54
+ * @returns The composed runtime nodes.
55
+ * @since 1.0.0
56
+ */
57
+ function delegateSuggestNodes(innerParser, outerParser, state, path, innerState, position = "append") {
58
+ return require_parser.getDelegatingSuggestRuntimeNodes(innerParser, outerParser, state, path, innerState, position);
59
+ }
60
+ /**
61
+ * Maps the source capability of a parser's dependency metadata while
62
+ * preserving any derived or transform capabilities unchanged.
63
+ *
64
+ * @param parser The parser whose source metadata should be transformed.
65
+ * @param mapSource Function that transforms the source capability.
66
+ * @returns The dependency metadata with its source capability transformed when
67
+ * present; otherwise the original dependency metadata, or
68
+ * `undefined` when the parser has no dependency metadata.
69
+ * @since 1.0.0
70
+ */
71
+ function mapSourceMetadata(parser, mapSource) {
72
+ return require_parser.composeWrappedSourceMetadata(parser.dependencyMetadata, mapSource);
73
+ }
74
+
75
+ //#endregion
76
+ exports.defineTraits = defineTraits;
77
+ exports.delegateSuggestNodes = delegateSuggestNodes;
78
+ exports.dispatchByMode = require_mode_dispatch.dispatchByMode;
79
+ exports.getTraits = getTraits;
80
+ exports.inheritAnnotations = require_annotations.inheritAnnotations;
81
+ exports.injectAnnotations = require_annotations.injectAnnotations;
82
+ exports.isInjectedAnnotationState = require_annotations.isInjectedAnnotationState;
83
+ exports.mapModeValue = require_mode_dispatch.mapModeValue;
84
+ exports.mapSourceMetadata = mapSourceMetadata;
85
+ exports.unwrapInjectedAnnotationState = require_annotations.unwrapInjectedAnnotationState;
86
+ exports.withAnnotationView = require_annotation_state.withAnnotationView;
87
+ exports.wrapForMode = require_mode_dispatch.wrapForMode;
@@ -0,0 +1,97 @@
1
+ import { inheritAnnotations, injectAnnotations, isInjectedAnnotationState, unwrapInjectedAnnotationState } from "./internal/annotations.cjs";
2
+ import { Mode, Parser } from "./internal/parser.cjs";
3
+ import { withAnnotationView } from "./annotation-state.cjs";
4
+ import { dispatchByMode, mapModeValue, wrapForMode } from "./internal/mode-dispatch.cjs";
5
+
6
+ //#region src/extension.d.ts
7
+
8
+ /**
9
+ * Stable trait flags for custom parser extensions.
10
+ *
11
+ * @since 1.0.0
12
+ */
13
+ interface ParserTraits {
14
+ /**
15
+ * Whether parent-state annotations should be injected into rebuilt child
16
+ * states instead of relying on structural inheritance.
17
+ */
18
+ readonly inheritsAnnotations?: true;
19
+ /**
20
+ * Whether a missing CLI state can still complete from a source-backed
21
+ * fallback such as config or environment data.
22
+ */
23
+ readonly completesFromSource?: true;
24
+ /**
25
+ * Whether annotation-only primitive states should count as completable only
26
+ * when they come from a nested source-bound parser.
27
+ */
28
+ readonly requiresSourceBinding?: true;
29
+ }
30
+ /**
31
+ * Suggest-time runtime node used to seed dependency-aware completion.
32
+ *
33
+ * @since 1.0.0
34
+ */
35
+ interface SuggestNode {
36
+ /** Path from the root parser to this node. */
37
+ readonly path: readonly PropertyKey[];
38
+ /** The parser whose dependency metadata should be inspected. */
39
+ readonly parser: Parser<Mode, unknown, unknown>;
40
+ /** Current parser state for this node. */
41
+ readonly state: unknown;
42
+ /** Whether this node reflects explicit input consumption. */
43
+ readonly matched?: boolean;
44
+ /** Snapshotted default dependency values for derived parsers. */
45
+ readonly defaultDependencyValues?: readonly unknown[];
46
+ }
47
+ /**
48
+ * Public view of a parser's source capability metadata.
49
+ *
50
+ * @since 1.0.0
51
+ */
52
+ type ParserSourceMetadata<M extends Mode = Mode, TValue = unknown, TState = unknown> = NonNullable<NonNullable<Parser<M, TValue, TState>["dependencyMetadata"]>["source"]>;
53
+ /**
54
+ * Defines stable extension traits on a parser object.
55
+ *
56
+ * @param parser The parser object to annotate.
57
+ * @param traits Traits to enable.
58
+ * @throws {TypeError} If a trait property cannot be defined on `parser`.
59
+ * @since 1.0.0
60
+ */
61
+ declare function defineTraits(parser: object, traits: ParserTraits): void;
62
+ /**
63
+ * Reads the stable extension traits defined on a parser object.
64
+ *
65
+ * @param parser The parser object to inspect.
66
+ * @returns The enabled traits. Returns an empty object when none are set.
67
+ * @since 1.0.0
68
+ */
69
+ declare function getTraits(parser: object): ParserTraits;
70
+ /**
71
+ * Delegates suggest-time runtime nodes to an inner parser while preserving an
72
+ * outer parser's own source metadata node.
73
+ *
74
+ * @param innerParser The wrapped parser that owns the underlying nodes.
75
+ * @param outerParser The outer parser that may contribute its own source node.
76
+ * @param state The outer parser state.
77
+ * @param path The parser path within the parse tree.
78
+ * @param innerState The state to use when collecting inner nodes.
79
+ * @param position Whether the outer node is appended or prepended.
80
+ * @returns The composed runtime nodes.
81
+ * @since 1.0.0
82
+ */
83
+ declare function delegateSuggestNodes<TInnerState>(innerParser: Parser<Mode, unknown, TInnerState>, outerParser: Parser<Mode, unknown, unknown>, state: unknown, path: readonly PropertyKey[], innerState: TInnerState, position?: "append" | "prepend"): readonly SuggestNode[];
84
+ /**
85
+ * Maps the source capability of a parser's dependency metadata while
86
+ * preserving any derived or transform capabilities unchanged.
87
+ *
88
+ * @param parser The parser whose source metadata should be transformed.
89
+ * @param mapSource Function that transforms the source capability.
90
+ * @returns The dependency metadata with its source capability transformed when
91
+ * present; otherwise the original dependency metadata, or
92
+ * `undefined` when the parser has no dependency metadata.
93
+ * @since 1.0.0
94
+ */
95
+ declare function mapSourceMetadata<M extends Mode, TValue, TState>(parser: Pick<Parser<M, TValue, TState>, "dependencyMetadata">, mapSource: (source: ParserSourceMetadata<M, TValue, TState>) => ParserSourceMetadata<M, TValue, TState>): Parser<M, TValue, TState>["dependencyMetadata"] | undefined;
96
+ //#endregion
97
+ export { ParserSourceMetadata, ParserTraits, SuggestNode, defineTraits, delegateSuggestNodes, dispatchByMode, getTraits, inheritAnnotations, injectAnnotations, isInjectedAnnotationState, mapModeValue, mapSourceMetadata, unwrapInjectedAnnotationState, withAnnotationView, wrapForMode };
@@ -0,0 +1,97 @@
1
+ import { inheritAnnotations, injectAnnotations, isInjectedAnnotationState, unwrapInjectedAnnotationState } from "./internal/annotations.js";
2
+ import { Mode, Parser } from "./internal/parser.js";
3
+ import { withAnnotationView } from "./annotation-state.js";
4
+ import { dispatchByMode, mapModeValue, wrapForMode } from "./internal/mode-dispatch.js";
5
+
6
+ //#region src/extension.d.ts
7
+
8
+ /**
9
+ * Stable trait flags for custom parser extensions.
10
+ *
11
+ * @since 1.0.0
12
+ */
13
+ interface ParserTraits {
14
+ /**
15
+ * Whether parent-state annotations should be injected into rebuilt child
16
+ * states instead of relying on structural inheritance.
17
+ */
18
+ readonly inheritsAnnotations?: true;
19
+ /**
20
+ * Whether a missing CLI state can still complete from a source-backed
21
+ * fallback such as config or environment data.
22
+ */
23
+ readonly completesFromSource?: true;
24
+ /**
25
+ * Whether annotation-only primitive states should count as completable only
26
+ * when they come from a nested source-bound parser.
27
+ */
28
+ readonly requiresSourceBinding?: true;
29
+ }
30
+ /**
31
+ * Suggest-time runtime node used to seed dependency-aware completion.
32
+ *
33
+ * @since 1.0.0
34
+ */
35
+ interface SuggestNode {
36
+ /** Path from the root parser to this node. */
37
+ readonly path: readonly PropertyKey[];
38
+ /** The parser whose dependency metadata should be inspected. */
39
+ readonly parser: Parser<Mode, unknown, unknown>;
40
+ /** Current parser state for this node. */
41
+ readonly state: unknown;
42
+ /** Whether this node reflects explicit input consumption. */
43
+ readonly matched?: boolean;
44
+ /** Snapshotted default dependency values for derived parsers. */
45
+ readonly defaultDependencyValues?: readonly unknown[];
46
+ }
47
+ /**
48
+ * Public view of a parser's source capability metadata.
49
+ *
50
+ * @since 1.0.0
51
+ */
52
+ type ParserSourceMetadata<M extends Mode = Mode, TValue = unknown, TState = unknown> = NonNullable<NonNullable<Parser<M, TValue, TState>["dependencyMetadata"]>["source"]>;
53
+ /**
54
+ * Defines stable extension traits on a parser object.
55
+ *
56
+ * @param parser The parser object to annotate.
57
+ * @param traits Traits to enable.
58
+ * @throws {TypeError} If a trait property cannot be defined on `parser`.
59
+ * @since 1.0.0
60
+ */
61
+ declare function defineTraits(parser: object, traits: ParserTraits): void;
62
+ /**
63
+ * Reads the stable extension traits defined on a parser object.
64
+ *
65
+ * @param parser The parser object to inspect.
66
+ * @returns The enabled traits. Returns an empty object when none are set.
67
+ * @since 1.0.0
68
+ */
69
+ declare function getTraits(parser: object): ParserTraits;
70
+ /**
71
+ * Delegates suggest-time runtime nodes to an inner parser while preserving an
72
+ * outer parser's own source metadata node.
73
+ *
74
+ * @param innerParser The wrapped parser that owns the underlying nodes.
75
+ * @param outerParser The outer parser that may contribute its own source node.
76
+ * @param state The outer parser state.
77
+ * @param path The parser path within the parse tree.
78
+ * @param innerState The state to use when collecting inner nodes.
79
+ * @param position Whether the outer node is appended or prepended.
80
+ * @returns The composed runtime nodes.
81
+ * @since 1.0.0
82
+ */
83
+ declare function delegateSuggestNodes<TInnerState>(innerParser: Parser<Mode, unknown, TInnerState>, outerParser: Parser<Mode, unknown, unknown>, state: unknown, path: readonly PropertyKey[], innerState: TInnerState, position?: "append" | "prepend"): readonly SuggestNode[];
84
+ /**
85
+ * Maps the source capability of a parser's dependency metadata while
86
+ * preserving any derived or transform capabilities unchanged.
87
+ *
88
+ * @param parser The parser whose source metadata should be transformed.
89
+ * @param mapSource Function that transforms the source capability.
90
+ * @returns The dependency metadata with its source capability transformed when
91
+ * present; otherwise the original dependency metadata, or
92
+ * `undefined` when the parser has no dependency metadata.
93
+ * @since 1.0.0
94
+ */
95
+ declare function mapSourceMetadata<M extends Mode, TValue, TState>(parser: Pick<Parser<M, TValue, TState>, "dependencyMetadata">, mapSource: (source: ParserSourceMetadata<M, TValue, TState>) => ParserSourceMetadata<M, TValue, TState>): Parser<M, TValue, TState>["dependencyMetadata"] | undefined;
96
+ //#endregion
97
+ export { ParserSourceMetadata, ParserTraits, SuggestNode, defineTraits, delegateSuggestNodes, dispatchByMode, getTraits, inheritAnnotations, injectAnnotations, isInjectedAnnotationState, mapModeValue, mapSourceMetadata, unwrapInjectedAnnotationState, withAnnotationView, wrapForMode };
@@ -0,0 +1,76 @@
1
+ import { inheritAnnotations, injectAnnotations, isInjectedAnnotationState, unwrapInjectedAnnotationState } from "./internal/annotations.js";
2
+ import { dispatchByMode, mapModeValue, wrapForMode } from "./internal/mode-dispatch.js";
3
+ import { annotationWrapperRequiresSourceBindingKey, composeWrappedSourceMetadata, defineInheritedAnnotationParser, getDelegatingSuggestRuntimeNodes, inheritParentAnnotationsKey, unmatchedNonCliDependencySourceStateMarker } from "./internal/parser.js";
4
+ import { withAnnotationView } from "./annotation-state.js";
5
+
6
+ //#region src/extension.ts
7
+ const emptyTraits = Object.freeze({});
8
+ /**
9
+ * Defines stable extension traits on a parser object.
10
+ *
11
+ * @param parser The parser object to annotate.
12
+ * @param traits Traits to enable.
13
+ * @throws {TypeError} If a trait property cannot be defined on `parser`.
14
+ * @since 1.0.0
15
+ */
16
+ function defineTraits(parser, traits) {
17
+ if (traits.inheritsAnnotations === true) defineInheritedAnnotationParser(parser);
18
+ if (traits.completesFromSource === true) Object.defineProperty(parser, unmatchedNonCliDependencySourceStateMarker, {
19
+ value: true,
20
+ configurable: true,
21
+ enumerable: true
22
+ });
23
+ if (traits.requiresSourceBinding === true) Object.defineProperty(parser, annotationWrapperRequiresSourceBindingKey, {
24
+ value: true,
25
+ configurable: true,
26
+ enumerable: false
27
+ });
28
+ }
29
+ /**
30
+ * Reads the stable extension traits defined on a parser object.
31
+ *
32
+ * @param parser The parser object to inspect.
33
+ * @returns The enabled traits. Returns an empty object when none are set.
34
+ * @since 1.0.0
35
+ */
36
+ function getTraits(parser) {
37
+ const traits = {
38
+ ...Reflect.get(parser, inheritParentAnnotationsKey) === true ? { inheritsAnnotations: true } : {},
39
+ ...Reflect.get(parser, unmatchedNonCliDependencySourceStateMarker) === true ? { completesFromSource: true } : {},
40
+ ...Reflect.get(parser, annotationWrapperRequiresSourceBindingKey) === true ? { requiresSourceBinding: true } : {}
41
+ };
42
+ return Object.keys(traits).length > 0 ? traits : emptyTraits;
43
+ }
44
+ /**
45
+ * Delegates suggest-time runtime nodes to an inner parser while preserving an
46
+ * outer parser's own source metadata node.
47
+ *
48
+ * @param innerParser The wrapped parser that owns the underlying nodes.
49
+ * @param outerParser The outer parser that may contribute its own source node.
50
+ * @param state The outer parser state.
51
+ * @param path The parser path within the parse tree.
52
+ * @param innerState The state to use when collecting inner nodes.
53
+ * @param position Whether the outer node is appended or prepended.
54
+ * @returns The composed runtime nodes.
55
+ * @since 1.0.0
56
+ */
57
+ function delegateSuggestNodes(innerParser, outerParser, state, path, innerState, position = "append") {
58
+ return getDelegatingSuggestRuntimeNodes(innerParser, outerParser, state, path, innerState, position);
59
+ }
60
+ /**
61
+ * Maps the source capability of a parser's dependency metadata while
62
+ * preserving any derived or transform capabilities unchanged.
63
+ *
64
+ * @param parser The parser whose source metadata should be transformed.
65
+ * @param mapSource Function that transforms the source capability.
66
+ * @returns The dependency metadata with its source capability transformed when
67
+ * present; otherwise the original dependency metadata, or
68
+ * `undefined` when the parser has no dependency metadata.
69
+ * @since 1.0.0
70
+ */
71
+ function mapSourceMetadata(parser, mapSource) {
72
+ return composeWrappedSourceMetadata(parser.dependencyMetadata, mapSource);
73
+ }
74
+
75
+ //#endregion
76
+ export { defineTraits, delegateSuggestNodes, dispatchByMode, getTraits, inheritAnnotations, injectAnnotations, isInjectedAnnotationState, mapModeValue, mapSourceMetadata, unwrapInjectedAnnotationState, withAnnotationView, wrapForMode };