mnfst 0.5.158 → 0.5.160

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.
@@ -108,12 +108,34 @@ function initializeComboboxPlugin() {
108
108
  if (attr) el.removeAttribute(attr);
109
109
  }
110
110
 
111
- // Pre-walk pass: this runs on alpine:init / DOMContentLoaded, before Alpine walks
112
- // the tree, so x-model is gone by the time Alpine's model directive looks for it.
113
- document.querySelectorAll('[x-combobox]').forEach(captureModel);
111
+ // NB: match by attribute-name prefix, not the `[x-combobox]` CSS selector — the
112
+ // directive is almost always written with modifiers (x-combobox.multiple.chips),
113
+ // a literal attribute name that `[x-combobox]` does NOT match.
114
+ function isComboboxEl(el) {
115
+ if (!el.attributes) return false;
116
+ for (const a of el.attributes) if (a.name === 'x-combobox' || a.name.indexOf('x-combobox.') === 0) return true;
117
+ return false;
118
+ }
119
+ function stripModels(root) {
120
+ if (!root || root.nodeType !== 1) return;
121
+ if (isComboboxEl(root)) captureModel(root);
122
+ const all = root.getElementsByTagName ? root.getElementsByTagName('*') : [];
123
+ for (let i = 0; i < all.length; i++) if (isComboboxEl(all[i])) captureModel(all[i]);
124
+ }
125
+
126
+ // Strip x-model before Alpine ever binds it. The initial static DOM is handled here
127
+ // (this runs on alpine:init, before the walk); subtrees mounted later — x-markdown,
128
+ // components — are handled by wrapping the public initTree they call to mount, so the
129
+ // attribute is gone before Alpine's model directive looks for it.
130
+ stripModels(document.body);
131
+ if (typeof Alpine.initTree === 'function' && !Alpine.__cbInitTreeWrapped) {
132
+ Alpine.__cbInitTreeWrapped = true;
133
+ const origInitTree = Alpine.initTree.bind(Alpine);
134
+ Alpine.initTree = (node, ...rest) => { stripModels(node); return origInitTree(node, ...rest); };
135
+ }
114
136
 
115
137
  Alpine.directive('combobox', (el, { modifiers, expression }, { cleanup }) => {
116
- captureModel(el); // fallback for elements added after the pre-walk pass
138
+ captureModel(el); // fallback for any path that bypasses the above
117
139
  // Build after the current tick so sibling sources (datalist/menu) exist.
118
140
  setTimeout(() => build(el, modifiers, expression || '', cleanup), 0);
119
141
  });
@@ -122,6 +144,25 @@ function initializeComboboxPlugin() {
122
144
  if (el.__mnfstCombobox) return;
123
145
  el.__mnfstCombobox = true;
124
146
 
147
+ // If a mount path bypassed the pre-emptive strip (x-if / x-for mount via Alpine's
148
+ // INTERNAL initTree, which our public-initTree wrapper can't see) and Alpine's
149
+ // native x-model already bound the editor, neutralize it here. Otherwise its
150
+ // value-sync would bleed the raw model into the editor ("a,b") and its input
151
+ // listener would write partial typing back to the model. We own read/write below,
152
+ // so make both native paths no-ops. captureModel still recovered the expression.
153
+ if (el._x_model) {
154
+ el._x_forceModelUpdate = function () { }; // kill the model→editor value-sync (no bleed)
155
+ // Remove Alpine's input/change listener that writes the editor back to the model
156
+ // (a local closure — overriding _x_model.set isn't enough). _x_removeModelListeners
157
+ // is Alpine's own removal hook for exactly this.
158
+ try {
159
+ const rm = el._x_removeModelListeners;
160
+ if (rm) Object.keys(rm).forEach(k => { try { rm[k](); } catch (_) { } });
161
+ } catch (_) { }
162
+ el._x_model.set = function () { }; // extra safety for any path that calls it
163
+ if (el.value) el.value = '';
164
+ }
165
+
125
166
  // Sweep generated menus left orphaned by a prior render — their controlling
126
167
  // editor is gone (a SPA x-markdown re-render) or never hydrated (duplicates
127
168
  // an old prerender baked into <body>). Either way, no connected editor points
package/lib/manifest.css CHANGED
@@ -723,7 +723,7 @@
723
723
  stroke-width: 1.5;
724
724
  transition: r var(--transition-duration, .1s) ease;
725
725
 
726
- &:hover {
726
+ &:not(.map-point):hover {
727
727
  r: 5
728
728
  }
729
729
  }
@@ -792,6 +792,37 @@
792
792
  pointer-events: none
793
793
  }
794
794
 
