Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
0358d86
Add `theme` package
mirka Oct 13, 2025
0010125
Remove ts extensions
mirka Oct 13, 2025
22f281c
Handle CSS modules
mirka Oct 14, 2025
4741fc1
Update package lock
mirka Oct 14, 2025
0568c63
Allow public documentation
mirka Oct 15, 2025
24da932
Merge branch 'trunk' into theme-package
mirka Oct 15, 2025
97b0dfd
Add content to readme
mirka Oct 15, 2025
71d1f63
Lock private APIs
mirka Oct 15, 2025
fe9e740
Fix missing React error in test file
mirka Oct 15, 2025
d377c0c
Remove test for now (requires jest 30)
mirka Oct 15, 2025
d0d0242
Remove Storybook for now (punt to follow-up)
mirka Oct 15, 2025
91c4376
Remove build scripts to bin
mirka Oct 15, 2025
c144b61
Merge branch 'trunk' into theme-package
mirka Oct 16, 2025
a1c0e40
Move to prebuild folder
mirka Oct 16, 2025
67abb89
Lint all prebuild files
mirka Oct 16, 2025
54a4cb0
Move `design-tokens.ts` file to prebuild folder
mirka Oct 16, 2025
e4519e5
Fixup
mirka Oct 16, 2025
c43da33
Prebuild as part of root build process
mirka Oct 16, 2025
a89b0de
Try resolving floating point differences
mirka Oct 16, 2025
2f6f56b
Update readme
mirka Oct 17, 2025
97aa621
Remove layers from stylesheet
mirka Oct 17, 2025
a1c7b23
Merge branch 'trunk' into theme-package
mirka Oct 17, 2025
98ab6ed
Reduce color ramp tests
mirka Oct 17, 2025
2dfcd14
Move prebuild files into src (fixes types)
mirka Oct 17, 2025
815798b
Allow theme package to participate in private APIs
mirka Oct 17, 2025
ddfa586
Output combined stylesheet
mirka Oct 20, 2025
6aa7e5c
Rename prebuild to prebuilt
mirka Oct 21, 2025
cd1192c
Merge branch 'trunk' into theme-package
mirka Oct 21, 2025
d86bdeb
Merge branch 'trunk' into theme-package
mirka Oct 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Lock private APIs
  • Loading branch information
mirka committed Oct 15, 2025
commit 71d1f63ed35d7f1e8f37b6e76d346124a1489ac1
1 change: 1 addition & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/theme/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"sideEffects": false,
"dependencies": {
"@wordpress/element": "file:../element",
"@wordpress/private-apis": "file:../private-apis",
"colorjs.io": "^0.5.2"
},
"peerDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/theme/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export { ThemeProvider } from './theme-provider';
export { useThemeProviderStyles } from './use-theme-provider-styles';
// Private APIs.
export { privateApis } from './private-apis';
10 changes: 10 additions & 0 deletions packages/theme/src/lock-unlock.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/**
* WordPress dependencies
*/
import { __dangerousOptInToUnstableAPIsOnlyForCoreModules } from '@wordpress/private-apis';

export const { lock, unlock } =
__dangerousOptInToUnstableAPIsOnlyForCoreModules(
'I acknowledge private features are not for use in themes or plugins and doing so will break in the next version of WordPress.',
'@wordpress/theme'
);
12 changes: 12 additions & 0 deletions packages/theme/src/private-apis.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/**
* Internal dependencies
*/
import { lock } from './lock-unlock';
import { ThemeProvider } from './theme-provider';
import { useThemeProviderStyles } from './use-theme-provider-styles';

export const privateApis = {};
lock( privateApis, {
ThemeProvider,
useThemeProviderStyles,
} );
Comment on lines +8 to +12
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All React APIs are private for the time being.

2 changes: 1 addition & 1 deletion packages/theme/src/test/theme-provider.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { render } from '@testing-library/react';
/**
* Internal dependencies
*/
import { ThemeProvider } from '../index';
import { ThemeProvider } from '../theme-provider';

const NestingDebug = ( { bg = '', primary = '' } ) => (
<div
Expand Down
2 changes: 1 addition & 1 deletion packages/theme/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
"moduleResolution": "bundler",
"types": [ "jest", "@testing-library/jest-dom" ]
},
"references": [ { "path": "../element" } ],
"references": [ { "path": "../element" }, { "path": "../private-apis" } ],
"include": [ "src", "types", "scripts", "build/js", "terrazzo.config.ts" ]
}