react-smart-copy 1.9.0 → 1.11.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 +159 -3
- package/dist/capture.cjs.map +1 -1
- package/dist/capture.js.map +1 -1
- package/dist/core.cjs +43 -10
- package/dist/core.cjs.map +1 -1
- package/dist/core.d.cts +32 -4
- package/dist/core.d.ts +32 -4
- package/dist/core.js +41 -11
- package/dist/core.js.map +1 -1
- package/dist/index.cjs +43 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +32 -4
- package/dist/index.d.ts +32 -4
- package/dist/index.js +41 -11
- package/dist/index.js.map +1 -1
- package/dist/markdown.cjs +1405 -0
- package/dist/markdown.cjs.map +1 -0
- package/dist/markdown.d.cts +144 -0
- package/dist/markdown.d.ts +144 -0
- package/dist/markdown.js +1395 -0
- package/dist/markdown.js.map +1 -0
- package/dist/structured.cjs +552 -0
- package/dist/structured.cjs.map +1 -0
- package/dist/structured.d.cts +273 -0
- package/dist/structured.d.ts +273 -0
- package/dist/structured.js +545 -0
- package/dist/structured.js.map +1 -0
- package/dist/testing.cjs.map +1 -1
- package/dist/testing.d.cts +11 -0
- package/dist/testing.d.ts +11 -0
- package/dist/testing.js.map +1 -1
- package/package.json +74 -11
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-smart-copy",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "Headless, type-safe clipboard interactions for React: copy and paste text, rich HTML and
|
|
3
|
+
"version": "1.11.0",
|
|
4
|
+
"description": "Headless, type-safe clipboard interactions for React: copy and paste text, rich HTML, images, spreadsheet tables, typed application data and Markdown, with coordinated copy groups, SVG/DOM capture, honest error states, retry and screen-reader announcements.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
7
7
|
"clipboard",
|
|
@@ -21,7 +21,15 @@
|
|
|
21
21
|
"google-sheets",
|
|
22
22
|
"tsv",
|
|
23
23
|
"ag-grid",
|
|
24
|
-
"tanstack-table"
|
|
24
|
+
"tanstack-table",
|
|
25
|
+
"structured-clipboard",
|
|
26
|
+
"custom-clipboard-format",
|
|
27
|
+
"standard-schema",
|
|
28
|
+
"markdown",
|
|
29
|
+
"html-to-markdown",
|
|
30
|
+
"paste-as-markdown",
|
|
31
|
+
"google-docs",
|
|
32
|
+
"word"
|
|
25
33
|
],
|
|
26
34
|
"license": "MIT",
|
|
27
35
|
"author": {
|
|
@@ -59,6 +67,12 @@
|
|
|
59
67
|
],
|
|
60
68
|
"table": [
|
|
61
69
|
"./dist/table.d.ts"
|
|
70
|
+
],
|
|
71
|
+
"structured": [
|
|
72
|
+
"./dist/structured.d.ts"
|
|
73
|
+
],
|
|
74
|
+
"markdown": [
|
|
75
|
+
"./dist/markdown.d.ts"
|
|
62
76
|
]
|
|
63
77
|
}
|
|
64
78
|
},
|
|
@@ -113,6 +127,26 @@
|
|
|
113
127
|
"default": "./dist/table.cjs"
|
|
114
128
|
}
|
|
115
129
|
},
|
|
130
|
+
"./structured": {
|
|
131
|
+
"import": {
|
|
132
|
+
"types": "./dist/structured.d.ts",
|
|
133
|
+
"default": "./dist/structured.js"
|
|
134
|
+
},
|
|
135
|
+
"require": {
|
|
136
|
+
"types": "./dist/structured.d.cts",
|
|
137
|
+
"default": "./dist/structured.cjs"
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
"./markdown": {
|
|
141
|
+
"import": {
|
|
142
|
+
"types": "./dist/markdown.d.ts",
|
|
143
|
+
"default": "./dist/markdown.js"
|
|
144
|
+
},
|
|
145
|
+
"require": {
|
|
146
|
+
"types": "./dist/markdown.d.cts",
|
|
147
|
+
"default": "./dist/markdown.cjs"
|
|
148
|
+
}
|
|
149
|
+
},
|
|
116
150
|
"./package.json": "./package.json"
|
|
117
151
|
},
|
|
118
152
|
"engines": {
|
|
@@ -137,7 +171,7 @@
|
|
|
137
171
|
"verify": "npm run lint && npm run typecheck && npm run test:coverage && npm run build && npm run lint:package && npm run size",
|
|
138
172
|
"changeset": "changeset",
|
|
139
173
|
"release": "npm run verify && changeset publish",
|
|
140
|
-
"site:build": "npm run build && node -e \"for (const f of ['core.js','capture.js','table.js']) require('fs').copyFileSync('dist/'+f,'site/'+f)\" && node scripts/build-changelog.js",
|
|
174
|
+
"site:build": "npm run build && node -e \"for (const f of ['core.js','capture.js','table.js','structured.js','markdown.js']) require('fs').copyFileSync('dist/'+f,'site/'+f)\" && node scripts/build-changelog.js",
|
|
141
175
|
"site:preview": "npm run site:build && npx --yes serve site",
|
|
142
176
|
"test:coverage": "vitest run --coverage"
|
|
143
177
|
},
|
|
@@ -146,31 +180,31 @@
|
|
|
146
180
|
"name": "useCopy (text only)",
|
|
147
181
|
"path": "dist/index.js",
|
|
148
182
|
"import": "{ useCopy }",
|
|
149
|
-
"limit": "3.
|
|
183
|
+
"limit": "3.5 kB"
|
|
150
184
|
},
|
|
151
185
|
{
|
|
152
186
|
"name": "usePaste",
|
|
153
187
|
"path": "dist/index.js",
|
|
154
188
|
"import": "{ usePaste }",
|
|
155
|
-
"limit": "4.
|
|
189
|
+
"limit": "4.4 kB"
|
|
156
190
|
},
|
|
157
191
|
{
|
|
158
192
|
"name": "useCopyInterceptor",
|
|
159
193
|
"path": "dist/index.js",
|
|
160
194
|
"import": "{ useCopyInterceptor }",
|
|
161
|
-
"limit": "2.
|
|
195
|
+
"limit": "2.45 kB"
|
|
162
196
|
},
|
|
163
197
|
{
|
|
164
198
|
"name": "CopyField + CopyGroup (everything copy, React)",
|
|
165
199
|
"path": "dist/index.js",
|
|
166
200
|
"import": "{ CopyField, CopyGroup }",
|
|
167
|
-
"limit": "5.
|
|
201
|
+
"limit": "5.65 kB"
|
|
168
202
|
},
|
|
169
203
|
{
|
|
170
204
|
"name": "PasteField (everything paste, React)",
|
|
171
205
|
"path": "dist/index.js",
|
|
172
206
|
"import": "{ PasteField }",
|
|
173
|
-
"limit": "7.
|
|
207
|
+
"limit": "7.15 kB"
|
|
174
208
|
},
|
|
175
209
|
{
|
|
176
210
|
"name": "useDragCopy",
|
|
@@ -181,7 +215,7 @@
|
|
|
181
215
|
{
|
|
182
216
|
"name": "core, all exports (framework-agnostic)",
|
|
183
217
|
"path": "dist/core.js",
|
|
184
|
-
"limit": "8.
|
|
218
|
+
"limit": "8.4 kB"
|
|
185
219
|
},
|
|
186
220
|
{
|
|
187
221
|
"name": "capture, all exports",
|
|
@@ -210,6 +244,30 @@
|
|
|
210
244
|
"path": "dist/table.js",
|
|
211
245
|
"import": "{ parseTable, toRecords }",
|
|
212
246
|
"limit": "3.2 kB"
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
"name": "structured, all exports",
|
|
250
|
+
"path": "dist/structured.js",
|
|
251
|
+
"import": "*",
|
|
252
|
+
"limit": "3.6 kB"
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
"name": "structured: defineClipFormat + clipPayload (copy side)",
|
|
256
|
+
"path": "dist/structured.js",
|
|
257
|
+
"import": "{ defineClipFormat, clipPayload }",
|
|
258
|
+
"limit": "1.9 kB"
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
"name": "markdown, all exports",
|
|
262
|
+
"path": "dist/markdown.js",
|
|
263
|
+
"import": "*",
|
|
264
|
+
"limit": "7.75 kB"
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
"name": "markdown: pasteAsMarkdown",
|
|
268
|
+
"path": "dist/markdown.js",
|
|
269
|
+
"import": "{ pasteAsMarkdown }",
|
|
270
|
+
"limit": "7.5 kB"
|
|
213
271
|
}
|
|
214
272
|
],
|
|
215
273
|
"publishConfig": {
|
|
@@ -223,15 +281,18 @@
|
|
|
223
281
|
"@tanstack/table-core": "^9.3.1",
|
|
224
282
|
"@testing-library/dom": "^10.4.2",
|
|
225
283
|
"@testing-library/react": "^16.3.3",
|
|
284
|
+
"@types/markdown-it": "14.2.0",
|
|
226
285
|
"@types/node": "^22.20.5",
|
|
227
286
|
"@types/react": "^19.3.0",
|
|
228
287
|
"@types/react-dom": "^19.3.0",
|
|
229
288
|
"@vitest/coverage-v8": "^5.0.1",
|
|
230
289
|
"ag-grid-community": "^36.2.0",
|
|
290
|
+
"arktype": "2.2.6",
|
|
231
291
|
"eslint": "^10.11.0",
|
|
232
292
|
"eslint-plugin-react-hooks": "^7.1.1",
|
|
233
293
|
"fast-check": "^4.10.2",
|
|
234
294
|
"jsdom": "^30.1.1",
|
|
295
|
+
"markdown-it": "14.3.2",
|
|
235
296
|
"publint": "^0.3.24",
|
|
236
297
|
"react": "^19.3.0",
|
|
237
298
|
"react-dom": "^19.3.0",
|
|
@@ -240,6 +301,8 @@
|
|
|
240
301
|
"tsdown": "^0.23.0",
|
|
241
302
|
"typescript": "^6.0.3",
|
|
242
303
|
"typescript-eslint": "^8.70.1",
|
|
243
|
-
"
|
|
304
|
+
"valibot": "1.5.0",
|
|
305
|
+
"vitest": "^5.0.1",
|
|
306
|
+
"zod": "4.6.5"
|
|
244
307
|
}
|
|
245
308
|
}
|