795
+ /* Timeline / Gantt */
796
+ & rect.gantt-segment {
797
+ fill: var(--color-chart-color, var(--color-chart-1));
798
+ transition: opacity var(--transition-duration, .1s) ease;
799
+
800
+ &:hover {
801
+ opacity: 0.82
802
+ }
803
+ }
804
+
805
+ & rect.gantt-point {
806
+ fill: var(--color-chart-color, var(--color-content-stark, oklch(20.5% 0 0)))
807
+ }
808
+
809
+ & text.gantt-track {
810
+ fill: var(--color-chart-label);
811
+ font-size: 0.75rem
812
+ }
813
+
814
+ /* Reference marker */
815
+ & line.gantt-marker {
816
+ stroke: var(--color-chart-color, var(--color-content-subtle, oklch(55.6% 0 0)));
817
+ stroke-width: 1.5;
818
+ stroke-dasharray: 3 3
819
+ }
820
+
821
+ & text.gantt-marker-label {
822
+ fill: var(--color-chart-color, var(--color-content-subtle, oklch(55.6% 0 0)));
823
+ font-size: 0.625rem
824
+ }
825
+
795
826
  /* Value labels drawn on/above segments */
796
827
  & text.value {
797
828
  fill: var(--color-content-stark, oklch(20.5% 0 0));
@@ -808,8 +839,32 @@
808
839
  }
809
840
  }
810
841
 
811
- /* Heatmap cell fill interpolates between the two heat tokens by the
812
- per-cell --heat percentage (0% = low, 100% = high) */
842
+ /* World map city / point markers */
843
+ & circle.map-point {
844
+ fill: var(--color-chart-color, var(--color-accent-content, oklch(20.5% 0 0)));
845
+ stroke: var(--color-page, oklch(98.5% 0 0));
846
+ stroke-width: 1;
847
+ fill-opacity: 0.82;
848
+ transition: opacity var(--transition-duration, .1s) ease;
849
+
850
+ &:hover {
851
+ opacity: 0.82
852
+ }
853
+ }
854
+
855
+ /* World map regions */
856
+ & path.map-region {
857
+ fill: var(--color-chart-color, var(--color-surface-2, color-mix(in oklch, oklch(20.5% 0 0) 8%, transparent)));
858
+ stroke: var(--color-page, oklch(98.5% 0 0));
859
+ stroke-width: 0.4;
860
+ transition: opacity var(--transition-duration, .1s) ease;
861
+
862
+ &:hover {
863
+ opacity: 0.82
864
+ }
865
+ }
866
+
867
+ /* Heatmap cell */
813
868
  & rect.heat-cell {
814
869
  fill: color-mix(in oklch, var(--color-chart-heat-high, var(--color-chart-1)) var(--heat, 0%), var(--color-chart-heat-low, var(--color-surface-2)));
815
870
  transition: opacity var(--transition-duration, .1s) ease;
@@ -819,7 +874,7 @@
819
874
  }
820
875
  }
821
876
 
822
- /* Legend — <footer> sibling below the SVG; <span> items, <i> swatches */
877
+ /* Legend */
823
878
  & footer {
824
879
  display: flex;
825
880
  flex-flow: row wrap;
@@ -844,9 +899,7 @@
844
899
  }
845
900
  }
846
901
 
847
- /* Heatmap gradient legend — low label, ramp bar (spans the grid), high
848
- label. Footer is padded to the chart margins in JS so the bar aligns
849
- with the columns. */
902
+ /* Heatmap gradient legend */
850
903
  & footer.heat-legend {
851
904
  flex-wrap: nowrap;
852
905
  gap: 0.5rem;
@@ -859,8 +912,7 @@
859
912
  }
860
913
  }
861
914
 
