@wcstack/clipboard 1.32.0 → 2.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/README.ja.md CHANGED
@@ -138,7 +138,7 @@ DOM の autoTrigger は書き込み(`writeText`)のみを起動します。
138
138
 
139
139
  > DOM トリガは**書き込み専用**です。クリックは常に `writeText` を起動し、読み取り(`readText` / `read`)を起動する経路はありません。読み取りは command-token または命令的呼び出しで起動してください。
140
140
 
141
- > DOM トリガによる `writeText` は fire-and-forget(`Promise` を await しません)ですが、決して reject しません。コピー失敗は他の書き込みと同様 `error` プロパティに現れます。autoTrigger の失敗を観測するには `error` をバインドしてください(例: `text: error.message@cb`)。
141
+ > DOM トリガによる `writeText` は fire-and-forget(`Promise` を await しません)ですが、決して reject しません。コピー失敗は他の書き込みと同様 `error` プロパティに現れます。autoTrigger の失敗を観測するには `error` をバインドしてください(例: `<wcs-clipboard>` 側に `error: copyError`、表示側に `textContent: copyError.message`)。
142
142
 
143
143
  > **autoTrigger は既定で有効。** 最初に接続した `<wcs-clipboard>` が document レベルの `click` リスナーを 1 つ設置します(`data-clipboardtarget` 要素のクリックで `writeText` を起動)。DOM ショートカットを使わないなら bootstrap エントリで無効化してください:
144
144
  >
package/README.md CHANGED
@@ -140,7 +140,7 @@ Add the `monitor` attribute to republish document `copy` / `cut` / `paste` as re
140
140
 
141
141
  > DOM triggers are **write-only**: a click always drives `writeText`. There is no DOM-trigger path for reads (`readText` / `read`) — drive reads from a command-token or imperatively.
142
142
 
143
- > A DOM-triggered `writeText` is fire-and-forget (its `Promise` is not awaited), but it never rejects: a failed copy surfaces through the `error` property like any other write. Bind `error` (e.g. `text: error.message@cb`) to observe autoTrigger failures.
143
+ > A DOM-triggered `writeText` is fire-and-forget (its `Promise` is not awaited), but it never rejects: a failed copy surfaces through the `error` property like any other write. Bind `error` (e.g. `error: copyError` on the `<wcs-clipboard>`, then `textContent: copyError.message` where you display it) to observe autoTrigger failures.
144
144
 
145
145
  > **autoTrigger is on by default.** The first `<wcs-clipboard>` to connect installs a single **document-level `click` listener** (a click on a `data-clipboardtarget` element runs `writeText`). If you don't use the DOM shortcut, opt out via the bootstrap entry:
146
146
  >
package/dist/index.d.ts CHANGED
@@ -356,5 +356,11 @@ declare const WCS_CLIPBOARD_ERROR_CODE: {
356
356
  readonly ClipboardError: "clipboard-error";
357
357
  };
358
358
 
359
+ declare global {
360
+ interface HTMLElementTagNameMap {
361
+ "wcs-clipboard": WcsClipboard;
362
+ }
363
+ }
364
+
359
365
  export { ClipboardCore, WCS_CLIPBOARD_ERROR_CODE, WcsClipboard, bootstrapClipboard, getConfig };
360
366
  export type { ClipboardPermissionState, IWritableConfig, IWritableTagNames, WcsClipboardCommands, WcsClipboardCoreCommands, WcsClipboardCoreValues, WcsClipboardErrorDetail, WcsClipboardInputs, WcsClipboardReadDetail, WcsClipboardReadItem, WcsClipboardValues, WcsIoErrorInfo, WcsIoErrorPhase };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wcstack/clipboard",
3
- "version": "1.32.0",
3
+ "version": "2.0.0",
4
4
  "description": "Declarative clipboard component for Web Components. Framework-agnostic Clipboard API primitive via wc-bindable-protocol.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.esm.js",