@10up/block-renderer-core 0.1.6 → 0.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.
package/dist/index.d.ts CHANGED
@@ -6,4 +6,27 @@ export type { BlockTemplate, BlockTemplateEntry, BlockTemplateEntrySchema, Block
6
6
  export { blockTemplateEntrySchema, blockTemplateSchema, } from './types/block-template.js';
7
7
  export type { PhpPatternOptions, PhpPatternOptionsSchema, } from './types/php-transforms.js';
8
8
  export { phpPatternOptionsSchema } from './types/php-transforms.js';
9
+ /**
10
+ * Pseudo-block type for fragments.
11
+ *
12
+ * A fragment groups multiple top-level blocks without producing any wrapper markup.
13
+ * It can only be used at the root of a BlockTree, similar to React's `<>...</>` fragment.
14
+ *
15
+ * @example
16
+ * ```typescript
17
+ * const tree: BlockTree = {
18
+ * root: 'fragment',
19
+ * elements: {
20
+ * 'fragment': {
21
+ * key: 'fragment',
22
+ * type: FRAGMENT_BLOCK_TYPE,
23
+ * props: {},
24
+ * children: ['hero', 'content', 'cta']
25
+ * },
26
+ * // ... child elements
27
+ * }
28
+ * };
29
+ * ```
30
+ */
31
+ export declare const FRAGMENT_BLOCK_TYPE = "fragment";
9
32
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,YAAY,EACV,YAAY,EACZ,SAAS,EACT,kBAAkB,EAClB,eAAe,GAChB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAG5E,YAAY,EACV,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,oBAAoB,GACrB,MAAM,6BAA6B,CAAC;AAGrC,YAAY,EACV,kBAAkB,EAClB,wBAAwB,EACxB,aAAa,EACb,SAAS,GACV,MAAM,uBAAuB,CAAC;AAG/B,YAAY,EACV,aAAa,EACb,kBAAkB,EAClB,wBAAwB,EACxB,mBAAmB,GACpB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EACL,wBAAwB,EACxB,mBAAmB,GACpB,MAAM,2BAA2B,CAAC;AAGnC,YAAY,EACV,iBAAiB,EACjB,uBAAuB,GACxB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,YAAY,EACV,YAAY,EACZ,SAAS,EACT,kBAAkB,EAClB,eAAe,GAChB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAG5E,YAAY,EACV,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,oBAAoB,GACrB,MAAM,6BAA6B,CAAC;AAGrC,YAAY,EACV,kBAAkB,EAClB,wBAAwB,EACxB,aAAa,EACb,SAAS,GACV,MAAM,uBAAuB,CAAC;AAG/B,YAAY,EACV,aAAa,EACb,kBAAkB,EAClB,wBAAwB,EACxB,mBAAmB,GACpB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EACL,wBAAwB,EACxB,mBAAmB,GACpB,MAAM,2BAA2B,CAAC;AAGnC,YAAY,EACV,iBAAiB,EACjB,uBAAuB,GACxB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEpE;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,mBAAmB,aAAa,CAAC"}
package/dist/index.js CHANGED
@@ -1,4 +1,27 @@
1
1
  export { blockElementSchema, blockTreeSchema } from './types/block-tree.js';
2
2
  export { blockTemplateEntrySchema, blockTemplateSchema, } from './types/block-template.js';
3
3
  export { phpPatternOptionsSchema } from './types/php-transforms.js';
4
+ /**
5
+ * Pseudo-block type for fragments.
6
+ *
7
+ * A fragment groups multiple top-level blocks without producing any wrapper markup.
8
+ * It can only be used at the root of a BlockTree, similar to React's `<>...</>` fragment.
9
+ *
10
+ * @example
11
+ * ```typescript
12
+ * const tree: BlockTree = {
13
+ * root: 'fragment',
14
+ * elements: {
15
+ * 'fragment': {
16
+ * key: 'fragment',
17
+ * type: FRAGMENT_BLOCK_TYPE,
18
+ * props: {},
19
+ * children: ['hero', 'content', 'cta']
20
+ * },
21
+ * // ... child elements
22
+ * }
23
+ * };
24
+ * ```
25
+ */
26
+ export const FRAGMENT_BLOCK_TYPE = 'fragment';
4
27
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AA0B5E,OAAO,EACL,wBAAwB,EACxB,mBAAmB,GACpB,MAAM,2BAA2B,CAAC;AAQnC,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AA0B5E,OAAO,EACL,wBAAwB,EACxB,mBAAmB,GACpB,MAAM,2BAA2B,CAAC;AAQnC,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEpE;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,UAAU,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@10up/block-renderer-core",
3
- "version": "0.1.6",
3
+ "version": "0.2.0",
4
4
  "description": "Core types and interfaces for block-renderer",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",