@astuteo/breakout-grid 5.1.0 → 5.1.1
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
|
+
const VERSION = `v${"5.1.1"} 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
|
+
const VERSION = `v${"5.1.1"}`;
|
|
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.`;
|
|
@@ -96,7 +96,7 @@ Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed
|
|
|
96
96
|
sectionCopied: null
|
|
97
97
|
};
|
|
98
98
|
}
|
|
99
|
-
const BUILD_VERSION = "5.1.
|
|
99
|
+
const BUILD_VERSION = "5.1.1";
|
|
100
100
|
function generateCSSExport(c, version = BUILD_VERSION) {
|
|
101
101
|
var _a, _b, _c, _d, _e;
|
|
102
102
|
const VERSION2 = version;
|
|
@@ -775,6 +775,14 @@ Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed
|
|
|
775
775
|
this.editMode = true;
|
|
776
776
|
this.$nextTick(() => this.loadCurrentValues());
|
|
777
777
|
}
|
|
778
|
+
const savedConfig = localStorage.getItem("breakoutGridConfig");
|
|
779
|
+
if (savedConfig) {
|
|
780
|
+
try {
|
|
781
|
+
const config = JSON.parse(savedConfig);
|
|
782
|
+
this.$nextTick(() => this.applyConfig(config));
|
|
783
|
+
} catch (e) {
|
|
784
|
+
}
|
|
785
|
+
}
|
|
778
786
|
const editorPos = localStorage.getItem("breakoutGridEditorPos");
|
|
779
787
|
if (editorPos) {
|
|
780
788
|
try {
|
|
@@ -1107,6 +1115,7 @@ Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed
|
|
|
1107
1115
|
this.editValues[`gapScale_${key}`] = num + this.getGapScaleUnit(key);
|
|
1108
1116
|
this.configCopied = false;
|
|
1109
1117
|
this.updateGapLive();
|
|
1118
|
+
this.saveConfigToStorage();
|
|
1110
1119
|
},
|
|
1111
1120
|
// Breakout helpers (use generic)
|
|
1112
1121
|
getBreakoutNumeric(key) {
|
|
@@ -1119,6 +1128,7 @@ Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed
|
|
|
1119
1128
|
this.editValues[`breakout_${key}`] = num + this.getBreakoutUnit(key);
|
|
1120
1129
|
this.configCopied = false;
|
|
1121
1130
|
this.updateBreakoutLive();
|
|
1131
|
+
this.saveConfigToStorage();
|
|
1122
1132
|
},
|
|
1123
1133
|
// Update --breakout-padding live
|
|
1124
1134
|
updateBreakoutLive() {
|
|
@@ -1127,10 +1137,70 @@ Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed
|
|
|
1127
1137
|
const max = this.editValues.popoutWidth || this.configOptions.popoutWidth.value;
|
|
1128
1138
|
document.documentElement.style.setProperty("--breakout-padding", `clamp(${min}, ${scale}, ${max})`);
|
|
1129
1139
|
},
|
|
1140
|
+
// Save current config to localStorage
|
|
1141
|
+
saveConfigToStorage() {
|
|
1142
|
+
const config = this.generateConfigExport();
|
|
1143
|
+
localStorage.setItem("breakoutGridConfig", JSON.stringify(config));
|
|
1144
|
+
},
|
|
1145
|
+
// Apply a config object (used by restore and localStorage load)
|
|
1146
|
+
applyConfig(config) {
|
|
1147
|
+
this.editMode = true;
|
|
1148
|
+
Object.keys(this.configOptions).forEach((key) => {
|
|
1149
|
+
if (config[key] !== void 0) {
|
|
1150
|
+
this.editValues[key] = config[key];
|
|
1151
|
+
const opt = this.configOptions[key];
|
|
1152
|
+
if (opt && opt.liveVar) {
|
|
1153
|
+
document.documentElement.style.setProperty(opt.liveVar, config[key]);
|
|
1154
|
+
}
|
|
1155
|
+
}
|
|
1156
|
+
});
|
|
1157
|
+
if (config.popoutWidth) {
|
|
1158
|
+
document.documentElement.style.setProperty("--popout", `minmax(0, ${config.popoutWidth})`);
|
|
1159
|
+
}
|
|
1160
|
+
if (config.featureMin || config.featureScale || config.featureMax) {
|
|
1161
|
+
const featureMin = config.featureMin || this.configOptions.featureMin.value;
|
|
1162
|
+
const featureScale = config.featureScale || this.configOptions.featureScale.value;
|
|
1163
|
+
const featureMax = config.featureMax || this.configOptions.featureMax.value;
|
|
1164
|
+
document.documentElement.style.setProperty("--feature", `minmax(0, clamp(${featureMin}, ${featureScale}, ${featureMax}))`);
|
|
1165
|
+
}
|
|
1166
|
+
if (config.gapScale) {
|
|
1167
|
+
Object.keys(this.gapScaleOptions).forEach((key) => {
|
|
1168
|
+
if (config.gapScale[key] !== void 0) {
|
|
1169
|
+
this.editValues[`gapScale_${key}`] = config.gapScale[key];
|
|
1170
|
+
}
|
|
1171
|
+
});
|
|
1172
|
+
this.updateGapLive();
|
|
1173
|
+
}
|
|
1174
|
+
if (config.breakoutMin !== void 0) {
|
|
1175
|
+
this.editValues.breakout_min = config.breakoutMin;
|
|
1176
|
+
}
|
|
1177
|
+
if (config.breakoutScale !== void 0) {
|
|
1178
|
+
this.editValues.breakout_scale = config.breakoutScale;
|
|
1179
|
+
}
|
|
1180
|
+
this.updateBreakoutLive();
|
|
1181
|
+
if (config.breakpoints) {
|
|
1182
|
+
if (config.breakpoints.lg !== void 0) {
|
|
1183
|
+
this.editValues.breakpoint_lg = config.breakpoints.lg;
|
|
1184
|
+
}
|
|
1185
|
+
if (config.breakpoints.xl !== void 0) {
|
|
1186
|
+
this.editValues.breakpoint_xl = config.breakpoints.xl;
|
|
1187
|
+
}
|
|
1188
|
+
}
|
|
1189
|
+
this.updateColumnWidths();
|
|
1190
|
+
},
|
|
1191
|
+
// Reset config to defaults and clear localStorage
|
|
1192
|
+
resetConfigToDefaults() {
|
|
1193
|
+
if (!confirm("Reset all config values to defaults?")) return;
|
|
1194
|
+
localStorage.removeItem("breakoutGridConfig");
|
|
1195
|
+
this.restoreCSSVariables();
|
|
1196
|
+
this.loadCurrentValues();
|
|
1197
|
+
this.configCopied = false;
|
|
1198
|
+
},
|
|
1130
1199
|
// Update a config value (and live CSS var if applicable)
|
|
1131
1200
|
updateConfigValue(key, value) {
|
|
1132
1201
|
this.editValues[key] = value;
|
|
1133
1202
|
this.configCopied = false;
|
|
1203
|
+
this.saveConfigToStorage();
|
|
1134
1204
|
const opt = this.configOptions[key];
|
|
1135
1205
|
if (opt && opt.liveVar) {
|
|
1136
1206
|
document.documentElement.style.setProperty(opt.liveVar, value);
|
|
@@ -2360,15 +2430,20 @@ Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed
|
|
|
2360
2430
|
</div>
|
|
2361
2431
|
|
|
2362
2432
|
<!-- Action Buttons -->
|
|
2363
|
-
<div style="padding: 10px 12px; background: #f7f7f7; display: flex; gap: 8px;">
|
|
2364
|
-
<
|
|
2365
|
-
<
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
Restore
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2433
|
+
<div style="padding: 10px 12px; background: #f7f7f7; display: flex; flex-direction: column; gap: 8px;">
|
|
2434
|
+
<div style="display: flex; gap: 8px;">
|
|
2435
|
+
<button @click="copyConfig()" :style="{ flex: 1, padding: '8px', fontSize: '11px', fontWeight: '500', border: '1px solid #e5e5e5', borderRadius: '4px', cursor: 'pointer', background: copySuccess ? '#10b981' : 'white', color: copySuccess ? 'white' : '#374151', transition: 'background 0.2s' }">
|
|
2436
|
+
<span x-text="copySuccess ? '✓ Copied' : 'Copy'"></span>
|
|
2437
|
+
</button>
|
|
2438
|
+
<button @click="openRestoreModal()" style="flex: 1; padding: 8px; font-size: 11px; font-weight: 500; border: 1px solid #e5e5e5; border-radius: 4px; cursor: pointer; background: white; color: #374151;" title="Restore from CSS variables">
|
|
2439
|
+
Restore
|
|
2440
|
+
</button>
|
|
2441
|
+
<button @click="resetConfigToDefaults()" style="flex: 1; padding: 8px; font-size: 11px; font-weight: 500; border: 1px solid #fca5a5; border-radius: 4px; cursor: pointer; background: #fef2f2; color: #dc2626;" title="Reset to defaults">
|
|
2442
|
+
Reset
|
|
2443
|
+
</button>
|
|
2444
|
+
</div>
|
|
2445
|
+
<button @click="downloadCSS()" style="width: 100%; padding: 10px 12px; font-size: 12px; font-weight: 600; border: none; border-radius: 4px; cursor: pointer; background: #1a1a2e; color: white;">
|
|
2446
|
+
Download CSS
|
|
2372
2447
|
</button>
|
|
2373
2448
|
</div>
|
|
2374
2449
|
</div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astuteo/breakout-grid",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "CSS Grid breakout layout system with visual configurator",
|
|
6
6
|
"main": "dist/_objects.breakout-grid.css",
|
|
@@ -57,9 +57,8 @@
|
|
|
57
57
|
"check-version": "node scripts/check-version.js",
|
|
58
58
|
"prepublishOnly": "npm run build && npm run check-files",
|
|
59
59
|
"check-files": "npm pack --dry-run",
|
|
60
|
-
"release": "npm run build && npm run check-
|
|
61
|
-
"release:
|
|
62
|
-
"release:
|
|
63
|
-
"release:major": "npm run release && npm version major && git push && git push --tags"
|
|
60
|
+
"release:patch": "npm version patch --no-git-tag-version && npm run build && npm run check-version && git add -A && git commit -m \"$(node -p 'require(`./package.json`).version')\" && git tag \"v$(node -p 'require(`./package.json`).version')\" && git push && git push --tags",
|
|
61
|
+
"release:minor": "npm version minor --no-git-tag-version && npm run build && npm run check-version && git add -A && git commit -m \"$(node -p 'require(`./package.json`).version')\" && git tag \"v$(node -p 'require(`./package.json`).version')\" && git push && git push --tags",
|
|
62
|
+
"release:major": "npm version major --no-git-tag-version && npm run build && npm run check-version && git add -A && git commit -m \"$(node -p 'require(`./package.json`).version')\" && git tag \"v$(node -p 'require(`./package.json`).version')\" && git push && git push --tags"
|
|
64
63
|
}
|
|
65
64
|
}
|