mnfst 0.5.25 → 0.5.27

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/README.md CHANGED
@@ -14,7 +14,7 @@ Manifest is a frontend framework extending HTML for rapid, feature-rich website
14
14
 
15
15
  ## 💾 Setup
16
16
 
17
- Get [CDN links](https://manifestjs.dev/getting-started/setup) for existing projects or try the [starter project](https://manifestjs.dev/getting-started/starter-project) for new ones.
17
+ Get [CDN links](https://manifestjs.org/getting-started/setup) for existing projects or try the [starter project](https://manifestjs.org/getting-started/starter-project) for new ones.
18
18
 
19
19
  <br>
20
20
 
@@ -38,7 +38,7 @@ Get [CDN links](https://manifestjs.dev/getting-started/setup) for existing proje
38
38
 
39
39
  ## 📚 Documentation
40
40
 
41
- For full documentation visit [manifestjs.dev](https://manifestjs.dev).
41
+ For full documentation visit [manifestjs.org](https://manifestjs.org).
42
42
 
43
43
  <br>
44
44
 
@@ -1,6 +1,6 @@
1
1
  /* Manifest Code CSS
2
2
  /* By Andrew Matlock under MIT license
3
- /* https://manifestjs.dev/styles/code
3
+ /* https://manifestjs.org/styles/code
4
4
  */
5
5
 
6
6
  @import url('https://fonts.googleapis.com/css2?family=Gabarito:wght@400..900&family=IBM+Plex+Mono:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;1,100;1,200;1,300;1,400;1,500;1,600;1,700&family=Lexend+Exa&display=swap');
package/dist/manifest.css CHANGED
@@ -1,6 +1,6 @@
1
1
  /* Manifest CSS
2
2
  /* By Andrew Matlock under MIT license
3
- /* https://manifestjs.dev
3
+ /* https://manifestjs.org
4
4
  /* Modify referenced variables in manifest.theme.css
5
5
  */
6
6
 
@@ -1300,15 +1300,23 @@ function deepMergeWithFallback(currentData, fallbackData) {
1300
1300
  return fallbackData;
1301
1301
  }
1302
1302
 
1303
- // Set nested value in object using dot notation path
1303
+ // Set nested value in object using dot notation path.
1304
+ // Numeric path segments (e.g. cards.0.title) create real arrays so x-for="card in $x....cards" works.
1304
1305
  function setNestedValue(obj, path, value) {
1305
1306
  const keys = path.split('.');
1306
1307
  let current = obj;
1307
1308
 
1308
1309
  for (let i = 0; i < keys.length - 1; i++) {
1309
1310
  const key = keys[i];
1311
+ const nextKey = keys[i + 1];
1310
1312
  if (!(key in current)) {
1311
- current[key] = {};
1313
+ current[key] = /^\d+$/.test(nextKey) ? [] : {};
1314
+ }
1315
+ if (Array.isArray(current) && /^\d+$/.test(key)) {
1316
+ const idx = parseInt(key, 10);
1317
+ if (current[idx] == null || typeof current[idx] !== 'object') {
1318
+ current[idx] = {};
1319
+ }
1312
1320
  }
1313
1321
  current = current[key];
1314
1322
  }
@@ -2330,9 +2338,8 @@ function getLoadingBranch() {
2330
2338
  }
2331
2339
 
2332
2340
  // Create a simple fallback object that returns empty strings for all properties.
2333
- // When propForPlaceholder === 'content', nested data keys use getLoadingBranchSafe() (primitives only)
2334
- // so Alpine never gets a chainable proxy and $x.content.theme.light doesn't stack overflow.
2335
- // For other props (json, yaml, etc.) use getLoadingBranch() (chainable) so $route and deep paths work.
2341
+ // Nested data keys use getLoadingBranch() (chainable) so $route, $search, $query and deep paths
2342
+ // don't throw while loading (e.g. $x.content.legal.$route('path')).
2336
2343
  function createSimpleFallback(propForPlaceholder) {
2337
2344
  const fallback = Object.create(null);
2338
2345
 
@@ -2488,11 +2495,11 @@ function createSimpleFallback(propForPlaceholder) {
2488
2495
  }
2489
2496
  }
2490
2497
 
2491
- // For string keys that look like data: use safe placeholder for 'content' (primitives only,
2492
- // no re-entry/stack overflow); use chainable placeholder for other props ($route, deep paths).
2498
+ // For string keys that look like data: use chainable placeholder so nested arrays (e.g. content.legal)
2499
+ // have $route/$search/$query and expressions like $x.content.legal.$route('path') don't throw while loading.
2493
2500
  if (typeof key === 'string' && key.length > 0 && key.length < 64 &&
2494
2501
  !key.startsWith('$') && key !== 'length') {
2495
- return propForPlaceholder === 'content' ? getLoadingBranchSafe() : getLoadingBranch();
2502
+ return getLoadingBranch();
2496
2503
  }
2497
2504
 
2498
2505
  // For any other key, return chaining fallback — never return the loading proxy itself.
package/dist/manifest.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /* Manifest JS
2
2
  /* By Andrew Matlock under MIT license
3
- /* https://manifestjs.dev
3
+ /* https://manifestjs.org
4
4
  /*
5
5
  /* Lightweight loader that dynamically loads Alpine.js and Manifest plugins
6
6
  /* from jsDelivr CDN. Loads all plugins by default, or a subset if specified.
@@ -324,7 +324,7 @@
324
324
  });
325
325
  });
326
326
  if (config.tailwind) {
327
- pluginPromises.push(loadTailwind(config.version).catch(() => {}));
327
+ pluginPromises.push(loadTailwind(config.version).catch(() => { }));
328
328
  }
329
329
  await Promise.all(pluginPromises);
330
330
  if (manifestPromise) {
@@ -1,6 +1,6 @@
1
1
  /* Manifest Theme CSS
2
2
  /* By Andrew Matlock under MIT license
3
- /* https://manifestjs.dev/styles/theme
3
+ /* https://manifestjs.org/styles/theme
4
4
  /* Modify values to customize your project theme
5
5
  */
6
6
 
@@ -18,6 +18,9 @@ function createUtilityGenerators() {
18
18
  addUtility('decoration', 'text-decoration-color', value);
19
19
  addUtility('accent', 'accent-color', value);
20
20
  addUtility('caret', 'caret-color', value);
21
+ utilities.push([`from-${suffix}`, `--tw-gradient-from: ${value}; --tw-gradient-stops: var(--tw-gradient-via-stops)`]);
22
+ utilities.push([`via-${suffix}`, `--tw-gradient-via: ${value}; --tw-gradient-stops: var(--tw-gradient-via-stops)`]);
23
+ utilities.push([`to-${suffix}`, `--tw-gradient-to: ${value}; --tw-gradient-stops: var(--tw-gradient-via-stops)`]);
21
24
  return utilities;
22
25
  },
23
26
  'font-': (suffix, value) => [
@@ -2167,6 +2170,21 @@ TailwindCompiler.prototype.parseClassName = function (className) {
2167
2170
  }
2168
2171
  }
2169
2172
 
2173
+ // Handle arbitrary nth variants: nth-[4n+1], nth-[2n], nth-last-[n+3], nth-of-type-[odd], etc.
2174
+ const nthArbitraryMatch = variant.match(/^(nth|nth-last|nth-of-type|nth-last-of-type)-\[(.+)\]$/);
2175
+ if (nthArbitraryMatch) {
2176
+ const baseVariant = nthArbitraryMatch[1];
2177
+ const param = nthArbitraryMatch[2];
2178
+ const baseSelector = this.variants[baseVariant];
2179
+ if (baseSelector) {
2180
+ return {
2181
+ name: variant,
2182
+ selector: `${baseSelector}(${param})`,
2183
+ isArbitrary: false
2184
+ };
2185
+ }
2186
+ }
2187
+
2170
2188
  // Handle parameterized has/not variants: has-[>p], not-\[hidden\]
2171
2189
  const hasMatch = variant.match(/^has-\[(.+)\]$/);
2172
2190
  if (hasMatch) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mnfst",
3
- "version": "0.5.25",
3
+ "version": "0.5.27",
4
4
  "private": false,
5
5
  "workspaces": [
6
6
  "templates/starter"
@@ -19,7 +19,7 @@
19
19
  "start:src": "cd src && browser-sync start --config bs-config.js",
20
20
  "start:docs": "cd docs && browser-sync start --config bs-config.js",
21
21
  "start:starter": "cd templates/starter && browser-sync start --config bs-config.js --port 3001",
22
- "publish:starter": "cd packages/create-starter && npm publish",
22
+ "publish:starter": "cd packages/create-starter && npm publish --auth-type=web",
23
23
  "prepublishOnly": "npm run build",
24
24
  "test": "echo 'No tests configured'",
25
25
  "lint": "echo 'No linting configured'"
@@ -48,7 +48,7 @@
48
48
  "author": "Andrew Matlock",
49
49
  "license": "MIT",
50
50
  "description": "A modern, lightweight frontend framework with built-in components and utilities",
51
- "homepage": "https://manifestjs.dev",
51
+ "homepage": "https://manifestjs.org",
52
52
  "repository": {
53
53
  "type": "git",
54
54
  "url": "https://github.com/andrewmatlock/manifest.git"