@ruckc/truss-code 1.27.0 → 1.29.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.
Files changed (2) hide show
  1. package/README.md +30 -0
  2. package/package.json +3 -2
package/README.md ADDED
@@ -0,0 +1,30 @@
1
+ # @ruckc/truss-code
2
+
3
+ Read-only code blocks, diff and merge views, and an optional Monaco code editor, styled with [Truss UI](https://truss.ruck.io) tokens.
4
+
5
+ Docs: <https://truss.ruck.io/docs/packages>
6
+
7
+ ## Install
8
+
9
+ ```sh
10
+ npm install @ruckc/truss-code @ruckc/truss-ui
11
+ npm install monaco-editor # only if you use the editors
12
+ ```
13
+
14
+ `svelte` (^5.20) and `@ruckc/truss-ui` are peer dependencies; `monaco-editor` is an optional peer, loaded lazily in the browser. Apps without it import from `@ruckc/truss-code/lite`.
15
+
16
+ ## Usage
17
+
18
+ ```svelte
19
+ <script lang="ts">
20
+ import { CodeEditor, CodeBlock } from '@ruckc/truss-code';
21
+ let sql = $state('select 1');
22
+ </script>
23
+
24
+ <CodeEditor bind:value={sql} language="sql" height={240} />
25
+ <CodeBlock code={sql} language="sql" />
26
+ ```
27
+
28
+ ## License
29
+
30
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ruckc/truss-code",
3
- "version": "1.27.0",
3
+ "version": "1.29.0",
4
4
  "description": "Read-only code blocks, diff and merge views, plus an optional Monaco code editor, styled with Truss UI",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -8,7 +8,8 @@
8
8
  "package": "svelte-package -i src/lib -o dist"
9
9
  },
10
10
  "files": [
11
- "dist"
11
+ "dist",
12
+ "README.md"
12
13
  ],
13
14
  "sideEffects": [
14
15
  "**/*.css"