fimo 0.9.0-experimental.1 → 0.9.0-experimental.2
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.
|
@@ -4,9 +4,10 @@ const DEFAULT_COUNT = 3;
|
|
|
4
4
|
const EXAMPLE_BLOCK_VARIANTS = 5;
|
|
5
5
|
/** Items seeded for a repeatable fixed-shape block. */
|
|
6
6
|
const EXAMPLE_REPEATABLE_ITEMS = 2;
|
|
7
|
-
/** Recursion cap for nested blocks — the schema
|
|
8
|
-
*
|
|
9
|
-
|
|
7
|
+
/** Recursion cap for nested blocks — fill to the schema's real nesting so deep
|
|
8
|
+
* page-builders render, matching the blocks-depth limit (7) in api-contracts.
|
|
9
|
+
* The schema is already depth-bounded, so generation stays finite. */
|
|
10
|
+
const MAX_FILL_DEPTH = 6;
|
|
10
11
|
function kebabCase(name) {
|
|
11
12
|
return name
|
|
12
13
|
.replace(/([a-z0-9])([A-Z])/g, '$1-$2')
|
|
@@ -19,7 +19,9 @@ import { join } from 'node:path';
|
|
|
19
19
|
const MAX_BLOCK_VARIANTS = 40;
|
|
20
20
|
// Bound recursion into nested components; beyond this a nested component falls
|
|
21
21
|
// back to `json` (still round-trips, just not granularly editable that deep).
|
|
22
|
-
|
|
22
|
+
// Kept one below MAX_STRUCTURED_CONTENT_DEPTH (7) in @fimo/api-contracts so the
|
|
23
|
+
// deepest blocks we emit still pass the server's structured-content-depth gate.
|
|
24
|
+
const MAX_COMPONENT_DEPTH = 6;
|
|
23
25
|
// Field-name + type-name contracts from @fimo/api-contracts (content-fields.ts).
|
|
24
26
|
const FIELD_NAME_PATTERN = /^[A-Za-z_]\w*$/;
|
|
25
27
|
const RESERVED_BLOCK_FIELD_NAMES = new Set(['_key', '_type']);
|
package/package.json
CHANGED