@atscript/core 0.1.27 → 0.1.28
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/index.cjs +427 -134
- package/dist/index.d.ts +7 -12
- package/dist/index.mjs +427 -134
- package/package.json +9 -3
- package/scripts/setup-skills.js +77 -0
- package/skills/atscript-core/.gitkeep +0 -0
- package/skills/atscript-core/SKILL.md +32 -0
- package/skills/atscript-core/annotations.md +157 -0
- package/skills/atscript-core/core.md +125 -0
- package/skills/atscript-core/plugins.md +206 -0
- package/skills/atscript-core/primitives.md +156 -0
package/dist/index.d.ts
CHANGED
|
@@ -246,21 +246,15 @@ interface TAnnotationTokens {
|
|
|
246
246
|
token: Token;
|
|
247
247
|
args: Token[];
|
|
248
248
|
}
|
|
249
|
+
type TPrimitiveAnnotationArg = string | number | boolean;
|
|
250
|
+
type TPrimitiveAnnotationArgs = Record<string, TPrimitiveAnnotationArg>;
|
|
251
|
+
type TPrimitiveAnnotationValue = boolean | string | number | TPrimitiveAnnotationArgs | (TPrimitiveAnnotationArg | TPrimitiveAnnotationArgs)[];
|
|
249
252
|
interface TPrimitiveBaseConfig {
|
|
250
253
|
type?: TPrimitiveTypeDef;
|
|
251
254
|
documentation?: string;
|
|
252
255
|
tags?: string[];
|
|
253
256
|
isContainer?: boolean;
|
|
254
|
-
|
|
255
|
-
min?: number;
|
|
256
|
-
max?: number;
|
|
257
|
-
int?: boolean;
|
|
258
|
-
minLength?: number;
|
|
259
|
-
maxLength?: number;
|
|
260
|
-
pattern?: string | RegExp | (string | RegExp)[];
|
|
261
|
-
required?: boolean;
|
|
262
|
-
message?: string;
|
|
263
|
-
};
|
|
257
|
+
annotations?: Record<string, TPrimitiveAnnotationValue>;
|
|
264
258
|
}
|
|
265
259
|
interface TPrimitiveConfig extends TPrimitiveBaseConfig {
|
|
266
260
|
extensions?: Record<string, Partial<TPrimitiveConfig>>;
|
|
@@ -325,7 +319,8 @@ declare class SemanticPrimitiveNode extends SemanticNode {
|
|
|
325
319
|
private readonly _id;
|
|
326
320
|
readonly config: TPrimitiveConfig;
|
|
327
321
|
private readonly parentKey;
|
|
328
|
-
|
|
322
|
+
private readonly annotationTree?;
|
|
323
|
+
constructor(_id: string, config: TPrimitiveConfig, parentKey?: string, annotationTree?: TAnnotationsTree | undefined);
|
|
329
324
|
protected applyAnnotations(): void;
|
|
330
325
|
readonly type?: 'union' | 'intersection' | 'tuple' | 'array' | 'object' | 'string' | 'number' | 'boolean' | 'void' | 'null' | 'phantom';
|
|
331
326
|
get key(): string;
|
|
@@ -776,4 +771,4 @@ declare function resolveAtscriptFromPath(from: string, id: string): string;
|
|
|
776
771
|
declare function getRelPath(fromUri: string, toUri: string): string;
|
|
777
772
|
|
|
778
773
|
export { $n, AnnotationSpec, AtscriptDoc, AtscriptRepo, BuildRepo, DEFAULT_FORMAT, PluginManager, SemanticAnnotateNode, SemanticArrayNode, SemanticConstNode, SemanticGroup, SemanticImportNode, SemanticInterfaceNode, SemanticNode, SemanticPrimitiveNode, SemanticPropNode, SemanticRefNode, SemanticStructureNode, SemanticTupleNode, SemanticTypeNode, Token, build, createAtscriptPlugin, defineConfig, getRelPath, isAnnotate, isAnnotationSpec, isArray, isConst, isGroup, isImport, isInterface, isPrimitive, isProp, isRef, isStructure, isTuple, isType, loadConfig, loadTsConfig, resolveAnnotation, resolveAtscriptFromPath, resolveConfigFile };
|
|
779
|
-
export type { TAnnotationArgument, TAnnotationSpecConfig, TAnnotationTokens, TAnnotationsTree, TAtscriptConfig, TAtscriptConfigInput, TAtscriptConfigOutput, TAtscriptDocConfig, TAtscriptPlugin, TAtscriptRenderFormat, TMessages, TNodeEntity, TOutput, TOutputWithSource, TPluginManagers, TPluginOutput, TPrimitiveBaseConfig, TPrimitiveConfig, TPrimitiveTypeArray, TPrimitiveTypeComplex, TPrimitiveTypeDef, TPrimitiveTypeFinal, TPrimitiveTypeFinalOptional, TPrimitiveTypeObject, TSemanticToken };
|
|
774
|
+
export type { TAnnotationArgument, TAnnotationSpecConfig, TAnnotationTokens, TAnnotationsTree, TAtscriptConfig, TAtscriptConfigInput, TAtscriptConfigOutput, TAtscriptDocConfig, TAtscriptPlugin, TAtscriptRenderFormat, TMessages, TNodeEntity, TOutput, TOutputWithSource, TPluginManagers, TPluginOutput, TPrimitiveAnnotationArg, TPrimitiveAnnotationArgs, TPrimitiveAnnotationValue, TPrimitiveBaseConfig, TPrimitiveConfig, TPrimitiveTypeArray, TPrimitiveTypeComplex, TPrimitiveTypeDef, TPrimitiveTypeFinal, TPrimitiveTypeFinalOptional, TPrimitiveTypeObject, TSemanticToken };
|