@weasel-js/routing 1.13.0 → 1.14.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.
@@ -0,0 +1,22 @@
1
+ import * as react from 'react';
2
+ import { A as Action } from '../index-DJ7SxEKS.js';
3
+ import '@weasel-js/gestures';
4
+ import '@weasel-js/geom';
5
+ import '@weasel-js/cursor';
6
+ import '@weasel-js/menu';
7
+ import '@weasel-js/prefs';
8
+ import '@weasel-js/modes';
9
+ import '@weasel-js/icons';
10
+ import '@weasel-js/registry';
11
+ import '@weasel-js/select';
12
+
13
+ /** Registers `action` with the enclosing `<ActionsProvider>` while mounted, and renders nothing. */
14
+ declare function RegisterAction({ action }: {
15
+ action: Action;
16
+ }): null;
17
+ /** A {@link RegisterAction} for each of `actions`. */
18
+ declare function RegisterActions({ actions }: {
19
+ actions: readonly Action[];
20
+ }): react.JSX.Element;
21
+
22
+ export { RegisterAction, RegisterActions };
@@ -0,0 +1,15 @@
1
+ import { useAction } from '../chunk-INZ63QGX.js';
2
+ import '../chunk-EUCNVGJV.js';
3
+ import { jsx, Fragment } from 'react/jsx-runtime';
4
+
5
+ function RegisterAction({ action }) {
6
+ useAction(action);
7
+ return null;
8
+ }
9
+ function RegisterActions({ actions }) {
10
+ return /* @__PURE__ */ jsx(Fragment, { children: actions.map((a) => /* @__PURE__ */ jsx(RegisterAction, { action: a }, a.id)) });
11
+ }
12
+
13
+ export { RegisterAction, RegisterActions };
14
+ //# sourceMappingURL=registerAction.js.map
15
+ //# sourceMappingURL=registerAction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/testing/registerAction.tsx"],"names":[],"mappings":";;;;AAIO,SAAS,cAAA,CAAe,EAAE,MAAA,EAAO,EAA6B;AACnE,EAAA,SAAA,CAAU,MAAM,CAAA;AAChB,EAAA,OAAO,IAAA;AACT;AAGO,SAAS,eAAA,CAAgB,EAAE,OAAA,EAAQ,EAAmC;AAC3E,EAAA,uBACE,GAAA,CAAA,QAAA,EAAA,EACG,QAAA,EAAA,OAAA,CAAQ,GAAA,CAAI,CAAC,CAAA,qBAAM,GAAA,CAAC,cAAA,EAAA,EAA0B,MAAA,EAAQ,CAAA,EAAA,EAAd,CAAA,CAAE,EAAe,CAAE,CAAA,EAC9D,CAAA;AAEJ","file":"registerAction.js","sourcesContent":["import type { Action } from '../interactions/actions/action';\nimport { useAction } from '../interactions/actions/ActionsProvider';\n\n/** Registers `action` with the enclosing `<ActionsProvider>` while mounted, and renders nothing. */\nexport function RegisterAction({ action }: { action: Action }): null {\n useAction(action);\n return null;\n}\n\n/** A {@link RegisterAction} for each of `actions`. */\nexport function RegisterActions({ actions }: { actions: readonly Action[] }) {\n return (\n <>\n {actions.map((a) => <RegisterAction key={a.id} action={a} />)}\n </>\n );\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@weasel-js/routing",
3
- "version": "1.13.0",
3
+ "version": "1.14.0",
4
4
  "description": "Binding-to-action routing: the gesture dispatcher, the action registry, tool and contribution declaration, and the eligibility rule algebra.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -21,6 +21,10 @@
21
21
  "import": "./dist/internal.js",
22
22
  "types": "./dist/internal.d.ts"
23
23
  },
24
+ "./testing/registerAction": {
25
+ "import": "./dist/testing/registerAction.js",
26
+ "types": "./dist/testing/registerAction.d.ts"
27
+ },
24
28
  "./package.json": "./package.json"
25
29
  },
26
30
  "peerDependencies": {
@@ -30,18 +34,18 @@
30
34
  "react": { "optional": true }
31
35
  },
32
36
  "dependencies": {
33
- "@weasel-js/cursor": "1.13.0",
34
- "@weasel-js/geom": "1.13.0",
35
- "@weasel-js/gestures": "1.13.0",
36
- "@weasel-js/history": "1.13.0",
37
- "@weasel-js/icons": "1.13.0",
38
- "@weasel-js/menu": "1.13.0",
39
- "@weasel-js/modes": "1.13.0",
40
- "@weasel-js/prefs": "1.13.0",
41
- "@weasel-js/quantity": "1.13.0",
42
- "@weasel-js/react": "1.13.0",
43
- "@weasel-js/registry": "1.13.0",
44
- "@weasel-js/select": "1.13.0"
37
+ "@weasel-js/cursor": "1.14.0",
38
+ "@weasel-js/geom": "1.14.0",
39
+ "@weasel-js/gestures": "1.14.0",
40
+ "@weasel-js/history": "1.14.0",
41
+ "@weasel-js/icons": "1.14.0",
42
+ "@weasel-js/menu": "1.14.0",
43
+ "@weasel-js/modes": "1.14.0",
44
+ "@weasel-js/prefs": "1.14.0",
45
+ "@weasel-js/quantity": "1.14.0",
46
+ "@weasel-js/react": "1.14.0",
47
+ "@weasel-js/registry": "1.14.0",
48
+ "@weasel-js/select": "1.14.0"
45
49
  },
46
50
  "author": "orochi235",
47
51
  "homepage": "https://orochi235.github.io/weasel/",