{"id":13464395,"url":"https://github.com/humanmade/hm-gutenberg-tools","last_synced_at":"2025-06-30T23:10:02.886Z","repository":{"id":27651629,"uuid":"114630185","full_name":"humanmade/hm-gutenberg-tools","owner":"humanmade","description":"Useful helpers, components or tools for building things with Gutenberg","archived":false,"fork":false,"pushed_at":"2025-02-19T11:41:20.000Z","size":3656,"stargazers_count":189,"open_issues_count":11,"forks_count":21,"subscribers_count":25,"default_branch":"main","last_synced_at":"2025-06-30T16:14:52.363Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/humanmade.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-12-18T10:55:00.000Z","updated_at":"2025-04-23T16:37:49.000Z","dependencies_parsed_at":"2024-01-16T06:07:51.029Z","dependency_job_id":"b595e952-263c-46f5-9feb-5f70e24b36fa","html_url":"https://github.com/humanmade/hm-gutenberg-tools","commit_stats":{"total_commits":204,"total_committers":19,"mean_commits":"10.736842105263158","dds":0.5245098039215687,"last_synced_commit":"19c9fed33d295a3ad2d3dcab2ceb3befd040b6a3"},"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"purl":"pkg:github/humanmade/hm-gutenberg-tools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humanmade%2Fhm-gutenberg-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humanmade%2Fhm-gutenberg-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humanmade%2Fhm-gutenberg-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humanmade%2Fhm-gutenberg-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/humanmade","download_url":"https://codeload.github.com/humanmade/hm-gutenberg-tools/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/humanmade%2Fhm-gutenberg-tools/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262864257,"owners_count":23376461,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T14:00:42.138Z","updated_at":"2025-06-30T23:10:02.814Z","avatar_url":"https://github.com/humanmade.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","Uncategorized"],"sub_categories":["Uncategorized"],"readme":"Human Made Gutenberg Tools\n==========================\n\n\u003e [!WARNING]  \n\u003e This project is no longer actively developed. It is recommended that you the components from our [Block Editor Components library instead](https://github.com/humanmade/block-editor-components).  \n\nA place to bundle useful reusable Gutenberg components and other tools.\n\n## What does this include?\n\n* [Post Select button.](https://github.com/humanmade/hm-gutenberg-tools/wiki/Post-Select-Button) Provides a media modal like user experience for selecting single or multiple posts. It supports searching, filtering, sorting and custom post types (and taxonomies).\nstying to work better in the sidebar.\n* More Sidebar controls. Other components wrapped up in as standardised sidebar control components.\n    * [Link control.](https://github.com/humanmade/hm-gutenberg-tools/wiki/Link-Control) A wrapper for the core UrlInput, but with some style improvements.\n    * [Image.](https://github.com/humanmade/hm-gutenberg-tools/wiki/Image-Control) Sidebar UI for selecting an image.\n    * [Post.](https://github.com/humanmade/hm-gutenberg-tools/wiki/Post-Select-Button) A wrapper for the post select button component.\n\n![image](https://user-images.githubusercontent.com/494927/35505702-d334667e-04de-11e8-8afc-4e21b1f83138.png)\n\n## Installation Instructions\n\nIt is reccomended to install as a plugin or mu-plugin using composer.\n\n```\ncomposer require humanmade/hm-gutenberg-tools\n```\n\nIf you install using another method (e.g. git submodule), note that the `main` branch does not include built assets, but tagged releases and the `build` branch do include them. You should not need to build the assets for this plugin as part of your project build process.\n\n### Bundling in a theme\n\nYou can bundle the plugin in a theme (or anywhere outside of plugins/mu-plugins directories). In order to do this you need to define `HM_GB_TOOLS_DIR` and `HM_GB_TOOLS_URL`. For example\n\n```\ndefine( 'HM_GB_TOOLS_DIR', get_stylesheet_directory() . '/lib/hm-gutenberg-tools' );\ndefine( 'HM_GB_TOOLS_URL', get_stylesheet_directory_uri() . '/lib/hm-gutenberg-tools' );\n```\n\n## Using components from HM Gutenberg Tools\n\nYou should specify the script `hm-gb-tools-editor` as a dependency of the script in which you are using it.\n\n```php\nwp_enqueue_script( 'my-custom-block', plugins_url( 'my-custom-block.js', dirname(__FILE__) ), [ 'hm-gb-tools-editor' ], '1.0' );\n```\n\nHM Gutenberg Tools then exposes all functionality globally as `window.hm`. You can then use reference this in your project in much the the same way that you would use any other components from Gutenberg.\n\n```js\nconst { PostSelectButton } = window.hm.components;\n\nfunction Edit( { attributes, setAttributes } ) {\n    return (\n        \u003cPostSelectButton\n            value={ attributes.postIds }\n            onSelect={ posts =\u003e setAttributes( { postIds: posts.map( p =\u003e p.id ) } ) }\n            postType=\"page\"\n            btnProps={ { isLarge: true } }\n        \u003e\n    );\n}\n```\n\n[**Refer to the Wiki for usage instructions on individual components**](https://github.com/humanmade/hm-gutenberg-tools/wiki)\n\n## Development\n\n* `npm run build` Builds a production version of the code.\n* `npm run watch` Watches for changes and builds development versions of the code.\n* `npm run lint` Lints your JS. Run `npm run lint -- --fix` to fix it too.\n* `composer run lint` Lints your PHP code.\n\nTo assist with local development, you can define `define( 'HM_GB_TOOLS_DEV', true );` to enable the \"HM Gutenberg Tools Dev\" block, which includes examples of many of features offered by this plugin.\n\n## Releasing a new version.\n\n1. Update the version numbers in `plugin.php` and `package.json`.\n2. Add the changelog to the readme for the new version.\n3. Commit your changes to `main` and push.\n4. Run the bash script: `./release.sh v1.2.3`\n\nThe script will sync the the build branch with main, build assets and commit the changes, and publish a new tagged version.\n\n## Changelog\n\n### v1.7.3\n\n* Restore built asset files not included in v1.7.2 due to release process error.\n\n### v1.7.2\n\n* Upgraded dependencies for enhanced performance, security and stability.\n* Audit fix dependency upgrade, improving code security.\n* Enhanced security by introducing sanitization for `post.title.rendered` mitigating XSS attack risks.\n\n### v1.7.1\n\n* Add filter for minimum search length for term select.\n* Add filter for term select query.\n\n### v1.7.0\n\n* Add post status field select.\n* Allow to accept status from the Rest API endpoint.\n* Add status field in the post list item.\n* Update deprecated mediaUpload function.\n\n### v1.6.3\n\n* Ignore sticky posts by default.\n\n### v1.6.2\n\n* Fix date filter label not being cleared when both selected dates are unset.\n* Switch from node-sass to sass and npm audit fix\n\n### v1.6.1\n\n* Reset PostSelect current page when filters are changed\n\n### v1.6.0\n\n* Adds date range filters for use when searching posts\n\n### v1.5.0\n\n* Handle current selections across multiple post types\n* Correctly handle post type filters in post selection modal\n* Preserbe specified Post Type list when clearing Types token list\n\n### v1.4.1\n\n* Adds a filter to allow the post select query to be modified\n\n### v1.4.0\n\n* Support thumbnails in post select components\n\n### v1.3.1\n\n* Switch selection when clicking off single-post selections\n\n### v1.1.0\n\n* Support for i18n.\n\n### v1.0.0\n\n* Refactor how it works for compatability with WordPress 5.0\n    * Use core data store\n    * Use custom endpoint to fetch content to handle multiple post types.\n\n### v0.2.0\n\n* Deprecate EditableHTML. You can now just use the Gutenberg component `wp.editor.RichText` and set the `format` prop to `string`.\n* Updates to work with the latest version of Gutenberg (3.5).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhumanmade%2Fhm-gutenberg-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhumanmade%2Fhm-gutenberg-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhumanmade%2Fhm-gutenberg-tools/lists"}