@typespec/html-program-viewer 0.84.0-dev.0 → 0.84.0-dev.1
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/emitter/index.js
CHANGED
package/dist/react/index.js
CHANGED
|
@@ -933,7 +933,9 @@ function paramMessage(strings, ...keys) {
|
|
|
933
933
|
template.keys = keys;
|
|
934
934
|
return template;
|
|
935
935
|
}
|
|
936
|
-
|
|
936
|
+
//#endregion
|
|
937
|
+
//#region ../compiler/dist/src/core/messages.js
|
|
938
|
+
var diagnostics = {
|
|
937
939
|
/**
|
|
938
940
|
* Scanner errors.
|
|
939
941
|
*/
|
|
@@ -1128,6 +1130,10 @@ var { createDiagnostic, reportDiagnostic } = createDiagnosticCreator({
|
|
|
1128
1130
|
functionDeclarations: "Function declarations are an experimental feature that may change in the future. Use with caution and consider providing feedback to the TypeSpec team."
|
|
1129
1131
|
}
|
|
1130
1132
|
},
|
|
1133
|
+
"auto-decorator-disabled": {
|
|
1134
|
+
severity: "error",
|
|
1135
|
+
messages: { default: "Auto decorator declarations require the 'auto-decorators' feature to be enabled. Add 'auto-decorators' to the 'features' list in your tspconfig.yaml." }
|
|
1136
|
+
},
|
|
1131
1137
|
"using-invalid-ref": {
|
|
1132
1138
|
severity: "error",
|
|
1133
1139
|
messages: { default: "Using must refer to a namespace" }
|
|
@@ -1364,6 +1370,8 @@ var { createDiagnostic, reportDiagnostic } = createDiagnosticCreator({
|
|
|
1364
1370
|
messages: {
|
|
1365
1371
|
default: paramMessage`Modifier '${"modifier"}' is invalid.`,
|
|
1366
1372
|
"missing-required": paramMessage`Declaration of type '${"nodeKind"}' is missing required modifier '${"modifier"}'.`,
|
|
1373
|
+
"missing-required-one-of": paramMessage`Declaration of type '${"nodeKind"}' is missing one of the required modifiers: ${"modifiers"}.`,
|
|
1374
|
+
"mutually-exclusive": paramMessage`Modifiers '${"modifierA"}' and '${"modifierB"}' cannot be used together.`,
|
|
1367
1375
|
"not-allowed": paramMessage`Modifier '${"modifier"}' cannot be used on declarations of type '${"nodeKind"}'.`
|
|
1368
1376
|
}
|
|
1369
1377
|
},
|
|
@@ -1781,7 +1789,9 @@ var { createDiagnostic, reportDiagnostic } = createDiagnosticCreator({
|
|
|
1781
1789
|
severity: "error",
|
|
1782
1790
|
messages: { default: paramMessage`The --option parameter value "${"value"}" must be in the format: <emitterName>.some-options=value` }
|
|
1783
1791
|
}
|
|
1784
|
-
}
|
|
1792
|
+
};
|
|
1793
|
+
new Set(Object.keys(diagnostics));
|
|
1794
|
+
var { createDiagnostic, reportDiagnostic } = createDiagnosticCreator(diagnostics);
|
|
1785
1795
|
//#endregion
|
|
1786
1796
|
//#region ../compiler/dist/src/core/source-file.js
|
|
1787
1797
|
function createSourceFile(text, path) {
|
|
@@ -1928,7 +1938,8 @@ var SyntaxKind;
|
|
|
1928
1938
|
SyntaxKind[SyntaxKind["CallExpression"] = 68] = "CallExpression";
|
|
1929
1939
|
SyntaxKind[SyntaxKind["ScalarConstructor"] = 69] = "ScalarConstructor";
|
|
1930
1940
|
SyntaxKind[SyntaxKind["InternalKeyword"] = 70] = "InternalKeyword";
|
|
1931
|
-
SyntaxKind[SyntaxKind["
|
|
1941
|
+
SyntaxKind[SyntaxKind["AutoKeyword"] = 71] = "AutoKeyword";
|
|
1942
|
+
SyntaxKind[SyntaxKind["FunctionTypeExpression"] = 72] = "FunctionTypeExpression";
|
|
1932
1943
|
})(SyntaxKind || (SyntaxKind = {}));
|
|
1933
1944
|
var IdentifierKind;
|
|
1934
1945
|
(function(IdentifierKind) {
|
|
@@ -2073,7 +2084,10 @@ function getLocationContext(program, type) {
|
|
|
2073
2084
|
if (sourceLocation.isSynthetic) return { type: "synthetic" };
|
|
2074
2085
|
return program.getSourceFileLocationContext(sourceLocation.file);
|
|
2075
2086
|
}
|
|
2076
|
-
new Set(Object.keys({
|
|
2087
|
+
new Set(Object.keys({
|
|
2088
|
+
"function-declarations": { description: "Allows use of function declarations without experimental warnings in project code." },
|
|
2089
|
+
"auto-decorators": { description: "Allows use of auto decorator declarations without experimental warnings in project code." }
|
|
2090
|
+
}));
|
|
2077
2091
|
//#endregion
|
|
2078
2092
|
//#region ../../node_modules/.pnpm/ajv@8.20.0/node_modules/ajv/dist/compile/codegen/code.js
|
|
2079
2093
|
var require_code$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
@@ -10238,6 +10252,141 @@ deepFreeze({
|
|
|
10238
10252
|
});
|
|
10239
10253
|
createJSONSchemaValidator(TypeSpecConfigJsonSchema);
|
|
10240
10254
|
//#endregion
|
|
10255
|
+
//#region ../compiler/dist/src/core/decorator-utils.js
|
|
10256
|
+
/**
|
|
10257
|
+
* Validate the decorator target is matching the expected value.
|
|
10258
|
+
* @param context
|
|
10259
|
+
* @param target
|
|
10260
|
+
* @param decoratorName
|
|
10261
|
+
* @param expectedType
|
|
10262
|
+
* @returns
|
|
10263
|
+
*/
|
|
10264
|
+
function validateDecoratorTarget(context, target, decoratorName, expectedType) {
|
|
10265
|
+
if (!isTypeSpecValueTypeOf(target, expectedType)) {
|
|
10266
|
+
reportDiagnostic(context.program, {
|
|
10267
|
+
code: "decorator-wrong-target",
|
|
10268
|
+
format: {
|
|
10269
|
+
decorator: decoratorName,
|
|
10270
|
+
to: target.kind
|
|
10271
|
+
},
|
|
10272
|
+
target: context.decoratorTarget
|
|
10273
|
+
});
|
|
10274
|
+
return false;
|
|
10275
|
+
}
|
|
10276
|
+
return true;
|
|
10277
|
+
}
|
|
10278
|
+
function isIntrinsicType(program, type, kind) {
|
|
10279
|
+
return ignoreDiagnostics(program.checker.isTypeAssignableTo(type, program.checker.getStdType(kind), type));
|
|
10280
|
+
}
|
|
10281
|
+
/**
|
|
10282
|
+
* Check if the given target is of any of the TypeSpec types.
|
|
10283
|
+
* @param target Target to validate.
|
|
10284
|
+
* @param expectedType One or multiple allowed TypeSpec types.
|
|
10285
|
+
* @returns boolean if the target is of one of the allowed types.
|
|
10286
|
+
*/
|
|
10287
|
+
function isTypeSpecValueTypeOf(target, expectedType) {
|
|
10288
|
+
const kind = getTypeKind(target);
|
|
10289
|
+
if (kind === void 0) return false;
|
|
10290
|
+
return typeof expectedType === "string" ? expectedType === "Any" || kind === expectedType : expectedType.includes("Any") || expectedType.includes(kind);
|
|
10291
|
+
}
|
|
10292
|
+
function getTypeKind(target) {
|
|
10293
|
+
switch (typeof target) {
|
|
10294
|
+
case "object": return target.kind;
|
|
10295
|
+
case "string": return "String";
|
|
10296
|
+
case "number": return "Number";
|
|
10297
|
+
case "boolean": return "Boolean";
|
|
10298
|
+
default: return;
|
|
10299
|
+
}
|
|
10300
|
+
}
|
|
10301
|
+
function validateDecoratorUniqueOnNode(context, type, decorator) {
|
|
10302
|
+
compilerAssert("decorators" in type, "Type should have decorators");
|
|
10303
|
+
if (type.decorators.filter((x) => x.decorator === decorator && x.node?.kind === SyntaxKind.DecoratorExpression && x.node?.parent === type.node).length > 1) {
|
|
10304
|
+
reportDiagnostic(context.program, {
|
|
10305
|
+
code: "duplicate-decorator",
|
|
10306
|
+
format: { decoratorName: "@" + decorator.name.slice(1) },
|
|
10307
|
+
target: context.decoratorTarget
|
|
10308
|
+
});
|
|
10309
|
+
return false;
|
|
10310
|
+
}
|
|
10311
|
+
return true;
|
|
10312
|
+
}
|
|
10313
|
+
/**
|
|
10314
|
+
* Validate that a given decorator is not on a type or any of its base types.
|
|
10315
|
+
* Useful to check for decorator usage that conflicts with another decorator.
|
|
10316
|
+
* @param context Decorator context
|
|
10317
|
+
* @param type The type to check
|
|
10318
|
+
* @param badDecorator The decorator we don't want present
|
|
10319
|
+
* @param givenDecorator The decorator that is the reason why we don't want the bad decorator present
|
|
10320
|
+
* @returns Whether the decorator application is valid
|
|
10321
|
+
*/
|
|
10322
|
+
function validateDecoratorNotOnType(context, type, badDecorator, givenDecorator) {
|
|
10323
|
+
compilerAssert("decorators" in type, "Type should have decorators");
|
|
10324
|
+
const decAppsToCheck = [];
|
|
10325
|
+
let base = type;
|
|
10326
|
+
while (base) {
|
|
10327
|
+
decAppsToCheck.push(...base.decorators);
|
|
10328
|
+
base = getHeritage(base);
|
|
10329
|
+
}
|
|
10330
|
+
for (const decapp of decAppsToCheck) if (decapp.decorator === badDecorator) {
|
|
10331
|
+
reportDiagnostic(context.program, {
|
|
10332
|
+
code: "decorator-conflict",
|
|
10333
|
+
format: {
|
|
10334
|
+
decoratorName: "@" + badDecorator.name.slice(1),
|
|
10335
|
+
otherDecoratorName: "@" + givenDecorator.name.slice(1)
|
|
10336
|
+
},
|
|
10337
|
+
target: context.decoratorTarget
|
|
10338
|
+
});
|
|
10339
|
+
return false;
|
|
10340
|
+
}
|
|
10341
|
+
return true;
|
|
10342
|
+
function getHeritage(type) {
|
|
10343
|
+
if (type.kind === "Model") return type.baseModel;
|
|
10344
|
+
else if (type.kind === "Scalar") return type.baseScalar;
|
|
10345
|
+
else return;
|
|
10346
|
+
}
|
|
10347
|
+
}
|
|
10348
|
+
/**
|
|
10349
|
+
* Return the type of the property or the model itself.
|
|
10350
|
+
*/
|
|
10351
|
+
function getPropertyType(target) {
|
|
10352
|
+
if (target.kind === "ModelProperty") return target.type;
|
|
10353
|
+
else return target;
|
|
10354
|
+
}
|
|
10355
|
+
//#endregion
|
|
10356
|
+
//#region ../compiler/dist/src/core/type-utils.js
|
|
10357
|
+
function isNeverType(type) {
|
|
10358
|
+
return "kind" in type && type.kind === "Intrinsic" && type.name === "never";
|
|
10359
|
+
}
|
|
10360
|
+
function isType(entity) {
|
|
10361
|
+
return entity.entityKind === "Type";
|
|
10362
|
+
}
|
|
10363
|
+
function isValue(entity) {
|
|
10364
|
+
return entity.entityKind === "Value";
|
|
10365
|
+
}
|
|
10366
|
+
function isArrayModelType(programOrType, maybeType) {
|
|
10367
|
+
const type = maybeType ?? programOrType;
|
|
10368
|
+
return Boolean(type.indexer && type.indexer.key.name === "integer");
|
|
10369
|
+
}
|
|
10370
|
+
function isRecordModelType(programOrType, maybeType) {
|
|
10371
|
+
const type = maybeType ?? programOrType;
|
|
10372
|
+
return Boolean(type.indexer && type.indexer.key.name === "string");
|
|
10373
|
+
}
|
|
10374
|
+
/**
|
|
10375
|
+
* Check the given type is a finished template instance.
|
|
10376
|
+
*/
|
|
10377
|
+
function isTemplateInstance(type) {
|
|
10378
|
+
const maybeTemplateType = type;
|
|
10379
|
+
return maybeTemplateType.templateMapper !== void 0 && !maybeTemplateType.templateMapper.partial && maybeTemplateType.isFinished;
|
|
10380
|
+
}
|
|
10381
|
+
/**
|
|
10382
|
+
* Resolve if the type was created from a template type or is a template type declaration.
|
|
10383
|
+
*/
|
|
10384
|
+
function isTemplateDeclarationOrInstance(type) {
|
|
10385
|
+
if (type.node === void 0) return false;
|
|
10386
|
+
const node = type.node;
|
|
10387
|
+
return node.templateParameters && node.templateParameters.length > 0;
|
|
10388
|
+
}
|
|
10389
|
+
//#endregion
|
|
10241
10390
|
//#region ../compiler/dist/src/typekit/define-kit.js
|
|
10242
10391
|
/**
|
|
10243
10392
|
* The prototype object for Typekit instances.
|
|
@@ -10885,40 +11034,6 @@ function createDiagnosable(fn) {
|
|
|
10885
11034
|
return wrapper;
|
|
10886
11035
|
}
|
|
10887
11036
|
//#endregion
|
|
10888
|
-
//#region ../compiler/dist/src/core/type-utils.js
|
|
10889
|
-
function isNeverType(type) {
|
|
10890
|
-
return "kind" in type && type.kind === "Intrinsic" && type.name === "never";
|
|
10891
|
-
}
|
|
10892
|
-
function isType(entity) {
|
|
10893
|
-
return entity.entityKind === "Type";
|
|
10894
|
-
}
|
|
10895
|
-
function isValue(entity) {
|
|
10896
|
-
return entity.entityKind === "Value";
|
|
10897
|
-
}
|
|
10898
|
-
function isArrayModelType(programOrType, maybeType) {
|
|
10899
|
-
const type = maybeType ?? programOrType;
|
|
10900
|
-
return Boolean(type.indexer && type.indexer.key.name === "integer");
|
|
10901
|
-
}
|
|
10902
|
-
function isRecordModelType(programOrType, maybeType) {
|
|
10903
|
-
const type = maybeType ?? programOrType;
|
|
10904
|
-
return Boolean(type.indexer && type.indexer.key.name === "string");
|
|
10905
|
-
}
|
|
10906
|
-
/**
|
|
10907
|
-
* Check the given type is a finished template instance.
|
|
10908
|
-
*/
|
|
10909
|
-
function isTemplateInstance(type) {
|
|
10910
|
-
const maybeTemplateType = type;
|
|
10911
|
-
return maybeTemplateType.templateMapper !== void 0 && !maybeTemplateType.templateMapper.partial && maybeTemplateType.isFinished;
|
|
10912
|
-
}
|
|
10913
|
-
/**
|
|
10914
|
-
* Resolve if the type was created from a template type or is a template type declaration.
|
|
10915
|
-
*/
|
|
10916
|
-
function isTemplateDeclarationOrInstance(type) {
|
|
10917
|
-
if (type.node === void 0) return false;
|
|
10918
|
-
const node = type.node;
|
|
10919
|
-
return node.templateParameters && node.templateParameters.length > 0;
|
|
10920
|
-
}
|
|
10921
|
-
//#endregion
|
|
10922
11037
|
//#region ../compiler/dist/src/typekit/kits/array.js
|
|
10923
11038
|
defineKit({ array: {
|
|
10924
11039
|
is(type) {
|
|
@@ -11083,107 +11198,6 @@ defineKit({ enumMember: {
|
|
|
11083
11198
|
return type.entityKind === "Type" && type.kind === "EnumMember";
|
|
11084
11199
|
}
|
|
11085
11200
|
} });
|
|
11086
|
-
//#endregion
|
|
11087
|
-
//#region ../compiler/dist/src/core/decorator-utils.js
|
|
11088
|
-
/**
|
|
11089
|
-
* Validate the decorator target is matching the expected value.
|
|
11090
|
-
* @param context
|
|
11091
|
-
* @param target
|
|
11092
|
-
* @param decoratorName
|
|
11093
|
-
* @param expectedType
|
|
11094
|
-
* @returns
|
|
11095
|
-
*/
|
|
11096
|
-
function validateDecoratorTarget(context, target, decoratorName, expectedType) {
|
|
11097
|
-
if (!isTypeSpecValueTypeOf(target, expectedType)) {
|
|
11098
|
-
reportDiagnostic(context.program, {
|
|
11099
|
-
code: "decorator-wrong-target",
|
|
11100
|
-
format: {
|
|
11101
|
-
decorator: decoratorName,
|
|
11102
|
-
to: target.kind
|
|
11103
|
-
},
|
|
11104
|
-
target: context.decoratorTarget
|
|
11105
|
-
});
|
|
11106
|
-
return false;
|
|
11107
|
-
}
|
|
11108
|
-
return true;
|
|
11109
|
-
}
|
|
11110
|
-
function isIntrinsicType(program, type, kind) {
|
|
11111
|
-
return ignoreDiagnostics(program.checker.isTypeAssignableTo(type, program.checker.getStdType(kind), type));
|
|
11112
|
-
}
|
|
11113
|
-
/**
|
|
11114
|
-
* Check if the given target is of any of the TypeSpec types.
|
|
11115
|
-
* @param target Target to validate.
|
|
11116
|
-
* @param expectedType One or multiple allowed TypeSpec types.
|
|
11117
|
-
* @returns boolean if the target is of one of the allowed types.
|
|
11118
|
-
*/
|
|
11119
|
-
function isTypeSpecValueTypeOf(target, expectedType) {
|
|
11120
|
-
const kind = getTypeKind(target);
|
|
11121
|
-
if (kind === void 0) return false;
|
|
11122
|
-
return typeof expectedType === "string" ? expectedType === "Any" || kind === expectedType : expectedType.includes("Any") || expectedType.includes(kind);
|
|
11123
|
-
}
|
|
11124
|
-
function getTypeKind(target) {
|
|
11125
|
-
switch (typeof target) {
|
|
11126
|
-
case "object": return target.kind;
|
|
11127
|
-
case "string": return "String";
|
|
11128
|
-
case "number": return "Number";
|
|
11129
|
-
case "boolean": return "Boolean";
|
|
11130
|
-
default: return;
|
|
11131
|
-
}
|
|
11132
|
-
}
|
|
11133
|
-
function validateDecoratorUniqueOnNode(context, type, decorator) {
|
|
11134
|
-
compilerAssert("decorators" in type, "Type should have decorators");
|
|
11135
|
-
if (type.decorators.filter((x) => x.decorator === decorator && x.node?.kind === SyntaxKind.DecoratorExpression && x.node?.parent === type.node).length > 1) {
|
|
11136
|
-
reportDiagnostic(context.program, {
|
|
11137
|
-
code: "duplicate-decorator",
|
|
11138
|
-
format: { decoratorName: "@" + decorator.name.slice(1) },
|
|
11139
|
-
target: context.decoratorTarget
|
|
11140
|
-
});
|
|
11141
|
-
return false;
|
|
11142
|
-
}
|
|
11143
|
-
return true;
|
|
11144
|
-
}
|
|
11145
|
-
/**
|
|
11146
|
-
* Validate that a given decorator is not on a type or any of its base types.
|
|
11147
|
-
* Useful to check for decorator usage that conflicts with another decorator.
|
|
11148
|
-
* @param context Decorator context
|
|
11149
|
-
* @param type The type to check
|
|
11150
|
-
* @param badDecorator The decorator we don't want present
|
|
11151
|
-
* @param givenDecorator The decorator that is the reason why we don't want the bad decorator present
|
|
11152
|
-
* @returns Whether the decorator application is valid
|
|
11153
|
-
*/
|
|
11154
|
-
function validateDecoratorNotOnType(context, type, badDecorator, givenDecorator) {
|
|
11155
|
-
compilerAssert("decorators" in type, "Type should have decorators");
|
|
11156
|
-
const decAppsToCheck = [];
|
|
11157
|
-
let base = type;
|
|
11158
|
-
while (base) {
|
|
11159
|
-
decAppsToCheck.push(...base.decorators);
|
|
11160
|
-
base = getHeritage(base);
|
|
11161
|
-
}
|
|
11162
|
-
for (const decapp of decAppsToCheck) if (decapp.decorator === badDecorator) {
|
|
11163
|
-
reportDiagnostic(context.program, {
|
|
11164
|
-
code: "decorator-conflict",
|
|
11165
|
-
format: {
|
|
11166
|
-
decoratorName: "@" + badDecorator.name.slice(1),
|
|
11167
|
-
otherDecoratorName: "@" + givenDecorator.name.slice(1)
|
|
11168
|
-
},
|
|
11169
|
-
target: context.decoratorTarget
|
|
11170
|
-
});
|
|
11171
|
-
return false;
|
|
11172
|
-
}
|
|
11173
|
-
return true;
|
|
11174
|
-
function getHeritage(type) {
|
|
11175
|
-
if (type.kind === "Model") return type.baseModel;
|
|
11176
|
-
else if (type.kind === "Scalar") return type.baseScalar;
|
|
11177
|
-
else return;
|
|
11178
|
-
}
|
|
11179
|
-
}
|
|
11180
|
-
/**
|
|
11181
|
-
* Return the type of the property or the model itself.
|
|
11182
|
-
*/
|
|
11183
|
-
function getPropertyType(target) {
|
|
11184
|
-
if (target.kind === "ModelProperty") return target.type;
|
|
11185
|
-
else return target;
|
|
11186
|
-
}
|
|
11187
11201
|
createStateSymbol("deprecated");
|
|
11188
11202
|
//#endregion
|
|
11189
11203
|
//#region ../compiler/dist/src/utils/duplicate-tracker.js
|
|
@@ -12886,50 +12900,50 @@ var Token;
|
|
|
12886
12900
|
/** @internal */ Token[Token["__StartModifierKeyword"] = 69] = "__StartModifierKeyword";
|
|
12887
12901
|
Token[Token["ExternKeyword"] = 69] = "ExternKeyword";
|
|
12888
12902
|
Token[Token["InternalKeyword"] = 70] = "InternalKeyword";
|
|
12889
|
-
|
|
12890
|
-
Token[Token["
|
|
12891
|
-
Token[Token["
|
|
12892
|
-
Token[Token["
|
|
12893
|
-
Token[Token["
|
|
12894
|
-
Token[Token["
|
|
12895
|
-
Token[Token["
|
|
12896
|
-
Token[Token["
|
|
12897
|
-
Token[Token["
|
|
12898
|
-
Token[Token["
|
|
12899
|
-
Token[Token["
|
|
12900
|
-
|
|
12901
|
-
/** @internal */ Token[Token["
|
|
12902
|
-
Token[Token["
|
|
12903
|
-
Token[Token["
|
|
12904
|
-
Token[Token["
|
|
12905
|
-
Token[Token["
|
|
12906
|
-
Token[Token["
|
|
12907
|
-
Token[Token["
|
|
12908
|
-
Token[Token["
|
|
12909
|
-
Token[Token["
|
|
12910
|
-
Token[Token["
|
|
12911
|
-
Token[Token["
|
|
12912
|
-
Token[Token["
|
|
12913
|
-
Token[Token["
|
|
12914
|
-
Token[Token["
|
|
12915
|
-
Token[Token["
|
|
12916
|
-
Token[Token["
|
|
12917
|
-
Token[Token["
|
|
12918
|
-
Token[Token["
|
|
12919
|
-
Token[Token["
|
|
12920
|
-
Token[Token["
|
|
12921
|
-
Token[Token["
|
|
12922
|
-
Token[Token["
|
|
12923
|
-
Token[Token["
|
|
12924
|
-
Token[Token["
|
|
12925
|
-
Token[Token["
|
|
12926
|
-
Token[Token["
|
|
12927
|
-
Token[Token["
|
|
12928
|
-
Token[Token["
|
|
12929
|
-
Token[Token["
|
|
12930
|
-
Token[Token["
|
|
12931
|
-
Token[Token["
|
|
12932
|
-
Token[Token["
|
|
12903
|
+
Token[Token["AutoKeyword"] = 71] = "AutoKeyword";
|
|
12904
|
+
/** @internal */ Token[Token["__EndModifierKeyword"] = 72] = "__EndModifierKeyword";
|
|
12905
|
+
Token[Token["ExtendsKeyword"] = 72] = "ExtendsKeyword";
|
|
12906
|
+
Token[Token["FnKeyword"] = 73] = "FnKeyword";
|
|
12907
|
+
Token[Token["TrueKeyword"] = 74] = "TrueKeyword";
|
|
12908
|
+
Token[Token["FalseKeyword"] = 75] = "FalseKeyword";
|
|
12909
|
+
Token[Token["ReturnKeyword"] = 76] = "ReturnKeyword";
|
|
12910
|
+
Token[Token["VoidKeyword"] = 77] = "VoidKeyword";
|
|
12911
|
+
Token[Token["NeverKeyword"] = 78] = "NeverKeyword";
|
|
12912
|
+
Token[Token["UnknownKeyword"] = 79] = "UnknownKeyword";
|
|
12913
|
+
Token[Token["ValueOfKeyword"] = 80] = "ValueOfKeyword";
|
|
12914
|
+
Token[Token["TypeOfKeyword"] = 81] = "TypeOfKeyword";
|
|
12915
|
+
/** @internal */ Token[Token["__EndKeyword"] = 82] = "__EndKeyword";
|
|
12916
|
+
/** @internal */ Token[Token["__StartReservedKeyword"] = 82] = "__StartReservedKeyword";
|
|
12917
|
+
Token[Token["StatemachineKeyword"] = 82] = "StatemachineKeyword";
|
|
12918
|
+
Token[Token["MacroKeyword"] = 83] = "MacroKeyword";
|
|
12919
|
+
Token[Token["PackageKeyword"] = 84] = "PackageKeyword";
|
|
12920
|
+
Token[Token["MetadataKeyword"] = 85] = "MetadataKeyword";
|
|
12921
|
+
Token[Token["EnvKeyword"] = 86] = "EnvKeyword";
|
|
12922
|
+
Token[Token["ArgKeyword"] = 87] = "ArgKeyword";
|
|
12923
|
+
Token[Token["DeclareKeyword"] = 88] = "DeclareKeyword";
|
|
12924
|
+
Token[Token["ArrayKeyword"] = 89] = "ArrayKeyword";
|
|
12925
|
+
Token[Token["StructKeyword"] = 90] = "StructKeyword";
|
|
12926
|
+
Token[Token["RecordKeyword"] = 91] = "RecordKeyword";
|
|
12927
|
+
Token[Token["ModuleKeyword"] = 92] = "ModuleKeyword";
|
|
12928
|
+
Token[Token["ModKeyword"] = 93] = "ModKeyword";
|
|
12929
|
+
Token[Token["SymKeyword"] = 94] = "SymKeyword";
|
|
12930
|
+
Token[Token["ContextKeyword"] = 95] = "ContextKeyword";
|
|
12931
|
+
Token[Token["PropKeyword"] = 96] = "PropKeyword";
|
|
12932
|
+
Token[Token["PropertyKeyword"] = 97] = "PropertyKeyword";
|
|
12933
|
+
Token[Token["ScenarioKeyword"] = 98] = "ScenarioKeyword";
|
|
12934
|
+
Token[Token["PubKeyword"] = 99] = "PubKeyword";
|
|
12935
|
+
Token[Token["SubKeyword"] = 100] = "SubKeyword";
|
|
12936
|
+
Token[Token["TypeRefKeyword"] = 101] = "TypeRefKeyword";
|
|
12937
|
+
Token[Token["TraitKeyword"] = 102] = "TraitKeyword";
|
|
12938
|
+
Token[Token["ThisKeyword"] = 103] = "ThisKeyword";
|
|
12939
|
+
Token[Token["SelfKeyword"] = 104] = "SelfKeyword";
|
|
12940
|
+
Token[Token["SuperKeyword"] = 105] = "SuperKeyword";
|
|
12941
|
+
Token[Token["KeyofKeyword"] = 106] = "KeyofKeyword";
|
|
12942
|
+
Token[Token["WithKeyword"] = 107] = "WithKeyword";
|
|
12943
|
+
Token[Token["ImplementsKeyword"] = 108] = "ImplementsKeyword";
|
|
12944
|
+
Token[Token["ImplKeyword"] = 109] = "ImplKeyword";
|
|
12945
|
+
Token[Token["SatisfiesKeyword"] = 110] = "SatisfiesKeyword";
|
|
12946
|
+
Token[Token["FlagKeyword"] = 111] = "FlagKeyword";
|
|
12933
12947
|
Token[Token["PartialKeyword"] = 112] = "PartialKeyword";
|
|
12934
12948
|
Token[Token["PrivateKeyword"] = 113] = "PrivateKeyword";
|
|
12935
12949
|
Token[Token["PublicKeyword"] = 114] = "PublicKeyword";
|
|
@@ -13021,6 +13035,7 @@ getTokenDisplayTable([
|
|
|
13021
13035
|
[Token.NeverKeyword, "'never'"],
|
|
13022
13036
|
[Token.UnknownKeyword, "'unknown'"],
|
|
13023
13037
|
[Token.ExternKeyword, "'extern'"],
|
|
13038
|
+
[Token.AutoKeyword, "'auto'"],
|
|
13024
13039
|
[Token.StatemachineKeyword, "'statemachine'"],
|
|
13025
13040
|
[Token.MacroKeyword, "'macro'"],
|
|
13026
13041
|
[Token.PackageKeyword, "'package'"],
|
|
@@ -13051,7 +13066,6 @@ getTokenDisplayTable([
|
|
|
13051
13066
|
[Token.ImplKeyword, "'impl'"],
|
|
13052
13067
|
[Token.SatisfiesKeyword, "'satisfies'"],
|
|
13053
13068
|
[Token.FlagKeyword, "'flag'"],
|
|
13054
|
-
[Token.AutoKeyword, "'auto'"],
|
|
13055
13069
|
[Token.PartialKeyword, "'partial'"],
|
|
13056
13070
|
[Token.PrivateKeyword, "'private'"],
|
|
13057
13071
|
[Token.PublicKeyword, "'public'"],
|
|
@@ -13091,6 +13105,7 @@ var Keywords = new Map([
|
|
|
13091
13105
|
["never", Token.NeverKeyword],
|
|
13092
13106
|
["unknown", Token.UnknownKeyword],
|
|
13093
13107
|
["extern", Token.ExternKeyword],
|
|
13108
|
+
["auto", Token.AutoKeyword],
|
|
13094
13109
|
["internal", Token.InternalKeyword],
|
|
13095
13110
|
["statemachine", Token.StatemachineKeyword],
|
|
13096
13111
|
["macro", Token.MacroKeyword],
|
|
@@ -13122,7 +13137,6 @@ var Keywords = new Map([
|
|
|
13122
13137
|
["impl", Token.ImplKeyword],
|
|
13123
13138
|
["satisfies", Token.SatisfiesKeyword],
|
|
13124
13139
|
["flag", Token.FlagKeyword],
|
|
13125
|
-
["auto", Token.AutoKeyword],
|
|
13126
13140
|
["partial", Token.PartialKeyword],
|
|
13127
13141
|
["private", Token.PrivateKeyword],
|
|
13128
13142
|
["public", Token.PublicKeyword],
|
|
@@ -13160,7 +13174,6 @@ var ReservedKeywords = new Map([
|
|
|
13160
13174
|
["impl", Token.ImplKeyword],
|
|
13161
13175
|
["satisfies", Token.SatisfiesKeyword],
|
|
13162
13176
|
["flag", Token.FlagKeyword],
|
|
13163
|
-
["auto", Token.AutoKeyword],
|
|
13164
13177
|
["partial", Token.PartialKeyword],
|
|
13165
13178
|
["private", Token.PrivateKeyword],
|
|
13166
13179
|
["public", Token.PublicKeyword],
|
|
@@ -21079,7 +21092,7 @@ globalThis[globalLibraryUrlsLoadedSym];
|
|
|
21079
21092
|
//#region ../compiler/dist/src/manifest.js
|
|
21080
21093
|
var manifest;
|
|
21081
21094
|
try {
|
|
21082
|
-
manifest = (await import("../manifest-
|
|
21095
|
+
manifest = (await import("../manifest-7Fm89_6U.js")).default;
|
|
21083
21096
|
} catch {
|
|
21084
21097
|
manifest = (await import(
|
|
21085
21098
|
/* @vite-ignore */
|
|
@@ -31027,7 +31040,8 @@ var TypeConfig = buildConfig({
|
|
|
31027
31040
|
Decorator: {
|
|
31028
31041
|
parameters: "nested-items",
|
|
31029
31042
|
implementation: "skip",
|
|
31030
|
-
target: "ref"
|
|
31043
|
+
target: "ref",
|
|
31044
|
+
declarationKind: "value"
|
|
31031
31045
|
},
|
|
31032
31046
|
ScalarConstructor: {
|
|
31033
31047
|
scalar: "parent",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type-config.d.ts","sourceRoot":"","sources":["../../src/react/type-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAEvD,MAAM,MAAM,iBAAiB,CAAC,CAAC,IAC3B;IAAE,IAAI,EAAE,QAAQ,GAAG,cAAc,GAAG,KAAK,GAAG,OAAO,GAAG,MAAM,CAAA;CAAE,GAC9D,uBAAuB,CAAC,CAAC,CAAC,CAAC;AAC/B,MAAM,MAAM,oBAAoB,CAAC,CAAC,IAC9B,QAAQ,GACR,cAAc,GACd,KAAK,GACL,OAAO,GACP,MAAM,GACN,0BAA0B,CAAC,CAAC,CAAC,CAAC;AAElC,MAAM,MAAM,sBAAsB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,CAAC;AACvF,MAAM,MAAM,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,CAAC;AAEjF,MAAM,MAAM,uBAAuB,CAAC,CAAC,IAAI;IACvC,IAAI,EAAE,QAAQ,CAAC;IACf,UAAU,EAAE,mBAAmB,CAAC,CAAC,CAAC,CAAC;CACpC,CAAC;AACF,MAAM,MAAM,0BAA0B,CAAC,CAAC,IAAI;IAC1C,IAAI,EAAE,QAAQ,CAAC;IACf,UAAU,EAAE,sBAAsB,CAAC,CAAC,CAAC,CAAC;CACvC,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;CAG7B,CAAC;AAqBF,eAAO,MAAM,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"type-config.d.ts","sourceRoot":"","sources":["../../src/react/type-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAEvD,MAAM,MAAM,iBAAiB,CAAC,CAAC,IAC3B;IAAE,IAAI,EAAE,QAAQ,GAAG,cAAc,GAAG,KAAK,GAAG,OAAO,GAAG,MAAM,CAAA;CAAE,GAC9D,uBAAuB,CAAC,CAAC,CAAC,CAAC;AAC/B,MAAM,MAAM,oBAAoB,CAAC,CAAC,IAC9B,QAAQ,GACR,cAAc,GACd,KAAK,GACL,OAAO,GACP,MAAM,GACN,0BAA0B,CAAC,CAAC,CAAC,CAAC;AAElC,MAAM,MAAM,sBAAsB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,CAAC;AACvF,MAAM,MAAM,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,CAAC;AAEjF,MAAM,MAAM,uBAAuB,CAAC,CAAC,IAAI;IACvC,IAAI,EAAE,QAAQ,CAAC;IACf,UAAU,EAAE,mBAAmB,CAAC,CAAC,CAAC,CAAC;CACpC,CAAC;AACF,MAAM,MAAM,0BAA0B,CAAC,CAAC,IAAI;IAC1C,IAAI,EAAE,QAAQ,CAAC;IACf,UAAU,EAAE,sBAAsB,CAAC,CAAC,CAAC,CAAC;CACvC,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;CAG7B,CAAC;AAqBF,eAAO,MAAM,UAAU,EAAE,eA8GvB,CAAC;AAOH,KAAK,UAAU,CAAC,CAAC,SAAS,IAAI,IAAI,mBAAmB,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;AAChE,KAAK,eAAe,GAAG;KACpB,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,UAAU,CAAC,OAAO,CAAC,IAAI,EAAE;QAAE,IAAI,EAAE,CAAC,CAAA;KAAE,CAAC,CAAC;CAC5D,CAAC;AAIF,eAAO,MAAM,cAAc,iLAAuB,CAAC;AAEnD,wBAAgB,oBAAoB,CAAC,CAAC,SAAS,IAAI,EAAE,CAAC,SAAS,MAAM,CAAC,EACpE,IAAI,EAAE,CAAC,EACP,GAAG,EAAE,CAAC,GACL,oBAAoB,CAAC,CAAC,CAAC,CAIzB;AACD,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,MAAM,EAAE,IAAI,EAAE,CAAC,GAAG,mBAAmB,CAAC,CAAC,CAAC,GAAG,IAAI,CAE3F"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@typespec/html-program-viewer",
|
|
3
|
-
"version": "0.84.0-dev.
|
|
3
|
+
"version": "0.84.0-dev.1",
|
|
4
4
|
"author": "Microsoft Corporation",
|
|
5
5
|
"description": "TypeSpec library for emitting an html view of the program.",
|
|
6
6
|
"homepage": "https://typespec.io",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"!dist/test/**"
|
|
37
37
|
],
|
|
38
38
|
"peerDependencies": {
|
|
39
|
-
"@typespec/compiler": "^1.13.0 || >= 1.14.0-dev.
|
|
39
|
+
"@typespec/compiler": "^1.13.0 || >= 1.14.0-dev.3"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@fluentui/react-components": "^9.73.7",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"@types/node": "^25.5.2",
|
|
55
55
|
"@types/react": "^19.2.16",
|
|
56
56
|
"@types/react-dom": "^19.2.3",
|
|
57
|
-
"@typespec/compiler": "^1.13.0 || >= 1.14.0-dev.
|
|
57
|
+
"@typespec/compiler": "^1.13.0 || >= 1.14.0-dev.3",
|
|
58
58
|
"@vitejs/plugin-react": "^6.0.1",
|
|
59
59
|
"@vitest/coverage-v8": "^4.1.3",
|
|
60
60
|
"@vitest/ui": "^4.1.3",
|