@molecule/app-bonds-default 0.0.1-stage → 1.2.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 +27 -5
- package/dist/index.d.ts +5 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -2
- package/dist/setup.d.ts +13 -1
- package/dist/setup.d.ts.map +1 -1
- package/dist/setup.js +17 -1
- package/package.json +11 -7
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@ AUTO-GENERATED — DO NOT EDIT THIS FILE.
|
|
|
3
3
|
Generated by `mlcl sync-docs` from the package's src/index.ts JSDoc + mlcl/registry.json.
|
|
4
4
|
Edits here are overwritten on the next commit (molecule's pre-commit hook regenerates).
|
|
5
5
|
To change this document, edit the module-level JSDoc in src/index.ts.
|
|
6
|
-
Generated: 2026-11-
|
|
6
|
+
Generated: 2026-11-16T05:58:33.777Z
|
|
7
7
|
-->
|
|
8
8
|
|
|
9
9
|
# @molecule/app-bonds-default
|
|
@@ -15,14 +15,17 @@ app-side bond wirings, shared unchanged by the per-framework packages
|
|
|
15
15
|
`setupAllDefaultBonds()` and `bootstrapApp()`. Switching framework means
|
|
16
16
|
changing the package name in the imports — every export below keeps its name.
|
|
17
17
|
|
|
18
|
-
- The
|
|
18
|
+
- The eight universal neutral setups — `setupAppStateSimple` (the vanilla
|
|
19
19
|
`simpleProvider`, so `createStore()` works from the first render — the
|
|
20
20
|
documented `createStore()` + `useStore()` pattern needs a provider bonded
|
|
21
21
|
and nothing else in a scaffold wires one), `setupAppFontsArimo`,
|
|
22
22
|
`setupAppStorageLocalstorage`, `setupAppStylingTailwind` (registers the
|
|
23
23
|
tailwind-merge class merger), `setupAppThemeCssVariables` (light + dark via
|
|
24
24
|
`getDefaultThemeProvider()`), `setupAppUiTailwind` ClassMap,
|
|
25
|
-
`setupAppIconsMolecule
|
|
25
|
+
`setupAppIconsMolecule`, `setupAppClipboardWeb` (the browser Clipboard API
|
|
26
|
+
with a selection-and-copy fallback, so `copyTextWithFallback()` and
|
|
27
|
+
`writeText()` from `@molecule/app-clipboard` work wherever a copy can).
|
|
28
|
+
Routing is framework-specific and lives in the
|
|
26
29
|
per-framework packages.
|
|
27
30
|
- **Optional provider wirings live behind subpaths**, one module per pair:
|
|
28
31
|
`@molecule/app-bonds-default/optional/<pair>.js` — `realtime-socketio`,
|
|
@@ -97,7 +100,7 @@ const { authClient, setupAuthDefault } = createDefaultAuthClient({
|
|
|
97
100
|
## Installation
|
|
98
101
|
|
|
99
102
|
```bash
|
|
100
|
-
npm install @molecule/app-bonds-default @molecule/app-auth @molecule/app-charts @molecule/app-charts-chartjs @molecule/app-client-search @molecule/app-client-search-minisearch @molecule/app-code-editor @molecule/app-code-editor-monaco @molecule/app-command-palette @molecule/app-command-palette-cmdk @molecule/app-drag-drop @molecule/app-drag-drop-dndkit @molecule/app-fonts @molecule/app-fonts-arimo @molecule/app-http @molecule/app-icons @molecule/app-icons-molecule @molecule/app-keyboard-shortcuts @molecule/app-keyboard-shortcuts-hotkeys @molecule/app-maps @molecule/app-maps-leaflet @molecule/app-realtime @molecule/app-realtime-socketio @molecule/app-routing @molecule/app-state @molecule/app-storage @molecule/app-storage-localstorage @molecule/app-styling-tailwind @molecule/app-theme @molecule/app-theme-css-variables @molecule/app-ui @molecule/app-ui-tailwind @molecule/app-video @molecule/app-video-hls @molecule/app-virtual-scroll @molecule/app-virtual-scroll-tanstack
|
|
103
|
+
npm install @molecule/app-bonds-default @molecule/app-auth @molecule/app-charts @molecule/app-charts-chartjs @molecule/app-client-search @molecule/app-client-search-minisearch @molecule/app-clipboard @molecule/app-clipboard-web @molecule/app-code-editor @molecule/app-code-editor-monaco @molecule/app-command-palette @molecule/app-command-palette-cmdk @molecule/app-drag-drop @molecule/app-drag-drop-dndkit @molecule/app-fonts @molecule/app-fonts-arimo @molecule/app-http @molecule/app-icons @molecule/app-icons-molecule @molecule/app-keyboard-shortcuts @molecule/app-keyboard-shortcuts-hotkeys @molecule/app-maps @molecule/app-maps-leaflet @molecule/app-realtime @molecule/app-realtime-socketio @molecule/app-routing @molecule/app-state @molecule/app-storage @molecule/app-storage-localstorage @molecule/app-styling-tailwind @molecule/app-theme @molecule/app-theme-css-variables @molecule/app-ui @molecule/app-ui-tailwind @molecule/app-video @molecule/app-video-hls @molecule/app-virtual-scroll @molecule/app-virtual-scroll-tanstack
|
|
101
104
|
```
|
|
102
105
|
|
|
103
106
|
## API
|
|
@@ -279,6 +282,21 @@ Returns (and lazily constructs) the shared default CSS-variables theme provider.
|
|
|
279
282
|
function getDefaultThemeProvider(): ReturnType<typeof createCSSVariablesThemeProvider>
|
|
280
283
|
```
|
|
281
284
|
|
|
285
|
+
#### `setupAppClipboardWeb()`
|
|
286
|
+
|
|
287
|
+
Wires `@molecule/app-clipboard-web` to `@molecule/app-clipboard`: the browser's
|
|
288
|
+
Clipboard API, falling back to a selection-and-copy where that API is missing
|
|
289
|
+
or refuses (a plain-HTTP page, an iframe without the clipboard-write
|
|
290
|
+
permission, a document that lost focus).
|
|
291
|
+
|
|
292
|
+
WITHOUT this, `writeText()` throws "No provider set" and
|
|
293
|
+
`copyTextWithFallback()` only tries the legacy copy command, so a copy button
|
|
294
|
+
built on them works in fewer places than a raw `navigator.clipboard` call.
|
|
295
|
+
|
|
296
|
+
```typescript
|
|
297
|
+
function setupAppClipboardWeb(): void
|
|
298
|
+
```
|
|
299
|
+
|
|
282
300
|
#### `setupAppFontsArimo()`
|
|
283
301
|
|
|
284
302
|
Wires `@molecule/app-fonts-arimo` to `@molecule/app-fonts`.
|
|
@@ -357,12 +375,14 @@ Peer dependencies:
|
|
|
357
375
|
- `@molecule/app-charts-chartjs` ^1.0.1
|
|
358
376
|
- `@molecule/app-client-search` ^1.0.0
|
|
359
377
|
- `@molecule/app-client-search-minisearch` ^1.0.0
|
|
378
|
+
- `@molecule/app-clipboard` ^1.0.1
|
|
379
|
+
- `@molecule/app-clipboard-web` ^1.0.1
|
|
360
380
|
- `@molecule/app-code-editor` ^1.0.1
|
|
361
381
|
- `@molecule/app-code-editor-monaco` ^1.0.1
|
|
362
382
|
- `@molecule/app-command-palette` ^1.0.1
|
|
363
383
|
- `@molecule/app-command-palette-cmdk` ^1.0.1
|
|
364
384
|
- `@molecule/app-drag-drop` ^1.0.1
|
|
365
|
-
- `@molecule/app-drag-drop-dndkit` ^1.0.1
|
|
385
|
+
- `@molecule/app-drag-drop-dndkit` ^1.0.1 || ^2.0.0
|
|
366
386
|
- `@molecule/app-fonts` ^1.0.1
|
|
367
387
|
- `@molecule/app-fonts-arimo` ^1.0.1
|
|
368
388
|
- `@molecule/app-http` ^1.5.0
|
|
@@ -395,6 +415,8 @@ Peer dependencies:
|
|
|
395
415
|
- `@molecule/app-charts-chartjs`
|
|
396
416
|
- `@molecule/app-client-search`
|
|
397
417
|
- `@molecule/app-client-search-minisearch`
|
|
418
|
+
- `@molecule/app-clipboard`
|
|
419
|
+
- `@molecule/app-clipboard-web`
|
|
398
420
|
- `@molecule/app-code-editor`
|
|
399
421
|
- `@molecule/app-code-editor-monaco`
|
|
400
422
|
- `@molecule/app-command-palette`
|
package/dist/index.d.ts
CHANGED
|
@@ -6,14 +6,17 @@
|
|
|
6
6
|
* `setupAllDefaultBonds()` and `bootstrapApp()`. Switching framework means
|
|
7
7
|
* changing the package name in the imports — every export below keeps its name.
|
|
8
8
|
*
|
|
9
|
-
* - The
|
|
9
|
+
* - The eight universal neutral setups — `setupAppStateSimple` (the vanilla
|
|
10
10
|
* `simpleProvider`, so `createStore()` works from the first render — the
|
|
11
11
|
* documented `createStore()` + `useStore()` pattern needs a provider bonded
|
|
12
12
|
* and nothing else in a scaffold wires one), `setupAppFontsArimo`,
|
|
13
13
|
* `setupAppStorageLocalstorage`, `setupAppStylingTailwind` (registers the
|
|
14
14
|
* tailwind-merge class merger), `setupAppThemeCssVariables` (light + dark via
|
|
15
15
|
* `getDefaultThemeProvider()`), `setupAppUiTailwind` ClassMap,
|
|
16
|
-
* `setupAppIconsMolecule
|
|
16
|
+
* `setupAppIconsMolecule`, `setupAppClipboardWeb` (the browser Clipboard API
|
|
17
|
+
* with a selection-and-copy fallback, so `copyTextWithFallback()` and
|
|
18
|
+
* `writeText()` from `@molecule/app-clipboard` work wherever a copy can).
|
|
19
|
+
* Routing is framework-specific and lives in the
|
|
17
20
|
* per-framework packages.
|
|
18
21
|
* - **Optional provider wirings live behind subpaths**, one module per pair:
|
|
19
22
|
* `@molecule/app-bonds-default/optional/<pair>.js` — `realtime-socketio`,
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgHG;AAEH,cAAc,WAAW,CAAA;AACzB,cAAc,YAAY,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -6,14 +6,17 @@
|
|
|
6
6
|
* `setupAllDefaultBonds()` and `bootstrapApp()`. Switching framework means
|
|
7
7
|
* changing the package name in the imports — every export below keeps its name.
|
|
8
8
|
*
|
|
9
|
-
* - The
|
|
9
|
+
* - The eight universal neutral setups — `setupAppStateSimple` (the vanilla
|
|
10
10
|
* `simpleProvider`, so `createStore()` works from the first render — the
|
|
11
11
|
* documented `createStore()` + `useStore()` pattern needs a provider bonded
|
|
12
12
|
* and nothing else in a scaffold wires one), `setupAppFontsArimo`,
|
|
13
13
|
* `setupAppStorageLocalstorage`, `setupAppStylingTailwind` (registers the
|
|
14
14
|
* tailwind-merge class merger), `setupAppThemeCssVariables` (light + dark via
|
|
15
15
|
* `getDefaultThemeProvider()`), `setupAppUiTailwind` ClassMap,
|
|
16
|
-
* `setupAppIconsMolecule
|
|
16
|
+
* `setupAppIconsMolecule`, `setupAppClipboardWeb` (the browser Clipboard API
|
|
17
|
+
* with a selection-and-copy fallback, so `copyTextWithFallback()` and
|
|
18
|
+
* `writeText()` from `@molecule/app-clipboard` work wherever a copy can).
|
|
19
|
+
* Routing is framework-specific and lives in the
|
|
17
20
|
* per-framework packages.
|
|
18
21
|
* - **Optional provider wirings live behind subpaths**, one module per pair:
|
|
19
22
|
* `@molecule/app-bonds-default/optional/<pair>.js` — `realtime-socketio`,
|
package/dist/setup.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Framework-neutral default app-side bond wirings (state + Tailwind ClassMap +
|
|
3
|
-
* localStorage + Arimo font + Molecule icons + CSS-variables theme
|
|
3
|
+
* localStorage + Arimo font + Molecule icons + CSS-variables theme + web
|
|
4
|
+
* clipboard).
|
|
4
5
|
*
|
|
5
6
|
* Centralizes the byte-identical `app/src/bonds/<name>.ts` setup functions that
|
|
6
7
|
* every flagship app shipped. Per-app bond files become 1-line re-exports —
|
|
@@ -21,6 +22,17 @@
|
|
|
21
22
|
import { createCSSVariablesThemeProvider } from '@molecule/app-theme-css-variables';
|
|
22
23
|
/** Returns (and lazily constructs) the shared default CSS-variables theme provider. */
|
|
23
24
|
export declare function getDefaultThemeProvider(): ReturnType<typeof createCSSVariablesThemeProvider>;
|
|
25
|
+
/**
|
|
26
|
+
* Wires `@molecule/app-clipboard-web` to `@molecule/app-clipboard`: the browser's
|
|
27
|
+
* Clipboard API, falling back to a selection-and-copy where that API is missing
|
|
28
|
+
* or refuses (a plain-HTTP page, an iframe without the clipboard-write
|
|
29
|
+
* permission, a document that lost focus).
|
|
30
|
+
*
|
|
31
|
+
* WITHOUT this, `writeText()` throws "No provider set" and
|
|
32
|
+
* `copyTextWithFallback()` only tries the legacy copy command, so a copy button
|
|
33
|
+
* built on them works in fewer places than a raw `navigator.clipboard` call.
|
|
34
|
+
*/
|
|
35
|
+
export declare function setupAppClipboardWeb(): void;
|
|
24
36
|
/** Wires `@molecule/app-fonts-arimo` to `@molecule/app-fonts`. */
|
|
25
37
|
export declare function setupAppFontsArimo(): void;
|
|
26
38
|
/** Wires `@molecule/app-icons-molecule` to `@molecule/app-icons`. */
|
package/dist/setup.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../src/setup.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../src/setup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAgBH,OAAO,EACL,+BAA+B,EAGhC,MAAM,mCAAmC,CAAA;AAe1C,uFAAuF;AACvF,wBAAgB,uBAAuB,IAAI,UAAU,CAAC,OAAO,+BAA+B,CAAC,CAS5F;AAED;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,IAAI,IAAI,CAE3C;AAED,kEAAkE;AAClE,wBAAgB,kBAAkB,IAAI,IAAI,CAEzC;AAED,qEAAqE;AACrE,wBAAgB,qBAAqB,IAAI,IAAI,CAE5C;AAED;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,IAAI,IAAI,CAE1C;AAED,6EAA6E;AAC7E,wBAAgB,2BAA2B,IAAI,IAAI,CAElD;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,IAAI,IAAI,CAE9C;AAED,4FAA4F;AAC5F,wBAAgB,yBAAyB,IAAI,IAAI,CAEhD;AAED,0EAA0E;AAC1E,wBAAgB,kBAAkB,IAAI,IAAI,CAEzC"}
|
package/dist/setup.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Framework-neutral default app-side bond wirings (state + Tailwind ClassMap +
|
|
3
|
-
* localStorage + Arimo font + Molecule icons + CSS-variables theme
|
|
3
|
+
* localStorage + Arimo font + Molecule icons + CSS-variables theme + web
|
|
4
|
+
* clipboard).
|
|
4
5
|
*
|
|
5
6
|
* Centralizes the byte-identical `app/src/bonds/<name>.ts` setup functions that
|
|
6
7
|
* every flagship app shipped. Per-app bond files become 1-line re-exports —
|
|
@@ -18,6 +19,8 @@
|
|
|
18
19
|
*
|
|
19
20
|
* @module
|
|
20
21
|
*/
|
|
22
|
+
import { setProvider as setClipboard } from '@molecule/app-clipboard';
|
|
23
|
+
import { provider as webClipboardProvider } from '@molecule/app-clipboard-web';
|
|
21
24
|
import { setFont } from '@molecule/app-fonts';
|
|
22
25
|
import { font as arimoFont } from '@molecule/app-fonts-arimo';
|
|
23
26
|
import { setIconSet } from '@molecule/app-icons';
|
|
@@ -52,6 +55,19 @@ export function getDefaultThemeProvider() {
|
|
|
52
55
|
}
|
|
53
56
|
return _defaultThemeProvider;
|
|
54
57
|
}
|
|
58
|
+
/**
|
|
59
|
+
* Wires `@molecule/app-clipboard-web` to `@molecule/app-clipboard`: the browser's
|
|
60
|
+
* Clipboard API, falling back to a selection-and-copy where that API is missing
|
|
61
|
+
* or refuses (a plain-HTTP page, an iframe without the clipboard-write
|
|
62
|
+
* permission, a document that lost focus).
|
|
63
|
+
*
|
|
64
|
+
* WITHOUT this, `writeText()` throws "No provider set" and
|
|
65
|
+
* `copyTextWithFallback()` only tries the legacy copy command, so a copy button
|
|
66
|
+
* built on them works in fewer places than a raw `navigator.clipboard` call.
|
|
67
|
+
*/
|
|
68
|
+
export function setupAppClipboardWeb() {
|
|
69
|
+
setClipboard(webClipboardProvider);
|
|
70
|
+
}
|
|
55
71
|
/** Wires `@molecule/app-fonts-arimo` to `@molecule/app-fonts`. */
|
|
56
72
|
export function setupAppFontsArimo() {
|
|
57
73
|
setFont(arimoFont);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@molecule/app-bonds-default",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "Framework-neutral default app-side bond wirings (auth/http factories, state, fonts, storage, styling, theme, ClassMap, icons, optional providers) shared by the per-framework @molecule/app-bonds-default-* packages.",
|
|
3
|
+
"version": "1.2.0",
|
|
4
|
+
"description": "Framework-neutral default app-side bond wirings (auth/http factories, state, fonts, storage, styling, theme, ClassMap, icons, clipboard, optional providers) shared by the per-framework @molecule/app-bonds-default-* packages.",
|
|
5
5
|
"homepage": "https://www.molecule.dev/packages/app-bonds-default",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/index.js",
|
|
@@ -43,12 +43,14 @@
|
|
|
43
43
|
"@molecule/app-charts-chartjs": "^1.0.1",
|
|
44
44
|
"@molecule/app-client-search": "^1.0.0",
|
|
45
45
|
"@molecule/app-client-search-minisearch": "^1.0.0",
|
|
46
|
+
"@molecule/app-clipboard": "^1.0.1",
|
|
47
|
+
"@molecule/app-clipboard-web": "^1.0.1",
|
|
46
48
|
"@molecule/app-code-editor": "^1.0.1",
|
|
47
49
|
"@molecule/app-code-editor-monaco": "^1.0.1",
|
|
48
50
|
"@molecule/app-command-palette": "^1.0.1",
|
|
49
51
|
"@molecule/app-command-palette-cmdk": "^1.0.1",
|
|
50
52
|
"@molecule/app-drag-drop": "^1.0.1",
|
|
51
|
-
"@molecule/app-drag-drop-dndkit": "^1.0.1",
|
|
53
|
+
"@molecule/app-drag-drop-dndkit": "^1.0.1 || ^2.0.0",
|
|
52
54
|
"@molecule/app-fonts": "^1.0.1",
|
|
53
55
|
"@molecule/app-fonts-arimo": "^1.0.1",
|
|
54
56
|
"@molecule/app-http": "^1.5.0",
|
|
@@ -137,16 +139,18 @@
|
|
|
137
139
|
}
|
|
138
140
|
},
|
|
139
141
|
"devDependencies": {
|
|
140
|
-
"@molecule/app-auth": "3.
|
|
142
|
+
"@molecule/app-auth": "3.5.0",
|
|
141
143
|
"@molecule/app-charts-chartjs": "1.0.3",
|
|
142
144
|
"@molecule/app-client-search": "1.0.4",
|
|
143
145
|
"@molecule/app-client-search-minisearch": "1.0.4",
|
|
146
|
+
"@molecule/app-clipboard": "1.0.5",
|
|
147
|
+
"@molecule/app-clipboard-web": "1.0.2",
|
|
144
148
|
"@molecule/app-code-editor": "1.0.3",
|
|
145
149
|
"@molecule/app-code-editor-monaco": "1.0.8",
|
|
146
150
|
"@molecule/app-command-palette": "1.0.3",
|
|
147
151
|
"@molecule/app-command-palette-cmdk": "1.0.3",
|
|
148
152
|
"@molecule/app-drag-drop": "1.0.4",
|
|
149
|
-
"@molecule/app-drag-drop-dndkit": "
|
|
153
|
+
"@molecule/app-drag-drop-dndkit": "2.0.0",
|
|
150
154
|
"@molecule/app-fonts": "1.2.2",
|
|
151
155
|
"@molecule/app-fonts-arimo": "1.0.5",
|
|
152
156
|
"@molecule/app-http": "1.8.0",
|
|
@@ -163,8 +167,8 @@
|
|
|
163
167
|
"@molecule/app-storage-localstorage": "1.1.2",
|
|
164
168
|
"@molecule/app-theme": "1.0.4",
|
|
165
169
|
"@molecule/app-theme-css-variables": "1.0.4",
|
|
166
|
-
"@molecule/app-ui": "1.
|
|
167
|
-
"@molecule/app-ui-tailwind": "1.
|
|
170
|
+
"@molecule/app-ui": "1.4.0",
|
|
171
|
+
"@molecule/app-ui-tailwind": "1.3.0",
|
|
168
172
|
"@molecule/app-video-hls": "1.0.3",
|
|
169
173
|
"@molecule/app-virtual-scroll": "1.0.4",
|
|
170
174
|
"@molecule/app-virtual-scroll-tanstack": "1.0.3",
|