@astuteo/breakout-grid 5.1.2 → 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.2"} 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.2"}`;
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.`;
@@ -17,21 +17,21 @@ Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed
17
17
  contentMin: { value: "50rem", desc: "Min width for content column (~848px). Use rem.", cssVar: "--config-content-min", liveVar: "--content-min" },
18
18
  contentMax: { value: "55rem", desc: "Max width for content column (~976px). Use rem.", cssVar: "--config-content-max", liveVar: "--content-max" },
19
19
  contentBase: { value: "75vw", desc: "Preferred width for content (fluid). Use vw.", cssVar: "--config-content-base", liveVar: "--content-base" },
20
- popoutWidth: { value: "5rem", desc: "Popout extends beyond content. Use rem.", cssVar: "--config-popout", liveVar: null },
21
- featureMin: { value: "0rem", desc: "Minimum feature track width (floor)", cssVar: "--config-feature-min", liveVar: null },
22
- featureScale: { value: "12vw", desc: "Fluid feature track scaling", cssVar: "--config-feature-scale", liveVar: null },
23
- featureMax: { value: "12rem", desc: "Maximum feature track width (ceiling)", cssVar: "--config-feature-max", liveVar: null },
20
+ popoutWidth: { value: "5rem", desc: "Popout extends beyond content. Use rem.", cssVar: "--config-popout", liveVar: "--popout-width" },
21
+ featureMin: { value: "0rem", desc: "Minimum feature track width (floor)", cssVar: "--config-feature-min", liveVar: "--feature-min" },
22
+ featureScale: { value: "12vw", desc: "Fluid feature track scaling", cssVar: "--config-feature-scale", liveVar: "--feature-scale" },
23
+ featureMax: { value: "12rem", desc: "Maximum feature track width (ceiling)", cssVar: "--config-feature-max", liveVar: "--feature-max" },
24
24
  fullLimit: { value: "115rem", desc: "Max width for col-full-limit. Use rem.", cssVar: "--config-full-limit", liveVar: "--full-limit" },
25
- defaultCol: { value: "content", desc: "Default column when no col-* class", type: "select", options: ["content", "popout", "feature", "full"], cssVar: "--config-default-col" }
25
+ defaultCol: { value: "content", desc: "Default column when no col-* class", type: "select", options: ["content", "popout", "feature", "full"], cssVar: "--config-default-col", liveVar: "--default-col" }
26
26
  };
27
27
  const GAP_SCALE_OPTIONS = {
28
- default: { value: "4vw", desc: "Mobile/default gap scaling. Use vw.", cssVar: "--config-gap-scale-default" },
29
- lg: { value: "5vw", desc: "Large screens (1024px+). Use vw.", cssVar: "--config-gap-scale-lg" },
30
- xl: { value: "6vw", desc: "Extra large (1280px+). Use vw.", cssVar: "--config-gap-scale-xl" }
28
+ default: { value: "4vw", desc: "Mobile/default gap scaling. Use vw.", cssVar: "--config-gap-scale-default", liveVar: "--gap-scale-default" },
29
+ lg: { value: "5vw", desc: "Large screens (1024px+). Use vw.", cssVar: "--config-gap-scale-lg", liveVar: "--gap-scale-lg" },
30
+ xl: { value: "6vw", desc: "Extra large (1280px+). Use vw.", cssVar: "--config-gap-scale-xl", liveVar: "--gap-scale-xl" }
31
31
  };
32
32
  const BREAKOUT_OPTIONS = {
33
- min: { value: "1rem", desc: "Minimum breakout padding (floor)", cssVar: "--config-breakout-min" },
34
- scale: { value: "5vw", desc: "Fluid breakout scaling", cssVar: "--config-breakout-scale" }
33
+ min: { value: "1rem", desc: "Minimum breakout padding (floor)", cssVar: "--config-breakout-min", liveVar: "--breakout-min" },
34
+ scale: { value: "5vw", desc: "Fluid breakout scaling", cssVar: "--config-breakout-scale", liveVar: "--breakout-scale" }
35
35
  // max is popoutWidth
36
36
  };
37
37
  const BREAKPOINT_OPTIONS = {
@@ -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.2";
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;
@@ -862,12 +862,14 @@ Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed
862
862
  Object.keys(options).forEach((key) => {
863
863
  const opt = options[key];
864
864
  const editKey = prefix ? `${prefix}_${key}` : key;
865
- if (opt.cssVar) {
866
- const computed = this.getCSSVariable(opt.cssVar);
867
- this.editValues[editKey] = computed && computed !== "Not set" && computed !== "" ? computed : opt.value;
868
- } else {
869
- this.editValues[editKey] = opt.value;
865
+ let computed = null;
866
+ if (opt.liveVar) {
867
+ computed = this.getCSSVariable(opt.liveVar);
868
+ }
869
+ if ((!computed || computed === "Not set" || computed === "") && opt.cssVar) {
870
+ computed = this.getCSSVariable(opt.cssVar);
870
871
  }
872
+ this.editValues[editKey] = computed && computed !== "Not set" && computed !== "" ? computed : opt.value;
871
873
  });
872
874
  },
873
875
  loadCurrentValues() {
@@ -893,21 +895,6 @@ Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed
893
895
  };
894
896
  return config;
895
897
  },
