@plumeria/init 21.2.7 → 22.0.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 CHANGED
@@ -14,7 +14,7 @@ writes. Nothing is installed or patched before you say so.
14
14
  ✔ detected next pnpm typescript
15
15
 
16
16
  ➡︎ install @plumeria/core @plumeria/next-plugin @plumeria/eslint-plugin rimraf
17
- + write plumeria.d.ts classStyle
17
+ + write plumeria.d.ts sx
18
18
  ~ patch next.config.ts withPlumeria(...)
19
19
  ~ patch eslint.config.ts plumeria.configs.recommended
20
20
  ~ patch package.json predev: rimraf .next, prebuild: rimraf .next
@@ -42,13 +42,13 @@ so the counterpart cannot compile, and ESLint gets
42
42
  is reported while you type. Answering "none" sets neither. `--sizes` extends
43
43
  the answer to the size axis, where `width` and `inlineSize` are the pair.
44
44
 
45
- **Which JSX prop carries styles?** — `classStyle` by default. A renamed prop is
45
+ **Which JSX prop carries styles?** — `sx` by default. A renamed prop is
46
46
  written into the plugin as `styleProp` and declared in `plumeria.d.ts`, so the
47
47
  two cannot disagree. It has to be an identifier TypeScript can declare, and a
48
48
  name React leaves free; `className`, `style`, `key`, `ref` and `children` are
49
49
  refused, from the prompt and from `--style-prop` alike.
50
50
 
51
- **Apply styles in .jsx/.tsx only through `classStyle`?** — yes by default, which
51
+ **Apply styles in .jsx/.tsx only through `sx`?** — yes by default, which
52
52
  adds `@plumeria/no-use-in-jsx` to the lint config, so `css.use()` is reported in
53
53
  `.jsx` and `.tsx` files and the styling prop is the one way to apply styles
54
54
  there. Answer no, or pass `--allow-use`, when the project styles a third-party
@@ -95,7 +95,7 @@ nothing is touched and the snippet is printed instead.
95
95
  npx @plumeria/init --dry-run # show the plan, write nothing
96
96
  npx @plumeria/init --yes # take every default, ask nothing
97
97
  npx @plumeria/init --physical --sizes # answer the spelling question up front
98
- npx @plumeria/init --style-prop sx
98
+ npx @plumeria/init --style-prop classStyle
99
99
  npx @plumeria/init --allow-use # keep css.use() in .jsx/.tsx files
100
100
  npx @plumeria/init --bundler rollup
101
101
  npx @plumeria/init --no-eslint # leave ESLint out
package/dist/cli.js CHANGED
@@ -25,7 +25,7 @@ Options
25
25
  -y, --yes accept every default, ask nothing
26
26
  -d, --dry-run show the plan without writing
27
27
  --bundler <name> ${detect_1.BUNDLERS.join(', ')}
28
- --style-prop <p> the JSX prop that carries styles (default classStyle)
28
+ --style-prop <p> the JSX prop that carries styles (default sx)
29
29
  --logical this project writes logical properties
30
30
  --physical this project writes physical properties
31
31
  --sizes extend the spelling policy to the size axis
package/dist/setup.d.ts CHANGED
@@ -38,7 +38,7 @@ export type Action = {
38
38
  note: string;
39
39
  file: string;
40
40
  };
41
- export declare const DEFAULT_STYLE_PROP = "classStyle";
41
+ export declare const DEFAULT_STYLE_PROP = "sx";
42
42
  export declare const assertStyleProp: (value: string) => string;
43
43
  export declare const DEFAULT_ANSWERS: Answers;
44
44
  export declare const rejectedSpelling: (spelling: Spelling) => "logical" | "physical" | undefined;
package/dist/setup.js CHANGED
@@ -8,7 +8,7 @@ const node_fs_1 = __importDefault(require("node:fs"));
8
8
  const node_path_1 = __importDefault(require("node:path"));
9
9
  const detect_1 = require("./detect");
10
10
  const source_1 = require("./source");
11
- exports.DEFAULT_STYLE_PROP = 'classStyle';
11
+ exports.DEFAULT_STYLE_PROP = 'sx';
12
12
  const IDENTIFIER = /^[A-Za-z_$][A-Za-z0-9_$]*$/;
13
13
  const RESERVED = new Set(['className', 'key', 'ref', 'children', 'style']);
14
14
  const assertStyleProp = (value) => {
@@ -91,7 +91,7 @@ const pluginCall = (bundler, answers, local = 'plumeria') => `${local}.${UNPLUGI
91
91
  exports.pluginCall = pluginCall;
92
92
  const declarationSource = (answers) => {
93
93
  if (answers.styleProp === exports.DEFAULT_STYLE_PROP) {
94
- return `/// <reference types="@plumeria/core/class-style" />\n`;
94
+ return `/// <reference types="@plumeria/core/sx" />\n`;
95
95
  }
96
96
  return `import type { Style } from '@plumeria/core';
97
97
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plumeria/init",
3
- "version": "21.2.7",
3
+ "version": "22.0.0",
4
4
  "description": "One command that sets up Plumeria: detects the bundler, installs the packages, writes the configs",
5
5
  "author": "Refirst 11",
6
6
  "license": "MIT",