@jqhtml/core 2.3.61 → 2.3.67

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 +1 @@
1
- {"version":3,"file":"jquery-plugin.d.ts","sourceRoot":"","sources":["../src/jquery-plugin.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AASpE,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd;;WAEG;QACH,SAAS,IAAI,gBAAgB,GAAG,IAAI,CAAC;QACrC,SAAS,CAAC,cAAc,EAAE,oBAAoB,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,gBAAgB,CAAC;QAC9F,SAAS,CAAC,aAAa,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,gBAAgB,CAAC;QAE/E;;;;;;;WAOG;QACH,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;KACvC;CACF;AAGD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,GAAG,GAAG,IAAI,CAwgBpD"}
1
+ {"version":3,"file":"jquery-plugin.d.ts","sourceRoot":"","sources":["../src/jquery-plugin.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AASpE,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd;;WAEG;QACH,SAAS,IAAI,gBAAgB,GAAG,IAAI,CAAC;QACrC,SAAS,CAAC,cAAc,EAAE,oBAAoB,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,gBAAgB,CAAC;QAC9F,SAAS,CAAC,aAAa,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,gBAAgB,CAAC;QAE/E;;;;;;;WAOG;QACH,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;KACvC;CACF;AAGD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,GAAG,GAAG,IAAI,CA8gBpD"}
@@ -0,0 +1,47 @@
1
+ /**
2
+ * Value printers: how <%= %> renders an OBJECT.
3
+ *
4
+ * Primitives never come here - the generated template code routes only
5
+ * non-null, non-array objects to print_object(), so a hundred-row list of
6
+ * strings costs exactly what it did before. An object reaching an
7
+ * interpolation is walked through the printer chain in registration order;
8
+ * the first printer to return anything but undefined handles it. A printer
9
+ * returns a string (escaped or not according to the construct, exactly as a
10
+ * string literal at that site) or a component descriptor:
11
+ *
12
+ * { component: { name: 'Rich_Text_Display', args: { value }, attrs: { class: 'x' } } }
13
+ *
14
+ * which jqhtml mounts as if the template had written the tag - live in the
15
+ * browser, server-rendered under SSR - with no environment awareness on the
16
+ * printer's side. A descriptor carries no content.
17
+ *
18
+ * Attribute position (<div title="<%= v %>">) compiles through a different
19
+ * path and never consults printers.
20
+ */
21
+ export type Print_Mode = 'escape' | 'raw' | 'nl2br';
22
+ export interface Component_Descriptor {
23
+ component: {
24
+ name: string;
25
+ args?: Record<string, any>;
26
+ attrs?: Record<string, any>;
27
+ };
28
+ }
29
+ export type Object_Printer = (value: object) => undefined | string | Component_Descriptor;
30
+ /** A mounted descriptor, in the instruction form the runtime already understands. */
31
+ export type Component_Instruction = {
32
+ comp: [string, Record<string, any>];
33
+ };
34
+ /**
35
+ * Register a printer at the end of the chain. Printers run in registration
36
+ * order; return undefined to decline, a string, or a component descriptor.
37
+ */
38
+ export declare function add_object_printer(printer: Object_Printer): void;
39
+ /** The registered printers, in order. Read-only view for diagnostics. */
40
+ export declare function get_object_printers(): readonly Object_Printer[];
41
+ /**
42
+ * Render an object at an interpolation site. Called by compiled templates for
43
+ * every non-null, non-array object reaching <%= %>, <%!= %> or <%br= %>.
44
+ * Throws when nothing handles the value or a printer returns garbage.
45
+ */
46
+ export declare function print_object(value: object, mode: Print_Mode): string | Component_Instruction;
47
+ //# sourceMappingURL=value-printers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"value-printers.d.ts","sourceRoot":"","sources":["../src/value-printers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAKH,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,KAAK,GAAG,OAAO,CAAC;AAEpD,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE;QACT,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAC3B,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;KAC7B,CAAC;CACH;AAED,MAAM,MAAM,cAAc,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK,SAAS,GAAG,MAAM,GAAG,oBAAoB,CAAC;AAE1F,qFAAqF;AACrF,MAAM,MAAM,qBAAqB,GAAG;IAAE,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAA;CAAE,CAAC;AAI5E;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI,CAKhE;AAED,yEAAyE;AACzE,wBAAgB,mBAAmB,IAAI,SAAS,cAAc,EAAE,CAE/D;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GAAG,MAAM,GAAG,qBAAqB,CAqB5F"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jqhtml/core",
3
- "version": "2.3.61",
3
+ "version": "2.3.67",
4
4
  "description": "Core runtime library for JQHTML",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -66,6 +66,7 @@
66
66
  "playwright": "^1.53.2",
67
67
  "rollup": "^4.49.0",
68
68
  "rollup-plugin-dts": "^6.2.3",
69
+ "sass": "^1.104.0",
69
70
  "ts-jest": "^29.1.0",
70
71
  "tslib": "^2.8.1",
71
72
  "typescript": "^5.9.2"