@symbo.ls/link 3.5.1 → 3.6.1

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 +5 -11
  2. package/package.json +7 -5
package/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  'use strict'
2
2
 
3
3
  import { router as defaultRouter } from '@domql/router'
4
+ import { resolvePropValue } from 'attrs-in-props'
4
5
 
5
6
  export const Link = {
6
7
  extends: 'Focusable',
@@ -13,19 +14,12 @@ export const Link = {
13
14
  draggable: false,
14
15
 
15
16
  attr: {
16
- href: (el, s, ctx) => {
17
+ href: (el) => {
17
18
  const props = el.props
18
- const href =
19
- el.call('exec', props.href, el) ||
20
- el.call('exec', el.call('exec', props, el).href, el)
21
- if (el.call('isString', href) && href.includes('{{')) {
22
- return el.call('replaceLiteralsWithObjectFields', href)
23
- }
24
- return href
19
+ return resolvePropValue(el, props.href) ||
20
+ resolvePropValue(el, el.call('exec', props, el).href)
25
21
  },
26
- target: ({ props }) => props.target,
27
- 'aria-label': ({ props }) => (props.aria ? props.aria.label : props.text),
28
- draggable: ({ props }) => props.draggable
22
+ 'aria-label': ({ props }) => (props.aria ? props.aria.label : props.text)
29
23
  }
30
24
  }
31
25
 
package/package.json CHANGED
@@ -1,20 +1,22 @@
1
1
  {
2
2
  "name": "@symbo.ls/link",
3
- "version": "3.5.1",
3
+ "version": "3.6.1",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
6
  "gitHead": "9fc1b79b41cdc725ca6b24aec64920a599634681",
7
7
  "dependencies": {
8
- "@domql/router": "^3.5.1",
9
- "@symbo.ls/atoms": "^3.5.1"
8
+ "@domql/router": "^3.6.1",
9
+ "@symbo.ls/atoms": "^3.6.1"
10
10
  },
11
11
  "source": "index.js",
12
12
  "type": "module",
13
13
  "module": "index.js",
14
14
  "exports": {
15
15
  ".": {
16
- "import": "./index.js",
17
- "default": "./index.js"
16
+ "import": "./index.js"
18
17
  }
18
+ },
19
+ "publishConfig": {
20
+ "access": "public"
19
21
  }
20
22
  }