@times-design-system/components-wordpress 1.4.0 → 1.5.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 (72) hide show
  1. package/BLOCK_CREATION_CHECKLIST.md +124 -12
  2. package/CHANGELOG.md +6 -0
  3. package/README.md +46 -29
  4. package/TESTING.md +152 -0
  5. package/dist/blocks/dialog-box/block.json +24 -0
  6. package/dist/blocks/dialog-box/edit.js +41 -0
  7. package/dist/blocks/dialog-box/index.js +17 -0
  8. package/dist/blocks/dialog-box/render.php +24 -0
  9. package/dist/blocks/dialog-box/save.js +23 -0
  10. package/dist/blocks/dialog-box/style.css +23 -0
  11. package/dist/blocks/icon/block.json +24 -0
  12. package/dist/blocks/icon/edit.js +41 -0
  13. package/dist/blocks/icon/index.js +17 -0
  14. package/dist/blocks/icon/render.php +24 -0
  15. package/dist/blocks/icon/save.js +23 -0
  16. package/dist/blocks/icon/style.css +23 -0
  17. package/dist/blocks/input-helper-message/block.json +24 -0
  18. package/dist/blocks/input-helper-message/edit.js +42 -0
  19. package/dist/blocks/input-helper-message/index.js +17 -0
  20. package/dist/blocks/input-helper-message/render.php +24 -0
  21. package/dist/blocks/input-helper-message/save.js +23 -0
  22. package/dist/blocks/input-helper-message/style.css +23 -0
  23. package/dist/blocks/tab/block.json +24 -0
  24. package/dist/blocks/tab/edit.js +41 -0
  25. package/dist/blocks/tab/index.js +17 -0
  26. package/dist/blocks/tab/render.php +24 -0
  27. package/dist/blocks/tab/save.js +23 -0
  28. package/dist/blocks/tab/style.css +23 -0
  29. package/dist/blocks/tab-group/block.json +24 -0
  30. package/dist/blocks/tab-group/edit.js +41 -0
  31. package/dist/blocks/tab-group/index.js +17 -0
  32. package/dist/blocks/tab-group/render.php +24 -0
  33. package/dist/blocks/tab-group/save.js +23 -0
  34. package/dist/blocks/tab-group/style.css +23 -0
  35. package/dist/vitest.config.d.ts +2 -0
  36. package/dist/vitest.setup.d.ts +1 -0
  37. package/package.json +21 -5
  38. package/scripts/create-wordpress-block-tests.cjs +438 -0
  39. package/scripts/create-wordpress-block.cjs +681 -0
  40. package/src/blocks/dialog-box/block.json +24 -0
  41. package/src/blocks/dialog-box/edit.js +41 -0
  42. package/src/blocks/dialog-box/index.js +17 -0
  43. package/src/blocks/dialog-box/render.php +24 -0
  44. package/src/blocks/dialog-box/save.js +23 -0
  45. package/src/blocks/dialog-box/style.css +23 -0
  46. package/src/blocks/icon/block.json +24 -0
  47. package/src/blocks/icon/edit.js +41 -0
  48. package/src/blocks/icon/index.js +17 -0
  49. package/src/blocks/icon/render.php +24 -0
  50. package/src/blocks/icon/save.js +23 -0
  51. package/src/blocks/icon/style.css +23 -0
  52. package/src/blocks/input-helper-message/block.json +24 -0
  53. package/src/blocks/input-helper-message/edit.js +42 -0
  54. package/src/blocks/input-helper-message/index.js +17 -0
  55. package/src/blocks/input-helper-message/render.php +24 -0
  56. package/src/blocks/input-helper-message/save.js +23 -0
  57. package/src/blocks/input-helper-message/style.css +23 -0
  58. package/src/blocks/tab/block.json +24 -0
  59. package/src/blocks/tab/edit.js +41 -0
  60. package/src/blocks/tab/index.js +17 -0
  61. package/src/blocks/tab/render.php +24 -0
  62. package/src/blocks/tab/save.js +23 -0
  63. package/src/blocks/tab/style.css +23 -0
  64. package/src/blocks/tab-group/block.json +24 -0
  65. package/src/blocks/tab-group/edit.js +41 -0
  66. package/src/blocks/tab-group/index.js +17 -0
  67. package/src/blocks/tab-group/render.php +24 -0
  68. package/src/blocks/tab-group/save.js +23 -0
  69. package/src/blocks/tab-group/style.css +23 -0
  70. package/vitest.config.js +28 -0
  71. package/vitest.config.ts +28 -0
  72. package/vitest.setup.ts +129 -0
