@torpor/view 1.1.3 → 1.2.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/compile.cjs +389 -124
- package/dist/compile.d.cts +18 -11
- package/dist/compile.d.cts.map +1 -1
- package/dist/compile.d.mts +18 -11
- package/dist/compile.d.mts.map +1 -1
- package/dist/compile.mjs +389 -124
- package/dist/compile.mjs.map +1 -1
- package/dist/index.cjs +15 -7
- package/dist/index.d.cts +10 -2
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +10 -2
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +15 -7
- package/dist/index.mjs.map +1 -1
- package/dist/ssr.cjs +75 -0
- package/dist/ssr.d.cts +49 -1
- package/dist/ssr.d.cts.map +1 -1
- package/dist/ssr.d.mts +49 -1
- package/dist/ssr.d.mts.map +1 -1
- package/dist/ssr.mjs +42 -1
- package/dist/ssr.mjs.map +1 -1
- package/package.json +11 -11
package/dist/compile.d.cts
CHANGED
|
@@ -181,6 +181,23 @@ interface BuildOptions {
|
|
|
181
181
|
* space. Whitespace inside `pre`, `textarea`, and `code` is always kept.
|
|
182
182
|
*/
|
|
183
183
|
preserveWhitespace?: boolean;
|
|
184
|
+
/**
|
|
185
|
+
* The original component source, used to compute line/char positions for
|
|
186
|
+
* build-time diagnostics. Optional: when omitted, errors still carry
|
|
187
|
+
* `startIndex`/`endIndex` but line/char default to 0.
|
|
188
|
+
*/
|
|
189
|
+
source?: string;
|
|
190
|
+
}
|
|
191
|
+
//#endregion
|
|
192
|
+
//#region src/compile/types/CompileError.d.ts
|
|
193
|
+
interface CompileError {
|
|
194
|
+
message: string;
|
|
195
|
+
startIndex: number;
|
|
196
|
+
startLine: number;
|
|
197
|
+
startChar: number;
|
|
198
|
+
endIndex: number;
|
|
199
|
+
endLine: number;
|
|
200
|
+
endChar: number;
|
|
184
201
|
}
|
|
185
202
|
//#endregion
|
|
186
203
|
//#region src/compile/types/SourceMapping.d.ts
|
|
@@ -198,6 +215,7 @@ interface BuildResult {
|
|
|
198
215
|
hash: string;
|
|
199
216
|
}[];
|
|
200
217
|
map: SourceMapping[];
|
|
218
|
+
errors: CompileError[];
|
|
201
219
|
}
|
|
202
220
|
//#endregion
|
|
203
221
|
//#region src/compile/build.d.ts
|
|
@@ -221,17 +239,6 @@ declare function build(template: Template, options?: BuildOptions): BuildResult;
|
|
|
221
239
|
*/
|
|
222
240
|
declare function buildType(template: Template, options?: BuildOptions): string;
|
|
223
241
|
//#endregion
|
|
224
|
-
//#region src/compile/types/CompileError.d.ts
|
|
225
|
-
interface CompileError {
|
|
226
|
-
message: string;
|
|
227
|
-
startIndex: number;
|
|
228
|
-
startLine: number;
|
|
229
|
-
startChar: number;
|
|
230
|
-
endIndex: number;
|
|
231
|
-
endLine: number;
|
|
232
|
-
endChar: number;
|
|
233
|
-
}
|
|
234
|
-
//#endregion
|
|
235
242
|
//#region src/compile/types/ParseResult.d.ts
|
|
236
243
|
interface ParseResult {
|
|
237
244
|
ok: boolean;
|
package/dist/compile.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compile.d.cts","names":[],"sources":["../src/compile/types/Import.ts","../src/compile/types/SourceSpan.ts","../src/compile/types/ScriptChunk.ts","../src/compile/types/nodes/Fragment.ts","../src/compile/types/nodes/NodeType.ts","../src/compile/types/nodes/TemplateNode.ts","../src/compile/types/nodes/ParentNode.ts","../src/compile/types/nodes/RootNode.ts","../src/compile/types/styles/StyleNode.ts","../src/compile/types/styles/Style.ts","../src/types/TemplateComponent.ts","../src/types/Template.ts","../src/compile/types/BuildOptions.ts","../src/compile/types/
|
|
1
|
+
{"version":3,"file":"compile.d.cts","names":[],"sources":["../src/compile/types/Import.ts","../src/compile/types/SourceSpan.ts","../src/compile/types/ScriptChunk.ts","../src/compile/types/nodes/Fragment.ts","../src/compile/types/nodes/NodeType.ts","../src/compile/types/nodes/TemplateNode.ts","../src/compile/types/nodes/ParentNode.ts","../src/compile/types/nodes/RootNode.ts","../src/compile/types/styles/StyleNode.ts","../src/compile/types/styles/Style.ts","../src/types/TemplateComponent.ts","../src/types/Template.ts","../src/compile/types/BuildOptions.ts","../src/compile/types/CompileError.ts","../src/compile/types/SourceMapping.ts","../src/compile/types/BuildResult.ts","../src/compile/build.ts","../src/compile/buildType.ts","../src/compile/types/ParseResult.ts","../src/compile/parse.ts"],"mappings":";;UAAyB;EACxB;EACA;EACA;EACA;EACA;;;;UCLwB;EACxB;EACA;;;;UCAwB;EACxB;EACA,MAAM;;;;UCFkB;EACxB;EACA;EACA;EACA;IACC;IACA,OAAO;IACP;IACA;IACA;;EAED;IACC;IACA;IACA;;EAED;EACA;;;;;;;EAOA;;;;;;;;;;EAUA;;;;;;;;;EASA;;;;KC7CI;;;UCEoB;EACxB,MAAM;EAGN;EAKA;EAKA;;;;UCbwB,mBAAmB;EAC3C,MAAM;EACN,UAAU;;;;UCDc,iBAAiB;EACzC;EACA,UAAU;EAGV,WAAW;;;;UCTa;EACxB;EACA;;;;UCAwB;EACxB;EACA,UAAU;EACV;;;;UCFwB;EACxB;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;EACA,SAAS;;EAET,QAAQ;;EAER;EACA,OAAO;EACP,QAAQ;;EAER;;EAEA;;EAEA;;EAEA;;EAEA;;;;;;;UC1BwB;EACxB,SAAS;EACT,QAAQ;EACR,YAAY;;;;UCVY;;;;EAIxB;;;;EAIA;;;;EAIA;;;;;;;EAOA;;;;EAIA;;;;;;;;EAQA;;;;;;EAMA;;;;UCrCwB;EACxB;EACA;EACA;EACA;EACA;EACA;EACA;;;;UCLwB;EACxB;EACA,QAAQ;EACR,UAAU;;;;UCFc;EACxB;EACA;IACC;IACA;;EAED,KAAK;EACL,QAAQ;;;;;;;;;;;iBCOe,MAAM,UAAU,UAAU,UAAU,eAAe;;;;;;;;;;;iBCLnD,UAAU,UAAU,UAAU,UAAU;;;UCTvC;EACxB;EACA,QAAQ;EACR,WAAW;;;;;;;;;;;;iBCKY,MAAM,iBAAiB"}
|
package/dist/compile.d.mts
CHANGED
|
@@ -181,6 +181,23 @@ interface BuildOptions {
|
|
|
181
181
|
* space. Whitespace inside `pre`, `textarea`, and `code` is always kept.
|
|
182
182
|
*/
|
|
183
183
|
preserveWhitespace?: boolean;
|
|
184
|
+
/**
|
|
185
|
+
* The original component source, used to compute line/char positions for
|
|
186
|
+
* build-time diagnostics. Optional: when omitted, errors still carry
|
|
187
|
+
* `startIndex`/`endIndex` but line/char default to 0.
|
|
188
|
+
*/
|
|
189
|
+
source?: string;
|
|
190
|
+
}
|
|
191
|
+
//#endregion
|
|
192
|
+
//#region src/compile/types/CompileError.d.ts
|
|
193
|
+
interface CompileError {
|
|
194
|
+
message: string;
|
|
195
|
+
startIndex: number;
|
|
196
|
+
startLine: number;
|
|
197
|
+
startChar: number;
|
|
198
|
+
endIndex: number;
|
|
199
|
+
endLine: number;
|
|
200
|
+
endChar: number;
|
|
184
201
|
}
|
|
185
202
|
//#endregion
|
|
186
203
|
//#region src/compile/types/SourceMapping.d.ts
|
|
@@ -198,6 +215,7 @@ interface BuildResult {
|
|
|
198
215
|
hash: string;
|
|
199
216
|
}[];
|
|
200
217
|
map: SourceMapping[];
|
|
218
|
+
errors: CompileError[];
|
|
201
219
|
}
|
|
202
220
|
//#endregion
|
|
203
221
|
//#region src/compile/build.d.ts
|
|
@@ -221,17 +239,6 @@ declare function build(template: Template, options?: BuildOptions): BuildResult;
|
|
|
221
239
|
*/
|
|
222
240
|
declare function buildType(template: Template, options?: BuildOptions): string;
|
|
223
241
|
//#endregion
|
|
224
|
-
//#region src/compile/types/CompileError.d.ts
|
|
225
|
-
interface CompileError {
|
|
226
|
-
message: string;
|
|
227
|
-
startIndex: number;
|
|
228
|
-
startLine: number;
|
|
229
|
-
startChar: number;
|
|
230
|
-
endIndex: number;
|
|
231
|
-
endLine: number;
|
|
232
|
-
endChar: number;
|
|
233
|
-
}
|
|
234
|
-
//#endregion
|
|
235
242
|
//#region src/compile/types/ParseResult.d.ts
|
|
236
243
|
interface ParseResult {
|
|
237
244
|
ok: boolean;
|
package/dist/compile.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compile.d.mts","names":[],"sources":["../src/compile/types/Import.ts","../src/compile/types/SourceSpan.ts","../src/compile/types/ScriptChunk.ts","../src/compile/types/nodes/Fragment.ts","../src/compile/types/nodes/NodeType.ts","../src/compile/types/nodes/TemplateNode.ts","../src/compile/types/nodes/ParentNode.ts","../src/compile/types/nodes/RootNode.ts","../src/compile/types/styles/StyleNode.ts","../src/compile/types/styles/Style.ts","../src/types/TemplateComponent.ts","../src/types/Template.ts","../src/compile/types/BuildOptions.ts","../src/compile/types/
|
|
1
|
+
{"version":3,"file":"compile.d.mts","names":[],"sources":["../src/compile/types/Import.ts","../src/compile/types/SourceSpan.ts","../src/compile/types/ScriptChunk.ts","../src/compile/types/nodes/Fragment.ts","../src/compile/types/nodes/NodeType.ts","../src/compile/types/nodes/TemplateNode.ts","../src/compile/types/nodes/ParentNode.ts","../src/compile/types/nodes/RootNode.ts","../src/compile/types/styles/StyleNode.ts","../src/compile/types/styles/Style.ts","../src/types/TemplateComponent.ts","../src/types/Template.ts","../src/compile/types/BuildOptions.ts","../src/compile/types/CompileError.ts","../src/compile/types/SourceMapping.ts","../src/compile/types/BuildResult.ts","../src/compile/build.ts","../src/compile/buildType.ts","../src/compile/types/ParseResult.ts","../src/compile/parse.ts"],"mappings":";;UAAyB;EACxB;EACA;EACA;EACA;EACA;;;;UCLwB;EACxB;EACA;;;;UCAwB;EACxB;EACA,MAAM;;;;UCFkB;EACxB;EACA;EACA;EACA;IACC;IACA,OAAO;IACP;IACA;IACA;;EAED;IACC;IACA;IACA;;EAED;EACA;;;;;;;EAOA;;;;;;;;;;EAUA;;;;;;;;;EASA;;;;KC7CI;;;UCEoB;EACxB,MAAM;EAGN;EAKA;EAKA;;;;UCbwB,mBAAmB;EAC3C,MAAM;EACN,UAAU;;;;UCDc,iBAAiB;EACzC;EACA,UAAU;EAGV,WAAW;;;;UCTa;EACxB;EACA;;;;UCAwB;EACxB;EACA,UAAU;EACV;;;;UCFwB;EACxB;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;EACA,SAAS;;EAET,QAAQ;;EAER;EACA,OAAO;EACP,QAAQ;;EAER;;EAEA;;EAEA;;EAEA;;EAEA;;;;;;;UC1BwB;EACxB,SAAS;EACT,QAAQ;EACR,YAAY;;;;UCVY;;;;EAIxB;;;;EAIA;;;;EAIA;;;;;;;EAOA;;;;EAIA;;;;;;;;EAQA;;;;;;EAMA;;;;UCrCwB;EACxB;EACA;EACA;EACA;EACA;EACA;EACA;;;;UCLwB;EACxB;EACA,QAAQ;EACR,UAAU;;;;UCFc;EACxB;EACA;IACC;IACA;;EAED,KAAK;EACL,QAAQ;;;;;;;;;;;iBCOe,MAAM,UAAU,UAAU,UAAU,eAAe;;;;;;;;;;;iBCLnD,UAAU,UAAU,UAAU,UAAU;;;UCTvC;EACxB;EACA,QAAQ;EACR,WAAW;;;;;;;;;;;;iBCKY,MAAM,iBAAiB"}
|