@symbo.ls/link 2.10.134 → 2.10.162

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.
Files changed (2) hide show
  1. package/index.js +10 -5
  2. package/package.json +2 -2
package/index.js CHANGED
@@ -10,7 +10,8 @@ export const Link = {
10
10
  aria: {},
11
11
  fontWeight: 'bold',
12
12
  textDecoration: 'none',
13
- color: 'currentColor'
13
+ color: 'currentColor',
14
+ draggable: true
14
15
  },
15
16
  attr: {
16
17
  href: element => {
@@ -18,15 +19,15 @@ export const Link = {
18
19
  return exec(element.props.href, element) || exec(element.props, element).href
19
20
  },
20
21
  target: ({ props }) => props.target,
21
- 'aria-label': ({ props }) => props.aria ? props.aria.label : props.text
22
+ 'aria-label': ({ props }) => props.aria ? props.aria.label : props.text,
23
+ draggable: ({ props }) => props.draggable
22
24
  }
23
25
  }
24
26
 
25
- export const RouteLink = {
26
- extend: Link,
27
+ export const RouterLink = {
27
28
  on: {
28
29
  click: (event, element, state) => {
29
- const root = element.lookup('app')
30
+ const root = element.__ref.__root
30
31
  const { href } = element.props
31
32
  const firstThree = href[0] + href[1] + href[2]
32
33
  if (href && firstThree !== 'htt' && firstThree !== 'ske') {
@@ -36,3 +37,7 @@ export const RouteLink = {
36
37
  }
37
38
  }
38
39
  }
40
+
41
+ export const RouteLink = {
42
+ extend: [Link, RouterLink]
43
+ }
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@symbo.ls/link",
3
- "version": "2.10.134",
3
+ "version": "2.10.162",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
- "gitHead": "ca88f67b0c989938a8118a539f75608bcbacc26a",
6
+ "gitHead": "bcb75a861d22f204893bc7f58a4432b1126f8e17",
7
7
  "dependencies": {
8
8
  "@domql/router": "latest",
9
9
  "@symbo.ls/atoms": "latest"