896
- formatConfig(obj, indent = 2) {
897
- const pad = " ".repeat(indent);
898
- const lines = ["{"];
899
- const entries = Object.entries(obj);
900
- entries.forEach(([key, value], i) => {
901
- const comma = i < entries.length - 1 ? "," : "";
902
- if (typeof value === "object" && value !== null) {
903
- lines.push(`${pad}${key}: ${this.formatConfig(value, indent + 2).replace(/\n/g, "\n" + pad)}${comma}`);
904
- } else {
905
- lines.push(`${pad}${key}: '${value}'${comma}`);
906
- }
907
- });
908
- lines.push("}");
909
- return lines.join("\n");
910
- },
911
898
  configSections: {
912
899
  content: { keys: ["contentMin", "contentBase", "contentMax"], label: "Content" },
913
900
  defaultCol: { keys: ["defaultCol"], label: "Default Column" },
@@ -919,43 +906,37 @@ Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed
919
906
  copySection(sectionName) {
920
907
  const section = this.configSections[sectionName];
921
908
  if (!section) return;
922
- const config = {};
909
+ const lines = [];
923
910
  section.keys.forEach((key) => {
911
+ let value, varName;
924
912
  if (this.configOptions[key]) {
925
- config[key] = this.editValues[key] || this.configOptions[key].value;
913
+ value = this.editValues[key] || this.configOptions[key].value;
914
+ varName = this.configOptions[key].liveVar;
926
915
  } else if (key === "breakoutMin") {
927
- 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;
928
918
  } else if (key === "breakoutScale") {
929
- 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};`);
930
924
  }
931
925
  });
932
926
  if (section.nested) {
933
927
  Object.keys(section.nested).forEach((nestedKey) => {
934
- config[nestedKey] = {};
935
928
  section.nested[nestedKey].forEach((subKey) => {
936
- 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};`);
937
932
  });
938
933
  });
939
934
  }
940
- const configStr = this.formatConfigFlat(config);
941
- navigator.clipboard.writeText(configStr).then(() => {
935
+ navigator.clipboard.writeText(lines.join("\n")).then(() => {
942
936
  this.sectionCopied = sectionName;
943
937
  setTimeout(() => this.sectionCopied = null, 1500);
944
938
  });
945
939
  },
946
- formatConfigFlat(obj) {
947
- const lines = [];
948
- const entries = Object.entries(obj);
949
- entries.forEach(([key, value], i) => {
950
- const comma = i < entries.length - 1 ? "," : ",";
951
- if (typeof value === "object" && value !== null) {
952
- lines.push(`${key}: ${this.formatConfig(value)}${comma}`);
953
- } else {
954
- lines.push(`${key}: '${value}'${comma}`);
955
- }
956
- });
957
- return lines.join("\n");
958
- },
959
940
  copyConfig() {
960
941
  var _a, _b, _c, _d, _e;
961
942
  const config = this.generateConfigExport();
@@ -2306,7 +2287,6 @@ Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed
2306
2287
  <div>
2307
2288
  <span style="font-size: 11px; color: #374151;">min</span>
2308
2289
  <span style="font-size: 9px; color: #9ca3af; margin-left: 4px;">floor</span>
2309
- <span style="font-size: 8px; color: #10b981; margin-left: 4px; font-weight: 500;">live</span>
2310
2290
  </div>
2311
2291
  <div style="display: flex; align-items: center; gap: 4px;">
2312
2292
  <input type="number" :value="getNumericValue('baseGap')" @input="updateNumericValue('baseGap', $event.target.value)" step="0.5"
@@ -2323,7 +2303,6 @@ Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed
2323
2303
  <div>
2324
2304
  <span style="font-size: 11px; color: #374151;">max</span>
2325
2305
  <span style="font-size: 9px; color: #9ca3af; margin-left: 4px;">ceiling</span>
2326
- <span style="font-size: 8px; color: #10b981; margin-left: 4px; font-weight: 500;">live</span>
2327
2306
  </div>
2328
2307
  <div style="display: flex; align-items: center; gap: 4px;">
2329
2308
  <input type="number" :value="getNumericValue('maxGap')" @input="updateNumericValue('maxGap', $event.target.value)" step="1"
@@ -2337,8 +2316,8 @@ Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed
2337
2316
  </div>
2338
2317
  </div>
2339
2318
 
2340
- <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>
2341
- <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>
2342
2321
  <template x-for="key in Object.keys(gapScaleOptions)" :key="'ed_gs_'+key">
2343
2322
  <div :style="{
2344
2323
  display: 'flex',
@@ -2364,7 +2343,6 @@ Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed
2364
2343
  </div>
2365
2344
  </template>
2366
2345
 
2367
- <!-- Live formula preview -->
2368
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;">
2369
2347
  <div style="color: #6b7280; margin-bottom: 4px;">Generated CSS:</div>
2370
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.2
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.2",
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",