@visulima/ono 2.0.0-alpha.9 → 2.0.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/CHANGELOG.md +270 -0
- package/README.md +44 -6
- package/dist/error-inspector/page/create-request-context.d.ts +41 -3
- package/dist/error-inspector/page/create-request-context.js +70 -70
- package/dist/index.d.ts +112 -18
- package/dist/index.js +224 -209
- package/dist/packem_shared/process-DVasYamT.js +1 -0
- package/dist/packem_shared/sanitize-D2LcyiFA.js +1 -0
- package/dist/packem_shared/types.d-D1UE67tt.d.ts +54 -0
- package/dist/server/open-in-editor.d.ts +22 -22
- package/dist/server/open-in-editor.js +1 -1
- package/package.json +44 -73
- package/dist/error-inspector/components/causes-viewer/index.d.ts +0 -7
- package/dist/error-inspector/components/copy-button.d.ts +0 -8
- package/dist/error-inspector/components/copy-dropdown.d.ts +0 -10
- package/dist/error-inspector/components/error-card/index.d.ts +0 -13
- package/dist/error-inspector/components/error-card/solutions.d.ts +0 -7
- package/dist/error-inspector/components/error-card/sticky-header.d.ts +0 -5
- package/dist/error-inspector/components/header-bar/editor-selector.d.ts +0 -3
- package/dist/error-inspector/components/header-bar/index.d.ts +0 -11
- package/dist/error-inspector/components/header-bar/theme-toggle.d.ts +0 -6
- package/dist/error-inspector/components/header-tabs.d.ts +0 -10
- package/dist/error-inspector/components/raw-stack-trace.d.ts +0 -2
- package/dist/error-inspector/components/shortcuts-button.d.ts +0 -5
- package/dist/error-inspector/components/stack-trace-viewer/index.d.ts +0 -7
- package/dist/error-inspector/components/stack-trace-viewer/types.d.ts +0 -5
- package/dist/error-inspector/components/stack-trace-viewer/utils/get-type.d.ts +0 -3
- package/dist/error-inspector/components/stack-trace-viewer/utils/group-similar-types.d.ts +0 -4
- package/dist/error-inspector/components/tooltip.d.ts +0 -4
- package/dist/error-inspector/index.d.ts +0 -6
- package/dist/error-inspector/layout.d.ts +0 -12
- package/dist/error-inspector/page/stack.d.ts +0 -15
- package/dist/error-inspector/page/types.d.ts +0 -62
- package/dist/error-inspector/types.d.ts +0 -43
- package/dist/error-inspector/utils/cn.d.ts +0 -2
- package/dist/error-inspector/utils/sanitize.d.ts +0 -7
- package/dist/packem_shared/clipboard-jWc8JBuB.js +0 -1
- package/dist/packem_shared/process-BO_aZsiL.js +0 -1
- package/dist/types.d.ts +0 -1
- package/dist/utils/process.d.ts +0 -7
- package/dist/utils/revision-hash.d.ts +0 -2
- package/dist/utils/runtimes.d.ts +0 -3
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import type Editors from "../../../../../shared/utils/editors.d.ts";
|
|
2
|
-
import type { Theme } from "../types.d.ts";
|
|
3
|
-
export type RequestTimings = {
|
|
4
|
-
elapsedMs?: number;
|
|
5
|
-
end?: number;
|
|
6
|
-
start?: number;
|
|
7
|
-
};
|
|
8
|
-
export type AppContext = {
|
|
9
|
-
routing?: {
|
|
10
|
-
params?: Record<string, string>;
|
|
11
|
-
query?: Record<string, string | string[]>;
|
|
12
|
-
route?: string;
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
export type UserContext = {
|
|
16
|
-
client?: {
|
|
17
|
-
geo?: unknown;
|
|
18
|
-
ip?: string;
|
|
19
|
-
userAgent?: string;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
export type GitContext = {
|
|
23
|
-
branch?: string;
|
|
24
|
-
commit?: string;
|
|
25
|
-
dirty?: boolean;
|
|
26
|
-
tag?: string;
|
|
27
|
-
};
|
|
28
|
-
export type ContentPage = {
|
|
29
|
-
code: {
|
|
30
|
-
html: string;
|
|
31
|
-
script?: string;
|
|
32
|
-
};
|
|
33
|
-
defaultSelected?: boolean;
|
|
34
|
-
id: string;
|
|
35
|
-
name: string;
|
|
36
|
-
};
|
|
37
|
-
export type TemplateOptions = {
|
|
38
|
-
content?: ContentPage[];
|
|
39
|
-
cspNonce?: string;
|
|
40
|
-
editor?: Editors;
|
|
41
|
-
openInEditorUrl?: string;
|
|
42
|
-
theme?: Theme;
|
|
43
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { TemplateOptions } from "../types.d.ts";
|
|
2
|
-
export declare const sanitizeHtml: (value: unknown) => string;
|
|
3
|
-
export declare const sanitizeAttribute: (value: unknown) => string;
|
|
4
|
-
export declare const sanitizeUrlAttribute: (value: unknown) => string;
|
|
5
|
-
export declare const sanitizeCodeHtml: (value: unknown) => string;
|
|
6
|
-
export declare const sanitizeCspNonce: (value: unknown) => string | undefined;
|
|
7
|
-
export declare const sanitizeOptions: (options?: TemplateOptions) => TemplateOptions;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var f=Object.defineProperty;var l=(t,e)=>f(t,"name",{value:e,configurable:!0});import{sanitize as u}from"isomorphic-dompurify";var w=Object.defineProperty,n=l((t,e)=>w(t,"name",{value:e,configurable:!0}),"e$1");const D=["http://","https://","/","./","../"],g="#",y={'"':""","&":"&","'":"'","<":"<",">":">"},x=/^[\w+/-]+={0,2}$/,a=n(t=>t==null?"":(typeof t=="string"?t:String(t)).trim(),"toString"),d=n(t=>t.replaceAll(/[&<>"']/g,e=>y[e]),"escapeHtml"),C=n(t=>{try{return u(a(t))}catch{return d(a(t))}},"sanitizeHtml"),H=n(t=>{const e=a(t);if(!e)return"";try{return u(e).replaceAll('"',""").replaceAll("'","'")}catch{return d(e)}},"sanitizeAttribute"),b=n(t=>{const e=a(t);if(!e)return g;try{const i=u(e),r=i.toLowerCase();return D.some(o=>r.startsWith(o))?i:g}catch{return g}},"sanitizeUrlAttribute"),P=n(t=>{const e=a(t);if(!e)return"";try{return u(e,{ADD_ATTR:["class","style"]})}catch{return C(e)}},"sanitizeCodeHtml"),j=n(t=>{const e=a(t);if(e)return x.test(e)?e:void 0},"sanitizeCspNonce"),N=n((t={})=>{try{return{...t,cspNonce:j(t.cspNonce),openInEditorUrl:t.openInEditorUrl?b(t.openInEditorUrl):void 0}}catch{return{...t,cspNonce:void 0,openInEditorUrl:void 0}}},"sanitizeOptions");var A=Object.defineProperty,s=l((t,e)=>A(t,"name",{value:e,configurable:!0}),"t");const h={javascript:s(()=>import("@shikijs/langs/javascript"),"javascript"),typescript:s(()=>import("@shikijs/langs/typescript"),"typescript"),jsx:s(()=>import("@shikijs/langs/jsx"),"jsx"),tsx:s(()=>import("@shikijs/langs/tsx"),"tsx"),json:s(()=>import("@shikijs/langs/json"),"json"),jsonc:s(()=>import("@shikijs/langs/jsonc"),"jsonc"),xml:s(()=>import("@shikijs/langs/xml"),"xml"),sql:s(()=>import("@shikijs/langs/sql"),"sql"),markdown:s(()=>import("@shikijs/langs/markdown"),"markdown"),mdx:s(()=>import("@shikijs/langs/mdx"),"mdx"),html:s(()=>import("@shikijs/langs/html"),"html"),css:s(()=>import("@shikijs/langs/css"),"css"),scss:s(()=>import("@shikijs/langs/scss"),"scss"),less:s(()=>import("@shikijs/langs/less"),"less"),sass:s(()=>import("@shikijs/langs/sass"),"sass"),stylus:s(()=>import("@shikijs/langs/stylus"),"stylus"),styl:s(()=>import("@shikijs/langs/styl"),"styl"),svelte:s(()=>import("@shikijs/langs/svelte"),"svelte"),vue:s(()=>import("@shikijs/langs/vue"),"vue"),bash:s(()=>import("@shikijs/langs/bash"),"bash"),shell:s(()=>import("@shikijs/langs/shell"),"shell"),text:s(()=>Promise.resolve({name:"text",patterns:[],scopeName:"source.text",repository:{}}),"text")};s(async t=>{if(typeof t!="string"||!t)return;const e=h[t.toLowerCase()];if(e)return await e()},"getLanguageImport");var F=Object.defineProperty,c=l((t,e)=>F(t,"name",{value:e,configurable:!0}),"a$1");let p,m;const L=c(async()=>{const[t,e]=await Promise.all([import("shiki/core"),import("shiki/engine/javascript")]),{createHighlighterCore:i}=t,{createJavaScriptRegexEngine:r}=e,o=await i({themes:[import("../packem_chunks/min-dark.js"),import("../packem_chunks/min-light.js")],langs:[],engine:r()}),v=o;return m=c(()=>{try{o?.dispose?.()}catch{}p=void 0},"disposeFn"),v},"createSingletonHighlighter"),z=c(async(t,e)=>{if(e==="text")return;const i=e.toLowerCase();if(!(t.getLoadedLanguages?.()??t.getLanguages?.()??[]).includes(i)){const r=h[i];r&&await t.loadLanguage?.(await r())}},"ensureLanguageLoaded"),O=c(async(t=[])=>{p||(p=L());const e=await p,i=[];for(const r of t)if(typeof r=="string")i.push(r.toLowerCase());else{const o=r.name;o&&i.push(o.toLowerCase())}return await Promise.all(i.map(r=>z(e,r))),e},"getHighlighter");c(async()=>{try{m&&(m(),m=void 0)}catch{}},"disposeHighlighter");c((t=[])=>({name:"@shikijs/transformers:compact-line-options",line(e,i){const r=t.find(o=>o.line===i);return r?.classes&&this.addClassToHast(e,r.classes),e}}),"transformerCompactLineOptions");const U="data:image/svg+xml;charset=utf-8,%3Csvg%20class%3D%22lucide%20lucide-check%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20%3E%20%3Cpath%20d%3D%22M20%206%209%2017l-5-5%22%20%2F%3E%20%3C%2Fsvg%3E",$="data:image/svg+xml;charset=utf-8,%3Csvg%20class%3D%22lucide%20lucide-clipboard%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2224%22%20height%3D%2224%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22currentColor%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20%3E%20%3Crect%20width%3D%228%22%20height%3D%224%22%20x%3D%228%22%20y%3D%222%22%20rx%3D%221%22%20ry%3D%221%22%20%2F%3E%20%3Cpath%20d%3D%22M16%204h2a2%202%200%200%201%202%202v14a2%202%200%200%201-2%202H6a2%202%200%200%201-2-2V6a2%202%200%200%201%202-2h2%22%20%2F%3E%20%3C%2Fsvg%3E";export{H as a,j as b,b as c,O as d,U as e,N as f,P as g,$ as n,C as s};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var i=Object.defineProperty;var o=(r,e)=>i(r,"name",{value:e,configurable:!0});var l=Object.defineProperty,a=o((r,e)=>l(r,"name",{value:e,configurable:!0}),"r");const g=globalThis.process||Object.create(null),t={versions:{}},c=new Proxy(g,{get(r,e){if(e in r)return r[e];if(e in t)return t[e]}});let s,n;const f=a(()=>(s??=c.version??"",s),"getProcessVersion"),u=a(()=>(n??=c.platform??"",n),"getProcessPlatform");export{u as a,f as g,c as n};
|
package/dist/types.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type Theme = "dark" | "light" | "auto";
|
package/dist/utils/process.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
interface Process extends Partial<Omit<typeof globalThis.process, "versions">> {
|
|
2
|
-
versions: Record<string, string>;
|
|
3
|
-
}
|
|
4
|
-
declare const process: Process;
|
|
5
|
-
export declare const getProcessVersion: () => string;
|
|
6
|
-
export declare const getProcessPlatform: () => string;
|
|
7
|
-
export default process;
|
package/dist/utils/runtimes.d.ts
DELETED