@orago/dodo 0.0.11 → 0.0.12
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.
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require("../dodo.cjs"),t=require("./plugin-tracking.cjs");let n=require("@orago/kiwi/finch/finch");var r=class{static sheet(t){return e.oo(`style`).value(n.Builder.renderSheet(t,{indent:0,gap:1}))}},i=class{constructor(){this.style=e.oo(`style`),this.groups=new Set}add(...e){for(let t of e)this.groups.add(t);return this}delete(...e){for(let t of e)this.groups.delete(t);return this}render(){let e=n.Builder.group(Array.from(this.groups));return this.style.value(n.Builder.renderSheet(e,{indent:0,gap:1})),this}};function a(r){let a
|
|
1
|
+
const e=require("../dodo.cjs"),t=require("./plugin-tracking.cjs");let n=require("@orago/kiwi/finch/finch");var r=class{static sheet(t){return e.oo(`style`).value(n.Builder.renderSheet(t,{indent:0,gap:1}))}},i=class{constructor(){this.style=e.oo(`style`),this.groups=new Set}add(...e){for(let t of e)this.groups.add(t);return this}delete(...e){for(let t of e)this.groups.delete(t);return this}render(){let e=n.Builder.group(Array.from(this.groups));return this.style.value(n.Builder.renderSheet(e,{indent:0,gap:1})),this}};function a(r,a){let o=a?.group??new t.DodoTagGroup,s=a?.sheet??new i,c=n.Builder.group([n.Builder.style(o.getQuerySelector(),r)]);return s.add(c).render(),{group:o,sheet:s,use:e=>o.reference()(e),head(t=document.head){return e.oo(t).append(s.style),this}}}exports.$dodoStyleRef=a,exports.FinchPlugin=r,exports.FinchSheet=i;
|
|
2
2
|
//# sourceMappingURL=plugin-style.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-style.cjs","names":["oo","Builder","DodoTagGroup"],"sources":["../../src/plugins/plugin-style.ts"],"sourcesContent":["import { Builder, BuilderGroup, FinchStyle } from \"@orago/kiwi/finch/finch\";\r\nimport { type Dodo, Extractable, oo } from \"../dodo.js\";\r\nimport { DodoTagGroup } from \"./plugin-tracking.js\";\r\n\r\nexport class FinchPlugin {\r\n\tstatic sheet(group: BuilderGroup): Dodo {\r\n\t\treturn oo(\"style\").value(\r\n\t\t\tBuilder.renderSheet(group, { indent: 0, gap: 1 }),\r\n\t\t);\r\n\t}\r\n}\r\n\r\nexport class FinchSheet {\r\n\tstyle = oo(\"style\");\r\n\tgroups: Set<BuilderGroup> = new Set();\r\n\tconstructor() {}\r\n\r\n\tadd(...groups: BuilderGroup[]): this {\r\n\t\tfor (const group of groups) {\r\n\t\t\tthis.groups.add(group);\r\n\t\t}\r\n\t\treturn this;\r\n\t}\r\n\r\n\tdelete(...groups: BuilderGroup[]): this {\r\n\t\tfor (const group of groups) {\r\n\t\t\tthis.groups.delete(group);\r\n\t\t}\r\n\t\treturn this;\r\n\t}\r\n\r\n\trender(): this {\r\n\t\tconst grouped = Builder.group(Array.from(this.groups));\r\n\t\tthis.style.value(Builder.renderSheet(grouped, { indent: 0, gap: 1 }));\r\n\t\treturn this;\r\n\t}\r\n}\r\n\r\nexport function $dodoStyleRef(
|
|
1
|
+
{"version":3,"file":"plugin-style.cjs","names":["oo","Builder","DodoTagGroup"],"sources":["../../src/plugins/plugin-style.ts"],"sourcesContent":["import { Builder, BuilderGroup, FinchStyle } from \"@orago/kiwi/finch/finch\";\r\nimport { type Dodo, Extractable, oo } from \"../dodo.js\";\r\nimport { DodoTagGroup } from \"./plugin-tracking.js\";\r\n\r\nexport class FinchPlugin {\r\n\tstatic sheet(group: BuilderGroup): Dodo {\r\n\t\treturn oo(\"style\").value(\r\n\t\t\tBuilder.renderSheet(group, { indent: 0, gap: 1 }),\r\n\t\t);\r\n\t}\r\n}\r\n\r\nexport class FinchSheet {\r\n\tstyle = oo(\"style\");\r\n\tgroups: Set<BuilderGroup> = new Set();\r\n\tconstructor() {}\r\n\r\n\tadd(...groups: BuilderGroup[]): this {\r\n\t\tfor (const group of groups) {\r\n\t\t\tthis.groups.add(group);\r\n\t\t}\r\n\t\treturn this;\r\n\t}\r\n\r\n\tdelete(...groups: BuilderGroup[]): this {\r\n\t\tfor (const group of groups) {\r\n\t\t\tthis.groups.delete(group);\r\n\t\t}\r\n\t\treturn this;\r\n\t}\r\n\r\n\trender(): this {\r\n\t\tconst grouped = Builder.group(Array.from(this.groups));\r\n\t\tthis.style.value(Builder.renderSheet(grouped, { indent: 0, gap: 1 }));\r\n\t\treturn this;\r\n\t}\r\n}\r\n\r\nexport function $dodoStyleRef(\r\n\tstyle: FinchStyle,\r\n\toptions?: {\r\n\t\tgroup?: DodoTagGroup;\r\n\t\tsheet?: FinchSheet;\r\n\t},\r\n) {\r\n\tconst group = options?.group ?? new DodoTagGroup();\r\n\tconst sheet = options?.sheet ?? new FinchSheet();\r\n\tconst style_group = Builder.group([\r\n\t\tBuilder.style(group.getQuerySelector(), style),\r\n\t]);\r\n\tsheet.add(style_group).render();\r\n\r\n\treturn {\r\n\t\tgroup,\r\n\t\tsheet,\r\n\t\tuse: (dodo: Dodo) => group.reference()(dodo),\r\n\t\t/**\r\n\t\t * add to dom head\r\n\t\t */\r\n\t\thead(head: Extractable = document.head) {\r\n\t\t\too(head).append(sheet.style);\r\n\t\t\treturn this;\r\n\t\t},\r\n\t};\r\n}\r\n"],"mappings":"2GAIA,IAAa,EAAb,KAAyB,CACxB,OAAO,MAAM,EAA2B,CACvC,OAAOA,EAAAA,GAAG,OAAO,CAAC,CAAC,MAClBC,EAAAA,QAAQ,YAAY,EAAO,CAAE,OAAQ,EAAG,IAAK,CAAE,CAAC,CACjD,CACD,CACD,EAEa,EAAb,KAAwB,CAGvB,aAAc,CAFND,KAAAA,MAAAA,EAAAA,GAAG,OAAO,EACU,KAAA,OAAA,IAAI,GACjB,CAEf,IAAI,GAAG,EAA8B,CACpC,IAAK,IAAM,KAAS,EACnB,KAAK,OAAO,IAAI,CAAK,EAEtB,OAAO,IACR,CAEA,OAAO,GAAG,EAA8B,CACvC,IAAK,IAAM,KAAS,EACnB,KAAK,OAAO,OAAO,CAAK,EAEzB,OAAO,IACR,CAEA,QAAe,CACd,IAAM,EAAUC,EAAAA,QAAQ,MAAM,MAAM,KAAK,KAAK,MAAM,CAAC,EAErD,OADA,KAAK,MAAM,MAAMA,EAAAA,QAAQ,YAAY,EAAS,CAAE,OAAQ,EAAG,IAAK,CAAE,CAAC,CAAC,EAC7D,IACR,CACD,EAEA,SAAgB,EACf,EACA,EAIC,CACD,IAAM,EAAQ,GAAS,OAAS,IAAIC,EAAAA,aAC9B,EAAQ,GAAS,OAAS,IAAI,EAC9B,EAAcD,EAAAA,QAAQ,MAAM,CACjCA,EAAAA,QAAQ,MAAM,EAAM,iBAAiB,EAAG,CAAK,CAC9C,CAAC,EAGD,OAFA,EAAM,IAAI,CAAW,CAAC,CAAC,OAAO,EAEvB,CACN,QACA,QACA,IAAM,GAAe,EAAM,UAAU,CAAC,CAAC,CAAI,EAI3C,KAAK,EAAoB,SAAS,KAAM,CAEvC,OADA,EAAA,GAAG,CAAI,CAAC,CAAC,OAAO,EAAM,KAAK,EACpB,IACR,CACD,CACD"}
|
|
@@ -13,7 +13,10 @@ declare class FinchSheet {
|
|
|
13
13
|
delete(...groups: BuilderGroup[]): this;
|
|
14
14
|
render(): this;
|
|
15
15
|
}
|
|
16
|
-
declare function $dodoStyleRef(style: FinchStyle
|
|
16
|
+
declare function $dodoStyleRef(style: FinchStyle, options?: {
|
|
17
|
+
group?: DodoTagGroup;
|
|
18
|
+
sheet?: FinchSheet;
|
|
19
|
+
}): {
|
|
17
20
|
group: DodoTagGroup;
|
|
18
21
|
sheet: FinchSheet;
|
|
19
22
|
use: (dodo: Dodo) => void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{oo as e}from"../dodo.mjs";import{DodoTagGroup as t}from"./plugin-tracking.mjs";import{Builder as n}from"@orago/kiwi/finch/finch";var r=class{static sheet(t){return e(`style`).value(n.renderSheet(t,{indent:0,gap:1}))}},i=class{constructor(){this.style=e(`style`),this.groups=new Set}add(...e){for(let t of e)this.groups.add(t);return this}delete(...e){for(let t of e)this.groups.delete(t);return this}render(){let e=n.group(Array.from(this.groups));return this.style.value(n.renderSheet(e,{indent:0,gap:1})),this}};function a(r){let a
|
|
1
|
+
import{oo as e}from"../dodo.mjs";import{DodoTagGroup as t}from"./plugin-tracking.mjs";import{Builder as n}from"@orago/kiwi/finch/finch";var r=class{static sheet(t){return e(`style`).value(n.renderSheet(t,{indent:0,gap:1}))}},i=class{constructor(){this.style=e(`style`),this.groups=new Set}add(...e){for(let t of e)this.groups.add(t);return this}delete(...e){for(let t of e)this.groups.delete(t);return this}render(){let e=n.group(Array.from(this.groups));return this.style.value(n.renderSheet(e,{indent:0,gap:1})),this}};function a(r,a){let o=a?.group??new t,s=a?.sheet??new i,c=n.group([n.style(o.getQuerySelector(),r)]);return s.add(c).render(),{group:o,sheet:s,use:e=>o.reference()(e),head(t=document.head){return e(t).append(s.style),this}}}export{a as $dodoStyleRef,r as FinchPlugin,i as FinchSheet};
|
|
2
2
|
//# sourceMappingURL=plugin-style.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-style.mjs","names":[],"sources":["../../src/plugins/plugin-style.ts"],"sourcesContent":["import { Builder, BuilderGroup, FinchStyle } from \"@orago/kiwi/finch/finch\";\r\nimport { type Dodo, Extractable, oo } from \"../dodo.js\";\r\nimport { DodoTagGroup } from \"./plugin-tracking.js\";\r\n\r\nexport class FinchPlugin {\r\n\tstatic sheet(group: BuilderGroup): Dodo {\r\n\t\treturn oo(\"style\").value(\r\n\t\t\tBuilder.renderSheet(group, { indent: 0, gap: 1 }),\r\n\t\t);\r\n\t}\r\n}\r\n\r\nexport class FinchSheet {\r\n\tstyle = oo(\"style\");\r\n\tgroups: Set<BuilderGroup> = new Set();\r\n\tconstructor() {}\r\n\r\n\tadd(...groups: BuilderGroup[]): this {\r\n\t\tfor (const group of groups) {\r\n\t\t\tthis.groups.add(group);\r\n\t\t}\r\n\t\treturn this;\r\n\t}\r\n\r\n\tdelete(...groups: BuilderGroup[]): this {\r\n\t\tfor (const group of groups) {\r\n\t\t\tthis.groups.delete(group);\r\n\t\t}\r\n\t\treturn this;\r\n\t}\r\n\r\n\trender(): this {\r\n\t\tconst grouped = Builder.group(Array.from(this.groups));\r\n\t\tthis.style.value(Builder.renderSheet(grouped, { indent: 0, gap: 1 }));\r\n\t\treturn this;\r\n\t}\r\n}\r\n\r\nexport function $dodoStyleRef(
|
|
1
|
+
{"version":3,"file":"plugin-style.mjs","names":[],"sources":["../../src/plugins/plugin-style.ts"],"sourcesContent":["import { Builder, BuilderGroup, FinchStyle } from \"@orago/kiwi/finch/finch\";\r\nimport { type Dodo, Extractable, oo } from \"../dodo.js\";\r\nimport { DodoTagGroup } from \"./plugin-tracking.js\";\r\n\r\nexport class FinchPlugin {\r\n\tstatic sheet(group: BuilderGroup): Dodo {\r\n\t\treturn oo(\"style\").value(\r\n\t\t\tBuilder.renderSheet(group, { indent: 0, gap: 1 }),\r\n\t\t);\r\n\t}\r\n}\r\n\r\nexport class FinchSheet {\r\n\tstyle = oo(\"style\");\r\n\tgroups: Set<BuilderGroup> = new Set();\r\n\tconstructor() {}\r\n\r\n\tadd(...groups: BuilderGroup[]): this {\r\n\t\tfor (const group of groups) {\r\n\t\t\tthis.groups.add(group);\r\n\t\t}\r\n\t\treturn this;\r\n\t}\r\n\r\n\tdelete(...groups: BuilderGroup[]): this {\r\n\t\tfor (const group of groups) {\r\n\t\t\tthis.groups.delete(group);\r\n\t\t}\r\n\t\treturn this;\r\n\t}\r\n\r\n\trender(): this {\r\n\t\tconst grouped = Builder.group(Array.from(this.groups));\r\n\t\tthis.style.value(Builder.renderSheet(grouped, { indent: 0, gap: 1 }));\r\n\t\treturn this;\r\n\t}\r\n}\r\n\r\nexport function $dodoStyleRef(\r\n\tstyle: FinchStyle,\r\n\toptions?: {\r\n\t\tgroup?: DodoTagGroup;\r\n\t\tsheet?: FinchSheet;\r\n\t},\r\n) {\r\n\tconst group = options?.group ?? new DodoTagGroup();\r\n\tconst sheet = options?.sheet ?? new FinchSheet();\r\n\tconst style_group = Builder.group([\r\n\t\tBuilder.style(group.getQuerySelector(), style),\r\n\t]);\r\n\tsheet.add(style_group).render();\r\n\r\n\treturn {\r\n\t\tgroup,\r\n\t\tsheet,\r\n\t\tuse: (dodo: Dodo) => group.reference()(dodo),\r\n\t\t/**\r\n\t\t * add to dom head\r\n\t\t */\r\n\t\thead(head: Extractable = document.head) {\r\n\t\t\too(head).append(sheet.style);\r\n\t\t\treturn this;\r\n\t\t},\r\n\t};\r\n}\r\n"],"mappings":"wIAIA,IAAa,EAAb,KAAyB,CACxB,OAAO,MAAM,EAA2B,CACvC,OAAO,EAAG,OAAO,CAAC,CAAC,MAClB,EAAQ,YAAY,EAAO,CAAE,OAAQ,EAAG,IAAK,CAAE,CAAC,CACjD,CACD,CACD,EAEa,EAAb,KAAwB,CAGvB,aAAc,CAFN,KAAA,MAAA,EAAG,OAAO,EACU,KAAA,OAAA,IAAI,GACjB,CAEf,IAAI,GAAG,EAA8B,CACpC,IAAK,IAAM,KAAS,EACnB,KAAK,OAAO,IAAI,CAAK,EAEtB,OAAO,IACR,CAEA,OAAO,GAAG,EAA8B,CACvC,IAAK,IAAM,KAAS,EACnB,KAAK,OAAO,OAAO,CAAK,EAEzB,OAAO,IACR,CAEA,QAAe,CACd,IAAM,EAAU,EAAQ,MAAM,MAAM,KAAK,KAAK,MAAM,CAAC,EAErD,OADA,KAAK,MAAM,MAAM,EAAQ,YAAY,EAAS,CAAE,OAAQ,EAAG,IAAK,CAAE,CAAC,CAAC,EAC7D,IACR,CACD,EAEA,SAAgB,EACf,EACA,EAIC,CACD,IAAM,EAAQ,GAAS,OAAS,IAAI,EAC9B,EAAQ,GAAS,OAAS,IAAI,EAC9B,EAAc,EAAQ,MAAM,CACjC,EAAQ,MAAM,EAAM,iBAAiB,EAAG,CAAK,CAC9C,CAAC,EAGD,OAFA,EAAM,IAAI,CAAW,CAAC,CAAC,OAAO,EAEvB,CACN,QACA,QACA,IAAM,GAAe,EAAM,UAAU,CAAC,CAAC,CAAI,EAI3C,KAAK,EAAoB,SAAS,KAAM,CAEvC,OADA,EAAG,CAAI,CAAC,CAAC,OAAO,EAAM,KAAK,EACpB,IACR,CACD,CACD"}
|