@maizzle/framework 6.1.6 → 6.2.0

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.
Files changed (56) hide show
  1. package/dist/components/Img.vue +10 -4
  2. package/dist/components/Section.vue +1 -1
  3. package/dist/composables/definePreviewProps.d.ts +21 -0
  4. package/dist/composables/definePreviewProps.d.ts.map +1 -0
  5. package/dist/composables/definePreviewProps.js +23 -0
  6. package/dist/composables/definePreviewProps.js.map +1 -0
  7. package/dist/index.d.ts +3 -2
  8. package/dist/index.js +3 -2
  9. package/dist/plugins/postcss/resolveMaizzleImports.js +15 -8
  10. package/dist/plugins/postcss/resolveMaizzleImports.js.map +1 -1
  11. package/dist/render/createRenderer.d.ts.map +1 -1
  12. package/dist/render/createRenderer.js +25 -4
  13. package/dist/render/createRenderer.js.map +1 -1
  14. package/dist/render/index.d.ts +21 -0
  15. package/dist/render/index.d.ts.map +1 -1
  16. package/dist/render/index.js +76 -30
  17. package/dist/render/index.js.map +1 -1
  18. package/dist/render/plugins/previewProps.d.ts +13 -0
  19. package/dist/render/plugins/previewProps.d.ts.map +1 -0
  20. package/dist/render/plugins/previewProps.js +185 -0
  21. package/dist/render/plugins/previewProps.js.map +1 -0
  22. package/dist/render/withPreviewProps.d.ts +15 -0
  23. package/dist/render/withPreviewProps.d.ts.map +1 -0
  24. package/dist/render/withPreviewProps.js +40 -0
  25. package/dist/render/withPreviewProps.js.map +1 -0
  26. package/dist/serve.d.ts.map +1 -1
  27. package/dist/serve.js +4 -1
  28. package/dist/serve.js.map +1 -1
  29. package/dist/server/ui/.vite/deps/@lucide_vue.js +51812 -41607
  30. package/dist/server/ui/.vite/deps/@lucide_vue.js.map +1 -1
  31. package/dist/server/ui/.vite/deps/@vueuse_core.js.map +1 -1
  32. package/dist/server/ui/.vite/deps/@vueuse_shared.js.map +1 -1
  33. package/dist/server/ui/.vite/deps/_metadata.json +13 -13
  34. package/dist/server/ui/.vite/deps/class-variance-authority.js.map +1 -1
  35. package/dist/server/ui/.vite/deps/clsx.js.map +1 -1
  36. package/dist/server/ui/.vite/deps/culori.js.map +1 -1
  37. package/dist/server/ui/.vite/deps/reka-ui.js +240 -73
  38. package/dist/server/ui/.vite/deps/reka-ui.js.map +1 -1
  39. package/dist/server/ui/.vite/deps/tailwind-merge.js +102 -22
  40. package/dist/server/ui/.vite/deps/tailwind-merge.js.map +1 -1
  41. package/dist/server/ui/.vite/deps/vue-router.js +84 -53
  42. package/dist/server/ui/.vite/deps/vue-router.js.map +1 -1
  43. package/dist/server/ui/.vite/deps/vue.runtime.esm-bundler-Dq07uCLt.js.map +1 -1
  44. package/dist/transformers/format.d.ts.map +1 -1
  45. package/dist/transformers/minify.d.ts.map +1 -1
  46. package/dist/transformers/purgeCss.d.ts.map +1 -1
  47. package/dist/transformers/shorthandCss.js +11 -5
  48. package/dist/transformers/shorthandCss.js.map +1 -1
  49. package/dist/transformers/tailwindComponent.js +1 -1
  50. package/dist/transformers/tailwindComponent.js.map +1 -1
  51. package/dist/transformers/tailwindcss.js +8 -4
  52. package/dist/transformers/tailwindcss.js.map +1 -1
  53. package/dist/types/config.d.ts.map +1 -1
  54. package/dist/utils/compileTailwindCss.js +1 -1
  55. package/dist/utils/compileTailwindCss.js.map +1 -1
  56. package/package.json +3 -3
@@ -134,13 +134,21 @@ function defineDiagnostics(options) {
134
134
  return result;
135
135
  }
136
136
  //#endregion
