@konemono/nostr-share-component 0.0.16 → 0.0.17
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 +17 -36
- package/package.json +6 -6
- package/dist/main.d.ts +0 -2
- /package/dist/{lib/icons.d.ts → icons.d.ts} +0 -0
- /package/dist/{lib/list.d.ts → list.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -1,47 +1,28 @@
|
|
|
1
|
-
#
|
|
1
|
+
# nostr-share-component
|
|
2
2
|
|
|
3
|
-
This template should help get you started developing with Svelte and TypeScript in Vite.
|
|
4
3
|
|
|
5
|
-
|
|
4
|
+
``<head>``に以下のコードを各。{version}の部分は適切なバージョンに変更してください(e.g. 0.0.10)
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
## Technical considerations
|
|
14
|
-
|
|
15
|
-
**Why use this over SvelteKit?**
|
|
16
|
-
|
|
17
|
-
- It brings its own routing solution which might not be preferable for some users.
|
|
18
|
-
- It is first and foremost a framework that just happens to use Vite under the hood, not a Vite app.
|
|
19
|
-
|
|
20
|
-
This template contains as little as possible to get started with Vite + TypeScript + Svelte, while taking into account the developer experience with regards to HMR and intellisense. It demonstrates capabilities on par with the other `create-vite` templates and is a good starting point for beginners dipping their toes into a Vite + Svelte project.
|
|
21
|
-
|
|
22
|
-
Should you later need the extended capabilities and extensibility provided by SvelteKit, the template has been structured similarly to SvelteKit so that it is easy to migrate.
|
|
23
|
-
|
|
24
|
-
**Why `global.d.ts` instead of `compilerOptions.types` inside `jsconfig.json` or `tsconfig.json`?**
|
|
25
|
-
|
|
26
|
-
Setting `compilerOptions.types` shuts out all other types not explicitly listed in the configuration. Using triple-slash references keeps the default TypeScript setting of accepting type information from the entire workspace, while also adding `svelte` and `vite/client` type information.
|
|
27
|
-
|
|
28
|
-
**Why include `.vscode/extensions.json`?**
|
|
6
|
+
```
|
|
7
|
+
<script src="
|
|
8
|
+
https://cdn.jsdelivr.net/npm/@konemono/nostr-share-component@{version}/dist/nostr-share-component.min.js
|
|
9
|
+
"></script>
|
|
10
|
+
```
|
|
29
11
|
|
|
30
|
-
|
|
12
|
+
任意の位置に以下のコードを配置
|
|
31
13
|
|
|
32
|
-
|
|
14
|
+
{url}{title}{text}はそれぞれ共有したい文字列に変換
|
|
15
|
+
(なくても良い)
|
|
33
16
|
|
|
34
|
-
|
|
17
|
+
icon={true}にすると◯サイズのボタン(なくても良い。defaultはfalse)
|
|
35
18
|
|
|
36
|
-
**Why is HMR not preserving my local component state?**
|
|
37
19
|
|
|
38
|
-
|
|
20
|
+
```
|
|
21
|
+
<nostr-share url={url} shareTitle={title} text={text} icon={true} class=""></nostr-share>
|
|
22
|
+
```
|
|
39
23
|
|
|
40
|
-
|
|
24
|
+
中に任意のコンテントをいれると共有ボタンがカスタムできる
|
|
41
25
|
|
|
42
|
-
```ts
|
|
43
|
-
// store.ts
|
|
44
|
-
// An extremely simple external store
|
|
45
|
-
import { writable } from 'svelte/store'
|
|
46
|
-
export default writable(0)
|
|
47
26
|
```
|
|
27
|
+
<nostr-share class="" url={url} shareTitle={title} text={text} icon={true}>Share on Nostr</nostr-share>
|
|
28
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@konemono/nostr-share-component",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.17",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/nostr-share-component.umd.js",
|
|
6
6
|
"module": "dist/nostr-share-component.es.js",
|
|
@@ -31,12 +31,12 @@
|
|
|
31
31
|
"check": "svelte-check --tsconfig ./tsconfig.json && tsc -p tsconfig.node.json"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@sveltejs/vite-plugin-svelte": "^5.0.
|
|
34
|
+
"@sveltejs/vite-plugin-svelte": "^5.0.3",
|
|
35
35
|
"@tsconfig/svelte": "^5.0.4",
|
|
36
|
-
"svelte": "^5.
|
|
37
|
-
"svelte-check": "^4.1.
|
|
36
|
+
"svelte": "^5.15.0",
|
|
37
|
+
"svelte-check": "^4.1.1",
|
|
38
38
|
"tslib": "^2.8.1",
|
|
39
|
-
"typescript": "~5.
|
|
40
|
-
"vite": "^6.0.
|
|
39
|
+
"typescript": "~5.7.2",
|
|
40
|
+
"vite": "^6.0.5"
|
|
41
41
|
}
|
|
42
42
|
}
|
package/dist/main.d.ts
DELETED
|
File without changes
|
|
File without changes
|