mnfst 0.5.182 → 0.5.183

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.
@@ -872,13 +872,24 @@ function initializeComboboxPlugin() {
872
872
  if (cleanup) cleanup(() => mo.disconnect());
873
873
  }
874
874
 
875
- // ----- Seed initial chips from value="a, b" — only when no x-model (it wins)
876
- // and no adopted wrapper (already seeded). -----
877
- if (!modelExpr && !adopt && !editorNone && chips && el.value) {
878
- const seeds = el.value.split(/[,\n;]+/).map(s => s.trim()).filter(Boolean);
879
- el.value = '';
875
+ // ----- Seed the initial value from the value attribute — only when there's no
876
+ // x-model (it wins). Chips split on separators; a SINGLE field takes the
877
+ // whole value and resolves it to its label (async options fill in via the
878
+ // reread). Seeding never writes the model or fires change. -----
879
+ if (!modelExpr && !editorNone && el.value) {
880
880
  seeding = true;
881
- seeds.forEach(s => commitText(s));
881
+ if (chips) {
882
+ // Fresh only — an adopted (prerendered) wrapper already recovered its chips.
883
+ if (!adopt) {
884
+ const seeds = el.value.split(/[,\n;]+/).map(s => s.trim()).filter(Boolean);
885
+ el.value = '';
886
+ seeds.forEach(s => commitText(s));
887
+ }
888
+ } else if (!multiple) {
889
+ // Runs fresh AND on hydration: el.value is the value attribute either way,
890
+ // so a single field re-derives its selection even in an adopted wrapper.
891
+ addValue(el.value.trim(), labelFor(el.value.trim()));
892
+ }
882
893
  seeding = false;
883
894
  }
884
895
  // In chips/multiple the editor is a typing buffer. Clear value AND remove the
@@ -7,7 +7,7 @@
7
7
  "manifest.code.js": "sha384-G3MNfvQRWWY+gm4SGGrSsgQbDeil9MP+ON2DTk6Rcq9Nsex8woHMDt5EJHrFH0Nj",
8
8
  "manifest.color.js": "sha384-6Rv3LxyTcZNjrhtayQfqRdCx0uSZ4BiEbgEI98I62eTvp8Aw7LBIoNJ0Je1oktwL",
9
9
  "manifest.colorpicker.js": "sha384-N5ezEwgKrDodV4YdURxhdyZKmg1n/QhqvmAC4SEG03mw1pEAZAA8Gphp+NLAOxts",
10
- "manifest.combobox.js": "sha384-J1zXXanlzsfoYJsRdz41DJD168S+20oT+lIEpUJ4UOjwjMcy/t+2GwwVjfSSNOlD",
10
+ "manifest.combobox.js": "sha384-CkVdU8xSLTtg6Sh0sIhePXHKLC1DNTU3WVG4gS8iJRaL03/HzVr37b/a0kdFlT/C",
11
11
  "manifest.components.js": "sha384-eZDib+RFdwd9mOUdi6o53eNS0LBlEEkZPDegxtkAcE+GrGIFxsuB4O0ymfixGNfM",
12
12
  "manifest.data.js": "sha384-3lLvGnqcQr4Ium80MdaQTr8RytjVbs5rnxd0q41BF3ppcoQccMFAcvgFSyZP/0sl",
13
13
  "manifest.datepicker.js": "sha384-52BBZdlLN+EATiUorwTEQOWGJZiSNu0voy9q+WQxxWpUeYsGGkuS0QPPXGx2akxG",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mnfst",
3
- "version": "0.5.182",
3
+ "version": "0.5.183",
4
4
  "private": false,
5
5
  "workspaces": [
6
6
  "templates/starter",