137
- //#region ../../home/cosmin/Work/maizzle/framework/node_modules/vue-router/dist/useApi-CROJJdhE.js
137
+ //#region ../../home/cosmin/Work/maizzle/framework/node_modules/vue-router/dist/useApi-BPuI6ZR9.js
138
138
  /*!
139
- * vue-router v5.2.0
139
+ * vue-router v5.3.1
140
140
  * (c) 2026 Eduardo San Martin Morote
141
141
  * @license MIT
142
142
  */
143
143
  /**
144
+ * Checks if a path is absolute, meaning it starts with a `/`.
145
+ *
146
+ * @param path - path to check
147
+ *
148
+ * @internal
149
+ */
150
+ var isAbsolutePath = (path) => path.startsWith("/");
151
+ /**
144
152
  * Allows differentiating lazy components from functional components and vue-class-component
145
153
  * @internal
146
154
  *
@@ -4283,9 +4291,9 @@ target.__VUE_DEVTOOLS_KIT_VITE_RPC_CLIENT__ ??= null;
4283
4291
  target.__VUE_DEVTOOLS_KIT_VITE_RPC_SERVER__ ??= null;
4284
4292
  target.__VUE_DEVTOOLS_KIT_BROADCAST_RPC_SERVER__ ??= null;
4285
4293
  //#endregion
4286
- //#region ../../home/cosmin/Work/maizzle/framework/node_modules/vue-router/dist/devtools-Bpr7ZAVB.js
4294
+ //#region ../../home/cosmin/Work/maizzle/framework/node_modules/vue-router/dist/devtools-CN5uWJaH.js
4287
4295
  /*!
4288
- * vue-router v5.2.0
4296
+ * vue-router v5.3.1
4289
4297
  * (c) 2026 Eduardo San Martin Morote
4290
4298
  * @license MIT
4291
4299
  */
