@astuteo/breakout-grid 5.1.3 → 5.1.4

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.
@@ -1,6 +1,6 @@
1
1
  (function() {
2
2
  "use strict";
3
- const VERSION = `v${"5.1.3"} lite`;
3
+ const VERSION = `v${"5.1.4"} lite`;
4
4
  const LOREM_CONTENT = `Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium.
5
5
 
6
6
  Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet.`;
@@ -1,6 +1,6 @@
1
1
  (function() {
2
2
  "use strict";
3
- const VERSION = `v${"5.1.3"}`;
3
+ const VERSION = `v${"5.1.4"}`;
4
4
  const LOREM_CONTENT = `Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium.
5
5
 
6
6
  Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet.`;
@@ -82,7 +82,7 @@ Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed
82
82
  backdropOpacity: 0.85
83
83
  };
84
84
  }
85
- const BUILD_VERSION = "5.1.3";
85
+ const BUILD_VERSION = "5.1.4";
86
86
  function generateCSSExport(c, version = BUILD_VERSION) {
87
87
  var _a, _b, _c, _d, _e;
88
88
  const VERSION2 = version;
@@ -895,21 +895,6 @@ Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed
895
895
  };
896
896
  return config;
897
897
  },
898
- formatConfig(obj, indent = 2) {
899
- const pad = " ".repeat(indent);
900
- const lines = ["{"];
901
- const entries = Object.entries(obj);
902
- entries.forEach(([key, value], i) => {
903
- const comma = i < entries.length - 1 ? "," : "";
904
- if (typeof value === "object" && value !== null) {
905
- lines.push(`${pad}${key}: ${this.formatConfig(value, indent + 2).replace(/\n/g, "\n" + pad)}${comma}`);
906
- } else {
907
- lines.push(`${pad}${key}: '${value}'${comma}`);
908
- }
909
- });
910
- lines.push("}");
911
- return lines.join("\n");
912
- },
913
898
  configSections: {
914
899
  content: { keys: ["contentMin", "contentBase", "contentMax"], label: "Content" },
915
900
  defaultCol: { keys: ["defaultCol"], label: "Default Column" },
@@ -921,43 +906,37 @@ Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed
921
906
  copySection(sectionName) {
922
907
  const section = this.configSections[sectionName];
923
908
  if (!section) return;
924
- const config = {};
909
+ const lines = [];
925
910
  section.keys.forEach((key) => {
911
+ let value, varName;
926
912
  if (this.configOptions[key]) {
927
- config[key] = this.editValues[key] || this.configOptions[key].value;
913
+ value = this.editValues[key] || this.configOptions[key].value;
914
+ varName = this.configOptions[key].liveVar;
928
915
  } else if (key === "breakoutMin") {
929
- config[key] = this.editValues.breakout_min || this.breakoutOptions.min.value;
916
+ value = this.editValues.breakout_min || this.breakoutOptions.min.value;
917
+ varName = this.breakoutOptions.min.liveVar;
930
918
  } else if (key === "breakoutScale") {
931
- config[key] = this.editValues.breakout_scale || this.breakoutOptions.scale.value;
919
+ value = this.editValues.breakout_scale || this.breakoutOptions.scale.value;
920
+ varName = this.breakoutOptions.scale.liveVar;
921
+ }
922
+ if (varName) {
923
+ lines.push(`${varName}: ${value};`);
932
924
  }
933
925
  });
934
926
  if (section.nested) {
935
927
  Object.keys(section.nested).forEach((nestedKey) => {
936
- config[nestedKey] = {};
937
928
  section.nested[nestedKey].forEach((subKey) => {
938
- config[nestedKey][subKey] = this.editValues[`gapScale_${subKey}`] || this.gapScaleOptions[subKey].value;
929
+ const opt = this.gapScaleOptions[subKey];
930
+ const value = this.editValues[`gapScale_${subKey}`] || opt.value;
931
+ lines.push(`${opt.liveVar}: ${value};`);
939
932
  });
940
933
  });
941
934
  }
942
- const configStr = this.formatConfigFlat(config);
943
- navigator.clipboard.writeText(configStr).then(() => {
935
+ navigator.clipboard.writeText(lines.join("\n")).then(() => {
944
936
  this.sectionCopied = sectionName;
945
937
  setTimeout(() => this.sectionCopied = null, 1500);
946
938
  });
947
939
  },
948
- formatConfigFlat(obj) {
949
- const lines = [];
950
- const entries = Object.entries(obj);
951
- entries.forEach(([key, value], i) => {
952
- const comma = i < entries.length - 1 ? "," : ",";
953
- if (typeof value === "object" && value !== null) {
954
- lines.push(`${key}: ${this.formatConfig(value)}${comma}`);
955
- } else {
956
- lines.push(`${key}: '${value}'${comma}`);
957
- }
958
- });
959
- return lines.join("\n");
960
- },
961
940
  copyConfig() {
962
941
  var _a, _b, _c, _d, _e;
963
942
  const config = this.generateConfigExport();
@@ -2308,7 +2287,6 @@ Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed
2308
2287
  <div>
2309
2288
  <span style="font-size: 11px; color: #374151;">min</span>
2310
2289
  <span style="font-size: 9px; color: #9ca3af; margin-left: 4px;">floor</span>
2311
- <span style="font-size: 8px; color: #10b981; margin-left: 4px; font-weight: 500;">live</span>
2312
2290
  </div>
2313
2291
  <div style="display: flex; align-items: center; gap: 4px;">
2314
2292
  <input type="number" :value="getNumericValue('baseGap')" @input="updateNumericValue('baseGap', $event.target.value)" step="0.5"
@@ -2325,7 +2303,6 @@ Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed
2325
2303
  <div>
2326
2304
  <span style="font-size: 11px; color: #374151;">max</span>
2327
2305
  <span style="font-size: 9px; color: #9ca3af; margin-left: 4px;">ceiling</span>
2328
- <span style="font-size: 8px; color: #10b981; margin-left: 4px; font-weight: 500;">live</span>
2329
2306
  </div>
2330
2307
  <div style="display: flex; align-items: center; gap: 4px;">
2331
2308
  <input type="number" :value="getNumericValue('maxGap')" @input="updateNumericValue('maxGap', $event.target.value)" step="1"
@@ -2339,8 +2316,8 @@ Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed
2339
2316
  </div>
2340
2317
  </div>
2341
2318
 
2342
- <div style="font-size: 9px; font-weight: 600; color: #6b7280; text-transform: uppercase; letter-spacing: 0.5px; margin: 10px 0 2px;">Responsive Scale <span style="font-size: 8px; color: #10b981; font-weight: 500; text-transform: none;">live preview</span></div>
2343
- <div style="font-size: 9px; color: #9ca3af; margin-bottom: 6px; line-height: 1.4;">Fluid value (vw) that grows with viewport. Active breakpoint previews live.</div>
2319
+ <div style="font-size: 9px; font-weight: 600; color: #6b7280; text-transform: uppercase; letter-spacing: 0.5px; margin: 10px 0 2px;">Responsive Scale (Gap)</div>
2320
+ <div style="font-size: 9px; color: #9ca3af; margin-bottom: 6px; line-height: 1.4;">Fluid value (vw) that grows with viewport.</div>
2344
2321
  <template x-for="key in Object.keys(gapScaleOptions)" :key="'ed_gs_'+key">
2345
2322
  <div :style="{
2346
2323
  display: 'flex',
@@ -2366,7 +2343,6 @@ Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed
2366
2343
  </div>
2367
2344
  </template>
2368
2345
 
2369
- <!-- Live formula preview -->
2370
2346
  <div style="margin-top: 8px; padding: 8px; background: #f3f4f6; border-radius: 4px; font-family: 'SF Mono', Monaco, monospace; font-size: 9px; line-height: 1.6;">
2371
2347
  <div style="color: #6b7280; margin-bottom: 4px;">Generated CSS:</div>
2372
2348
  <div style="color: #374151;"><span style="color: #9ca3af;">mobile:</span> clamp(<span x-text="editValues.baseGap || configOptions.baseGap.value"></span>, <span x-text="editValues.gapScale_default || gapScaleOptions.default.value"></span>, <span x-text="editValues.maxGap || configOptions.maxGap.value"></span>)</div>
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Breakout Grid - Objects Layer (ITCSS)
3
- * Version: 5.1.3
3
+ * Version: 5.1.4
4
4
  *
5
5
  * Documentation: https://github.com/astuteo-llc/breakout-grid
6
6
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astuteo/breakout-grid",
3
- "version": "5.1.3",
3
+ "version": "5.1.4",
4
4
  "type": "module",
5
5
  "description": "CSS Grid breakout layout system with visual configurator",
6
6
  "main": "dist/_objects.breakout-grid.css",