@@ -0,0 +1,24 @@
1
+ <?php
2
+ /**
3
+ * Block Rendering: Icon
4
+ *
5
+ * Server-side rendering for the Icon block.
6
+ * Reference: packages/components-react/src/Icon/
7
+ *
8
+ * @param array $attributes Block attributes
9
+ * @param string $content Saved block content
10
+ * @param WP_Block $block The block instance
11
+ * @return string Rendered HTML
12
+ */
13
+
14
+ $wrapper_attributes = get_block_wrapper_attributes();
15
+
16
+ // TODO: Render the Icon component
17
+ // Extract attributes and render appropriate HTML with BEM classes
18
+
19
+ ?>
20
+ <div <?php echo wp_kses_post( $wrapper_attributes ); ?>>
21
+ <!-- TODO: Render Icon component here -->
22
+ <!-- Use CSS custom properties from packages/tokens/data/resolved-hexes.json -->
23
+ <!-- Apply BEM naming: tds-icon--{modifier} -->
24
+ </div>
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Block Save Component: Icon
3
+ *
4
+ * Renders the static output saved to the database.
5
+ * Reference: packages/components-react/src/Icon/
6
+ */
7
+
8
+ import { useBlockProps } from '@wordpress/block-editor';
9
+
10
+ export function save(props) {
11
+ const { attributes } = props;
12
+ const blockProps = useBlockProps.save();
13
+
14
+ // TODO: Render the actual Icon component with attributes
15
+ // This output is saved to the database and displayed on the frontend
16
+
17
+ return (
18
+ <div {...blockProps}>
19
+ {/* TODO: Render Icon component */}
20
+ {attributes.content && <p>{attributes.content}</p>}
21
+ </div>
22
+ );
23
+ }
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Styles for Icon Block
3
+ *
4
+ * Reference: packages/components-react/src/Icon/
5
+ * Token Reference: packages/tokens/data/resolved-hexes.json
6
+ *
7
+ * TODO: Adapt styles from React component
8
+ * - Copy relevant CSS from React component
9
+ * - Map CSS custom properties to resolved hex values
10
+ * - Use BEM naming: .tds-icon--{modifier}
11
+ */
12
+
13
+ .tds-icon {
14
+ /* TODO: Add component styles here */
15
+ }
16
+
17
+ .tds-icon--focus {
18
+ /* TODO: Add focus state styles */
19
+ }
20
+
21
+ .tds-icon--disabled {
22
+ /* TODO: Add disabled state styles */
23
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "$schema": "https://schemas.wp.org/trunk/block.json",
3
+ "apiVersion": 3,
4
+ "name": "tds/input-helper-message",
5
+ "title": "Times Design System - InputHelperMessage",
6
+ "category": "common",
7
+ "description": "WordPress block for Times Design System InputHelperMessage component",
8
+ "icon": "block-default",
9
+ "supports": {
10
+ "html": false,
11
+ "multiple": true,
12
+ "reusable": true,
13
+ "customClassName": true
14
+ },
15
+ "textdomain": "times-blocks",
16
+ "attributes": {
17
+ "content": {
18
+ "type": "string",
19
+ "default": ""
20
+ }
21
+ },
22
+ "render": "file:./render.php",
23
+ "editorScript": "file:./index.js"
24
+ }
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Block Editor Component: InputHelperMessage
3
+ *
4
+ * Renders the editor UI for the InputHelperMessage block in Gutenberg.
5
+ * Reference: packages/components-react/src/InputHelperMessage/
6
+ */
7
+
8
+ import { useBlockProps, InspectorControls } from '@wordpress/block-editor';
9
+ import { PanelBody, TextControl } from '@wordpress/components';
10
+
11
+ export function edit(props) {
12
+ const { attributes, setAttributes } = props;
13
+ const blockProps = useBlockProps();
14
+
15
+ // TODO: Implement editor UI based on component props
16
+ // - Add inspector controls for attributes
17
+ // - Render preview of component in editor
18
+ // - Handle attribute changes via setAttributes()
19
+
20
+ return (
21
+ <>
22
+ <InspectorControls>
23
+ <PanelBody title="InputHelperMessage Settings" initialOpen={true}>
24
+ <TextControl
25
+ label="Content"
26
+ value={attributes.content || ''}
27
+ onChange={(content) => setAttributes({ content })}
28
+ placeholder="Enter content..."
29
+ />
30
+ {/* TODO: Add more controls based on component variants */}
31
+ </PanelBody>
32
+ </InspectorControls>
33
+ <div {...blockProps}>
34
+ <p>📝 InputHelperMessage block editor</p>
35
+ <p style={{ fontSize: '12px', color: '#666' }}>
36
+ TODO: Render the InputHelperMessage component here with current
37
+ attributes
38
+ </p>
39
+ </div>
40
+ </>
41
+ );
42
+ }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * WordPress Block Loader: InputHelperMessage
3
+ *
4
+ * Reference: packages/components-react/src/InputHelperMessage/
5
+ * TODO: Update attributes in block.json based on component props
6
+ */
7
+
8
+ import { registerBlockType } from '@wordpress/blocks';
9
+ import { edit as Edit } from './edit';
10
+ import { save as Save } from './save';
11
+ import blockConfig from './block.json';
12
+
13
+ registerBlockType(blockConfig.name, {
14
+ ...blockConfig,
15
+ edit: Edit,
16
+ save: Save
17
+ });
@@ -0,0 +1,24 @@
1
+ <?php
2
+ /**
3
+ * Block Rendering: InputHelperMessage
4
+ *
5
+ * Server-side rendering for the InputHelperMessage block.
6
+ * Reference: packages/components-react/src/InputHelperMessage/
7
+ *
8
+ * @param array $attributes Block attributes
9
+ * @param string $content Saved block content
10
+ * @param WP_Block $block The block instance
11
+ * @return string Rendered HTML
12
+ */
13
+
14
+ $wrapper_attributes = get_block_wrapper_attributes();
15
+
16
+ // TODO: Render the InputHelperMessage component
17
+ // Extract attributes and render appropriate HTML with BEM classes
18
+
19
+ ?>
20
+ <div <?php echo wp_kses_post( $wrapper_attributes ); ?>>
21
+ <!-- TODO: Render InputHelperMessage component here -->
22
+ <!-- Use CSS custom properties from packages/tokens/data/resolved-hexes.json -->
23
+ <!-- Apply BEM naming: tds-input-helper-message--{modifier} -->
24
+ </div>
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Block Save Component: InputHelperMessage
3
+ *
4
+ * Renders the static output saved to the database.
5
+ * Reference: packages/components-react/src/InputHelperMessage/
6
+ */
7
+
8
+ import { useBlockProps } from '@wordpress/block-editor';
9
+
10
+ export function save(props) {
11
+ const { attributes } = props;
12
+ const blockProps = useBlockProps.save();
13
+
14
+ // TODO: Render the actual InputHelperMessage component with attributes
15
+ // This output is saved to the database and displayed on the frontend
16
+
17
+ return (
18
+ <div {...blockProps}>
19
+ {/* TODO: Render InputHelperMessage component */}
20
+ {attributes.content && <p>{attributes.content}</p>}
21
+ </div>
22
+ );
23
+ }
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Styles for InputHelperMessage Block
3
+ *
4
+ * Reference: packages/components-react/src/InputHelperMessage/
5
+ * Token Reference: packages/tokens/data/resolved-hexes.json
6
+ *
7
+ * TODO: Adapt styles from React component
8
+ * - Copy relevant CSS from React component
9
+ * - Map CSS custom properties to resolved hex values
10
+ * - Use BEM naming: .tds-input-helper-message--{modifier}
11
+ */
12
+
13
+ .tds-input-helper-message {
14
+ /* TODO: Add component styles here */
15
+ }
16
+
17
+ .tds-input-helper-message--focus {
18
+ /* TODO: Add focus state styles */
19
+ }
20
+
21
+ .tds-input-helper-message--disabled {
22
+ /* TODO: Add disabled state styles */
23
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "$schema": "https://schemas.wp.org/trunk/block.json",
3
+ "apiVersion": 3,
4
+ "name": "tds/tab",
5
+ "title": "Times Design System - Tab",
6
+ "category": "common",
7
+ "description": "WordPress block for Times Design System Tab component",
8
+ "icon": "block-default",
9
+ "supports": {
10
+ "html": false,
11
+ "multiple": true,
12
+ "reusable": true,
13
+ "customClassName": true
14
+ },
15
+ "textdomain": "times-blocks",
16
+ "attributes": {
17
+ "content": {
18
+ "type": "string",
19
+ "default": ""
20
+ }
21
+ },
22
+ "render": "file:./render.php",
23
+ "editorScript": "file:./index.js"
24
+ }
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Block Editor Component: Tab
3
+ *
4
+ * Renders the editor UI for the Tab block in Gutenberg.
5
+ * Reference: packages/components-react/src/Tab/
6
+ */
7
+
8
+ import { useBlockProps, InspectorControls } from '@wordpress/block-editor';
9
+ import { PanelBody, TextControl } from '@wordpress/components';
10
+
11
+ export function edit(props) {
12
+ const { attributes, setAttributes } = props;
13
+ const blockProps = useBlockProps();
14
+
15
+ // TODO: Implement editor UI based on component props
16
+ // - Add inspector controls for attributes
17
+ // - Render preview of component in editor
18
+ // - Handle attribute changes via setAttributes()
19
+
20
+ return (
21
+ <>
22
+ <InspectorControls>
23
+ <PanelBody title="Tab Settings" initialOpen={true}>
24
+ <TextControl
25
+ label="Content"
26
+ value={attributes.content || ''}
27
+ onChange={(content) => setAttributes({ content })}
28
+ placeholder="Enter content..."
29
+ />
30
+ {/* TODO: Add more controls based on component variants */}
31
+ </PanelBody>
32
+ </InspectorControls>
33
+ <div {...blockProps}>
34
+ <p>📝 Tab block editor</p>
35
+ <p style={{ fontSize: '12px', color: '#666' }}>
36
+ TODO: Render the Tab component here with current attributes
37
+ </p>
38
+ </div>
39
+ </>
40
+ );
41
+ }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * WordPress Block Loader: Tab
3
+ *
4
+ * Reference: packages/components-react/src/Tab/
5
+ * TODO: Update attributes in block.json based on component props
6
+ */
7
+
8
+ import { registerBlockType } from '@wordpress/blocks';
9
+ import { edit as Edit } from './edit';
10
+ import { save as Save } from './save';
11
+ import blockConfig from './block.json';
12
+
13
+ registerBlockType(blockConfig.name, {
14
+ ...blockConfig,
15
+ edit: Edit,
16
+ save: Save
17
+ });
@@ -0,0 +1,24 @@
1
+ <?php
2
+ /**
3
+ * Block Rendering: Tab
4
+ *
5
+ * Server-side rendering for the Tab block.
6
+ * Reference: packages/components-react/src/Tab/
7
+ *
8
+ * @param array $attributes Block attributes
9
+ * @param string $content Saved block content
10
+ * @param WP_Block $block The block instance
11
+ * @return string Rendered HTML
12
+ */
13
+
14
+ $wrapper_attributes = get_block_wrapper_attributes();
15
+
16
+ // TODO: Render the Tab component
17
+ // Extract attributes and render appropriate HTML with BEM classes
18
+
19
+ ?>
20
+ <div <?php echo wp_kses_post( $wrapper_attributes ); ?>>
21
+ <!-- TODO: Render Tab component here -->
22
+ <!-- Use CSS custom properties from packages/tokens/data/resolved-hexes.json -->
23
+ <!-- Apply BEM naming: tds-tab--{modifier} -->
24
+ </div>
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Block Save Component: Tab
3
+ *
4
+ * Renders the static output saved to the database.
5
+ * Reference: packages/components-react/src/Tab/
6
+ */
7
+
8
+ import { useBlockProps } from '@wordpress/block-editor';
9
+
10
+ export function save(props) {
11
+ const { attributes } = props;
12
+ const blockProps = useBlockProps.save();
13
+
14
+ // TODO: Render the actual Tab component with attributes
15
+ // This output is saved to the database and displayed on the frontend
16
+
17
+ return (
18
+ <div {...blockProps}>
19
+ {/* TODO: Render Tab component */}
20
+ {attributes.content && <p>{attributes.content}</p>}
21
+ </div>
22
+ );
23
+ }
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Styles for Tab Block
3
+ *
4
+ * Reference: packages/components-react/src/Tab/
5
+ * Token Reference: packages/tokens/data/resolved-hexes.json
6
+ *
7
+ * TODO: Adapt styles from React component
8
+ * - Copy relevant CSS from React component
9
+ * - Map CSS custom properties to resolved hex values
10
+ * - Use BEM naming: .tds-tab--{modifier}
11
+ */
12
+
13
+ .tds-tab {
14
+ /* TODO: Add component styles here */
15
+ }
16
+
17
+ .tds-tab--focus {
18
+ /* TODO: Add focus state styles */
19
+ }
20
+
21
+ .tds-tab--disabled {
22
+ /* TODO: Add disabled state styles */
23
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "$schema": "https://schemas.wp.org/trunk/block.json",
3
+ "apiVersion": 3,
4
+ "name": "tds/tab-group",
5
+ "title": "Times Design System - TabGroup",
6
+ "category": "common",
7
+ "description": "WordPress block for Times Design System TabGroup component",
8
+ "icon": "block-default",
9
+ "supports": {
10
+ "html": false,
11
+ "multiple": true,
12
+ "reusable": true,
13
+ "customClassName": true
14
+ },
15
+ "textdomain": "times-blocks",
16
+ "attributes": {
17
+ "content": {
18
+ "type": "string",
19
+ "default": ""
20
+ }
21
+ },
22
+ "render": "file:./render.php",
23
+ "editorScript": "file:./index.js"
24
+ }
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Block Editor Component: TabGroup
3
+ *
4
+ * Renders the editor UI for the TabGroup block in Gutenberg.
5
+ * Reference: packages/components-react/src/TabGroup/
6
+ */
7
+
8
+ import { useBlockProps, InspectorControls } from '@wordpress/block-editor';
9
+ import { PanelBody, TextControl } from '@wordpress/components';
10
+
11
+ export function edit(props) {
12
+ const { attributes, setAttributes } = props;
13
+ const blockProps = useBlockProps();
14
+
15
+ // TODO: Implement editor UI based on component props
16
+ // - Add inspector controls for attributes
17
+ // - Render preview of component in editor
18
+ // - Handle attribute changes via setAttributes()
19
+
20
+ return (
21
+ <>
22
+ <InspectorControls>
23
+ <PanelBody title="TabGroup Settings" initialOpen={true}>
24
+ <TextControl
25
+ label="Content"
26
+ value={attributes.content || ''}
27
+ onChange={(content) => setAttributes({ content })}
28
+ placeholder="Enter content..."
29
+ />
30
+ {/* TODO: Add more controls based on component variants */}
31
+ </PanelBody>
32
+ </InspectorControls>
33
+ <div {...blockProps}>
34
+ <p>📝 TabGroup block editor</p>
35
+ <p style={{ fontSize: '12px', color: '#666' }}>
36
+ TODO: Render the TabGroup component here with current attributes
37
+ </p>
38
+ </div>
39
+ </>
40
+ );
41
+ }
@@ -0,0 +1,17 @@
1
+ /**
2
+ * WordPress Block Loader: TabGroup
3
+ *
4
+ * Reference: packages/components-react/src/TabGroup/
5
+ * TODO: Update attributes in block.json based on component props
6
+ */
7
+
8
+ import { registerBlockType } from '@wordpress/blocks';
9
+ import { edit as Edit } from './edit';
10
+ import { save as Save } from './save';
11
+ import blockConfig from './block.json';
12
+
13
+ registerBlockType(blockConfig.name, {
14
+ ...blockConfig,
15
+ edit: Edit,
16
+ save: Save
17
+ });
@@ -0,0 +1,24 @@
1
+ <?php
2
+ /**
3
+ * Block Rendering: TabGroup
4
+ *
5
+ * Server-side rendering for the TabGroup block.
6
+ * Reference: packages/components-react/src/TabGroup/
7
+ *
8
+ * @param array $attributes Block attributes
9
+ * @param string $content Saved block content
10
+ * @param WP_Block $block The block instance
11
+ * @return string Rendered HTML
12
+ */
13
+
14
+ $wrapper_attributes = get_block_wrapper_attributes();
15
+
16
+ // TODO: Render the TabGroup component
17
+ // Extract attributes and render appropriate HTML with BEM classes
18
+
19
+ ?>
20
+ <div <?php echo wp_kses_post( $wrapper_attributes ); ?>>
21
+ <!-- TODO: Render TabGroup component here -->
22
+ <!-- Use CSS custom properties from packages/tokens/data/resolved-hexes.json -->
23
+ <!-- Apply BEM naming: tds-tab-group--{modifier} -->
24
+ </div>
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Block Save Component: TabGroup
3
+ *
4
+ * Renders the static output saved to the database.
5
+ * Reference: packages/components-react/src/TabGroup/
6
+ */
7
+
8
+ import { useBlockProps } from '@wordpress/block-editor';
9
+
10
+ export function save(props) {
11
+ const { attributes } = props;
12
+ const blockProps = useBlockProps.save();
13
+
14
+ // TODO: Render the actual TabGroup component with attributes
15
+ // This output is saved to the database and displayed on the frontend
16
+
17
+ return (
18
+ <div {...blockProps}>
19
+ {/* TODO: Render TabGroup component */}
20
+ {attributes.content && <p>{attributes.content}</p>}
21
+ </div>
22
+ );
23
+ }
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Styles for TabGroup Block
3
+ *
4
+ * Reference: packages/components-react/src/TabGroup/
5
+ * Token Reference: packages/tokens/data/resolved-hexes.json
6
+ *
7
+ * TODO: Adapt styles from React component
8
+ * - Copy relevant CSS from React component
9
+ * - Map CSS custom properties to resolved hex values
10
+ * - Use BEM naming: .tds-tab-group--{modifier}
11
+ */
12
+
13
+ .tds-tab-group {
14
+ /* TODO: Add component styles here */
15
+ }
16
+
17
+ .tds-tab-group--focus {
18
+ /* TODO: Add focus state styles */
19
+ }
20
+
21
+ .tds-tab-group--disabled {
22
+ /* TODO: Add disabled state styles */
23
+ }
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vite").UserConfig;
2
+ export default _default;
@@ -0,0 +1 @@
1
+ import '@testing-library/jest-dom';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@times-design-system/components-wordpress",
3
- "version": "1.4.0",
3
+ "version": "1.5.0",
4
4
  "type": "module",
