@silvery/examples 0.4.4 → 0.5.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 +7 -0
- package/examples/apps/app-todo.tsx +2 -2
- package/examples/apps/async-data.tsx +1 -13
- package/examples/apps/components.tsx +2 -2
- package/examples/apps/inline-bench.tsx +2 -2
- package/examples/apps/layout-ref.tsx +1 -13
- package/examples/apps/outline.tsx +1 -12
- package/examples/apps/paste-demo.tsx +1 -14
- package/examples/apps/textarea.tsx +1 -13
- package/examples/apps/transform.tsx +1 -14
- package/package.json +11 -10
package/README.md
ADDED
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
|
|
25
25
|
import React from "react"
|
|
26
26
|
import { Box, Text, Muted, Kbd } from "silvery"
|
|
27
|
-
import { createApp, useApp, type AppHandle } from "@silvery/
|
|
28
|
-
import { pipe, withReact, withTerminal } from "@silvery/
|
|
27
|
+
import { createApp, useApp, type AppHandle } from "@silvery/create/create-app"
|
|
28
|
+
import { pipe, withReact, withTerminal } from "@silvery/create/plugins"
|
|
29
29
|
import { ExampleBanner, type ExampleMeta } from "../_banner.js"
|
|
30
30
|
|
|
31
31
|
export const meta: ExampleMeta = {
|
|
@@ -8,19 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import React, { Suspense, useState, use } from "react"
|
|
11
|
-
import {
|
|
12
|
-
render,
|
|
13
|
-
Box,
|
|
14
|
-
Text,
|
|
15
|
-
H1,
|
|
16
|
-
Kbd,
|
|
17
|
-
Muted,
|
|
18
|
-
useInput,
|
|
19
|
-
useApp,
|
|
20
|
-
createTerm,
|
|
21
|
-
ErrorBoundary,
|
|
22
|
-
type Key,
|
|
23
|
-
} from "silvery"
|
|
11
|
+
import { render, Box, Text, H1, Kbd, Muted, useInput, useApp, createTerm, ErrorBoundary, type Key } from "silvery"
|
|
24
12
|
import { ExampleBanner, type ExampleMeta } from "../_banner.js"
|
|
25
13
|
|
|
26
14
|
export const meta: ExampleMeta = {
|
|
@@ -87,8 +87,8 @@ function TypographyTab() {
|
|
|
87
87
|
|
|
88
88
|
<H3>Use Built-in Components</H3>
|
|
89
89
|
<P>
|
|
90
|
-
<Code>silvery/ui</Code> ships 30+ components. They handle keyboard navigation, theming,
|
|
91
|
-
|
|
90
|
+
<Code>silvery/ui</Code> ships 30+ components. They handle keyboard navigation, theming, mouse support, and
|
|
91
|
+
dozens of edge cases.
|
|
92
92
|
</P>
|
|
93
93
|
<UL>
|
|
94
94
|
<LI>
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
* bun examples/apps/inline-bench.tsx
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
import { TerminalBuffer } from "silvery"
|
|
13
|
-
import { createOutputPhase, outputPhase } from "silvery/pipeline/output-phase"
|
|
12
|
+
import { TerminalBuffer } from "@silvery/ag-term/buffer"
|
|
13
|
+
import { createOutputPhase, outputPhase } from "@silvery/ag-term/pipeline/output-phase"
|
|
14
14
|
|
|
15
15
|
const RUNS = 500
|
|
16
16
|
|
|
@@ -8,19 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
import React, { useRef, useState, useEffect } from "react"
|
|
11
|
-
import {
|
|
12
|
-
render,
|
|
13
|
-
Box,
|
|
14
|
-
Text,
|
|
15
|
-
H1,
|
|
16
|
-
Kbd,
|
|
17
|
-
Muted,
|
|
18
|
-
useInput,
|
|
19
|
-
useApp,
|
|
20
|
-
createTerm,
|
|
21
|
-
type BoxHandle,
|
|
22
|
-
type Key,
|
|
23
|
-
} from "silvery"
|
|
11
|
+
import { render, Box, Text, H1, Kbd, Muted, useInput, useApp, createTerm, type BoxHandle, type Key } from "silvery"
|
|
24
12
|
import { ExampleBanner, type ExampleMeta } from "../_banner.js"
|
|
25
13
|
|
|
26
14
|
export const meta: ExampleMeta = {
|
|
@@ -15,18 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import React, { useState } from "react"
|
|
18
|
-
import {
|
|
19
|
-
render,
|
|
20
|
-
Box,
|
|
21
|
-
Text,
|
|
22
|
-
Kbd,
|
|
23
|
-
Muted,
|
|
24
|
-
useInput,
|
|
25
|
-
useApp,
|
|
26
|
-
useContentRect,
|
|
27
|
-
createTerm,
|
|
28
|
-
type Key,
|
|
29
|
-
} from "silvery"
|
|
18
|
+
import { render, Box, Text, Kbd, Muted, useInput, useApp, useContentRect, createTerm, type Key } from "silvery"
|
|
30
19
|
import { ExampleBanner, type ExampleMeta } from "../_banner.js"
|
|
31
20
|
|
|
32
21
|
export const meta: ExampleMeta = {
|
|
@@ -15,20 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import React, { useState } from "react"
|
|
18
|
-
import {
|
|
19
|
-
render,
|
|
20
|
-
Box,
|
|
21
|
-
Text,
|
|
22
|
-
H1,
|
|
23
|
-
Small,
|
|
24
|
-
Kbd,
|
|
25
|
-
Muted,
|
|
26
|
-
Lead,
|
|
27
|
-
useInput,
|
|
28
|
-
useApp,
|
|
29
|
-
createTerm,
|
|
30
|
-
type Key,
|
|
31
|
-
} from "silvery"
|
|
18
|
+
import { render, Box, Text, H1, Small, Kbd, Muted, Lead, useInput, useApp, createTerm, type Key } from "silvery"
|
|
32
19
|
import { ExampleBanner, type ExampleMeta } from "../_banner.js"
|
|
33
20
|
|
|
34
21
|
export const meta: ExampleMeta = {
|
|
@@ -10,19 +10,7 @@
|
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
12
|
import React, { useState } from "react"
|
|
13
|
-
import {
|
|
14
|
-
render,
|
|
15
|
-
Box,
|
|
16
|
-
Text,
|
|
17
|
-
H1,
|
|
18
|
-
Strong,
|
|
19
|
-
Muted,
|
|
20
|
-
TextArea,
|
|
21
|
-
useInput,
|
|
22
|
-
useApp,
|
|
23
|
-
createTerm,
|
|
24
|
-
type Key,
|
|
25
|
-
} from "silvery"
|
|
13
|
+
import { render, Box, Text, H1, Strong, Muted, TextArea, useInput, useApp, createTerm, type Key } from "silvery"
|
|
26
14
|
import { ExampleBanner, type ExampleMeta } from "../_banner.js"
|
|
27
15
|
|
|
28
16
|
export const meta: ExampleMeta = {
|
|
@@ -14,20 +14,7 @@
|
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
16
|
import React, { useState } from "react"
|
|
17
|
-
import {
|
|
18
|
-
render,
|
|
19
|
-
Box,
|
|
20
|
-
Text,
|
|
21
|
-
H1,
|
|
22
|
-
Small,
|
|
23
|
-
Kbd,
|
|
24
|
-
Muted,
|
|
25
|
-
Transform,
|
|
26
|
-
useInput,
|
|
27
|
-
useApp,
|
|
28
|
-
createTerm,
|
|
29
|
-
type Key,
|
|
30
|
-
} from "silvery"
|
|
17
|
+
import { render, Box, Text, H1, Small, Kbd, Muted, Transform, useInput, useApp, createTerm, type Key } from "silvery"
|
|
31
18
|
import { ExampleBanner, type ExampleMeta } from "../_banner.js"
|
|
32
19
|
|
|
33
20
|
export const meta: ExampleMeta = {
|
package/package.json
CHANGED
|
@@ -1,27 +1,28 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@silvery/examples",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Example apps and component demos for silvery
|
|
3
|
+
"version": "0.5.0",
|
|
4
|
+
"description": "Example apps and component demos for silvery — bunx @silvery/examples <name>",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"author": "
|
|
6
|
+
"author": "Bjørn Stabell <bjorn@stabell.org>",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
9
|
"url": "https://github.com/beorn/silvery.git",
|
|
10
|
-
"directory": "packages/
|
|
10
|
+
"directory": "packages/examples"
|
|
11
|
+
},
|
|
12
|
+
"bin": {
|
|
13
|
+
"silvery-examples": "./bin/cli.ts"
|
|
11
14
|
},
|
|
12
15
|
"files": [
|
|
13
16
|
"bin",
|
|
14
17
|
"examples"
|
|
15
18
|
],
|
|
16
19
|
"type": "module",
|
|
17
|
-
"bin": {
|
|
18
|
-
"silvery-examples": "./bin/cli.ts"
|
|
19
|
-
},
|
|
20
20
|
"publishConfig": {
|
|
21
21
|
"access": "public"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"silvery": "
|
|
25
|
-
"@silvery/
|
|
24
|
+
"@silvery/ag-term": "0.5.0",
|
|
25
|
+
"@silvery/create": "0.5.0",
|
|
26
|
+
"silvery": "workspace:*"
|
|
26
27
|
}
|
|
27
|
-
}
|
|
28
|
+
}
|