@massimo-cassandro/minimo 1.20.9 → 1.20.10

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@massimo-cassandro/minimo",
3
- "version": "1.20.9",
3
+ "version": "1.20.10",
4
4
  "description": "Light css framework & utilities",
5
5
  "type": "module",
6
6
  "main": "./index.js",
@@ -43,7 +43,7 @@
43
43
  "test": "node --test \"test/**/*.test.mjs\"",
44
44
  "test sideEffects tree-shaking": "node ./test/sideEffects-tree-shaking/run-test.mjs",
45
45
  "checkJS": "npx tsc --noEmit -p jsconfig.json",
46
- "checkJS ./src": "npx tsc --noEmit --allowJs --checkJs --target ES2023 --module ESNext --allowSyntheticDefaultImports --moduleResolution bundler declarations.d.ts src/**/*.js",
46
+ "checkJS ./src": "npx tsc --noEmit --allowJs --checkJs --target ES2023 --module ESNext --allowSyntheticDefaultImports --moduleResolution bundler declarations.d.ts types/global.d.ts src/**/*.js",
47
47
  "check outdated": "echo '*** ROOT ***' && npm outdated --omit=peer && echo '*** DEMO ***' && npm --prefix ./demo outdated && echo '*** END ***'"
48
48
  },
49
49
  "license": "MIT",
@@ -50,13 +50,13 @@ function closeDialog(el) {
50
50
  * @param {string | number | null} [params.dialogMinHeight=null] - optional dialog min-height value - if set, overrides main css custom prop
51
51
  * @param {string | number | null} [params.dialogMaxHeight=null] - optional dialog max-height value - if set, overrides main css custom prop
52
52
  * @param {string | null} [params.iframeUrl=null] - URL to load in an iframe.
53
- * @param {string | any[] | null} [params.content=null] - Plain text, HTML, or a domBuilder array.
53
+ * @param {string | DomBuilderItem[] | null} [params.content=null] - Plain text, HTML, or a domBuilder array.
54
54
  * @param {string | null} [params.ajaxUrl=null] - URL for Ajax content loading.
55
55
  * @param {((data: *, el: Element) => void) | null} [params.ajaxCallback=null] - Called with the Ajax response and the content element.
56
56
  * @param {((el: HTMLDialogElement) => void) | null} [params.closeCallback=null] - Called with the dialog element just before it is removed.
57
57
  * @param {boolean} [params.addScrollbarPadding=false] - Adds right padding to compensate for the scrollbar.
58
- * @param {string | any[] | null} [params.headerContent=null] - Header content: plain text, HTML, or a domBuilder array.
59
- * @param {string | any[] | null} [params.footerContent=null] - Footer content: plain text, HTML, or a domBuilder array.
58
+ * @param {string | DomBuilderItem[] | null} [params.headerContent=null] - Header content: plain text, HTML, or a domBuilder array.
59
+ * @param {string | DomBuilderItem[] | null} [params.footerContent=null] - Footer content: plain text, HTML, or a domBuilder array.
60
60
  * @param {HTMLElement | null} [params.triggerElement=null] - Optional element that triggered the popup; when set, `aria-haspopup`, `aria-controls` and `aria-expanded` are managed on it.
61
61
  * @returns {HTMLDialogElement} The dialog element.
62
62
  */
@@ -1,6 +1,4 @@
1
1
 
2
- /** @typedef {import('./dom-builder.js').DomBuilderItem} DomBuilderItem */
3
-
4
2
  // boolean attributes are omitted when their value is explicitly false;
5
3
  // declared once at module level (Set for O(1) lookup) since the list never changes between calls
6
4
  const boolAttrs = new Set([
@@ -0,0 +1,11 @@
1
+ // Global alias for domBuilder's config-object type, so JSDoc across the codebase can
2
+ // reference `DomBuilderItem` directly instead of repeating an `import(...)` type query.
3
+ // The canonical definition lives in dom-builder.js — this only re-exports it.
4
+ type DomBuilderItem = import('../src/utilities/dom-builder/dom-builder.js').DomBuilderItem;
5
+
6
+ // Sanitizer API (Element.setHTML / getHTML) — not yet in TypeScript's lib.dom.d.ts.
7
+ // https://developer.mozilla.org/en-US/docs/Web/API/Element/setHTML
8
+ interface Element {
9
+ setHTML?(input: string, options?: { sanitizer?: unknown }): void;
10
+ getHTML?(options?: { serializableShadowRoots?: boolean; shadowRoots?: ShadowRoot[] }): string;
11
+ }