@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/dist/tool.d.ts CHANGED
@@ -1,32 +1,36 @@
1
- import { t as CreateThemeOptions } from "./_chunks/types.js";
1
+ import { a as PartialHues } from "./types-DfPLuLv0.js";
2
2
  /**
3
3
  * Options for the {@link themerTool} plugin.
4
4
  *
5
- * @public
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 colors that the Studio's configured theme was generated from — 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 colors = {primary: '#2276fc'}
17
+ * const hues = parseHuesFromUrl('https://themer.sanity.build/api/hues?preset=verdant')
15
18
  *
16
19
  * export default defineConfig({
17
- * theme: createTheme(colors),
18
- * plugins: [themerTool({colors})],
20
+ * theme: createTheme(hues),
21
+ * plugins: [themerTool({hues})],
19
22
  * })
20
23
  * ```
21
24
  */
22
- colors?: CreateThemeOptions;
25
+ hues?: PartialHues;
23
26
  }
24
27
  /**
25
- * A Studio plugin that adds a themer sidebar for generating Studio themes:
26
- * a navbar toggle opens the sidebar next to the active tool, where presets
27
- * and color pickers preview a `createTheme` theme live on the whole Studio
28
- * while you browse around. Toggle between light and dark mode with the
29
- * regular appearance menu — the preview follows it.
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
- * @public
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 };
@@ -1 +1 @@
1
- {"version":3,"file":"tool.d.ts","names":[],"sources":["../src/tool/plugin.tsx"],"mappings":";;;;;;UAYiB;;;;;;;;;;;;;;;EAef,SAAS;;;;;;;;;;;;;;;;;;;;;cAsBE,6BAAU,cAAA"}
1
+ {"version":3,"file":"tool.d.ts","names":[],"sources":["../src/tool/plugin.tsx"],"mappings":";;;;;;;;;UAgBiB;;;;;;;;;;;;;;;EAef,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;cA0BI,6BAAU,cAAA"}