@typespec/playground 0.5.0-dev.2 → 0.5.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/react/index.js
CHANGED
|
@@ -67,10 +67,10 @@ function useMonacoModel(uri, language) {
|
|
|
67
67
|
}, [uri, language]);
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
const footer = "
|
|
70
|
+
const footer = "_footer_e6dic_1";
|
|
71
71
|
const style$i = {
|
|
72
72
|
footer: footer,
|
|
73
|
-
"footer-item": "_footer-
|
|
73
|
+
"footer-item": "_footer-item_e6dic_9"
|
|
74
74
|
};
|
|
75
75
|
|
|
76
76
|
const FooterItem = ({ children, link, className }) => {
|
|
@@ -38698,9 +38698,9 @@ function absolutePathStatus(path) {
|
|
|
38698
38698
|
if (path.startsWith(".") || !isPathAbsolute(path)) {
|
|
38699
38699
|
return "not-absolute";
|
|
38700
38700
|
}
|
|
38701
|
-
if (path.includes("\\")) {
|
|
38702
|
-
|
|
38703
|
-
}
|
|
38701
|
+
// if (path.includes("\\")) {
|
|
38702
|
+
// return "windows-style";
|
|
38703
|
+
// }
|
|
38704
38704
|
return "valid";
|
|
38705
38705
|
}
|
|
38706
38706
|
function createJSONSchemaValidator(schema, options = { strict: true }) {
|
|
@@ -38731,21 +38731,11 @@ function ajvErrorToDiagnostic(obj, error, target) {
|
|
|
38731
38731
|
const tspTarget = resolveTarget(error, target);
|
|
38732
38732
|
if (error.params.format === "absolute-path") {
|
|
38733
38733
|
const value = getErrorValue(obj, error);
|
|
38734
|
-
|
|
38735
|
-
|
|
38736
|
-
|
|
38737
|
-
|
|
38738
|
-
|
|
38739
|
-
target: tspTarget,
|
|
38740
|
-
});
|
|
38741
|
-
}
|
|
38742
|
-
else {
|
|
38743
|
-
return createDiagnostic({
|
|
38744
|
-
code: "config-path-absolute",
|
|
38745
|
-
format: { path: value },
|
|
38746
|
-
target: tspTarget,
|
|
38747
|
-
});
|
|
38748
|
-
}
|
|
38734
|
+
return createDiagnostic({
|
|
38735
|
+
code: "config-path-absolute",
|
|
38736
|
+
format: { path: value },
|
|
38737
|
+
target: tspTarget,
|
|
38738
|
+
});
|
|
38749
38739
|
}
|
|
38750
38740
|
const messageLines = [`Schema violation: ${error.message} (${error.instancePath || "/"})`];
|
|
38751
38741
|
for (const [name, value] of Object.entries(error.params).filter(([name]) => !IGNORED_AJV_PARAMS.has(name))) {
|
|
@@ -38817,7 +38807,7 @@ let manifest;
|
|
|
38817
38807
|
try {
|
|
38818
38808
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
38819
38809
|
// @ts-ignore
|
|
38820
|
-
manifest = (await import('../manifest-
|
|
38810
|
+
manifest = (await import('../manifest-Cewnx59A-Cewnx59A.js')).default;
|
|
38821
38811
|
}
|
|
38822
38812
|
catch {
|
|
38823
38813
|
const name = "../dist/manifest.js";
|
|
@@ -40614,6 +40604,13 @@ NumericPrototype.toString = function () {
|
|
|
40614
40604
|
],
|
|
40615
40605
|
});
|
|
40616
40606
|
|
|
40607
|
+
var Related;
|
|
40608
|
+
(function (Related) {
|
|
40609
|
+
Related[Related["false"] = 0] = "false";
|
|
40610
|
+
Related[Related["true"] = 1] = "true";
|
|
40611
|
+
Related[Related["maybe"] = 2] = "maybe";
|
|
40612
|
+
})(Related || (Related = {}));
|
|
40613
|
+
|
|
40617
40614
|
var ResolutionKind;
|
|
40618
40615
|
(function (ResolutionKind) {
|
|
40619
40616
|
ResolutionKind[ResolutionKind["Value"] = 0] = "Value";
|
|
@@ -40621,12 +40618,6 @@ var ResolutionKind;
|
|
|
40621
40618
|
ResolutionKind[ResolutionKind["BaseType"] = 2] = "BaseType";
|
|
40622
40619
|
ResolutionKind[ResolutionKind["Constraint"] = 3] = "Constraint";
|
|
40623
40620
|
})(ResolutionKind || (ResolutionKind = {}));
|
|
40624
|
-
var Related;
|
|
40625
|
-
(function (Related) {
|
|
40626
|
-
Related[Related["false"] = 0] = "false";
|
|
40627
|
-
Related[Related["true"] = 1] = "true";
|
|
40628
|
-
Related[Related["maybe"] = 2] = "maybe";
|
|
40629
|
-
})(Related || (Related = {}));
|
|
40630
40621
|
|
|
40631
40622
|
var yu=Object.create;var He=Object.defineProperty;var Au=Object.getOwnPropertyDescriptor;var Bu=Object.getOwnPropertyNames;var wu=Object.getPrototypeOf,xu=Object.prototype.hasOwnProperty;var sr=e=>{throw TypeError(e)};var _u=(e,t)=>()=>(e&&(t=e(e=0)),t);var At=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),We=(e,t)=>{for(var r in t)He(e,r,{get:t[r],enumerable:!0});},ar=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Bu(t))!xu.call(e,o)&&o!==r&&He(e,o,{get:()=>t[o],enumerable:!(n=Au(t,o))||n.enumerable});return e};var Me=(e,t,r)=>(r=e!=null?yu(wu(e)):{},ar(He(r,"default",{value:e,enumerable:!0}),e)),vu=e=>ar(He({},"__esModule",{value:!0}),e);var bu=(e,t,r)=>t.has(e)||sr("Cannot "+r);var Dr=(e,t,r)=>t.has(e)?sr("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r);var pe=(e,t,r)=>(bu(e,t,"access private method"),r);var it=At((ia,sn)=>{var on=new Proxy(String,{get:()=>on});sn.exports=on;});var Tn={};We(Tn,{default:()=>_o,shouldHighlight:()=>xo});var xo,_o,kn=_u(()=>{xo=()=>!1,_o=String;});var Pn=At((bD,Xt)=>{var g=String,Ln=function(){return {isColorSupported:!1,reset:g,bold:g,dim:g,italic:g,underline:g,inverse:g,hidden:g,strikethrough:g,black:g,red:g,green:g,yellow:g,blue:g,magenta:g,cyan:g,white:g,gray:g,bgBlack:g,bgRed:g,bgGreen:g,bgYellow:g,bgBlue:g,bgMagenta:g,bgCyan:g,bgWhite:g}};Xt.exports=Ln();Xt.exports.createColors=Ln;});var $n=At(Ct=>{Object.defineProperty(Ct,"__esModule",{value:!0});Ct.codeFrameColumns=Mn;Ct.default=To;var In=(kn(),vu(Tn)),Hn=vo(Pn(),!0);function Wn(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,r=new WeakMap;return (Wn=function(n){return n?r:t})(e)}function vo(e,t){if(e===null||typeof e!="object"&&typeof e!="function")return {default:e};var r=Wn(t);if(r&&r.has(e))return r.get(e);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if(u!=="default"&&{}.hasOwnProperty.call(e,u)){var i=o?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,r&&r.set(e,n),n}var bo=Hn.default,Rn=(e,t)=>r=>e(t(r)),Zt;function Oo(e){if(e){return (Zt)!=null||(Zt=(0, Hn.createColors)(!0)),Zt}return bo}var Yn=!1;function So(e){return {gutter:e.gray,marker:Rn(e.red,e.bold),message:Rn(e.red,e.bold)}}var jn=/\r\n|[\n\r\u2028\u2029]/;function No(e,t,r){let n=Object.assign({column:0,line:-1},e.start),o=Object.assign({},n,e.end),{linesAbove:u=2,linesBelow:i=3}=r||{},s=n.line,a=n.column,D=o.line,l=o.column,d=Math.max(s-(u+1),0),f=Math.min(t.length,D+i);s===-1&&(d=0),D===-1&&(f=t.length);let p=D-s,c={};if(p)for(let F=0;F<=p;F++){let m=F+s;if(!a)c[m]=!0;else if(F===0){let E=t[m-1].length;c[m]=[a,E-a+1];}else if(F===p)c[m]=[0,l];else {let E=t[m-F].length;c[m]=[0,E];}}else a===l?a?c[s]=[a,0]:c[s]=!0:c[s]=[a,l-a];return {start:d,end:f,markerLines:c}}function Mn(e,t,r={}){let n=(r.highlightCode||r.forceColor)&&(0, In.shouldHighlight)(r),o=Oo(r.forceColor),u=So(o),i=(F,m)=>n?F(m):m,s=e.split(jn),{start:a,end:D,markerLines:l}=No(t,s,r),d=t.start&&typeof t.start.column=="number",f=String(D).length,c=(n?(0, In.default)(e,r):e).split(jn,D).slice(a,D).map((F,m)=>{let E=a+1+m,w=` ${` ${E}`.slice(-f)} |`,h=l[E],C=!l[E+1];if(h){let k="";if(Array.isArray(h)){let v=F.slice(0,Math.max(h[0]-1,0)).replace(/[^\t]/g," "),$=h[1]||1;k=[`
|
|
40632
40623
|
`,i(u.gutter,w.replace(/\d/g," "))," ",v,i(u.marker,"^").repeat($)].join(""),C&&r.message&&(k+=" "+i(u.message,r.message));}return [i(u.marker,">"),i(u.gutter,w),F.length>0?` ${F}`:"",k].join("")}else return ` ${i(u.gutter,w)}${F.length>0?` ${F}`:""}`}).join(`
|
|
@@ -52048,12 +52039,14 @@ function computeTypeNodeProps(path, type, name) {
|
|
|
52048
52039
|
};
|
|
52049
52040
|
}
|
|
52050
52041
|
function computeItemList(path, name, items) {
|
|
52042
|
+
let index = 0;
|
|
52051
52043
|
return {
|
|
52052
52044
|
kind: "list",
|
|
52053
52045
|
id: path,
|
|
52054
52046
|
name,
|
|
52055
52047
|
children: Array.from(items.entries()).map(([key, value]) => {
|
|
52056
|
-
|
|
52048
|
+
const name2 = typeof key === "symbol" ? `sym(${index++})` : key;
|
|
52049
|
+
return computeTypeNode(path, value, name2);
|
|
52057
52050
|
})
|
|
52058
52051
|
};
|
|
52059
52052
|
}
|
package/dist/style.css
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
.
|
|
1
|
+
._footer_e6dic_1 {
|
|
2
2
|
grid-area: footer;
|
|
3
3
|
display: flex;
|
|
4
4
|
font-size: 14px;
|
|
5
5
|
|
|
6
|
-
background-color: #
|
|
6
|
+
background-color: #0073c1;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
._footer-
|
|
9
|
+
._footer-item_e6dic_9 {
|
|
10
10
|
text-decoration: none;
|
|
11
11
|
color: #fefefe;
|
|
12
12
|
border-right: 1px solid #d5d5d5;
|
|
13
13
|
padding: 0 5px;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
._footer-
|
|
16
|
+
._footer-item_e6dic_9:hover {
|
|
17
17
|
background-color: #063a5c;
|
|
18
18
|
}
|
|
19
19
|
._version-item_1c15n_1 {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@typespec/playground",
|
|
3
|
-
"version": "0.5.0-dev.
|
|
3
|
+
"version": "0.5.0-dev.4",
|
|
4
4
|
"author": "Microsoft Corporation",
|
|
5
5
|
"description": "TypeSpec playground UI components.",
|
|
6
6
|
"homepage": "https://typespec.io",
|
|
@@ -20,26 +20,32 @@
|
|
|
20
20
|
"main": "dist/src/index.js",
|
|
21
21
|
"exports": {
|
|
22
22
|
".": {
|
|
23
|
+
"development": "./src/index.ts",
|
|
23
24
|
"types": "./dist/src/index.d.ts",
|
|
24
25
|
"default": "./dist/index.js"
|
|
25
26
|
},
|
|
26
27
|
"./vite": {
|
|
28
|
+
"development": "./src/vite/index.ts",
|
|
27
29
|
"types": "./dist/src/vite/index.d.ts",
|
|
28
30
|
"default": "./dist/vite/index.js"
|
|
29
31
|
},
|
|
30
32
|
"./tooling": {
|
|
33
|
+
"development": "./src/tooling/index.ts",
|
|
31
34
|
"types": "./dist/src/tooling/index.d.ts",
|
|
32
35
|
"default": "./dist/tooling/index.js"
|
|
33
36
|
},
|
|
34
37
|
"./manifest": {
|
|
38
|
+
"development": "./src/manifest.ts",
|
|
35
39
|
"types": "./dist/src/manifest.d.ts",
|
|
36
40
|
"default": "./dist/manifest.js"
|
|
37
41
|
},
|
|
38
42
|
"./react": {
|
|
43
|
+
"development": "./src/react/index.ts",
|
|
39
44
|
"types": "./dist/src/react/index.d.ts",
|
|
40
45
|
"default": "./dist/react/index.js"
|
|
41
46
|
},
|
|
42
47
|
"./react/viewers": {
|
|
48
|
+
"development": "./src/react/viewers/index.tsx",
|
|
43
49
|
"types": "./dist/src/react/viewers/index.d.ts",
|
|
44
50
|
"default": "./dist/react/viewers/index.js"
|
|
45
51
|
},
|
|
@@ -58,13 +64,13 @@
|
|
|
58
64
|
"@fluentui/react-components": "~9.54.5",
|
|
59
65
|
"@fluentui/react-icons": "^2.0.249",
|
|
60
66
|
"@typespec/bundler": "~0.1.6 || >=0.2.0-dev <0.2.0",
|
|
61
|
-
"@typespec/compiler": "~0.59.
|
|
67
|
+
"@typespec/compiler": "~0.59.1 || >=0.60.0-dev <0.60.0",
|
|
62
68
|
"@typespec/html-program-viewer": "~0.59.0 || >=0.60.0-dev <0.60.0",
|
|
63
|
-
"@typespec/http": "~0.59.
|
|
69
|
+
"@typespec/http": "~0.59.1 || >=0.60.0-dev <0.60.0",
|
|
64
70
|
"@typespec/openapi": "~0.59.0 || >=0.60.0-dev <0.60.0",
|
|
65
|
-
"@typespec/openapi3": "~0.59.
|
|
71
|
+
"@typespec/openapi3": "~0.59.1 || >=0.60.0-dev <0.60.0",
|
|
66
72
|
"@typespec/protobuf": "~0.59.0 || >=0.60.0-dev <0.60.0",
|
|
67
|
-
"@typespec/rest": "~0.59.
|
|
73
|
+
"@typespec/rest": "~0.59.1 || >=0.60.0-dev <0.60.0",
|
|
68
74
|
"@typespec/versioning": "~0.59.0 || >=0.60.0-dev <0.60.0",
|
|
69
75
|
"clsx": "^2.1.1",
|
|
70
76
|
"debounce": "~2.1.0",
|