From f26cb9f52c39819ec8b08ae73fefeadd0b6ef3a8 Mon Sep 17 00:00:00 2001 From: Thomas Guillot Date: Tue, 14 Oct 2025 20:13:03 +0100 Subject: [PATCH 1/2] feat(newspack-icons): add ai and ai-text to npm package --- packages/icons/index.js | 2 ++ packages/icons/package.json | 2 +- packages/icons/src/ai-text.js | 12 ++++++++++++ packages/icons/src/ai.js | 12 ++++++++++++ 4 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 packages/icons/src/ai-text.js create mode 100644 packages/icons/src/ai.js diff --git a/packages/icons/index.js b/packages/icons/index.js index 084b834d58..ff49f0bf03 100644 --- a/packages/icons/index.js +++ b/packages/icons/index.js @@ -1,5 +1,7 @@ export { default as accessibility } from './src/accessibility'; export { default as ad } from './src/ad'; +export { default as ai } from './src/ai'; +export { default as aiText } from './src/ai-text'; export { default as archiveLoop } from './src/archive-loop'; export { default as aspectLandscape } from './src/aspect-landscape'; export { default as aspectPortrait } from './src/aspect-portrait'; diff --git a/packages/icons/package.json b/packages/icons/package.json index 58eda0dcfe..8d922975eb 100644 --- a/packages/icons/package.json +++ b/packages/icons/package.json @@ -1,6 +1,6 @@ { "name": "newspack-icons", - "version": "1.0.1", + "version": "1.0.2", "description": "A collection of custom SVG icons for Newspack projects", "main": "index.js", "module": "index.js", diff --git a/packages/icons/src/ai-text.js b/packages/icons/src/ai-text.js new file mode 100644 index 0000000000..473286a6db --- /dev/null +++ b/packages/icons/src/ai-text.js @@ -0,0 +1,12 @@ +/** + * WordPress dependencies + */ +import { SVG, Path } from '@wordpress/primitives'; + +const aiText = ( + + + +); + +export default aiText; diff --git a/packages/icons/src/ai.js b/packages/icons/src/ai.js new file mode 100644 index 0000000000..4e9c3633ee --- /dev/null +++ b/packages/icons/src/ai.js @@ -0,0 +1,12 @@ +/** + * WordPress dependencies + */ +import { SVG, Path } from '@wordpress/primitives'; + +const ai = ( + + + +); + +export default ai; From 09cb96d205b22a9659164f3f445de388d9a77c47 Mon Sep 17 00:00:00 2001 From: Thomas Guillot Date: Wed, 15 Oct 2025 11:00:27 +0100 Subject: [PATCH 2/2] feat(components-demo): add demo of all available newspack-icons --- src/wizards/componentsDemo/index.js | 30 +++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/src/wizards/componentsDemo/index.js b/src/wizards/componentsDemo/index.js index b8a5507878..bc9cedf921 100644 --- a/src/wizards/componentsDemo/index.js +++ b/src/wizards/componentsDemo/index.js @@ -9,9 +9,10 @@ import '../../shared/js/public-path'; /** * WordPress dependencies. */ -import { Component, Fragment, render } from '@wordpress/element'; +import { Component, Fragment, render, createInterpolateElement } from '@wordpress/element'; import { __ } from '@wordpress/i18n'; -import { audio, category, plus, reusableBlock, typography } from '@wordpress/icons'; +import { Icon, audio, category, plus, reusableBlock, typography } from '@wordpress/icons'; +import { ExternalLink } from '@wordpress/components'; /** * Internal dependencies. @@ -39,6 +40,7 @@ import { Waiting, WebPreview, } from '../../components/src'; +import * as newspackIcons from '../../../packages/icons'; class ComponentsDemo extends Component { /** @@ -730,6 +732,30 @@ class ComponentsDemo extends Component { #51f1ff / Inverted + +

{ __( 'Newspack Icons', 'newspack-plugin' ) }

+

+ { createInterpolateElement( + __( + "This is a collection of custom SVG icons for Newspack projects.
They are available in newspack-plugin in the newspack-icons package.
There's also an npm package that you can install to use them in your projects.", + 'newspack-plugin' + ), + { + br:
, + code: , + link: , + } + ) } +

+ + { Object.entries( newspackIcons ).map( ( [ name, icon ] ) => ( +
+ + { name } +
+ ) ) } +
+