5
5
  "description": "Times Design System Gutenberg blocks for WordPress Full Site Editing",
6
6
  "keywords": [
@@ -38,7 +38,17 @@
38
38
  "clean": "rimraf dist",
39
39
  "dev": "rollup -c --watch",
40
40
  "prepublishOnly": "npm run build",
41
- "_test": "node ./__tests__/*.test.js"
41
+ "test": "vitest --run",
42
+ "test:coverage": "vitest --run --coverage",
43
+ "test:watch": "vitest",
44
+ "test:ui": "vitest --ui",
45
+ "block:create": "node scripts/create-wordpress-block.cjs",
46
+ "block:create:all": "node scripts/create-wordpress-block.cjs --all",
47
+ "block:test": "node scripts/create-wordpress-block-tests.cjs",
48
+ "block:checklist": "node scripts/create-wordpress-block.cjs --checklist",
49
+ "block:checklist:all": "node scripts/create-wordpress-block.cjs --checklist:all",
50
+ "block:status": "node scripts/create-wordpress-block.cjs --status",
51
+ "block:list": "node scripts/create-wordpress-block.cjs --list"
42
52
  },
43
53
  "bugs": {
44
54
  "url": "https://github.com/newsuk/times-design-system/issues"
@@ -48,7 +58,7 @@
48
58
  "access": "public"
49
59
  },