862
- /* Cursor-following tooltip — chrome comes from manifest.tooltip.css
863
- (.tooltip); only the pointer-tracking positioning lives here */
915
+ /* Cursor-following tooltip */
864
916
  & .tooltip {
865
917
  position: absolute;
866
918
  left: 0;
@@ -1460,7 +1512,7 @@
1460
1512
 
1461
1513
  @layer components {
1462
1514
 
1463
- /* Field shell — inherits input tokens so it reads as a normal field */
1515
+ /* Wrapper */
1464
1516
  :where(.combobox):not(.unstyle) {
1465
1517
  display: flex;
1466
1518
  flex-wrap: wrap;
@@ -1498,16 +1550,8 @@
1498
1550
  pointer-events: none
1499
1551
  }
1500
1552
 
1501
- /* Inner typing surface. The :not(.unstyle) lifts specificity above
1502
- manifest.input.css, which sorts after this file in the bundled CSS and
1503
- would otherwise re-apply its own width/background/hover to the editor. */
1553
+ /* Inner typing surface */
1504
1554
  &> :where(input:not([type=hidden]), textarea):not(.unstyle) {
1505
- /* flex-basis (not min-width) sets the wrap threshold: the editor fills
1506
- the rest of the row, and once less than 7rem is left it wraps to its
1507
- own line. min-width:0 is REQUIRED — a flex item's default min-width:auto
1508
- is its content size, and WebKit enforces it by crushing the
1509
- flex-shrink:0 chips to an ellipsis. Resetting it to 0 lets the editor
1510
- shrink/wrap instead, so the chips keep their room. */
1511
1555
  flex: 1 1 7rem;
1512
1556
  min-width: 0;
1513
1557
  width: auto;
@@ -1533,7 +1577,7 @@
1533
1577
  /* Chips */
1534
1578
  :where(.combobox-chip):not(.unstyle) {
1535
1579
  display: inline-flex;
1536
- flex: 0 0 auto; /* hold content width; don't grow or shrink — overflow:hidden below otherwise lets flex squeeze chips to an ellipsis (notably Safari) */
1580
+ flex: 0 0 auto;
1537
1581
  align-items: center;
1538
1582
  gap: var(--spacing, 0.25rem);
1539
1583
  max-width: 100%;
@@ -1575,7 +1619,7 @@
1575
1619
  }
1576
1620
  }
1577
1621
 
1578
- /* Locked — selected but not removable; no × button, so restore the right padding */
1622
+ /* Non-removable */
1579
1623
  &[data-locked] {
1580
1624
  padding-inline-end: calc(var(--spacing, 0.25rem) * 2);
1581
1625
  cursor: default
@@ -1588,9 +1632,8 @@
1588
1632
  }
1589
1633
  }
1590
1634
 
1591
- /* Trigger (editor:none button mode) — transparent; the shell is the field.
1592
- Fills the row like the input editor, with a select-style caret. */
1593
- :where(.combobox) > button:not(.unstyle) {
1635
+ /* Button trigger */
1636
+ :where(.combobox)>button:not(.unstyle) {
1594
1637
  flex: 1 1 auto;
1595
1638
  align-self: stretch;
1596
1639
  min-width: 7rem;
@@ -1619,10 +1662,7 @@
1619
1662
  }
1620
1663
  }
1621
1664
 
1622
- /* Chip-less field (single input, textarea, or button trigger): the editor IS
1623
- the field — it fills the whole wrapper and carries the padding, so the click
1624
- target, caret and text selection align with the field edges instead of
1625
- floating inside the wrapper's padding. */
1665
+ /* Chip-less */
1626
1666
  :where(.combobox):has(> :where(input:not([type=hidden]), textarea, button):not(.unstyle)):not(:has(.combobox-chip)) {
1627
1667
  padding: 0;
1628
1668
 
@@ -1633,15 +1673,10 @@
1633
1673
  }
1634
1674
  }
1635
1675
 
