@ideasonpurpose/wp-theme-addons 0.2.2 → 0.3.1
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/README.md +20 -4
- package/index.d.ts +30 -0
- package/package.json +8 -6
package/README.md
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
# WordPress Theme Addons
|
|
2
2
|
|
|
3
|
-
#### Version 0.
|
|
3
|
+
#### Version 0.3.1
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
[](https://www.npmjs.com/package/@ideasonpurpose/wp-theme-addons)
|
|
6
|
+
[](https://packagist.org/packages/ideasonpurpose/wp-theme-addons)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
This repository contains JavaScript and PHP add-ons for the WordPress Block Editor and Hybrid themes. The project is used in production, but is under active development and implementations are likely to change.
|
|
6
10
|
|
|
7
11
|
## What's in here
|
|
8
12
|
|
|
@@ -51,7 +55,7 @@ A few utility classes are exported. `usePublicPostTypes` and `usePublicTaxonomie
|
|
|
51
55
|
### npm
|
|
52
56
|
|
|
53
57
|
```sh
|
|
54
|
-
npm install
|
|
58
|
+
npm install @ideasonpurpose/wp-theme-addons
|
|
55
59
|
```
|
|
56
60
|
|
|
57
61
|
Or in `package.json`:
|
|
@@ -59,7 +63,7 @@ Or in `package.json`:
|
|
|
59
63
|
```json
|
|
60
64
|
{
|
|
61
65
|
"dependencies": {
|
|
62
|
-
"@ideasonpurpose/wp-theme-addons": "
|
|
66
|
+
"@ideasonpurpose/wp-theme-addons": "^0.2.2"
|
|
63
67
|
}
|
|
64
68
|
}
|
|
65
69
|
```
|
|
@@ -166,3 +170,15 @@ graph TD
|
|
|
166
170
|
- **npm** reads `package.json` → installs to `node_modules/` → JS/SCSS imports resolve via `@ideasonpurpose/wp-theme-addons`
|
|
167
171
|
- **Composer** reads `composer.json` → installs to `vendor/` → PHP classes autoload via PSR-4
|
|
168
172
|
- No conflicts: separate config files, separate dependency directories, separate language ecosystems.
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
<!-- START IOP CREDIT BLURB 2026-07-->
|
|
176
|
+
|
|
177
|
+
##
|
|
178
|
+
|
|
179
|
+
#### Brought to you by IOP
|
|
180
|
+
|
|
181
|
+
| <a href="https://www.ideasonpurpose.com"><img src="https://raw.githubusercontent.com/ideasonpurpose/ideasonpurpose/master/iop-logo-white-on-black-88px.png" width="44" height="44" align="top" alt="IOP Logo"></a> <br> | This project is actively developed and used in production at <a href="https://www.ideasonpurpose.com">Ideas On Purpose</a>. <br> |
|
|
182
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
|
|
183
|
+
|
|
184
|
+
<!-- END IOP CREDIT BLURB -->
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
declare module "@ideasonpurpose/wp-theme-addons" {
|
|
2
|
+
interface WP_Post_Type {
|
|
3
|
+
slug: string;
|
|
4
|
+
name: string;
|
|
5
|
+
viewable: boolean;
|
|
6
|
+
taxonomies: string[];
|
|
7
|
+
[key: string]: unknown;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
interface WP_Taxonomy {
|
|
11
|
+
slug: string;
|
|
12
|
+
name: string;
|
|
13
|
+
visibility: {
|
|
14
|
+
publicly_queryable: boolean;
|
|
15
|
+
[key: string]: unknown;
|
|
16
|
+
};
|
|
17
|
+
labels: {
|
|
18
|
+
singular_name: string;
|
|
19
|
+
[key: string]: unknown;
|
|
20
|
+
};
|
|
21
|
+
[key: string]: unknown;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function usePublicPostTypes(): WP_Post_Type[] | undefined;
|
|
25
|
+
export function usePublicTaxonomies(): WP_Taxonomy[] | undefined;
|
|
26
|
+
|
|
27
|
+
export function initLinkedGroupBlock(): void;
|
|
28
|
+
export function initRelatedPostsQueryBlock(): void;
|
|
29
|
+
export function initCssLocalProps(blockNames?: string[]): void;
|
|
30
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ideasonpurpose/wp-theme-addons",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "WordPress Block Editor add-ons — JavaScript blocks, utilities, and PHP components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"wordpress",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"type": "git",
|
|
18
18
|
"url": "git+https://github.com/ideasonpurpose/wp-theme-addons.git"
|
|
19
19
|
},
|
|
20
|
-
"license": "
|
|
20
|
+
"license": "ISC",
|
|
21
21
|
"author": "Ideas On Purpose (https://www.ideasonpurpose.com/)",
|
|
22
22
|
"contributors": [
|
|
23
23
|
{
|
|
@@ -28,11 +28,13 @@
|
|
|
28
28
|
"type": "module",
|
|
29
29
|
"exports": "./index.js",
|
|
30
30
|
"main": "index.js",
|
|
31
|
+
"types": "index.d.ts",
|
|
31
32
|
"directories": {
|
|
32
33
|
"lib": "lib"
|
|
33
34
|
},
|
|
34
35
|
"files": [
|
|
35
36
|
"index.js",
|
|
37
|
+
"index.d.ts",
|
|
36
38
|
"lib",
|
|
37
39
|
"editor",
|
|
38
40
|
"CssLocalProps",
|
|
@@ -41,6 +43,10 @@
|
|
|
41
43
|
"scripts": {
|
|
42
44
|
"version": "version-everything && git add -u"
|
|
43
45
|
},
|
|
46
|
+
"prettier": "@ideasonpurpose/prettier-config",
|
|
47
|
+
"stylelint": {
|
|
48
|
+
"extends": "@ideasonpurpose/stylelint-config"
|
|
49
|
+
},
|
|
44
50
|
"devDependencies": {
|
|
45
51
|
"@ideasonpurpose/prettier-config": "^1.1.1",
|
|
46
52
|
"@ideasonpurpose/stylelint-config": "^1.1.6",
|
|
@@ -51,10 +57,6 @@
|
|
|
51
57
|
"prettier": "^3.9.4",
|
|
52
58
|
"version-everything": "^0.12.2"
|
|
53
59
|
},
|
|
54
|
-
"prettier": "@ideasonpurpose/prettier-config",
|
|
55
|
-
"stylelint": {
|
|
56
|
-
"extends": "@ideasonpurpose/stylelint-config"
|
|
57
|
-
},
|
|
58
60
|
"version-everything": {
|
|
59
61
|
"files": [
|
|
60
62
|
"README.md"
|