@sanity/themer 0.0.0 → 0.1.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.
- package/README.md +9 -89
- package/dist/{legacy.cjs → defaults-DJtuhI2W.js} +94 -56
- package/dist/defaults-DJtuhI2W.js.map +1 -0
- package/dist/legacy.d.ts +8 -90
- package/dist/legacy.d.ts.map +1 -1
- package/dist/legacy.js +2 -1199
- package/dist/tool.d.ts +20 -13
- package/dist/tool.d.ts.map +1 -1
- package/dist/tool.js +682 -250
- package/dist/tool.js.map +1 -1
- package/dist/types-DfPLuLv0.d.ts +74 -0
- package/dist/types-DfPLuLv0.d.ts.map +1 -0
- package/package.json +22 -39
- package/dist/_chunks/mix.cjs +0 -52
- package/dist/_chunks/mix.cjs.map +0 -1
- package/dist/_chunks/mix.js +0 -42
- package/dist/_chunks/mix.js.map +0 -1
- package/dist/_chunks/presets.cjs +0 -215
- package/dist/_chunks/presets.cjs.map +0 -1
- package/dist/_chunks/presets.js +0 -201
- package/dist/_chunks/presets.js.map +0 -1
- package/dist/_chunks/types.d.cts +0 -26
- package/dist/_chunks/types.d.cts.map +0 -1
- package/dist/_chunks/types.d.ts +0 -26
- package/dist/_chunks/types.d.ts.map +0 -1
- package/dist/index.cjs +0 -3
- package/dist/index.d.cts +0 -63
- package/dist/index.d.cts.map +0 -1
- package/dist/index.d.ts +0 -63
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -2
- package/dist/legacy.cjs.map +0 -1
- package/dist/legacy.d.cts +0 -166
- package/dist/legacy.d.cts.map +0 -1
- package/dist/legacy.js.map +0 -1
- package/dist/tool.cjs +0 -407
- package/dist/tool.cjs.map +0 -1
- package/dist/tool.d.cts +0 -45
- package/dist/tool.d.cts.map +0 -1
package/dist/tool.d.ts
CHANGED
|
@@ -1,32 +1,36 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as PartialHues } from "./types-DfPLuLv0.js";
|
|
2
2
|
/**
|
|
3
3
|
* Options for the {@link themerTool} plugin.
|
|
4
4
|
*
|
|
5
|
-
*
|
|
5
|
+
* This is experimental and may change or be removed in any release without
|
|
6
|
+
* notice — use at your own risk.
|
|
7
|
+
*
|
|
8
|
+
* @alpha
|
|
6
9
|
*/
|
|
7
10
|
interface ThemerToolOptions {
|
|
8
11
|
/**
|
|
9
|
-
* The
|
|
12
|
+
* The hues that the Studio's configured theme was generated from — the
|
|
10
13
|
* themer starts editing from these, so pass the same object that the
|
|
11
14
|
* `theme` in the Studio config uses:
|
|
12
15
|
*
|
|
13
16
|
* ```ts
|
|
14
|
-
* const
|
|
17
|
+
* const hues = parseHuesFromUrl('https://themer.sanity.build/api/hues?preset=verdant')
|
|
15
18
|
*
|
|
16
19
|
* export default defineConfig({
|
|
17
|
-
* theme: createTheme(
|
|
18
|
-
* plugins: [themerTool({
|
|
20
|
+
* theme: createTheme(hues),
|
|
21
|
+
* plugins: [themerTool({hues})],
|
|
19
22
|
* })
|
|
20
23
|
* ```
|
|
21
24
|
*/
|
|
22
|
-
|
|
25
|
+
hues?: PartialHues;
|
|
23
26
|
}
|
|
24
27
|
/**
|
|
25
|
-
* A Studio plugin that adds a themer sidebar for
|
|
26
|
-
* a navbar toggle opens the sidebar next to the active tool, where presets
|
|
27
|
-
* and
|
|
28
|
-
*
|
|
29
|
-
* regular appearance menu — the
|
|
28
|
+
* A Studio plugin that adds a themer sidebar for the legacy Themer themes:
|
|
29
|
+
* a navbar toggle opens the sidebar next to the active tool, where presets,
|
|
30
|
+
* per-hue editors and pasted themer.sanity.build URLs preview a legacy
|
|
31
|
+
* `createTheme` theme live on the whole Studio while you browse around.
|
|
32
|
+
* Toggle between light and dark mode with the regular appearance menu — the
|
|
33
|
+
* preview follows it.
|
|
30
34
|
*
|
|
31
35
|
* ```ts
|
|
32
36
|
* import {themerTool} from '@sanity/themer/tool'
|
|
@@ -38,7 +42,10 @@ interface ThemerToolOptions {
|
|
|
38
42
|
* })
|
|
39
43
|
* ```
|
|
40
44
|
*
|
|
41
|
-
*
|
|
45
|
+
* This is experimental and may change or be removed in any release without
|
|
46
|
+
* notice — use at your own risk.
|
|
47
|
+
*
|
|
48
|
+
* @alpha
|
|
42
49
|
*/
|
|
43
50
|
declare const themerTool: import("sanity").Plugin<void | ThemerToolOptions>;
|
|
44
51
|
export { type ThemerToolOptions, themerTool };
|
package/dist/tool.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool.d.ts","names":[],"sources":["../src/tool/plugin.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"tool.d.ts","names":[],"sources":["../src/tool/plugin.tsx"],"mappings":";;;;;;;;;UAgBiB;;;;;;;;;;;;;;;EAef,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;cA0BI,6BAAU,cAAA"}
|