50
60
  "dependencies": {
51
- "@times-design-system/theme-scss": "^2.2.0",
61
+ "@times-design-system/theme-scss": "^2.3.0",
52
62
  "@wordpress/block-editor": "^12.0.0",
53
63
  "@wordpress/blocks": "^12.0.0",
54
64
  "@wordpress/components": "^25.0.0",
@@ -63,13 +73,19 @@
63
73
  "@rollup/plugin-json": "^6.0.0",
64
74
  "@rollup/plugin-node-resolve": "^15.0.0",
65
75
  "@rollup/plugin-typescript": "^11.0.0",
76
+ "@testing-library/jest-dom": "^6.1.5",
77
+ "@testing-library/react": "^14.1.2",
78
+ "@testing-library/user-event": "^14.5.1",
66
79
  "@types/react": "19.2.5",
80
+ "@vitest/ui": "^1.0.4",
81
+ "jsdom": "^23.0.0",
67
82
  "postcss": "^8.4.31",
68
83
  "rimraf": "^5.0.0",
69
84
  "rollup": "^3.0.0",
70
85
  "rollup-plugin-copy": "^3.4.0",
71
86
  "rollup-plugin-postcss": "^4.0.2",
72
- "typescript": "^5.0.0"
87
+ "typescript": "^5.0.0",
88
+ "vitest": "^1.0.4"
73
89
  },
74
- "gitHead": "4e9bd2bc67b0dc34eb38eac29cebe11c6bcdb25b"
90
+ "gitHead": "f57ef06b52f90bc4c57a8e0cefd9be6c54b8f7bf"
75
91
  }