@@ -4505,8 +4513,8 @@ function isEquivalentArray(a, b) {
4505
4513
  * @param from - currentLocation.path, should start with `/`
4506
4514
  */
4507
4515
  function resolveRelativePath(to, from) {
4508
- if (to.startsWith("/")) return to;
4509
- if (!from.startsWith("/")) {
4516
+ if (isAbsolutePath(to)) return to;
4517
+ if (!isAbsolutePath(from)) {
4510
4518
  diagnostics.VUE_ROUTER_R0070({
4511
4519
  to,
4512
4520
  from
@@ -4563,11 +4571,13 @@ var START_LOCATION_NORMALIZED = {
4563
4571
  * @param base - base to normalize
4564
4572
  */
4565
4573
  function normalizeBase(base) {
4566
- if (!base) if (isBrowser) {
4567
- const baseEl = document.querySelector("base");
4568
- base = baseEl && baseEl.getAttribute("href") || "/";
4569
- base = base.replace(/^\w+:\/\/[^/]+/, "");
4570
- } else base = "/";
4574
+ if (!base) {
4575
+ if (isBrowser) {
4576
+ const baseEl = document.querySelector("base");
4577
+ base = baseEl && baseEl.getAttribute("href") || "/";
4578
+ base = base.replace(/^\w+:\/\/[^/]+/, "");
4579
+ } else base = "/";
4580
+ }
4571
4581
  if (base[0] !== "/" && base[0] !== "#") base = "/" + base;
4572
4582
  return removeTrailingSlash(base);
4573
4583
  }
@@ -4584,10 +4594,10 @@ function getElementPosition(el, offset) {
4584
4594
  top: elRect.top - docRect.top - (offset.top || 0)
4585
4595
  };
4586
4596
  }
4587
- var computeScrollPosition = () => ({
4597
+ var computeScrollPosition = () => history.scrollRestoration === "manual" ? {
4588
4598
  left: window.scrollX,
4589
4599
  top: window.scrollY
4590
- });
4600
+ } : null;
4591
4601
  function scrollToPosition(position) {
4592
4602
  let scrollToOptions;
4593
4603
  if ("el" in position) {
@@ -4640,8 +4650,8 @@ function getScrollKey(path, delta) {
4640
4650
  return (history.state ? history.state.position - delta : -1) + path;
4641
4651
  }
4642
4652
  var scrollPositions = /* @__PURE__ */ new Map();
4643
- function saveScrollPosition(key, scrollPosition) {
4644
- scrollPositions.set(key, scrollPosition);
4653
+ function saveScrollPosition(key) {
4654
+ scrollPositions.set(key, computeScrollPosition());
4645
4655
  }
4646
4656
  function getSavedScrollPosition(key) {
4647
4657
  const scroll = scrollPositions.get(key);
@@ -4955,8 +4965,10 @@ function extractChangingRecords(to, from) {
4955
4965
  const len = Math.max(from.matched.length, to.matched.length);
4956
4966
  for (let i = 0; i < len; i++) {
4957
4967
  const recordFrom = from.matched[i];
4958
- if (recordFrom) if (to.matched.find((record) => isSameRouteRecord(record, recordFrom))) updatingRecords.push(recordFrom);
4959
- else leavingRecords.push(recordFrom);
4968
+ if (recordFrom) {
4969
+ if (to.matched.find((record) => isSameRouteRecord(record, recordFrom))) updatingRecords.push(recordFrom);
4970
+ else leavingRecords.push(recordFrom);
4971
+ }
4960
4972
  const recordTo = to.matched[i];
4961
4973
  if (recordTo) {
4962
4974
  if (!from.matched.find((record) => isSameRouteRecord(record, recordTo))) enteringRecords.push(recordTo);
@@ -5300,7 +5312,7 @@ function isRouteMatching(route, filter) {
5300
5312
  }
5301
5313
  const path = route.record.path.toLowerCase();
5302
5314
  const decodedPath = decode(path);
5303
- if (!filter.startsWith("/") && (decodedPath.includes(filter) || path.includes(filter))) return true;
5315
+ if (!isAbsolutePath(filter) && (decodedPath.includes(filter) || path.includes(filter))) return true;
5304
5316
  if (decodedPath.startsWith(filter) || path.startsWith(filter)) return true;
5305
5317
  if (route.record.name && String(route.record.name).includes(filter)) return true;
5306
5318
  return route.children.some((child) => isRouteMatching(child, filter));
@@ -5313,7 +5325,7 @@ function omit(obj, keys) {
5313
5325
  //#endregion
5314
5326
  //#region ../../home/cosmin/Work/maizzle/framework/node_modules/vue-router/dist/vue-router.js
5315
5327
  /*!
5316
- * vue-router v5.2.0
5328
+ * vue-router v5.3.1
5317
5329
  * (c) 2026 Eduardo San Martin Morote
5318
5330
  * @license MIT
5319
5331
  */
@@ -5373,22 +5385,18 @@ function useHistoryListeners(base, historyState, currentLocation, replace) {
5373
5385
  return teardown;
5374
5386
  }
5375
5387
  function beforeUnloadListener() {
5376
- if (document.visibilityState === "hidden") {
5377
- const { history } = window;
5378
- if (!history.state) return;
5379
- history.replaceState(assign({}, history.state, { scroll: computeScrollPosition() }), "");
5380
- }
5388
+ const { history } = window;
5389
+ if (!history.state) return;
5390
+ history.replaceState(assign({}, history.state, { scroll: computeScrollPosition() }), "");
5381
5391
  }
5382
5392
  function destroy() {
5383
5393
  for (const teardown of teardowns) teardown();
5384
5394
  teardowns = [];
5385
5395
  window.removeEventListener("popstate", popStateHandler);
5386
5396
  window.removeEventListener("pagehide", beforeUnloadListener);
5387
- document.removeEventListener("visibilitychange", beforeUnloadListener);
5388
5397
  }
5389
5398
  window.addEventListener("popstate", popStateHandler);
5390
5399
  window.addEventListener("pagehide", beforeUnloadListener);
5391
- document.addEventListener("visibilitychange", beforeUnloadListener);
5392
5400
  return {
5393
5401
  pauseListeners,
5394
5402
  listen,
@@ -5398,14 +5406,14 @@ function useHistoryListeners(base, historyState, currentLocation, replace) {
5398
5406
  /**
5399
5407
  * Creates a state object
5400
5408
  */
5401
- function buildState(back, current, forward, replaced = false, computeScroll = false) {
5409
+ function buildState(back, current, forward, replaced = false) {
5402
5410
  return {
5403
5411
  back,
5404
5412
  current,
5405
5413
  forward,
5406
5414
  replaced,
5407
5415
  position: window.history.length,
5408
- scroll: computeScroll ? computeScrollPosition() : null
5416
+ scroll: null
5409
5417
  };
5410
5418
  }
5411
5419
  function useHistoryStateNavigation(base) {
@@ -5600,7 +5608,7 @@ var VALID_PARAM_RE = /[a-zA-Z0-9_]/;
5600
5608
  function tokenizePath(path) {
5601
5609
  if (!path) return [[]];
5602
5610
  if (path === "/") return [[ROOT_TOKEN]];
5603
- if (!path.startsWith("/")) throw new Error(`Route paths should start with a "/": "${path}" should be "/${path}".`);
5611
+ if (!isAbsolutePath(path)) throw new Error(`Route paths should start with a "/": "${path}" should be "/${path}".`);
5604
5612
  function crash(message) {
5605
5613
  throw new Error(`ERR (${state})/"${buffer}": ${message}`);
5606
5614
  }
@@ -5666,9 +5674,10 @@ function tokenizePath(path) {
5666
5674
  }
5667
5675
  break;
5668
5676
  case 2:
5669
- if (char === ")") if (customRe[customRe.length - 1] == "\\") customRe = customRe.slice(0, -1) + char;
5670
- else state = 3;
5671
- else customRe += char;
5677
+ if (char === ")") {
5678
+ if (customRe[customRe.length - 1] == "\\") customRe = customRe.slice(0, -1) + char;
5679
+ else state = 3;
5680
+ } else customRe += char;
5672
5681
  break;
5673
5682
  case 3:
5674
5683
  consumeBuffer();
@@ -5774,10 +5783,14 @@ function tokensToParser(segments, extraOptions) {
5774
5783
  const param = value in params ? params[value] : "";
5775
5784
  if (isArray(param) && !repeatable) throw new Error(`Provided param "${value}" is an array but it is not repeatable (* or + modifiers)`);
5776
5785
  const text = isArray(param) ? param.join("/") : param;
5777
- if (!text) if (optional) {
5778
- if (segment.length < 2) if (path.endsWith("/")) path = path.slice(0, -1);
5779
- else avoidDuplicatedSlash = true;
5780
- } else throw new Error(`Missing required param "${value}"`);
5786
+ if (!text) {
5787
+ if (optional) {
5788
+ if (segment.length < 2) {
5789
+ if (path.endsWith("/")) path = path.slice(0, -1);
5790
+ else avoidDuplicatedSlash = true;
5791
+ }
5792
+ } else throw new Error(`Missing required param "${value}"`);
5793
+ }
5781
5794
  path += text;
5782
5795
  }
5783
5796
  }
@@ -5904,14 +5917,14 @@ function createRouterMatcher(routes, globalOptions) {
5904
5917
  let originalMatcher;
5905
5918
  for (const normalizedRecord of normalizedRecords) {
5906
5919
  const { path } = normalizedRecord;
5907
- if (parent && path[0] !== "/") {
5920
+ if (parent && !isAbsolutePath(path)) {
5908
5921
  const parentPath = parent.record.path;
5909
5922
  const connectingSlash = parentPath[parentPath.length - 1] === "/" ? "" : "/";
5910
5923
  normalizedRecord.path = parent.record.path + (path && connectingSlash + path);
5911
5924
  }
5912
5925
  if (normalizedRecord.path === "*") throw new Error("Catch all routes (\"*\") must now be defined using a param with a custom regexp.\nSee more at https://router.vuejs.org/guide/migration/#Removed-star-or-catch-all-routes.");
5913
5926
  matcher = createRouteRecordMatcher(normalizedRecord, parent, options);
5914
- if (parent && path[0] === "/") checkMissingParamsInAbsolutePath(matcher, parent);
5927
+ if (parent && isAbsolutePath(path)) checkMissingParamsInAbsolutePath(matcher, parent);
5915
5928
  if (originalRecord) {
5916
5929
  originalRecord.alias.push(matcher);
5917
5930
  checkSameParams(originalRecord, matcher);
@@ -5984,7 +5997,7 @@ function createRouterMatcher(routes, globalOptions) {
5984
5997
  path = matcher.stringify(params);
5985
5998
  } else if (location.path != null) {
5986
5999
  path = location.path;
5987
- if (!path.startsWith("/")) diagnostics.VUE_ROUTER_R0101({ path });
6000
+ if (!isAbsolutePath(path)) diagnostics.VUE_ROUTER_R0101({ path });
5988
6001
  matcher = matchers.find((m) => m.re.test(path));
5989
6002
  if (matcher) {
5990
6003
  params = matcher.parse(path);
@@ -6316,9 +6329,9 @@ function includesParams(outer, inner) {
6316
6329
  for (const key in inner) {
6317
6330
  const innerValue = inner[key];
6318
6331
  const outerValue = outer[key];
6319
- if (typeof innerValue === "string") {
6320
- if (innerValue !== outerValue) return false;
6321
- } else if (!isArray(outerValue) || outerValue.length !== innerValue.length || innerValue.some((value, i) => value.valueOf() !== outerValue[i].valueOf())) return false;
6332
+ if (isArray(innerValue)) {
6333
+ if (!isArray(outerValue) || outerValue.length !== innerValue.length || innerValue.some((value, i) => value.valueOf() !== outerValue[i].valueOf())) return false;
6334
+ } else if (innerValue !== outerValue) return false;
6322
6335
  }
6323
6336
  return true;
6324
6337
  }
@@ -6404,7 +6417,7 @@ var RouterViewImpl = /*#__PURE__*/ defineComponent({
6404
6417
  meta: matchedRoute.meta
6405
6418
  };
6406
6419
  (isArray(component.ref) ? component.ref.map((r) => r.i) : [component.ref.i]).forEach((instance) => {
6407
- instance.__vrv_devtools = info;
6420
+ if (instance) instance.__vrv_devtools = info;
6408
6421
  });
6409
6422
  }
6410
6423
  return normalizeSlot(slots.default, {
@@ -6447,6 +6460,7 @@ function createRouter(options) {
6447
6460
  const beforeResolveGuards = useCallbacks();
6448
6461
  const afterGuards = useCallbacks();
6449
6462
  const currentRoute = shallowRef(START_LOCATION_NORMALIZED);
6463
+ const routesVersion = shallowRef(0);
6450
6464
  let pendingLocation = START_LOCATION_NORMALIZED;
6451
6465
  if (isBrowser && options.scrollBehavior && "scrollRestoration" in history) history.scrollRestoration = "manual";
6452
6466
  const normalizeParams = applyToParams.bind(null, (paramValue) => "" + paramValue);
@@ -6460,12 +6474,23 @@ function createRouter(options) {
6460
6474
  if (!parent) diagnostics.VUE_ROUTER_R0001({ name: String(parentOrRoute) });
6461
6475
  record = route;
6462
6476
  } else record = parentOrRoute;
6463
- return matcher.addRoute(record, parent);
6477
+ const removeRoute = matcher.addRoute(record, parent);
6478
+ routesVersion.value++;
6479
+ return () => {
6480
+ removeRoute();
6481
+ routesVersion.value++;
6482
+ };
6464
6483
  }
6465
6484
  function removeRoute(name) {
6466
6485
  const recordMatcher = matcher.getRecordMatcher(name);
6467
- if (recordMatcher) matcher.removeRoute(recordMatcher);
6468
- else diagnostics.VUE_ROUTER_R0002({ name: String(name) });
6486
+ if (recordMatcher) {
6487
+ matcher.removeRoute(recordMatcher);
6488
+ routesVersion.value++;
6489
+ } else diagnostics.VUE_ROUTER_R0002({ name: String(name) });
6490
+ }
6491
+ function clearRoutes() {
6492
+ matcher.clearRoutes();
6493
+ routesVersion.value++;
6469
6494
  }
6470
6495
  function getRoutes() {
6471
6496
  return matcher.getRoutes().map((routeMatcher) => routeMatcher.record);
@@ -6474,8 +6499,9 @@ function createRouter(options) {
6474
6499
  return !!matcher.getRecordMatcher(name);
6475
6500
  }
6476
6501
  function resolve(rawLocation, currentLocation) {
6477
- currentLocation = assign({}, currentLocation || currentRoute.value);
6502
+ routesVersion.value;
6478
6503
  if (typeof rawLocation === "string") {
6504
+ currentLocation = currentLocation || (rawLocation.startsWith("/") ? START_LOCATION_NORMALIZED : currentRoute.value);
6479
6505
  const locationNormalized = parseURL(parseQuery$1, rawLocation, currentLocation.path);
6480
6506
  const matchedRoute = matcher.resolve({ path: locationNormalized.path }, currentLocation);
6481
6507
  const href = routerHistory.createHref(locationNormalized.fullPath);
@@ -6494,6 +6520,7 @@ function createRouter(options) {
6494
6520
  diagnostics.VUE_ROUTER_R0005({ rawLocation });
6495
6521
  return resolve({});
6496
6522
  }
6523
+ currentLocation = assign({}, currentLocation || (rawLocation.path != null && rawLocation.path.startsWith("/") && !("name" in rawLocation && rawLocation.name) ? START_LOCATION_NORMALIZED : currentRoute.value));
6497
6524
  let matcherLocation;
6498
6525
  if (rawLocation.path != null) {
6499
6526
  if ("params" in rawLocation && !("name" in rawLocation) && Object.keys(rawLocation.params).length) diagnostics.VUE_ROUTER_R0006({ path: rawLocation.path });
@@ -6643,8 +6670,10 @@ function createRouter(options) {
6643
6670
  return runGuardQueue(guards);
6644
6671
  }).then(() => {
6645
6672
  guards = [];
6646
- for (const record of enteringRecords) if (record.beforeEnter) if (isArray(record.beforeEnter)) for (const beforeEnter of record.beforeEnter) guards.push(guardToPromiseFn(beforeEnter, to, from));
6647
- else guards.push(guardToPromiseFn(record.beforeEnter, to, from));
6673
+ for (const record of enteringRecords) if (record.beforeEnter) {
6674
+ if (isArray(record.beforeEnter)) for (const beforeEnter of record.beforeEnter) guards.push(guardToPromiseFn(beforeEnter, to, from));
6675
+ else guards.push(guardToPromiseFn(record.beforeEnter, to, from));
6676
+ }
6648
6677
  guards.push(canceledNavigationCheck);
6649
6678
  return runGuardQueue(guards);
6650
6679
  }).then(() => {
@@ -6672,8 +6701,10 @@ function createRouter(options) {
6672
6701
  if (error) return error;
6673
6702
  const isFirstNavigation = from === START_LOCATION_NORMALIZED;
6674
6703
  const state = !isBrowser ? {} : history.state;
6675
- if (isPush) if (replace || isFirstNavigation) routerHistory.replace(toLocation.fullPath, assign({ scroll: isFirstNavigation && state && state.scroll }, data));
6676
- else routerHistory.push(toLocation.fullPath, data);
6704
+ if (isPush) {
6705
+ if (replace || isFirstNavigation) routerHistory.replace(toLocation.fullPath, assign({ scroll: isFirstNavigation && state && state.scroll }, data));
6706
+ else routerHistory.push(toLocation.fullPath, data);
6707
+ }
6677
6708
  currentRoute.value = toLocation;
6678
6709
  handleScroll(toLocation, from, isPush, isFirstNavigation);
6679
6710
  markAsReady();
@@ -6694,7 +6725,7 @@ function createRouter(options) {
6694
6725
  }
6695
6726
  pendingLocation = toLocation;
6696
6727
  const from = currentRoute.value;
6697
- if (isBrowser) saveScrollPosition(getScrollKey(from.fullPath, info.delta), computeScrollPosition());
6728
+ if (isBrowser && info.delta) saveScrollPosition(getScrollKey(from.fullPath, info.delta));
6698
6729
  navigate(toLocation, from).catch((error) => {
6699
6730
  if (isNavigationFailure(error, 12)) return error;
6700
6731
  if (isNavigationFailure(error, 2)) {
@@ -6765,7 +6796,7 @@ function createRouter(options) {
6765
6796
  listening: true,
6766
6797
  addRoute,
6767
6798
  removeRoute,
6768
- clearRoutes: matcher.clearRoutes,
6799
+ clearRoutes,
6769
6800
  hasRoute,
6770
6801
  getRoutes,
6771
6802
  resolve,