1636
- /* Listbox — base look comes from menu[popover]; these are combobox-only extras.
1637
- Selectors deliberately AVOID :where() on the option part so they out-specify
1638
- dropdown.css's `menu li { display: inline-flex }` (0,1,0), which sorts after
1639
- this file in the bundle and would otherwise keep filtered options visible. */
1676
+ /* Listbox */
1640
1677
  :where(menu[role=listbox]):not(.unstyle) {
1641
1678
 
1642
- /* Active descendant — only shown while the keyboard is driving (data-kbd).
1643
- On a mouse-opened menu the hover state alone highlights, so the first
1644
- option isn't left with a persistent background. */
1679
+ /* Active descendant */
1645
1680
  &[data-kbd] [role=option][aria-current="true"] {
1646
1681
  color: var(--color-field-inverse, oklch(43.9% 0 0));
1647
1682
  background-color: var(--color-field-surface, color-mix(in oklch, oklch(20.5% 0 0) 10%, transparent))
@@ -3867,8 +3902,13 @@
3867
3902
 
3868
3903
  @layer components {
3869
3904
 
3905
+ :where(.grid-table):not(.unstyle) {
3906
+ display: grid;
3907
+ }
3908
+
3870
3909
  :where(table, .grid-table):not(.unstyle) {
3871
3910
  table-layout: auto;
3911
+ align-items: start;
3872
3912
  width: 100%;
3873
3913
  max-width: 100%;
3874
3914
  overflow: hidden;
@@ -3902,7 +3942,6 @@
3902
3942
  font-size: 0.875rem;
3903
3943
  text-align: left;
3904
3944
  text-align: start;
3905
- overflow: hidden;
3906
3945
 
3907
3946
  /* Make elements within cell inline */
3908
3947
  &>*:not(template) {
@@ -3916,6 +3955,11 @@
3916
3955
  }
3917
3956
  }
3918
3957
 
3958
+ /* Native cells clip */
3959
+ :where(td, th) {
3960
+ overflow: hidden
3961
+ }
3962
+
3919
3963
  /* Footer row */
3920
3964
  :where(:not(:has(tfoot)) tbody tr:last-child, tfoot tr:last-child, .grid-footer > *) {
3921
3965
  border-bottom: 0
@@ -2,11 +2,11 @@
2
2
  "manifest.appwrite.auth.js": "sha384-1Kz/Dlerds1/7iKrEVDIRbFDyngZ0L+f81td9eW3w4t3nGFU+w4gjyGhwn+IiTRM",
3
3
  "manifest.appwrite.data.js": "sha384-00ulLT+GAIuPHA/rRT9p98vYlsyDzkyKXtg86BDQ6FGQa5vVVN+W6kuforniBAsz",
4
4
  "manifest.appwrite.presence.js": "sha384-uxRpx9/Jj0kGtklH5QmUlAzD3zdSvFRfK6bcJQqxl+Bsf5tOo4zgwqJTQgtZoHQP",
5
- "manifest.charts.js": "sha384-RuV7gWXt3s+JegxWgDieR/P5U99sbOYWiYHdJGe2uCJjDFU1cPp0mJ1QT55ec9uz",
5
+ "manifest.charts.js": "sha384-wjt79SedPBw7kIUo1qBGUifNgSEV/yzUZKTmNZKml3pjhaSrGc2nPG2Zh6/DLbs1",
6
6
  "manifest.code.js": "sha384-BJSRJ7txA6fY660qX+SfEEBrEB0dOChHdHI4/9iNGz3rGqohEZdzs7qA3LuR1GJW",
7
7
  "manifest.color.js": "sha384-6Rv3LxyTcZNjrhtayQfqRdCx0uSZ4BiEbgEI98I62eTvp8Aw7LBIoNJ0Je1oktwL",
8
8
  "manifest.colorpicker.js": "sha384-Wqz0ZIbeIi7KarqqqSLsQk+7E/fMaKhb32hrq5/eWzX1yjqMrpPZKH8y+jZ3mfg+",
9
- "manifest.combobox.js": "sha384-3rP3iWhh5lJsoQcqY6pBJUMzfSqQUqwHRxkSCOJiRo0HbmIXu5YXzy3UFOYnfbrh",
9
+ "manifest.combobox.js": "sha384-1Wf4gcfBpct8PjDUScjBFnid7prfcQUZZOftruze2KPqGOVjqsOOWoG1rRDK7pkO",
10
10
  "manifest.components.js": "sha384-mzPFoM0vqL9dnTVLMN3OrmO+KCgSqGknM1fd7bM1xzYeCco5OaZi56IMR5RS5oad",
11
11
  "manifest.data.js": "sha384-bCYTYyAYNVkg5pSwGcoe07Dgf5B7JDN7GtOIQdS+BtrBStQwvjZtskiQ38Bncvrf",
12
12
  "manifest.datepicker.js": "sha384-NEb/H4vuR3CFtRcodHsm3jJjrcYW2JMpDlQKlgwTrzpMMTcDkFKYXzAYJD0gZ7Ov",
@@ -27,6 +27,6 @@
27
27
  "manifest.tooltips.js": "sha384-ADzAx9D0HWq2b46mvNG05iOwPmEWdiFZNpEOXONSbBxs4xj1B/bzNL7S3x2R9cS1",
28
28
  "manifest.url.parameters.js": "sha384-FIufiClqDx1rJpU/QUc9z/D43qClQ6Qm8rBahipbJl9BDHUvhrOsUDegmTWW7Tuf",
29
29
  "manifest.utilities.js": "sha384-HWyVkjQoDRlWFKDBQw4RQOYODkBcU72NHW6l1p4bhQv1RtN0/XtnjwIb+lQK6+zv",
30
- "manifest.virtual.js": "sha384-0W3Hg1Gu4YcHibh0KB0G56/a2v9n7tO5Fw2Pz2rJmHbitvJWZ69f6nvYRVkQB2JE",
30
+ "manifest.virtual.js": "sha384-klEAlDCSGuzMZmO7NMSckKVeEJRR9UGWCesoPOOypX78EcPJ1/TUBAXz3MeSGx2s",
31
31
  "manifest.js": "sha384-zPXrym9jwpYVdg4TJ1XPQVxQhz7uezdDubaO/MZDvLeiTufor+6lNJsTG75cYPXm"
32
32
  }