streamdown-solidjs 0.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 {{me}}
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 ADDED
@@ -0,0 +1,28 @@
1
+ <p>
2
+ <img width="100%" src="https://assets.solidjs.com/banner?type=streamdown-solid&background=tiles&project=%20" alt="streamdown-solid">
3
+ </p>
4
+
5
+ # streamdown-solid
6
+
7
+ [![pnpm](https://img.shields.io/badge/maintained%20with-pnpm-cc00ff.svg?style=for-the-badge&logo=pnpm)](https://pnpm.io/)
8
+
9
+ Streamdown components for Solid.js
10
+
11
+
12
+ ## Quick start
13
+
14
+ Install it:
15
+
16
+ ```bash
17
+ npm i streamdown-solid
18
+ # or
19
+ yarn add streamdown-solid
20
+ # or
21
+ pnpm add streamdown-solid
22
+ ```
23
+
24
+ Use it:
25
+
26
+ ```tsx
27
+ import streamdown-solid from 'streamdown-solid'
28
+ ```
package/dist/dev.js ADDED
@@ -0,0 +1,24 @@
1
+ import { insert, template } from 'solid-js/web';
2
+ import { createSignal, createComputed } from 'solid-js';
3
+
4
+ // src/index.tsx
5
+ var _tmpl$ = /* @__PURE__ */ template(`<div>`);
6
+ function createHello() {
7
+ const [hello, setHello] = createSignal("Hello World!");
8
+ return [hello, (to) => setHello(`Hello ${to}!`)];
9
+ }
10
+ var Hello = (props) => {
11
+ const [hello, setHello] = createHello();
12
+ console.log("Hello World!");
13
+ createComputed(() => {
14
+ if (typeof props.to === "string")
15
+ setHello(props.to);
16
+ });
17
+ return (() => {
18
+ var _el$ = _tmpl$();
19
+ insert(_el$, hello);
20
+ return _el$;
21
+ })();
22
+ };
23
+
24
+ export { Hello, createHello };
package/dist/dev.jsx ADDED
@@ -0,0 +1,19 @@
1
+ // src/index.tsx
2
+ import { createComputed, createSignal } from "solid-js";
3
+ function createHello() {
4
+ const [hello, setHello] = createSignal("Hello World!");
5
+ return [hello, (to) => setHello(`Hello ${to}!`)];
6
+ }
7
+ var Hello = (props) => {
8
+ const [hello, setHello] = createHello();
9
+ console.log("Hello World!");
10
+ createComputed(() => {
11
+ if (typeof props.to === "string")
12
+ setHello(props.to);
13
+ });
14
+ return <><div>{hello()}</div></>;
15
+ };
16
+ export {
17
+ Hello,
18
+ createHello
19
+ };
@@ -0,0 +1,8 @@
1
+ import { Accessor, Component } from 'solid-js';
2
+
3
+ declare function createHello(): [Accessor<string>, (to: string) => void];
4
+ declare const Hello: Component<{
5
+ to?: string;
6
+ }>;
7
+
8
+ export { Hello, createHello };
package/dist/index.js ADDED
@@ -0,0 +1,23 @@
1
+ import { insert, template } from 'solid-js/web';
2
+ import { createSignal, createComputed } from 'solid-js';
3
+
4
+ // src/index.tsx
5
+ var _tmpl$ = /* @__PURE__ */ template(`<div>`);
6
+ function createHello() {
7
+ const [hello, setHello] = createSignal("Hello World!");
8
+ return [hello, (to) => setHello(`Hello ${to}!`)];
9
+ }
10
+ var Hello = (props) => {
11
+ const [hello, setHello] = createHello();
12
+ createComputed(() => {
13
+ if (typeof props.to === "string")
14
+ setHello(props.to);
15
+ });
16
+ return (() => {
17
+ var _el$ = _tmpl$();
18
+ insert(_el$, hello);
19
+ return _el$;
20
+ })();
21
+ };
22
+
23
+ export { Hello, createHello };
package/dist/index.jsx ADDED
@@ -0,0 +1,18 @@
1
+ // src/index.tsx
2
+ import { createComputed, createSignal } from "solid-js";
3
+ function createHello() {
4
+ const [hello, setHello] = createSignal("Hello World!");
5
+ return [hello, (to) => setHello(`Hello ${to}!`)];
6
+ }
7
+ var Hello = (props) => {
8
+ const [hello, setHello] = createHello();
9
+ createComputed(() => {
10
+ if (typeof props.to === "string")
11
+ setHello(props.to);
12
+ });
13
+ return <><div>{hello()}</div></>;
14
+ };
15
+ export {
16
+ Hello,
17
+ createHello
18
+ };
package/package.json ADDED
@@ -0,0 +1,87 @@
1
+ {
2
+ "name": "streamdown-solidjs",
3
+ "version": "0.0.0",
4
+ "description": "Streamdown components for Solid.js",
5
+ "license": "MIT",
6
+ "author": "coolRoger",
7
+ "contributors": [],
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/coolRoger/streamdown-solid.git"
11
+ },
12
+ "homepage": "https://github.com/coolRoger/streamdown-solid#readme",
13
+ "bugs": {
14
+ "url": "https://github.com/coolRoger/streamdown-solid/issues"
15
+ },
16
+ "files": [
17
+ "dist"
18
+ ],
19
+ "private": false,
20
+ "sideEffects": false,
21
+ "type": "module",
22
+ "main": "./dist/index.js",
23
+ "module": "./dist/index.js",
24
+ "types": "./dist/index.d.ts",
25
+ "browser": {},
26
+ "exports": {
27
+ "solid": {
28
+ "development": "./dist/dev.jsx",
29
+ "import": "./dist/index.jsx"
30
+ },
31
+ "development": {
32
+ "import": {
33
+ "types": "./dist/index.d.ts",
34
+ "default": "./dist/dev.js"
35
+ }
36
+ },
37
+ "import": {
38
+ "types": "./dist/index.d.ts",
39
+ "default": "./dist/index.js"
40
+ }
41
+ },
42
+ "typesVersions": {},
43
+ "scripts": {
44
+ "dev": "vite serve dev",
45
+ "build": "tsup",
46
+ "test": "concurrently pnpm:test:*",
47
+ "test:client": "vitest",
48
+ "test:ssr": "pnpm run test:client --mode ssr",
49
+ "prepublishOnly": "pnpm build",
50
+ "format": "prettier --ignore-path .gitignore -w \"src/**/*.{js,ts,json,css,tsx,jsx}\" \"dev/**/*.{js,ts,json,css,tsx,jsx}\"",
51
+ "lint": "concurrently pnpm:lint:*",
52
+ "lint:code": "eslint --ignore-path .gitignore --max-warnings 0 src/**/*.{js,ts,tsx,jsx}",
53
+ "lint:types": "tsc --noEmit",
54
+ "update-deps": "pnpm up -Li"
55
+ },
56
+ "peerDependencies": {
57
+ "solid-js": "^1.9.12"
58
+ },
59
+ "devDependencies": {
60
+ "@types/node": "^20.12.12",
61
+ "@typescript-eslint/eslint-plugin": "^7.9.0",
62
+ "@typescript-eslint/parser": "^7.9.0",
63
+ "concurrently": "^8.2.2",
64
+ "esbuild": "^0.21.3",
65
+ "esbuild-plugin-solid": "^0.6.0",
66
+ "eslint": "^8.56.0",
67
+ "eslint-plugin-eslint-comments": "^3.2.0",
68
+ "eslint-plugin-no-only-tests": "^3.1.0",
69
+ "jsdom": "^24.0.0",
70
+ "prettier": "3.0.0",
71
+ "solid-js": "^1.8.17",
72
+ "tsup": "^8.0.2",
73
+ "tsup-preset-solid": "^2.2.0",
74
+ "typescript": "^5.4.5",
75
+ "vite": "^5.2.11",
76
+ "vite-plugin-solid": "^2.10.2",
77
+ "vitest": "^1.6.0"
78
+ },
79
+ "keywords": [
80
+ "solid"
81
+ ],
82
+ "packageManager": "pnpm@9.1.1",
83
+ "engines": {
84
+ "node": ">=18",
85
+ "pnpm": ">=9.0.0"
86
+ }
87
+ }