@massimo-cassandro/minimo 1.28.3 → 1.28.5
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/dev-tools/starter-kit/templates/CLAUDE-frontend.md +4 -3
- package/dev-tools/update-version/index.mjs +1 -1
- package/package.json +1 -1
- package/src/css/buttons/status-buttons.css +1 -0
- package/src/css/flex.css +2 -0
- package/src/css/forms/forms.css +12 -2
- package/src/css/grid.css +1 -1
- package/src/utilities/dom-builder/dom-builder.js +10 -6
|
@@ -7,7 +7,8 @@
|
|
|
7
7
|
## Stile di lavoro
|
|
8
8
|
|
|
9
9
|
- Conferma la comprensione prima di agire su richieste ambigue
|
|
10
|
-
- Il progetto usa ES modules (import/export), evitare
|
|
11
|
-
- In linea di massima non proporre soluzioni che richiedano modifiche alla parte back-end, a meno che non sia esplicitamente richiesto
|
|
12
|
-
- nella chat evitare neologismi come parsare, committare ecc., usare i termini
|
|
10
|
+
- Il progetto usa ES modules (import/export), evitare soluzioni che utilizzano commonJs
|
|
11
|
+
- In linea di massima non proporre soluzioni che richiedano modifiche alla parte back-end, se presente, a meno che non sia esplicitamente richiesto
|
|
12
|
+
- nella chat evitare neologismi come parsare, committare ecc., usare i termini corrispondenti in italiano o il termine originale in inglese dove non sia possibile un equivalente in italiano. Non coniugare mai secondo le regole dell'italiano verbi di altre lingue
|
|
13
13
|
- nei commenti su più righe preferire `/* ... */` piuttosto che ripetere `//` ad igni inizio riga
|
|
14
|
+
- a meno che non sia esplicitamente richiesto di eseguire subito una modifica, NON ESEGUIRE MAI nulla autonomamente ma mostra sempre un piano d'azione prima di procedere
|
|
@@ -78,7 +78,7 @@ async function run() {
|
|
|
78
78
|
('v.' + params.newSemver) +
|
|
79
79
|
(params.logRow.descr
|
|
80
80
|
? ' - ' + params.logRow.descr
|
|
81
|
-
: params.updateMode === 'patch'
|
|
81
|
+
: params.updateMode === 'patch' && !(params.noLogV0 && params.semverArray[0] === 0)
|
|
82
82
|
? ' - Fix / Dependencies upd'
|
|
83
83
|
: '')
|
|
84
84
|
);
|
package/package.json
CHANGED
package/src/css/flex.css
CHANGED
package/src/css/forms/forms.css
CHANGED
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
/* single
|
|
27
|
+
/* single checkboxes and radios are vertically centered */
|
|
28
28
|
.form-group:not(.form-collection-fset):has(.form-check:not(.form-check-top-label)) {
|
|
29
29
|
align-self: center;
|
|
30
30
|
.form-check {
|
|
@@ -39,7 +39,17 @@
|
|
|
39
39
|
color: var(--form-label-color);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
/*
|
|
42
|
+
/*
|
|
43
|
+
with implicit label, without id and for.
|
|
44
|
+
Example:
|
|
45
|
+
|
|
46
|
+
<div class="form-group">
|
|
47
|
+
<label>
|
|
48
|
+
<span class="form-label">...</span>
|
|
49
|
+
<select class="form-control">...</select>
|
|
50
|
+
</label>
|
|
51
|
+
</div>
|
|
52
|
+
*/
|
|
43
53
|
label:has(.form-control) {
|
|
44
54
|
display: block;
|
|
45
55
|
width: 100%;
|
package/src/css/grid.css
CHANGED
|
@@ -100,7 +100,7 @@ import { parseDomString } from './parseDomString.js';
|
|
|
100
100
|
* @param {HTMLElement} [parent] - Parent element the structure is attached to (see `options.insertMode`).
|
|
101
101
|
* @param {Object} [options={}] - Configuration options. (default: {})
|
|
102
102
|
* @param {boolean} [options.emptyParent=false] - When true, the parent element is emptied before building. (default: false)
|
|
103
|
-
* @param {'append'|'before'|'after'} [options.insertMode='append'] - How each root element of `structureArray` is attached to `parent`: `append` inserts it as
|
|
103
|
+
* @param {'append'|'prepend'|'before'|'after'} [options.insertMode='append'] - How each root element of `structureArray` is attached to `parent`: `append` inserts it as the last child (default), `prepend` as the first child, `before`/`after` insert it as a previous/next sibling of `parent`. In every mode, `structureArray` order is preserved. Only applies to the elements produced by this call — nested `domBuilder` calls (`content`, `children`) always append. (default: 'append')
|
|
104
104
|
* @param {boolean} [options.debug=false] - When true, logs `structureArray` to the console after each string item has been parsed via `parseDomString` (i.e. the elaborated array actually used to build the DOM). (default: false)
|
|
105
105
|
* @returns {HTMLElement|null} The first created element, or null if nothing was created.
|
|
106
106
|
*/
|
|
@@ -119,12 +119,12 @@ export function domBuilder(/** @type {Array<DomBuilderItem|string|Node>} */ stru
|
|
|
119
119
|
parent.innerHTML = '';
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
-
// For the
|
|
123
|
-
// DocumentFragment and attached to `parent` with a single appendChild at
|
|
124
|
-
// instead of one
|
|
122
|
+
// For the 'append'/'prepend' insert modes, root-level siblings are accumulated into a
|
|
123
|
+
// DocumentFragment and attached to `parent` with a single appendChild/insertBefore at
|
|
124
|
+
// the end, instead of one call per sibling. 'before'/'after' modes need `target` to stay
|
|
125
125
|
// the real, live parent node throughout the loop for anchor resolution (see afterAnchors
|
|
126
126
|
// below), so batching is skipped for those.
|
|
127
|
-
const useFragment = !!parent && options.insertMode === 'append';
|
|
127
|
+
const useFragment = !!parent && (options.insertMode === 'append' || options.insertMode === 'prepend');
|
|
128
128
|
|
|
129
129
|
/** @type {HTMLElement | DocumentFragment | null} */
|
|
130
130
|
let target = useFragment ? document.createDocumentFragment() : (parent ?? null);
|
|
@@ -345,7 +345,11 @@ export function domBuilder(/** @type {Array<DomBuilderItem|string|Node>} */ stru
|
|
|
345
345
|
}
|
|
346
346
|
|
|
347
347
|
if (useFragment && parent && target) {
|
|
348
|
-
|
|
348
|
+
if (options.insertMode === 'prepend') {
|
|
349
|
+
parent.insertBefore(target, parent.firstChild);
|
|
350
|
+
} else {
|
|
351
|
+
parent.appendChild(target);
|
|
352
|
+
}
|
|
349
353
|
}
|
|
350
354
|
|
|
351
355
|
return mainElement;
|