ladrillosjs 2.0.0-beta.4.2 → 2.0.0-beta.4.3
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/core/componentParser.d.ts +9 -2
- package/dist/{index-BcPgsuUl.mjs → index-D3ODIub3.mjs} +222 -226
- package/dist/index-D3ODIub3.mjs.map +1 -0
- package/dist/index-jXCF8DaA.js +68 -0
- package/dist/index-jXCF8DaA.js.map +1 -0
- package/dist/index.d.ts +0 -94
- package/dist/ladrillosjs.cjs.js +1 -1
- package/dist/ladrillosjs.es.js +10 -14
- package/dist/ladrillosjs.umd.js +16 -16
- package/dist/ladrillosjs.umd.js.map +1 -1
- package/dist/{webcomponent-BbbpAvoT.js → webcomponent-BV2KhfNU.js} +2 -2
- package/dist/{webcomponent-BbbpAvoT.js.map → webcomponent-BV2KhfNU.js.map} +1 -1
- package/dist/{webcomponent-Dt-f2pQx.mjs → webcomponent-Crc7LIeF.mjs} +2 -2
- package/dist/{webcomponent-Dt-f2pQx.mjs.map → webcomponent-Crc7LIeF.mjs.map} +1 -1
- package/package.json +1 -1
- package/dist/index-BcPgsuUl.mjs.map +0 -1
- package/dist/index-FW6ZH_yR.js +0 -68
- package/dist/index-FW6ZH_yR.js.map +0 -1
|
@@ -3,9 +3,10 @@ import { ExternalScriptElement, LadrillosComponent, ScriptElement } from "../typ
|
|
|
3
3
|
* Parses component HTML and extracts scripts and styles
|
|
4
4
|
* @param source - The HTML source of the component
|
|
5
5
|
* @param name - The name of the component
|
|
6
|
+
* @param componentUrl - The URL/path of the component file (used for resolving relative CSS paths)
|
|
6
7
|
* @returns Parsed component object
|
|
7
8
|
*/
|
|
8
|
-
export declare const parseComponent: (source: string, name: string) => Promise<LadrillosComponent>;
|
|
9
|
+
export declare const parseComponent: (source: string, name: string, componentUrl?: string) => Promise<LadrillosComponent>;
|
|
9
10
|
/**
|
|
10
11
|
* Parses HTML content and removes comments
|
|
11
12
|
* @param source - The HTML source to parse
|
|
@@ -24,6 +25,12 @@ export declare const extractScripts: (doc: Document) => {
|
|
|
24
25
|
/**
|
|
25
26
|
* Extracts and processes style elements from the document
|
|
26
27
|
* @param doc - The parsed document
|
|
28
|
+
* @param componentUrl - The component file URL/path (used for resolving relative CSS paths)
|
|
27
29
|
* @returns Concatenated CSS content
|
|
30
|
+
*
|
|
31
|
+
* CSS path resolution rules:
|
|
32
|
+
* - ./style.css or ../style.css → resolved relative to component location
|
|
33
|
+
* - style.css or /style.css → resolved from /public folder
|
|
34
|
+
* - http://... or https://... → used as-is (absolute URLs)
|
|
28
35
|
*/
|
|
29
|
-
export declare const extractStyles: (doc: Document) => Promise<string>;
|
|
36
|
+
export declare const extractStyles: (doc: Document, componentUrl?: string) => Promise<string>;
|