@wireweave/core 2.0.1 → 2.0.2

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025-present Wireweave
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/dist/index.cjs CHANGED
@@ -817,9 +817,13 @@ function peg$parse(input, options) {
817
817
  });
818
818
  }
819
819
  function peg$f20(label, attrs) {
820
+ const obj = attrsToObject(attrs);
821
+ const inputType = obj.type;
822
+ delete obj.type;
820
823
  return createNode("Input", {
821
824
  label: label || null,
822
- ...attrsToObject(attrs)
825
+ ...inputType !== void 0 ? { inputType } : {},
826
+ ...obj
823
827
  });
824
828
  }
825
829
  function peg$f21(label, attrs) {
@@ -7907,6 +7911,10 @@ function generateLayoutClasses(prefix) {
7907
7911
  display: flex;
7908
7912
  align-items: center;
7909
7913
  min-height: 56px;
7914
+ flex-shrink: 0;
7915
+ background: var(--${prefix}-bg);
7916
+ position: relative;
7917
+ z-index: 1;
7910
7918
  }
7911
7919
 
7912
7920
  .${prefix}-header > .${prefix}-row {
@@ -7962,6 +7970,10 @@ function generateLayoutClasses(prefix) {
7962
7970
  .${prefix}-footer {
7963
7971
  border-top: 1px solid var(--${prefix}-border);
7964
7972
  padding: 16px;
7973
+ flex-shrink: 0;
7974
+ background: var(--${prefix}-bg);
7975
+ position: relative;
7976
+ z-index: 1;
7965
7977
  }
7966
7978
 
7967
7979
  .${prefix}-footer.${prefix}-no-border {
@@ -55052,6 +55064,9 @@ function renderSelect(node, ctx) {
55052
55064
  disabled: node.disabled,
55053
55065
  required: node.required
55054
55066
  };
55067
+ const hasSelectedValue = node.value && node.options.some(
55068
+ (opt) => (typeof opt === "string" ? opt : opt.value) === node.value
55069
+ );
55055
55070
  const options = node.options.map((opt) => {
55056
55071
  if (typeof opt === "string") {
55057
55072
  const selected2 = opt === node.value ? ' selected="selected"' : "";
@@ -55060,7 +55075,8 @@ function renderSelect(node, ctx) {
55060
55075
  const selected = opt.value === node.value ? ' selected="selected"' : "";
55061
55076
  return `<option value="${ctx.escapeHtml(opt.value)}"${selected}>${ctx.escapeHtml(opt.label)}</option>`;
55062
55077
  }).join("\n");
55063
- const placeholder = node.placeholder ? `<option value="" disabled="disabled" selected="selected">${ctx.escapeHtml(node.placeholder)}</option>
55078
+ const placeholderSelected = hasSelectedValue ? "" : ' selected="selected"';
55079
+ const placeholder = node.placeholder ? `<option value="" disabled="disabled"${placeholderSelected}>${ctx.escapeHtml(node.placeholder)}</option>
55064
55080
  ` : "";
55065
55081
  const select = `<select${ctx.buildAttrsString(attrs)}${styleAttr}>
55066
55082
  ${placeholder}${options}
@@ -56603,7 +56619,7 @@ var COMPONENT_SPECS = [
56603
56619
  name: "icon",
56604
56620
  nodeType: "Icon",
56605
56621
  category: "display",
56606
- attributes: [...COMMON_ATTRIBUTES, "size", "muted"],
56622
+ attributes: [...COMMON_ATTRIBUTES, "name", "size", "muted"],
56607
56623
  hasChildren: false,
56608
56624
  description: "Lucide icon"
56609
56625
  },
package/dist/index.js CHANGED
@@ -677,9 +677,13 @@ function peg$parse(input, options) {
677
677
  });
678
678
  }
679
679
  function peg$f20(label, attrs) {
680
+ const obj = attrsToObject(attrs);
681
+ const inputType = obj.type;
682
+ delete obj.type;
680
683
  return createNode("Input", {
681
684
  label: label || null,
682
- ...attrsToObject(attrs)
685
+ ...inputType !== void 0 ? { inputType } : {},
686
+ ...obj
683
687
  });
684
688
  }
685
689
  function peg$f21(label, attrs) {
@@ -7767,6 +7771,10 @@ function generateLayoutClasses(prefix) {
7767
7771
  display: flex;
7768
7772
  align-items: center;
7769
7773
  min-height: 56px;
7774
+ flex-shrink: 0;
7775
+ background: var(--${prefix}-bg);
7776
+ position: relative;
7777
+ z-index: 1;
7770
7778
  }
7771
7779
 
7772
7780
  .${prefix}-header > .${prefix}-row {
@@ -7822,6 +7830,10 @@ function generateLayoutClasses(prefix) {
7822
7830
  .${prefix}-footer {
7823
7831
  border-top: 1px solid var(--${prefix}-border);
7824
7832
  padding: 16px;
7833
+ flex-shrink: 0;
7834
+ background: var(--${prefix}-bg);
7835
+ position: relative;
7836
+ z-index: 1;
7825
7837
  }
7826
7838
 
7827
7839
  .${prefix}-footer.${prefix}-no-border {
@@ -54912,6 +54924,9 @@ function renderSelect(node, ctx) {
54912
54924
  disabled: node.disabled,
54913
54925
  required: node.required
54914
54926
  };
54927
+ const hasSelectedValue = node.value && node.options.some(
54928
+ (opt) => (typeof opt === "string" ? opt : opt.value) === node.value
54929
+ );
54915
54930
  const options = node.options.map((opt) => {
54916
54931
  if (typeof opt === "string") {
54917
54932
  const selected2 = opt === node.value ? ' selected="selected"' : "";
@@ -54920,7 +54935,8 @@ function renderSelect(node, ctx) {
54920
54935
  const selected = opt.value === node.value ? ' selected="selected"' : "";
54921
54936
  return `<option value="${ctx.escapeHtml(opt.value)}"${selected}>${ctx.escapeHtml(opt.label)}</option>`;
54922
54937
  }).join("\n");
54923
- const placeholder = node.placeholder ? `<option value="" disabled="disabled" selected="selected">${ctx.escapeHtml(node.placeholder)}</option>
54938
+ const placeholderSelected = hasSelectedValue ? "" : ' selected="selected"';
54939
+ const placeholder = node.placeholder ? `<option value="" disabled="disabled"${placeholderSelected}>${ctx.escapeHtml(node.placeholder)}</option>
54924
54940
  ` : "";
54925
54941
  const select = `<select${ctx.buildAttrsString(attrs)}${styleAttr}>
54926
54942
  ${placeholder}${options}
@@ -56463,7 +56479,7 @@ var COMPONENT_SPECS = [
56463
56479
  name: "icon",
56464
56480
  nodeType: "Icon",
56465
56481
  category: "display",
56466
- attributes: [...COMMON_ATTRIBUTES, "size", "muted"],
56482
+ attributes: [...COMMON_ATTRIBUTES, "name", "size", "muted"],
56467
56483
  hasChildren: false,
56468
56484
  description: "Lucide icon"
56469
56485
  },
package/dist/parser.cjs CHANGED
@@ -412,9 +412,13 @@ function peg$parse(input, options) {
412
412
  });
413
413
  }
414
414
  function peg$f20(label, attrs) {
415
+ const obj = attrsToObject(attrs);
416
+ const inputType = obj.type;
417
+ delete obj.type;
415
418
  return createNode("Input", {
416
419
  label: label || null,
417
- ...attrsToObject(attrs)
420
+ ...inputType !== void 0 ? { inputType } : {},
421
+ ...obj
418
422
  });
419
423
  }
420
424
  function peg$f21(label, attrs) {
package/dist/parser.js CHANGED
@@ -383,9 +383,13 @@ function peg$parse(input, options) {
383
383
  });
384
384
  }
385
385
  function peg$f20(label, attrs) {
386
+ const obj = attrsToObject(attrs);
387
+ const inputType = obj.type;
388
+ delete obj.type;
386
389
  return createNode("Input", {
387
390
  label: label || null,
388
- ...attrsToObject(attrs)
391
+ ...inputType !== void 0 ? { inputType } : {},
392
+ ...obj
389
393
  });
390
394
  }
391
395
  function peg$f21(label, attrs) {
package/dist/renderer.cjs CHANGED
@@ -1591,6 +1591,10 @@ function generateLayoutClasses(prefix) {
1591
1591
  display: flex;
1592
1592
  align-items: center;
1593
1593
  min-height: 56px;
1594
+ flex-shrink: 0;
1595
+ background: var(--${prefix}-bg);
1596
+ position: relative;
1597
+ z-index: 1;
1594
1598
  }
1595
1599
 
1596
1600
  .${prefix}-header > .${prefix}-row {
@@ -1646,6 +1650,10 @@ function generateLayoutClasses(prefix) {
1646
1650
  .${prefix}-footer {
1647
1651
  border-top: 1px solid var(--${prefix}-border);
1648
1652
  padding: 16px;
1653
+ flex-shrink: 0;
1654
+ background: var(--${prefix}-bg);
1655
+ position: relative;
1656
+ z-index: 1;
1649
1657
  }
1650
1658
 
1651
1659
  .${prefix}-footer.${prefix}-no-border {
@@ -48707,6 +48715,9 @@ function renderSelect(node, ctx) {
48707
48715
  disabled: node.disabled,
48708
48716
  required: node.required
48709
48717
  };
48718
+ const hasSelectedValue = node.value && node.options.some(
48719
+ (opt) => (typeof opt === "string" ? opt : opt.value) === node.value
48720
+ );
48710
48721
  const options = node.options.map((opt) => {
48711
48722
  if (typeof opt === "string") {
48712
48723
  const selected2 = opt === node.value ? ' selected="selected"' : "";
@@ -48715,7 +48726,8 @@ function renderSelect(node, ctx) {
48715
48726
  const selected = opt.value === node.value ? ' selected="selected"' : "";
48716
48727
  return `<option value="${ctx.escapeHtml(opt.value)}"${selected}>${ctx.escapeHtml(opt.label)}</option>`;
48717
48728
  }).join("\n");
48718
- const placeholder = node.placeholder ? `<option value="" disabled="disabled" selected="selected">${ctx.escapeHtml(node.placeholder)}</option>
48729
+ const placeholderSelected = hasSelectedValue ? "" : ' selected="selected"';
48730
+ const placeholder = node.placeholder ? `<option value="" disabled="disabled"${placeholderSelected}>${ctx.escapeHtml(node.placeholder)}</option>
48719
48731
  ` : "";
48720
48732
  const select = `<select${ctx.buildAttrsString(attrs)}${styleAttr}>
48721
48733
  ${placeholder}${options}
package/dist/renderer.js CHANGED
@@ -1553,6 +1553,10 @@ function generateLayoutClasses(prefix) {
1553
1553
  display: flex;
1554
1554
  align-items: center;
1555
1555
  min-height: 56px;
1556
+ flex-shrink: 0;
1557
+ background: var(--${prefix}-bg);
1558
+ position: relative;
1559
+ z-index: 1;
1556
1560
  }
1557
1561
 
1558
1562
  .${prefix}-header > .${prefix}-row {
@@ -1608,6 +1612,10 @@ function generateLayoutClasses(prefix) {
1608
1612
  .${prefix}-footer {
1609
1613
  border-top: 1px solid var(--${prefix}-border);
1610
1614
  padding: 16px;
1615
+ flex-shrink: 0;
1616
+ background: var(--${prefix}-bg);
1617
+ position: relative;
1618
+ z-index: 1;
1611
1619
  }
1612
1620
 
1613
1621
  .${prefix}-footer.${prefix}-no-border {
@@ -48669,6 +48677,9 @@ function renderSelect(node, ctx) {
48669
48677
  disabled: node.disabled,
48670
48678
  required: node.required
48671
48679
  };
48680
+ const hasSelectedValue = node.value && node.options.some(
48681
+ (opt) => (typeof opt === "string" ? opt : opt.value) === node.value
48682
+ );
48672
48683
  const options = node.options.map((opt) => {
48673
48684
  if (typeof opt === "string") {
48674
48685
  const selected2 = opt === node.value ? ' selected="selected"' : "";
@@ -48677,7 +48688,8 @@ function renderSelect(node, ctx) {
48677
48688
  const selected = opt.value === node.value ? ' selected="selected"' : "";
48678
48689
  return `<option value="${ctx.escapeHtml(opt.value)}"${selected}>${ctx.escapeHtml(opt.label)}</option>`;
48679
48690
  }).join("\n");
48680
- const placeholder = node.placeholder ? `<option value="" disabled="disabled" selected="selected">${ctx.escapeHtml(node.placeholder)}</option>
48691
+ const placeholderSelected = hasSelectedValue ? "" : ' selected="selected"';
48692
+ const placeholder = node.placeholder ? `<option value="" disabled="disabled"${placeholderSelected}>${ctx.escapeHtml(node.placeholder)}</option>
48681
48693
  ` : "";
48682
48694
  const select = `<select${ctx.buildAttrsString(attrs)}${styleAttr}>
48683
48695
  ${placeholder}${options}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wireweave/core",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "description": "Core parser and renderer for wireweave",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",