@astryxdesign/richtext 0.0.0-bootstrap.0 → 0.1.8-canary.d57e546

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/CHANGELOG.md ADDED
@@ -0,0 +1 @@
1
+ # @astryxdesign/richtext
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Meta Platforms, Inc.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,64 @@
1
1
  # @astryxdesign/richtext
2
2
 
3
- This is a `0.0.0-bootstrap.0` placeholder published only to claim the npm name while configuring npm trusted publishing. Do not install it; it will be superseded by the first real release.
3
+ Astryx rich text — a Lexical-based rich text editor and viewer.
4
+
5
+ > **Status: empty scaffold.** This package is bootstrapped but does not export
6
+ > anything yet. It will house the rich text editor and viewer that currently
7
+ > live in `@astryxdesign/lab`; that code will move here without a fresh package
8
+ > rollout.
9
+
10
+ It will ship to npm **only under the `@canary` dist-tag** — there is never a
11
+ stable (`latest`) release yet.
12
+
13
+ ## Trying richtext in your own project (canary)
14
+
15
+ Once components land, `@astryxdesign/richtext` will be published **only** under
16
+ the `@canary` dist-tag, so you must request that tag explicitly. There is no
17
+ `latest` version to install.
18
+
19
+ ```bash
20
+ npm install @astryxdesign/richtext@canary @astryxdesign/core@canary
21
+ ```
22
+
23
+ > Canary builds track the latest commit on `main` (`0.x.y-canary.<sha>`). They
24
+ > can break between any two versions — pin an exact version if you need
25
+ > stability.
26
+
27
+ ## Why no stable release?
28
+
29
+ `package.json` keeps `"private": true` plus an `"astryx": { "canaryOnly": true }`
30
+ marker. The release workflow's stable (`latest`) job skips both private and
31
+ `canaryOnly` packages, while the canary job strips `private` in its ephemeral CI
32
+ checkout only (never in git) to publish the `@canary` tag. The committed
33
+ `private: true` is npm's hard guarantee that no stable publish can ever happen —
34
+ **do not remove it.**
35
+
36
+ ## Publishing publicly (when the editor/view are ready)
37
+
38
+ When maintainers are ready to promote richtext to a stable public release:
39
+
40
+ 1. Move the editor/view source from `@astryxdesign/lab` into `src/` and export
41
+ it from `src/index.ts`. Add the StyleX CSS build wiring (see below).
42
+ 2. Remove `"private": true` **and** the `"astryx": { "canaryOnly": true }`
43
+ marker from `package.json`.
44
+ 3. Add a changeset (`pnpm changeset`) selecting `@astryxdesign/richtext` so the
45
+ release workflow versions and publishes it to the `latest` dist-tag.
46
+ 4. The stable (`latest`) release job (`.github/workflows/release.yml`) will then
47
+ include richtext on the next release.
48
+
49
+ ### Adding the StyleX CSS build (deferred until the first component)
50
+
51
+ This scaffold intentionally omits the `build:css` step. `build-css.mjs` exits
52
+ with an error ("No StyleX rules found") when a package has zero StyleX
53
+ components, which would break CI for an empty package. When the first StyleX
54
+ component lands:
55
+
56
+ 1. Register a `richtext` target in `scripts/build-css.mjs` (mirror the `lab` /
57
+ `charts` entries — same core token alias).
58
+ 2. Add `"build:css": "node ../../scripts/build-css.mjs --package richtext"` to
59
+ the `scripts` block and append `&& pnpm build:css` to the `build` script
60
+ (before `check-no-dev-jsx`).
61
+ 3. Add a `"./richtext.css"` entry to `exports` and add `richtext.css` under
62
+ `files` if needed.
63
+
64
+ The babel config is already StyleX-ready, so this is a small, mechanical add.
@@ -0,0 +1,20 @@
1
+ /**
2
+ * @file index.ts
3
+ * @input (none yet — empty package)
4
+ * @output Public API surface for @astryxdesign/richtext
5
+ * @position Barrel export; entry point for consumers of @astryxdesign/richtext
6
+ *
7
+ * SYNC: When modified, update /packages/richtext/README.md
8
+ */
9
+ /**
10
+ * @astryxdesign/richtext will house the Lexical-based rich text editor and
11
+ * viewer currently in @astryxdesign/lab. It is intentionally empty for now —
12
+ * this bootstrap only establishes the package, its build wiring, and its npm
13
+ * canary-only publishing setup so the editor/view can move here later without
14
+ * a fresh package rollout.
15
+ *
16
+ * The `export {}` keeps this a valid ES module with no exports until the first
17
+ * component lands.
18
+ */
19
+ export {};
20
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AAEH;;;;;;;;;GASG;AACH,OAAO,EAAE,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,22 @@
1
+ // Copyright (c) Meta Platforms, Inc. and affiliates.
2
+
3
+ /**
4
+ * @file index.ts
5
+ * @input (none yet — empty package)
6
+ * @output Public API surface for @astryxdesign/richtext
7
+ * @position Barrel export; entry point for consumers of @astryxdesign/richtext
8
+ *
9
+ * SYNC: When modified, update /packages/richtext/README.md
10
+ */
11
+
12
+ /**
13
+ * @astryxdesign/richtext will house the Lexical-based rich text editor and
14
+ * viewer currently in @astryxdesign/lab. It is intentionally empty for now —
15
+ * this bootstrap only establishes the package, its build wiring, and its npm
16
+ * canary-only publishing setup so the editor/view can move here later without
17
+ * a fresh package rollout.
18
+ *
19
+ * The `export {}` keeps this a valid ES module with no exports until the first
20
+ * component lands.
21
+ */
22
+ export {};
package/package.json CHANGED
@@ -1,11 +1,60 @@
1
1
  {
2
2
  "name": "@astryxdesign/richtext",
3
- "version": "0.0.0-bootstrap.0",
4
- "description": "Placeholder published to claim the npm name during trusted publishing setup. Do not install.",
5
- "homepage": "https://github.com/facebook/astryx",
3
+ "version": "0.1.8-canary.d57e546",
4
+ "description": "Astryx rich text — a Lexical-based rich text editor and viewer. Published to npm only under the @canary dist-tag for early testing; never released as a stable (latest) version.",
5
+ "author": "Meta Open Source",
6
6
  "license": "MIT",
7
+ "homepage": "https://github.com/facebook/astryx#readme",
7
8
  "repository": {
8
9
  "type": "git",
9
- "url": "git+https://github.com/facebook/astryx.git"
10
+ "url": "git+https://github.com/facebook/astryx.git",
11
+ "directory": "packages/richtext"
12
+ },
13
+ "bugs": {
14
+ "url": "https://github.com/facebook/astryx/issues"
15
+ },
16
+ "keywords": [
17
+ "astryx",
18
+ "richtext",
19
+ "rich-text",
20
+ "editor",
21
+ "lexical",
22
+ "design-system"
23
+ ],
24
+ "astryx": {
25
+ "canaryOnly": true,
26
+ "_comment": "Published ONLY to the @canary dist-tag (see .github/workflows/release.yml). Never released as a stable `latest` release. `private: true` is intentional and must stay — it is npm's hard guarantee against an accidental stable publish."
27
+ },
28
+ "main": "./dist/index.js",
29
+ "module": "./dist/index.js",
30
+ "types": "./dist/index.d.ts",
31
+ "sideEffects": false,
32
+ "files": [
33
+ "dist",
34
+ "src",
35
+ "README.md",
36
+ "CHANGELOG.md"
37
+ ],
38
+ "exports": {
39
+ ".": {
40
+ "source": "./src/index.ts",
41
+ "types": "./dist/index.d.ts",
42
+ "default": "./dist/index.js"
43
+ }
44
+ },
45
+ "peerDependencies": {
46
+ "@stylexjs/stylex": ">=0.10.0",
47
+ "@astryxdesign/core": "0.1.8-canary.d57e546",
48
+ "react": ">=19.0.0",
49
+ "react-dom": ">=19.0.0"
50
+ },
51
+ "scripts": {
52
+ "build": "rm -rf dist && pnpm build:esm && tsc --project tsconfig.build.json && node ../../scripts/check-no-dev-jsx.mjs",
53
+ "build:esm": "babel src --out-dir dist --extensions '.ts,.tsx' --out-file-extension '.js' --ignore '**/*.test.ts,**/*.test.tsx,**/__tests__/**,**/*.perf.test.*,**/*.doc.mjs,**/*.d.ts,**/*.css,**/*.css.d.ts' --config-file ./babel.config.js",
54
+ "dev": "babel src --watch --out-dir dist --extensions '.ts,.tsx' --out-file-extension '.js' --ignore '**/*.test.*,**/*.doc.mjs,**/*.d.ts,**/*.css*' --config-file ./babel.config.js",
55
+ "test": "vitest run --root ../..",
56
+ "test:watch": "vitest --root ../..",
57
+ "lint": "eslint src",
58
+ "typecheck": "tsc --project tsconfig.json --noEmit"
10
59
  }
11
- }
60
+ }
package/src/index.ts ADDED
@@ -0,0 +1,22 @@
1
+ // Copyright (c) Meta Platforms, Inc. and affiliates.
2
+
3
+ /**
4
+ * @file index.ts
5
+ * @input (none yet — empty package)
6
+ * @output Public API surface for @astryxdesign/richtext
7
+ * @position Barrel export; entry point for consumers of @astryxdesign/richtext
8
+ *
9
+ * SYNC: When modified, update /packages/richtext/README.md
10
+ */
11
+
12
+ /**
13
+ * @astryxdesign/richtext will house the Lexical-based rich text editor and
14
+ * viewer currently in @astryxdesign/lab. It is intentionally empty for now —
15
+ * this bootstrap only establishes the package, its build wiring, and its npm
16
+ * canary-only publishing setup so the editor/view can move here later without
17
+ * a fresh package rollout.
18
+ *
19
+ * The `export {}` keeps this a valid ES module with no exports until the first
20
+ * component lands.
21
+ */
22
+ export {};