@atomicsmash/blocks-helpers 1.0.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.
@@ -0,0 +1,438 @@
1
+ import type { WPElement } from "@wordpress/element";
2
+ import type { SVGProps } from "react";
3
+ import { createBlock } from "@wordpress/blocks";
4
+ export type BlockCategory = "text" | "media" | "design" | "widgets" | "theme" | "embed";
5
+ export type AttributeTypes = "null" | "boolean" | "object" | "array" | "string" | "integer" | "number";
6
+ export type AttributesObject = {
7
+ source?: "attribute" | "text" | "html" | "query" | "meta";
8
+ selector?: string;
9
+ attribute?: string;
10
+ multiline?: string;
11
+ query?: Record<string, any>;
12
+ meta?: string;
13
+ default?: any;
14
+ } & ({
15
+ type: AttributeTypes | AttributeTypes[];
16
+ enum?: ReadonlyArray<boolean> | ReadonlyArray<number> | ReadonlyArray<string>;
17
+ } | {
18
+ type?: AttributeTypes | AttributeTypes[];
19
+ enum: ReadonlyArray<boolean> | ReadonlyArray<number> | ReadonlyArray<string>;
20
+ });
21
+ type ReadonlyRecursive<T> = {
22
+ [k in keyof T]: T[k] extends Record<string, any> ? ReadonlyRecursive<T[k]> : T[k];
23
+ };
24
+ export type InterpretAttributes<Attributes extends Record<string, ReadonlyRecursive<AttributesObject>>> = {
25
+ [Property in keyof Attributes]: Attributes[Property] extends {
26
+ type: "string";
27
+ } ? string : Attributes[Property] extends {
28
+ type: "boolean";
29
+ } ? boolean : Attributes[Property] extends {
30
+ type: "object";
31
+ } ? Record<string, any> : Attributes[Property] extends {
32
+ type: "null";
33
+ } ? null : Attributes[Property] extends {
34
+ type: "array";
35
+ } ? any[] : Attributes[Property] extends {
36
+ type: "integer";
37
+ } ? number : Attributes[Property] extends {
38
+ type: "number";
39
+ } ? number : Attributes[Property]["enum"] extends undefined ? undefined : NonNullable<Attributes[Property]["enum"]>[number];
40
+ };
41
+ export type BlockAttributes = Readonly<Record<string, AttributesObject>>;
42
+ export type BlockSupports = Record<string, any> & {
43
+ anchor?: boolean;
44
+ align?: boolean | ("wide" | "full" | "left" | "center" | "right")[];
45
+ alignWide?: boolean;
46
+ ariaLabel?: boolean;
47
+ className?: boolean;
48
+ color?: {
49
+ background?: boolean;
50
+ gradients?: boolean;
51
+ link?: boolean;
52
+ text?: boolean;
53
+ enableContrastChecker?: boolean;
54
+ };
55
+ customClassName?: boolean;
56
+ defaultStylePicker?: boolean;
57
+ html?: boolean;
58
+ inserter?: boolean;
59
+ multiple?: boolean;
60
+ reusable?: boolean;
61
+ lock?: boolean;
62
+ spacing?: {
63
+ margin?: boolean | ("top" | "right" | "left" | "bottom")[] | ("vertical" | "horizontal")[];
64
+ padding?: boolean | ("top" | "right" | "left" | "bottom")[] | ("vertical" | "horizontal")[];
65
+ };
66
+ typography?: {
67
+ fontSize?: boolean;
68
+ lineHeight?: boolean;
69
+ };
70
+ };
71
+ type BlockExample = {
72
+ viewportWidth?: number;
73
+ attributes?: BlockAttributes;
74
+ innerBlocks?: BlockInstance[];
75
+ };
76
+ /**
77
+ * The WPDefinedPath type is a subtype of string, where the value represents a path to a JavaScript,
78
+ * CSS or PHP file relative to where block.json file is located. The path provided must be prefixed
79
+ * with file:. This approach is based on how npm handles local paths for packages.
80
+ *
81
+ * @see {@link https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/#wpdefinedpath}
82
+ */
83
+ export type WPDefinedPath = `file:${string}`;
84
+ /**
85
+ * This asset can be a local file path relative to the block.json file (must be prefixed with `file:`) or
86
+ * it can be a style or script handle from a registered asset.
87
+ *
88
+ * @see {@link https://developer.wordpress.org/block-editor/reference-guides/block-api/block-metadata/#wpdefinedasset}
89
+ */
90
+ export type WPDefinedAsset = WPDefinedPath | string;
91
+ export type BlockMetaData<Attributes extends BlockAttributes> = {
92
+ /**
93
+ * The version of the Block API used by the block. The most recent version is 2 and it was introduced in WordPress 5.6.
94
+ *
95
+ * See the API versions documentation at https://developer.wordpress.org/block-editor/reference-guides/block-api/block-api-versions/ for more details.
96
+ */
97
+ apiVersion?: 1 | 2;
98
+ /**
99
+ * The name for a block is a unique string that identifies a block.
100
+ * Names have to be structured as `namespace/block-name`, where namespace is the name of your plugin or theme.
101
+ * Regex: ^[a-z][a-z0-9-]\*\/[a-z][a-z0-9-]\*$
102
+ */
103
+ name: string;
104
+ /**
105
+ * The name of the experiment this block is a part of, or boolean true if there is no specific experiment name.
106
+ */
107
+ __experimental?: boolean | string;
108
+ /**
109
+ * This is the display title for your block, which can be translated with our translation functions. The block inserter will show this name.
110
+ */
111
+ title: string;
112
+ /**
113
+ * Blocks are grouped into categories to help users browse and discover them.
114
+ * Core provided categories are: text, media, design, widgets, theme, embed
115
+ *
116
+ * Plugins and Themes can also register custom block categories.
117
+ *
118
+ * @see https://developer.wordpress.org/block-editor/reference-guides/filters/block-filters/#managing-block-categories
119
+ */
120
+ category?: BlockCategory;
121
+ /**
122
+ * Setting parent lets a block require that it is only available when nested within the specified blocks.
123
+ * For example, you might want to allow an ‘Add to Cart’ block to only be available within a ‘Product’ block.
124
+ */
125
+ parent?: string[];
126
+ /**
127
+ * The `ancestor` property makes a block available inside the specified block types at any position of the ancestor block subtree.
128
+ * That allows, for example, to place a ‘Comment Content’ block inside a ‘Column’ block, as long as ‘Column’ is somewhere within a ‘Comment Template’ block.
129
+ */
130
+ ancestor?: string[];
131
+ /**
132
+ * An icon property should be specified to make it easier to identify a block.
133
+ * These can be any of WordPress’ Dashicons (slug serving also as a fallback in non-js contexts).
134
+ */
135
+ icon?: string;
136
+ /**
137
+ * This is a short description for your block, which can be translated with our translation functions. This will be shown in the block inspector.
138
+ */
139
+ description?: string;
140
+ /**
141
+ * Sometimes a block could have aliases that help users discover it while searching.
142
+ * For example, an image block could also want to be discovered by photo. You can do so by providing an array of unlimited terms (which are translated).
143
+ */
144
+ keywords?: string[];
145
+ /**
146
+ * The current version number of the block, such as 1.0 or 1.0.3. It’s similar to how plugins are versioned.
147
+ * This field might be used with block assets to control cache invalidation, and when the block author omits it,
148
+ * then the installed version of WordPress is used instead.
149
+ */
150
+ version?: string;
151
+ /**
152
+ * The gettext text domain of the plugin/block. More information can be found in the Text Domain section of the How to Internationalize your Plugin page.
153
+ *
154
+ * @see https://developer.wordpress.org/plugins/internationalization/how-to-internationalize-your-plugin/
155
+ */
156
+ textdomain?: string;
157
+ /**
158
+ * Attributes provide the structured data needs of a block. They can exist in different forms when they are serialized, but they are declared together under a common interface.
159
+ * See the attributes documentation at https://developer.wordpress.org/block-editor/reference-guides/block-api/block-attributes/ for more details.
160
+ * Property names must only contain letters Regex:[a-zA-Z]
161
+ */
162
+ attributes?: Attributes;
163
+ /**
164
+ * Context provided for available access by descendants of blocks of this type, in the form of an object which maps a context name to one of the block’s own attribute.
165
+ * See the block context documentation at https://developer.wordpress.org/block-editor/reference-guides/block-api/block-context/ for more details.
166
+ * Property names must only contain letters Regex:[a-zA-Z]
167
+ */
168
+ providesContext?: Record<string, string>;
169
+ /**
170
+ * Array of the names of context values to inherit from an ancestor provider.
171
+ * See the block context documentation at https://developer.wordpress.org/block-editor/reference-guides/block-api/block-context/ for more details.
172
+ */
173
+ usesContext?: string[];
174
+ /**
175
+ * It contains as set of options to control features used in the editor. See the supports documentation at https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/ for more details.
176
+ */
177
+ supports?: BlockSupports;
178
+ /**
179
+ * Block styles can be used to provide alternative styles to block. It works by adding a class name to the block’s wrapper.
180
+ * Using CSS, a theme developer can target the class name for the block style if it is selected.
181
+ *
182
+ * Plugins and Themes can also register custom block style for existing blocks.
183
+ *
184
+ * @see https://developer.wordpress.org/block-editor/reference-guides/filters/block-filters/#block-styles
185
+ */
186
+ styles?: {
187
+ name: string;
188
+ label: string;
189
+ isDefault?: boolean;
190
+ }[];
191
+ /**
192
+ * It provides structured example data for the block. This data is used to construct a preview for the block to be shown in the Inspector Help Panel when the user mouses over the block.
193
+ * See the example documentation at https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/#example-optional for more details.
194
+ */
195
+ example?: BlockExample;
196
+ /**
197
+ * Block type editor script definition. It will only be enqueued in the context of the editor.
198
+ */
199
+ editorScript?: WPDefinedAsset | WPDefinedAsset[];
200
+ /**
201
+ * Block type frontend and editor script definition. It will be enqueued both in the editor and when viewing the content on the front of the site.
202
+ */
203
+ script?: WPDefinedAsset | WPDefinedAsset[];
204
+ /**
205
+ * Block type frontend script definition. It will be enqueued only when viewing the content on the front of the site.
206
+ */
207
+ viewScript?: WPDefinedAsset | WPDefinedAsset[];
208
+ /**
209
+ * Block type editor style definition. It will only be enqueued in the context of the editor.
210
+ */
211
+ editorStyle?: WPDefinedAsset | WPDefinedAsset[];
212
+ /**
213
+ * Block type frontend style definition. It will be enqueued both in the editor and when viewing the content on the front of the site.
214
+ */
215
+ style?: WPDefinedAsset | WPDefinedAsset[];
216
+ /**
217
+ * Block Variations is the API that allows a block to have similar versions of it, but all these versions share some common functionality.
218
+ */
219
+ variations?: {
220
+ name: string;
221
+ title: string;
222
+ description?: string;
223
+ category?: BlockCategory;
224
+ icon?: string;
225
+ isDefault?: boolean;
226
+ attributes?: Attributes;
227
+ innerBlocks?: BlockInstance[];
228
+ example?: BlockExample;
229
+ scope?: ("inserter" | "block" | "transform")[];
230
+ keywords?: string[];
231
+ isActive?: string[];
232
+ }[];
233
+ /**
234
+ * Template file loaded on the server when rendering a block.
235
+ */
236
+ render?: WPDefinedPath;
237
+ };
238
+ export type BlockMigrateDeprecationFunction<InterpretedAttributes extends Record<string, any>, NewInterpretedAttributes extends Record<string, any>> = (attributes: InterpretedAttributes, innerBlocks: BlockInstance[]) => NewInterpretedAttributes | [NewInterpretedAttributes, BlockInstance[]];
239
+ export type BlockIsDeprecationEligibleFunction<InterpretedAttributes extends Record<string, any>> = (attributes: InterpretedAttributes, innerBlocks: BlockInstance[]) => boolean;
240
+ export interface BlockSaveProps<T extends Record<string, any>> {
241
+ readonly attributes: Readonly<T>;
242
+ readonly innerBlocks: Readonly<BlockInstance[]>;
243
+ }
244
+ export interface BlockEditProps<Attributes extends Record<string, any>, Context extends Record<string, any> = Record<string, never>> {
245
+ readonly clientId: string;
246
+ readonly attributes: Readonly<Attributes>;
247
+ readonly context: Context;
248
+ readonly insertBlocksAfter: BlockInstance[] | undefined;
249
+ readonly isSelected: boolean;
250
+ readonly mergeBlocks: BlockInstance[] | undefined;
251
+ readonly onRemove: () => void | undefined;
252
+ readonly onReplace: (clientIds: string | string[], blocks: BlockInstance | BlockInstance[], indexToSelect: number, initialPosition: 0 | -1 | null, meta: Record<string, unknown>) => BlockInstance[] | undefined;
253
+ readonly setAttributes: (attributes: Partial<Attributes>) => void;
254
+ readonly toggleSelection: (isSelectionEnabled: boolean) => void;
255
+ }
256
+ export type DeprecatedBlock<InterpretedAttributes extends Record<string, any>> = {
257
+ /**
258
+ * Attributes provide the structured data needs of a block. They can exist in different forms when they are serialized, but they are declared together under a common interface.
259
+ * See the attributes documentation at https://developer.wordpress.org/block-editor/reference-guides/block-api/block-attributes/ for more details.
260
+ * Property names must only contain letters Regex:[a-zA-Z]
261
+ */
262
+ attributes?: BlockAttributes;
263
+ /**
264
+ * It contains as set of options to control features used in the editor. See the supports documentation at https://developer.wordpress.org/block-editor/reference-guides/block-api/block-supports/ for more details.
265
+ */
266
+ supports?: BlockSupports;
267
+ migrate?: BlockMigrateDeprecationFunction<InterpretedAttributes, Record<string, any>>;
268
+ isEligible?: BlockIsDeprecationEligibleFunction<InterpretedAttributes>;
269
+ save: ({ attributes }: BlockSaveProps<InterpretedAttributes>) => WPElement;
270
+ };
271
+ type BlockInstance = ReturnType<typeof createBlock>;
272
+ export type BlockTypeTransform = {
273
+ type: "block";
274
+ blocks: string[];
275
+ transform: (attributes: BlockAttributes, innerBlocks: BlockInstance[]) => BlockInstance | BlockInstance[];
276
+ isMatch?: (attributes: BlockAttributes, block: ReturnType<typeof createBlock>) => boolean;
277
+ isMultiBlock?: boolean;
278
+ priority?: number;
279
+ };
280
+ export type EnterTypeTransform = {
281
+ type: "enter";
282
+ regExp: RegExp;
283
+ transform: (enteredValue: string) => BlockInstance | BlockInstance[];
284
+ priority?: number;
285
+ };
286
+ export type FilesTypeTransform = {
287
+ type: "files";
288
+ transform: (files: File[]) => BlockInstance | BlockInstance[];
289
+ isMatch?: (files: File[]) => boolean;
290
+ priority?: number;
291
+ };
292
+ export type PrefixTypeTransform = {
293
+ type: "prefix";
294
+ prefix: string;
295
+ transform: (content: File[]) => BlockInstance | BlockInstance[];
296
+ priority?: number;
297
+ };
298
+ export type PhrasingContentSchema = {
299
+ strong: Record<string, never>;
300
+ em: Record<string, never>;
301
+ s: Record<string, never>;
302
+ del: Record<string, never>;
303
+ ins: Record<string, never>;
304
+ a: {
305
+ attributes: ["href", "target", "rel", "id"];
306
+ };
307
+ code: Record<string, never>;
308
+ abbr: {
309
+ attributes: ["title"];
310
+ };
311
+ sub: Record<string, never>;
312
+ sup: Record<string, never>;
313
+ br: Record<string, never>;
314
+ small: Record<string, never>;
315
+ cite: Record<string, never>;
316
+ q: {
317
+ attributes: ["cite"];
318
+ };
319
+ dfn: {
320
+ attributes: ["title"];
321
+ };
322
+ data: {
323
+ attributes: ["value"];
324
+ };
325
+ time: {
326
+ attributes: ["datetime"];
327
+ };
328
+ var: Record<string, never>;
329
+ samp: Record<string, never>;
330
+ kbd: Record<string, never>;
331
+ i: Record<string, never>;
332
+ b: Record<string, never>;
333
+ u: Record<string, never>;
334
+ mark: Record<string, never>;
335
+ ruby: Record<string, never>;
336
+ rt: Record<string, never>;
337
+ rp: Record<string, never>;
338
+ bdi: {
339
+ attributes: ["dir"];
340
+ };
341
+ bdo: {
342
+ attributes: ["dir"];
343
+ };
344
+ wbr: Record<string, never>;
345
+ "#text": Record<string, never>;
346
+ audio: {
347
+ attributes: ["src", "preload", "autoplay", "mediagroup", "loop", "muted"];
348
+ };
349
+ canvas: {
350
+ attributes: ["width", "height"];
351
+ };
352
+ embed: {
353
+ attributes: ["src", "type", "width", "height"];
354
+ };
355
+ img: {
356
+ attributes: ["alt", "src", "srcset", "usemap", "ismap", "width", "height"];
357
+ };
358
+ object: {
359
+ attributes: ["data", "type", "name", "usemap", "form", "width", "height"];
360
+ };
361
+ video: {
362
+ attributes: [
363
+ "src",
364
+ "poster",
365
+ "preload",
366
+ "autoplay",
367
+ "mediagroup",
368
+ "loop",
369
+ "muted",
370
+ "controls",
371
+ "width",
372
+ "height"
373
+ ];
374
+ };
375
+ };
376
+ export type TransformRawSchema = {
377
+ [k in keyof HTMLElementTagNameMap | "#text"]?: {
378
+ attributes?: string[] | undefined;
379
+ require?: Array<keyof HTMLElementTagNameMap> | undefined;
380
+ classes?: Array<string | RegExp> | undefined;
381
+ children?: TransformRawSchema | undefined;
382
+ };
383
+ };
384
+ export type RawTypeTransform = {
385
+ type: "raw";
386
+ transform?: (node: Node) => BlockInstance | BlockInstance[];
387
+ schema?: TransformRawSchema | (({ phrasingContentSchema, isPaste, }: {
388
+ phrasingContentSchema: PhrasingContentSchema;
389
+ isPaste: boolean;
390
+ }) => TransformRawSchema);
391
+ selector?: string;
392
+ isMatch?: (node: Node) => boolean;
393
+ priority?: number;
394
+ };
395
+ export interface WPShortCodeAttributes {
396
+ named: Record<string, string | undefined>;
397
+ numeric: string[];
398
+ }
399
+ export type WPShortCode = {
400
+ attrs: WPShortCodeAttributes;
401
+ tag: string;
402
+ } & ({
403
+ type: "closed";
404
+ content: string;
405
+ } | {
406
+ type: "self-closing" | "single";
407
+ });
408
+ export interface WPShortCodeMatch {
409
+ index: number;
410
+ content: string;
411
+ shortcode: WPShortCode;
412
+ }
413
+ export type ShortCodeTypeTransform = {
414
+ type: "shortcode";
415
+ tag: string | string[];
416
+ transform?: (shortcodeAttributes: WPShortCodeAttributes, shortcodeMatch: WPShortCodeMatch) => BlockInstance | BlockInstance[];
417
+ attributes?: BlockAttributes;
418
+ isMatch?: (shortcodeAttributes: WPShortCodeAttributes) => boolean;
419
+ priority?: number;
420
+ };
421
+ export type BlockTransforms = BlockTypeTransform[] | EnterTypeTransform[] | FilesTypeTransform[] | PrefixTypeTransform[] | RawTypeTransform[] | ShortCodeTypeTransform[];
422
+ export type BlockSettings<InterpretedAttributes extends Record<string, any>, AllPossibleInterpretedAttributes extends Record<string, any> = InterpretedAttributes, Context extends Record<string, any> = Record<string, never>> = {
423
+ edit: ({ attributes, setAttributes, isSelected, }: BlockEditProps<InterpretedAttributes, Context>) => WPElement;
424
+ save: ({ attributes }: BlockSaveProps<InterpretedAttributes>) => WPElement;
425
+ transforms?: {
426
+ from: BlockTransforms;
427
+ to: BlockTransforms;
428
+ };
429
+ deprecated?: DeprecatedBlock<AllPossibleInterpretedAttributes>[];
430
+ };
431
+ export type LoosenTypeOfObject<Type extends Record<string, any>> = {
432
+ [Property in keyof Type]: Type[Property] extends string ? string : Type[Property] extends boolean ? boolean : Type[Property] extends number ? number : Type[Property];
433
+ };
434
+ export declare function registerBlockType<Attributes extends BlockAttributes = Record<string, never>, InterpretedAttributes extends Record<string, any> = InterpretAttributes<Attributes>, AllPossibleInterpretedAttributes extends Record<string, any> = InterpretedAttributes, Context extends Record<string, any> = Record<string, never>>(name: string, settings: Partial<BlockMetaData<Attributes>> & BlockSettings<InterpretedAttributes, AllPossibleInterpretedAttributes, Context>): import("@wordpress/blocks").Block<Attributes> | undefined;
435
+ export declare function ASCircleLogo(props: SVGProps<SVGSVGElement>): JSX.Element;
436
+ export declare function registerSnapBlocksCollection(): void;
437
+ export {};
438
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EACN,WAAW,EAGX,MAAM,mBAAmB,CAAC;AAE3B,MAAM,MAAM,aAAa,GACtB,MAAM,GACN,OAAO,GACP,QAAQ,GACR,SAAS,GACT,OAAO,GACP,OAAO,CAAC;AACX,MAAM,MAA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,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,EAC1D,qBAAqB,SAAS,MAAM,CACnC,MAAM,EACN,GAAG,CACH,GAAG,mBAAmB,CAAC,UAAU,CAAC,EACnC,gCAAgC,SAAS,MAAM,CAC9C,MAAM,EACN,GAAG,CACH,GAAG,qBAAqB,EACzB,OAAO,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,EAE3D,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,OAAO,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC,GAC3C,aAAa,CACZ,qBAAqB,EACrB,gCAAgC,EAChC,OAAO,CACP,6DAIF;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,QAAQ,CAAC,aAAa,CAAC,eAa1D;AAED,wBAAgB,4BAA4B,SAK3C"}
package/dist/index.js ADDED
@@ -0,0 +1,15 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { registerBlockType as wordpressRegisterBlockType, registerBlockCollection, } from "@wordpress/blocks";
3
+ export function registerBlockType(name, settings) {
4
+ /* @ts-expect-error Provided types are inaccurate and will provide an error with some valid inputs */
5
+ return wordpressRegisterBlockType(name, settings);
6
+ }
7
+ export function ASCircleLogo(props) {
8
+ return (_jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 20 20", xmlSpace: "preserve", ...props, children: [_jsx("circle", { cx: 2.9, cy: 6, r: 0.6 }), _jsx("circle", { cx: 16.8, cy: 14.6, r: 0.6 }), _jsx("path", { d: "m4.9 14.2-2.1.1 1.1-1.8c-.1-.2-.2-.4-.2-.7l-2.6 1.4c.1.2.1.3.2.5l1.9-1L2 14.8h2.4L2.6 16c.1.1.2.3.4.4l2.5-1.6-.6-.6zm11-10.6-.6 2.1 2.2-.2-1.7 1.2c.1.3.2.4.3.6l2.4-1.8c-.1-.2-.2-.4-.3-.5l-2.2.2.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-.7-1.5-.4 0-.6.2-.7.6-.2.4-.2 1.1-.3 1.4-.1.3-.2.4-.4.4-.3 0-.4-.4-.3-1 0-.6.2-1.1.6-1.1 0-.2.1-.4.1-.6-.8 0-1.1.6-1.2 1.6-.1 1 .2 1.7.8 1.7.5.1.7-.2.8-.6zm12-7.6c.3-.8 0-1.6-1.1-1.9-1.1-.3-1.8 0-2.1.9-.3.9.1 1.6 1.2 1.9 1.1.4 1.8 0 2-.9zm-1.9.5c-.8-.3-.9-.8-.8-1.3.2-.6.6-.9 1.4-.6.8.3.9.8.8 1.3-.2.5-.6.8-1.4.6zM6.7 15.7 4 17.4c.1.1.3.2.4.3l.7-.4c.4.3 1 .6 1.5.8v.8c.2.1.4.1.6.2V16c-.1-.1-.1-.1-.3-.1-.1-.2-.1-.2-.2-.2zM5.5 17l1.1-.7v1.3c-.3-.2-.8-.4-1.1-.6z" })] }));
9
+ }
10
+ export function registerSnapBlocksCollection() {
11
+ registerBlockCollection("snap-blocks", {
12
+ title: "Snap blocks",
13
+ icon: ASCircleLogo,
14
+ });
15
+ }
package/package.json ADDED
@@ -0,0 +1,44 @@
1
+ {
2
+ "name": "@atomicsmash/blocks-helpers",
3
+ "version": "1.0.0",
4
+ "description": "",
5
+ "keywords": [],
6
+ "homepage": "https://www.atomicsmash.co.uk/",
7
+ "license": "GPL-3.0-or-later",
8
+ "author": {
9
+ "name": "Atomic Smash",
10
+ "email": "npm@atomicsmash.co.uk",
11
+ "url": "https://www.atomicsmash.co.uk/"
12
+ },
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "https://github.com/AtomicSmash/packages",
16
+ "directory": "packages/blocks-helpers"
17
+ },
18
+ "files": [
19
+ "./dist/**/*"
20
+ ],
21
+ "main": "./dist/index.js",
22
+ "types": "./dist/index.d.ts",
23
+ "publishConfig": {
24
+ "access": "public"
25
+ },
26
+ "scripts": {
27
+ "dev": "tsc --build --watch tsconfig.build.json",
28
+ "build": "npm-run-all clean compile",
29
+ "clean": "del-cli ./dist/ *.tsbuildinfo",
30
+ "compile": "tsc --build tsconfig.build.json",
31
+ "test": "TZ=\"Europe/Istanbul\" vitest run",
32
+ "test:ui": "TZ=\"Europe/Istanbul\" vitest --ui",
33
+ "test:coverage": "TZ=\"Europe/Istanbul\" vitest run --coverage",
34
+ "lint": "run-p lint:*",
35
+ "lint:eslint": "eslint --cache --cache-location ./node_modules/.cache/eslint . --ext .js,.ts,.jsx,.tsx",
36
+ "lint:types": "tsc"
37
+ },
38
+ "dependencies": {
39
+ "@wordpress/blocks": "^12.6.0"
40
+ },
41
+ "devDependencies": {
42
+ "@types/wordpress__blocks": "^12.5.0"
43
+ }
44
+ }