@typespec/html-program-viewer 0.80.0-dev.2 → 0.80.0-dev.4
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/{manifest-be-ZVpLr.js → manifest-Cogkb9R8.js} +1 -1
- package/dist/react/index.js +143 -91
- package/dist/react/js-inspector/object-inspector.d.ts.map +1 -1
- package/dist/react/js-inspector/object-preview.d.ts.map +1 -1
- package/dist/react/js-inspector/utils/property-utils.d.ts +1 -1
- package/dist/react/js-inspector/utils/property-utils.d.ts.map +1 -1
- package/package.json +3 -3
package/dist/react/index.js
CHANGED
|
@@ -1229,6 +1229,9 @@ function useTreeControls({ onSetExpanded }) {
|
|
|
1229
1229
|
);
|
|
1230
1230
|
const expand = useCallback(
|
|
1231
1231
|
(key) => {
|
|
1232
|
+
if (expanded.has(key)) {
|
|
1233
|
+
return;
|
|
1234
|
+
}
|
|
1232
1235
|
expanded.add(key);
|
|
1233
1236
|
onSetExpanded?.(expanded);
|
|
1234
1237
|
setRerender((x) => x + 1);
|
|
@@ -1237,6 +1240,9 @@ function useTreeControls({ onSetExpanded }) {
|
|
|
1237
1240
|
);
|
|
1238
1241
|
const collapse = useCallback(
|
|
1239
1242
|
(key) => {
|
|
1243
|
+
if (!expanded.has(key)) {
|
|
1244
|
+
return;
|
|
1245
|
+
}
|
|
1240
1246
|
expanded.delete(key);
|
|
1241
1247
|
onSetExpanded?.(expanded);
|
|
1242
1248
|
setRerender((x) => x + 1);
|
|
@@ -36610,6 +36616,7 @@ const diagnostics = {
|
|
|
36610
36616
|
messages: {
|
|
36611
36617
|
default: paramMessage `${"feature"} is an experimental feature. It may change in the future or be removed. Use with caution and consider providing feedback on this feature.`,
|
|
36612
36618
|
functionDeclarations: "Function declarations are an experimental feature that may change in the future. Use with caution and consider providing feedback to the TypeSpec team.",
|
|
36619
|
+
internal: `Internal symbols are experimental and may be changed in a future release. Use with caution. Suppress this message ('#suppress "experimental-feature"') to silence this warning.`,
|
|
36613
36620
|
},
|
|
36614
36621
|
},
|
|
36615
36622
|
"using-invalid-ref": {
|
|
@@ -36687,6 +36694,7 @@ const diagnostics = {
|
|
|
36687
36694
|
member: paramMessage `${"kind"} doesn't have member ${"id"}`,
|
|
36688
36695
|
metaProperty: paramMessage `${"kind"} doesn't have meta property ${"id"}`,
|
|
36689
36696
|
node: paramMessage `Cannot resolve '${"id"}' in node ${"nodeName"} since it has no members. Did you mean to use "::" instead of "."?`,
|
|
36697
|
+
internal: paramMessage `Symbol '${"id"}' is internal and can only be accessed from within its declaring package.`,
|
|
36690
36698
|
},
|
|
36691
36699
|
},
|
|
36692
36700
|
"duplicate-property": {
|
|
@@ -36897,16 +36905,12 @@ const diagnostics = {
|
|
|
36897
36905
|
default: "A rest parameter must be of an array type.",
|
|
36898
36906
|
},
|
|
36899
36907
|
},
|
|
36900
|
-
"
|
|
36901
|
-
severity: "error",
|
|
36902
|
-
messages: {
|
|
36903
|
-
default: "A decorator declaration must be prefixed with the 'extern' modifier.",
|
|
36904
|
-
},
|
|
36905
|
-
},
|
|
36906
|
-
"function-extern": {
|
|
36908
|
+
"invalid-modifier": {
|
|
36907
36909
|
severity: "error",
|
|
36908
36910
|
messages: {
|
|
36909
|
-
default:
|
|
36911
|
+
default: paramMessage `Modifier '${"modifier"}' is invalid.`,
|
|
36912
|
+
"missing-required": paramMessage `Declaration of type '${"nodeKind"}' is missing required modifier '${"modifier"}'.`,
|
|
36913
|
+
"not-allowed": paramMessage `Modifier '${"modifier"}' cannot be used on declarations of type '${"nodeKind"}'.`,
|
|
36910
36914
|
},
|
|
36911
36915
|
},
|
|
36912
36916
|
"function-return": {
|
|
@@ -46737,7 +46741,8 @@ var SyntaxKind;
|
|
|
46737
46741
|
SyntaxKind[SyntaxKind["ConstStatement"] = 67] = "ConstStatement";
|
|
46738
46742
|
SyntaxKind[SyntaxKind["CallExpression"] = 68] = "CallExpression";
|
|
46739
46743
|
SyntaxKind[SyntaxKind["ScalarConstructor"] = 69] = "ScalarConstructor";
|
|
46740
|
-
SyntaxKind[SyntaxKind["
|
|
46744
|
+
SyntaxKind[SyntaxKind["InternalKeyword"] = 70] = "InternalKeyword";
|
|
46745
|
+
SyntaxKind[SyntaxKind["FunctionTypeExpression"] = 71] = "FunctionTypeExpression";
|
|
46741
46746
|
})(SyntaxKind || (SyntaxKind = {}));
|
|
46742
46747
|
var IdentifierKind;
|
|
46743
46748
|
(function (IdentifierKind) {
|
|
@@ -49115,62 +49120,62 @@ var Token;
|
|
|
49115
49120
|
///////////////////////////////////////////////////////////////
|
|
49116
49121
|
/** @internal */ Token[Token["__StartModifierKeyword"] = 69] = "__StartModifierKeyword";
|
|
49117
49122
|
Token[Token["ExternKeyword"] = 69] = "ExternKeyword";
|
|
49118
|
-
|
|
49123
|
+
Token[Token["InternalKeyword"] = 70] = "InternalKeyword";
|
|
49124
|
+
/** @internal */ Token[Token["__EndModifierKeyword"] = 71] = "__EndModifierKeyword";
|
|
49119
49125
|
///////////////////////////////////////////////////////////////
|
|
49120
49126
|
///////////////////////////////////////////////////////////////
|
|
49121
49127
|
// Other keywords
|
|
49122
|
-
Token[Token["ExtendsKeyword"] =
|
|
49123
|
-
Token[Token["FnKeyword"] =
|
|
49124
|
-
Token[Token["TrueKeyword"] =
|
|
49125
|
-
Token[Token["FalseKeyword"] =
|
|
49126
|
-
Token[Token["ReturnKeyword"] =
|
|
49127
|
-
Token[Token["VoidKeyword"] =
|
|
49128
|
-
Token[Token["NeverKeyword"] =
|
|
49129
|
-
Token[Token["UnknownKeyword"] =
|
|
49130
|
-
Token[Token["ValueOfKeyword"] =
|
|
49131
|
-
Token[Token["TypeOfKeyword"] =
|
|
49128
|
+
Token[Token["ExtendsKeyword"] = 71] = "ExtendsKeyword";
|
|
49129
|
+
Token[Token["FnKeyword"] = 72] = "FnKeyword";
|
|
49130
|
+
Token[Token["TrueKeyword"] = 73] = "TrueKeyword";
|
|
49131
|
+
Token[Token["FalseKeyword"] = 74] = "FalseKeyword";
|
|
49132
|
+
Token[Token["ReturnKeyword"] = 75] = "ReturnKeyword";
|
|
49133
|
+
Token[Token["VoidKeyword"] = 76] = "VoidKeyword";
|
|
49134
|
+
Token[Token["NeverKeyword"] = 77] = "NeverKeyword";
|
|
49135
|
+
Token[Token["UnknownKeyword"] = 78] = "UnknownKeyword";
|
|
49136
|
+
Token[Token["ValueOfKeyword"] = 79] = "ValueOfKeyword";
|
|
49137
|
+
Token[Token["TypeOfKeyword"] = 80] = "TypeOfKeyword";
|
|
49132
49138
|
// Add new non-statement keyword above
|
|
49133
|
-
/** @internal */ Token[Token["__EndKeyword"] =
|
|
49139
|
+
/** @internal */ Token[Token["__EndKeyword"] = 81] = "__EndKeyword";
|
|
49134
49140
|
///////////////////////////////////////////////////////////////
|
|
49135
|
-
/** @internal */ Token[Token["__StartReservedKeyword"] =
|
|
49141
|
+
/** @internal */ Token[Token["__StartReservedKeyword"] = 81] = "__StartReservedKeyword";
|
|
49136
49142
|
///////////////////////////////////////////////////////////////
|
|
49137
49143
|
// List of keywords that have special meaning in the language but are reserved for future use
|
|
49138
|
-
Token[Token["StatemachineKeyword"] =
|
|
49139
|
-
Token[Token["MacroKeyword"] =
|
|
49140
|
-
Token[Token["PackageKeyword"] =
|
|
49141
|
-
Token[Token["MetadataKeyword"] =
|
|
49142
|
-
Token[Token["EnvKeyword"] =
|
|
49143
|
-
Token[Token["ArgKeyword"] =
|
|
49144
|
-
Token[Token["DeclareKeyword"] =
|
|
49145
|
-
Token[Token["ArrayKeyword"] =
|
|
49146
|
-
Token[Token["StructKeyword"] =
|
|
49147
|
-
Token[Token["RecordKeyword"] =
|
|
49148
|
-
Token[Token["ModuleKeyword"] =
|
|
49149
|
-
Token[Token["ModKeyword"] =
|
|
49150
|
-
Token[Token["SymKeyword"] =
|
|
49151
|
-
Token[Token["ContextKeyword"] =
|
|
49152
|
-
Token[Token["PropKeyword"] =
|
|
49153
|
-
Token[Token["PropertyKeyword"] =
|
|
49154
|
-
Token[Token["ScenarioKeyword"] =
|
|
49155
|
-
Token[Token["PubKeyword"] =
|
|
49156
|
-
Token[Token["SubKeyword"] =
|
|
49157
|
-
Token[Token["TypeRefKeyword"] =
|
|
49158
|
-
Token[Token["TraitKeyword"] =
|
|
49159
|
-
Token[Token["ThisKeyword"] =
|
|
49160
|
-
Token[Token["SelfKeyword"] =
|
|
49161
|
-
Token[Token["SuperKeyword"] =
|
|
49162
|
-
Token[Token["KeyofKeyword"] =
|
|
49163
|
-
Token[Token["WithKeyword"] =
|
|
49164
|
-
Token[Token["ImplementsKeyword"] =
|
|
49165
|
-
Token[Token["ImplKeyword"] =
|
|
49166
|
-
Token[Token["SatisfiesKeyword"] =
|
|
49167
|
-
Token[Token["FlagKeyword"] =
|
|
49168
|
-
Token[Token["AutoKeyword"] =
|
|
49169
|
-
Token[Token["PartialKeyword"] =
|
|
49170
|
-
Token[Token["PrivateKeyword"] =
|
|
49171
|
-
Token[Token["PublicKeyword"] =
|
|
49172
|
-
Token[Token["ProtectedKeyword"] =
|
|
49173
|
-
Token[Token["InternalKeyword"] = 115] = "InternalKeyword";
|
|
49144
|
+
Token[Token["StatemachineKeyword"] = 81] = "StatemachineKeyword";
|
|
49145
|
+
Token[Token["MacroKeyword"] = 82] = "MacroKeyword";
|
|
49146
|
+
Token[Token["PackageKeyword"] = 83] = "PackageKeyword";
|
|
49147
|
+
Token[Token["MetadataKeyword"] = 84] = "MetadataKeyword";
|
|
49148
|
+
Token[Token["EnvKeyword"] = 85] = "EnvKeyword";
|
|
49149
|
+
Token[Token["ArgKeyword"] = 86] = "ArgKeyword";
|
|
49150
|
+
Token[Token["DeclareKeyword"] = 87] = "DeclareKeyword";
|
|
49151
|
+
Token[Token["ArrayKeyword"] = 88] = "ArrayKeyword";
|
|
49152
|
+
Token[Token["StructKeyword"] = 89] = "StructKeyword";
|
|
49153
|
+
Token[Token["RecordKeyword"] = 90] = "RecordKeyword";
|
|
49154
|
+
Token[Token["ModuleKeyword"] = 91] = "ModuleKeyword";
|
|
49155
|
+
Token[Token["ModKeyword"] = 92] = "ModKeyword";
|
|
49156
|
+
Token[Token["SymKeyword"] = 93] = "SymKeyword";
|
|
49157
|
+
Token[Token["ContextKeyword"] = 94] = "ContextKeyword";
|
|
49158
|
+
Token[Token["PropKeyword"] = 95] = "PropKeyword";
|
|
49159
|
+
Token[Token["PropertyKeyword"] = 96] = "PropertyKeyword";
|
|
49160
|
+
Token[Token["ScenarioKeyword"] = 97] = "ScenarioKeyword";
|
|
49161
|
+
Token[Token["PubKeyword"] = 98] = "PubKeyword";
|
|
49162
|
+
Token[Token["SubKeyword"] = 99] = "SubKeyword";
|
|
49163
|
+
Token[Token["TypeRefKeyword"] = 100] = "TypeRefKeyword";
|
|
49164
|
+
Token[Token["TraitKeyword"] = 101] = "TraitKeyword";
|
|
49165
|
+
Token[Token["ThisKeyword"] = 102] = "ThisKeyword";
|
|
49166
|
+
Token[Token["SelfKeyword"] = 103] = "SelfKeyword";
|
|
49167
|
+
Token[Token["SuperKeyword"] = 104] = "SuperKeyword";
|
|
49168
|
+
Token[Token["KeyofKeyword"] = 105] = "KeyofKeyword";
|
|
49169
|
+
Token[Token["WithKeyword"] = 106] = "WithKeyword";
|
|
49170
|
+
Token[Token["ImplementsKeyword"] = 107] = "ImplementsKeyword";
|
|
49171
|
+
Token[Token["ImplKeyword"] = 108] = "ImplKeyword";
|
|
49172
|
+
Token[Token["SatisfiesKeyword"] = 109] = "SatisfiesKeyword";
|
|
49173
|
+
Token[Token["FlagKeyword"] = 110] = "FlagKeyword";
|
|
49174
|
+
Token[Token["AutoKeyword"] = 111] = "AutoKeyword";
|
|
49175
|
+
Token[Token["PartialKeyword"] = 112] = "PartialKeyword";
|
|
49176
|
+
Token[Token["PrivateKeyword"] = 113] = "PrivateKeyword";
|
|
49177
|
+
Token[Token["PublicKeyword"] = 114] = "PublicKeyword";
|
|
49178
|
+
Token[Token["ProtectedKeyword"] = 115] = "ProtectedKeyword";
|
|
49174
49179
|
Token[Token["SealedKeyword"] = 116] = "SealedKeyword";
|
|
49175
49180
|
Token[Token["LocalKeyword"] = 117] = "LocalKeyword";
|
|
49176
49181
|
Token[Token["AsyncKeyword"] = 118] = "AsyncKeyword";
|
|
@@ -49331,6 +49336,7 @@ const Keywords = new Map([
|
|
|
49331
49336
|
["never", Token.NeverKeyword],
|
|
49332
49337
|
["unknown", Token.UnknownKeyword],
|
|
49333
49338
|
["extern", Token.ExternKeyword],
|
|
49339
|
+
["internal", Token.InternalKeyword],
|
|
49334
49340
|
// Reserved keywords
|
|
49335
49341
|
["statemachine", Token.StatemachineKeyword],
|
|
49336
49342
|
["macro", Token.MacroKeyword],
|
|
@@ -49367,7 +49373,6 @@ const Keywords = new Map([
|
|
|
49367
49373
|
["private", Token.PrivateKeyword],
|
|
49368
49374
|
["public", Token.PublicKeyword],
|
|
49369
49375
|
["protected", Token.ProtectedKeyword],
|
|
49370
|
-
["internal", Token.InternalKeyword],
|
|
49371
49376
|
["sealed", Token.SealedKeyword],
|
|
49372
49377
|
["local", Token.LocalKeyword],
|
|
49373
49378
|
["async", Token.AsyncKeyword],
|
|
@@ -49407,7 +49412,6 @@ const ReservedKeywords = new Map([
|
|
|
49407
49412
|
["private", Token.PrivateKeyword],
|
|
49408
49413
|
["public", Token.PublicKeyword],
|
|
49409
49414
|
["protected", Token.ProtectedKeyword],
|
|
49410
|
-
["internal", Token.InternalKeyword],
|
|
49411
49415
|
["sealed", Token.SealedKeyword],
|
|
49412
49416
|
["local", Token.LocalKeyword],
|
|
49413
49417
|
["async", Token.AsyncKeyword],
|
|
@@ -49422,6 +49426,9 @@ var TokenFlags;
|
|
|
49422
49426
|
TokenFlags[TokenFlags["DocComment"] = 16] = "DocComment";
|
|
49423
49427
|
TokenFlags[TokenFlags["Backticked"] = 32] = "Backticked";
|
|
49424
49428
|
})(TokenFlags || (TokenFlags = {}));
|
|
49429
|
+
function isModifier(token) {
|
|
49430
|
+
return token >= Token.__StartModifierKeyword && token < Token.__EndModifierKeyword;
|
|
49431
|
+
}
|
|
49425
49432
|
function getTokenDisplayTable(entries) {
|
|
49426
49433
|
const table = new Array(entries.length);
|
|
49427
49434
|
for (const [token, display] of entries) {
|
|
@@ -49465,8 +49472,16 @@ function needBacktick(sv, context) {
|
|
|
49465
49472
|
if (sv.length === 0) {
|
|
49466
49473
|
return false;
|
|
49467
49474
|
}
|
|
49468
|
-
if (context === "allow-reserved"
|
|
49469
|
-
|
|
49475
|
+
if (context === "allow-reserved") {
|
|
49476
|
+
if (ReservedKeywords.has(sv)) {
|
|
49477
|
+
return false;
|
|
49478
|
+
}
|
|
49479
|
+
// Modifier keywords (e.g. "internal", "extern") are contextual and can be
|
|
49480
|
+
// used as identifiers without escaping in non-modifier positions.
|
|
49481
|
+
const kwToken = Keywords.get(sv);
|
|
49482
|
+
if (kwToken !== undefined && isModifier(kwToken)) {
|
|
49483
|
+
return false;
|
|
49484
|
+
}
|
|
49470
49485
|
}
|
|
49471
49486
|
if (Keywords.has(sv)) {
|
|
49472
49487
|
return true;
|
|
@@ -51000,6 +51015,34 @@ function _$(arg) {
|
|
|
51000
51015
|
*/
|
|
51001
51016
|
const $ = _$;
|
|
51002
51017
|
|
|
51018
|
+
// Copyright (c) Microsoft Corporation
|
|
51019
|
+
// Licensed under the MIT License.
|
|
51020
|
+
/**
|
|
51021
|
+
* The default compatibility for all declaration syntax nodes.
|
|
51022
|
+
*
|
|
51023
|
+
* By default, only the `internal` modifier is allowed on all declaration syntax nodes.
|
|
51024
|
+
* No modifiers are required by default.
|
|
51025
|
+
*/
|
|
51026
|
+
const DEFAULT_COMPATIBILITY = {
|
|
51027
|
+
};
|
|
51028
|
+
const NO_MODIFIERS = {
|
|
51029
|
+
};
|
|
51030
|
+
({
|
|
51031
|
+
[SyntaxKind.NamespaceStatement]: NO_MODIFIERS,
|
|
51032
|
+
[SyntaxKind.OperationStatement]: DEFAULT_COMPATIBILITY,
|
|
51033
|
+
[SyntaxKind.ModelStatement]: DEFAULT_COMPATIBILITY,
|
|
51034
|
+
[SyntaxKind.ScalarStatement]: DEFAULT_COMPATIBILITY,
|
|
51035
|
+
[SyntaxKind.InterfaceStatement]: DEFAULT_COMPATIBILITY,
|
|
51036
|
+
[SyntaxKind.UnionStatement]: DEFAULT_COMPATIBILITY,
|
|
51037
|
+
[SyntaxKind.EnumStatement]: DEFAULT_COMPATIBILITY,
|
|
51038
|
+
[SyntaxKind.AliasStatement]: DEFAULT_COMPATIBILITY,
|
|
51039
|
+
[SyntaxKind.ConstStatement]: DEFAULT_COMPATIBILITY,
|
|
51040
|
+
[SyntaxKind.DecoratorDeclarationStatement]: {
|
|
51041
|
+
},
|
|
51042
|
+
[SyntaxKind.FunctionDeclarationStatement]: {
|
|
51043
|
+
},
|
|
51044
|
+
});
|
|
51045
|
+
|
|
51003
51046
|
/**
|
|
51004
51047
|
* The fixed set of options for each of the kinds of delimited lists in TypeSpec.
|
|
51005
51048
|
*/
|
|
@@ -51495,7 +51538,7 @@ let manifest;
|
|
|
51495
51538
|
try {
|
|
51496
51539
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
51497
51540
|
// @ts-ignore
|
|
51498
|
-
manifest = (await import('../manifest-
|
|
51541
|
+
manifest = (await import('../manifest-Cogkb9R8.js')).default;
|
|
51499
51542
|
}
|
|
51500
51543
|
catch {
|
|
51501
51544
|
const name = "../dist/manifest.js";
|
|
@@ -63410,7 +63453,6 @@ const ObjectName = ({ name, dimmed }) => {
|
|
|
63410
63453
|
return /* @__PURE__ */ jsxRuntimeExports$1.jsx("span", { className: mergeClasses(style$2["object-name"], dimmed && style$2["dimmed"]), children: name });
|
|
63411
63454
|
};
|
|
63412
63455
|
|
|
63413
|
-
const hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
63414
63456
|
const propertyIsEnumerable = Object.prototype.propertyIsEnumerable;
|
|
63415
63457
|
|
|
63416
63458
|
function getPropertyValue(object, propertyName) {
|
|
@@ -63456,23 +63498,29 @@ const ObjectPreview = ({ data }) => {
|
|
|
63456
63498
|
} else {
|
|
63457
63499
|
const maxProperties = OBJECT_MAX_PROPERTIES;
|
|
63458
63500
|
const propertyNodes = [];
|
|
63459
|
-
|
|
63460
|
-
|
|
63461
|
-
|
|
63462
|
-
|
|
63463
|
-
|
|
63464
|
-
|
|
63465
|
-
|
|
63466
|
-
|
|
63467
|
-
|
|
63468
|
-
|
|
63469
|
-
|
|
63470
|
-
/* @__PURE__ */ jsxRuntimeExports$1.jsx(JsValue, { value: propertyValue }),
|
|
63471
|
-
ellipsis
|
|
63472
|
-
] }, propertyName)
|
|
63473
|
-
);
|
|
63474
|
-
if (ellipsis) break;
|
|
63501
|
+
const stringKeys = Object.keys(object);
|
|
63502
|
+
const symbolKeys = Object.getOwnPropertySymbols(object).filter(
|
|
63503
|
+
(sym) => propertyIsEnumerable.call(object, sym)
|
|
63504
|
+
);
|
|
63505
|
+
const allKeys = [...stringKeys, ...symbolKeys];
|
|
63506
|
+
const totalProperties = allKeys.length;
|
|
63507
|
+
for (let i = 0; i < allKeys.length; i++) {
|
|
63508
|
+
const key = allKeys[i];
|
|
63509
|
+
let ellipsis;
|
|
63510
|
+
if (propertyNodes.length === maxProperties - 1 && totalProperties > maxProperties) {
|
|
63511
|
+
ellipsis = /* @__PURE__ */ jsxRuntimeExports$1.jsx("span", { children: "…" }, "ellipsis");
|
|
63475
63512
|
}
|
|
63513
|
+
const propertyValue = getPropertyValue(object, key);
|
|
63514
|
+
const displayName = typeof key === "string" ? key || `""` : key.toString();
|
|
63515
|
+
propertyNodes.push(
|
|
63516
|
+
/* @__PURE__ */ jsxRuntimeExports$1.jsxs("span", { children: [
|
|
63517
|
+
/* @__PURE__ */ jsxRuntimeExports$1.jsx(ObjectName, { name: displayName }),
|
|
63518
|
+
": ",
|
|
63519
|
+
/* @__PURE__ */ jsxRuntimeExports$1.jsx(JsValue, { value: propertyValue }),
|
|
63520
|
+
ellipsis
|
|
63521
|
+
] }, typeof key === "string" ? key : `symbol-${i}`)
|
|
63522
|
+
);
|
|
63523
|
+
if (ellipsis) break;
|
|
63476
63524
|
}
|
|
63477
63525
|
const objectConstructorName = object.constructor ? object.constructor.name : "Object";
|
|
63478
63526
|
return /* @__PURE__ */ jsxRuntimeExports$1.jsxs(require$$0.Fragment, { children: [
|
|
@@ -63529,28 +63577,32 @@ const createIterator = (showNonenumerable, sortObjectKeys) => {
|
|
|
63529
63577
|
i++;
|
|
63530
63578
|
}
|
|
63531
63579
|
} else {
|
|
63532
|
-
const
|
|
63533
|
-
|
|
63534
|
-
|
|
63535
|
-
|
|
63536
|
-
|
|
63580
|
+
const stringKeys = Object.getOwnPropertyNames(data);
|
|
63581
|
+
const symbolKeys = Object.getOwnPropertySymbols(data);
|
|
63582
|
+
const allKeys = [...stringKeys, ...symbolKeys];
|
|
63583
|
+
if (sortObjectKeys && !dataIsArray) {
|
|
63584
|
+
allKeys.sort((a, b) => {
|
|
63585
|
+
const aStr = typeof a === "string" ? a : a.toString();
|
|
63586
|
+
const bStr = typeof b === "string" ? b : b.toString();
|
|
63587
|
+
return aStr.localeCompare(bStr);
|
|
63588
|
+
});
|
|
63537
63589
|
}
|
|
63538
|
-
for (const
|
|
63539
|
-
if (propertyIsEnumerable.call(data,
|
|
63540
|
-
const propertyValue = getPropertyValue(data,
|
|
63590
|
+
for (const key of allKeys) {
|
|
63591
|
+
if (propertyIsEnumerable.call(data, key)) {
|
|
63592
|
+
const propertyValue = getPropertyValue(data, key);
|
|
63541
63593
|
yield {
|
|
63542
|
-
name:
|
|
63594
|
+
name: typeof key === "string" ? key || `""` : key.toString(),
|
|
63543
63595
|
data: propertyValue
|
|
63544
63596
|
};
|
|
63545
63597
|
} else if (showNonenumerable) {
|
|
63546
63598
|
let propertyValue;
|
|
63547
63599
|
try {
|
|
63548
|
-
propertyValue = getPropertyValue(data,
|
|
63600
|
+
propertyValue = getPropertyValue(data, key);
|
|
63549
63601
|
} catch (e) {
|
|
63550
63602
|
}
|
|
63551
63603
|
if (propertyValue !== void 0) {
|
|
63552
63604
|
yield {
|
|
63553
|
-
name:
|
|
63605
|
+
name: typeof key === "string" ? key || `""` : key.toString(),
|
|
63554
63606
|
data: propertyValue,
|
|
63555
63607
|
isNonenumerable: true
|
|
63556
63608
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"object-inspector.d.ts","sourceRoot":"","sources":["../../../src/react/js-inspector/object-inspector.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"object-inspector.d.ts","sourceRoot":"","sources":["../../../src/react/js-inspector/object-inspector.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AA2FhC,eAAO,MAAM,mBAAmB,GAAI,uCAAuC,iBAAiB,4CAOzF,CAAC;AAEJ,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,IAAI,EAAE,GAAG,CAAC;IACnB,QAAQ,CAAC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IACrC,QAAQ,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;IAClC,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,GAAG,CAAC;CAC3D;AAED,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,oBAAoB,CAwBpD,CAAC;AAEF,eAAO,MAAM,iBAAiB,MAAM,CAAC;AAMrC,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,GAAG,CAAC;IACnB,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,CAAC;CACpC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"object-preview.d.ts","sourceRoot":"","sources":["../../../src/react/js-inspector/object-preview.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,EAAE,EAAkB,MAAM,OAAO,CAAC;AAqBvD;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,GAAG,
|
|
1
|
+
{"version":3,"file":"object-preview.d.ts","sourceRoot":"","sources":["../../../src/react/js-inspector/object-preview.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,EAAE,EAAkB,MAAM,OAAO,CAAC;AAqBvD;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,GAAG,CA4EjC,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function getPropertyValue(object: any, propertyName: string): any;
|
|
1
|
+
export declare function getPropertyValue(object: any, propertyName: string | symbol): any;
|
|
2
2
|
//# sourceMappingURL=property-utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"property-utils.d.ts","sourceRoot":"","sources":["../../../../src/react/js-inspector/utils/property-utils.tsx"],"names":[],"mappings":"AAAA,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"property-utils.d.ts","sourceRoot":"","sources":["../../../../src/react/js-inspector/utils/property-utils.tsx"],"names":[],"mappings":"AAAA,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,OAW1E"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@typespec/html-program-viewer",
|
|
3
|
-
"version": "0.80.0-dev.
|
|
3
|
+
"version": "0.80.0-dev.4",
|
|
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.9.0 || >= 1.10.0-dev.
|
|
39
|
+
"@typespec/compiler": "^1.9.0 || >= 1.10.0-dev.13"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@fluentui/react-components": "~9.73.1",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"@types/node": "~25.3.0",
|
|
55
55
|
"@types/react": "~19.2.7",
|
|
56
56
|
"@types/react-dom": "~19.2.2",
|
|
57
|
-
"@typespec/compiler": "^1.9.0 || >= 1.10.0-dev.
|
|
57
|
+
"@typespec/compiler": "^1.9.0 || >= 1.10.0-dev.13",
|
|
58
58
|
"@vitejs/plugin-react": "~5.1.2",
|
|
59
59
|
"@vitest/coverage-v8": "^4.0.18",
|
|
60
60
|
"@vitest/ui": "^4.0.18",
|