@symbo.ls/atoms 2.11.480 → 2.11.491

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 (3) hide show
  1. package/Iframe.js +11 -1
  2. package/Img.js +3 -4
  3. package/package.json +2 -2
package/Iframe.js CHANGED
@@ -8,7 +8,17 @@ export const Iframe = {
8
8
  minHeight: 'H'
9
9
  },
10
10
  attr: {
11
- src: ({ props }) => props.src,
11
+ src: (el, s) => {
12
+ let src = el.call('exec', el.props.src, el)
13
+
14
+ if (el.call('isString', src) && src.includes('{{')) {
15
+ src = el.call('replaceLiteralsWithObjectFields', src)
16
+ }
17
+
18
+ let isUrl
19
+ try { isUrl = new URL(src) } catch (e) {}
20
+ if (isUrl) return src
21
+ },
12
22
  srcdoc: ({ props }) => props.srcdoc,
13
23
  sandbox: ({ props }) => props.sandbox,
14
24
  seamless: ({ props }) => props.seamless,
package/Img.js CHANGED
@@ -6,11 +6,10 @@ export const Img = {
6
6
  attr: {
7
7
  src: (el) => {
8
8
  const { props, context } = el
9
- const { exec, isString, replaceLiteralsWithObjectFields } = context.utils
10
- let src = (props.preSrc || '') + exec(props.src, el)
9
+ let src = (props.preSrc || '') + el.call('exec', props.src, el)
11
10
 
12
- if (isString(src) && src.includes('{{')) {
13
- src = replaceLiteralsWithObjectFields(src, el.state)
11
+ if (el.call('isString', src) && src.includes('{{')) {
12
+ src = el.call('replaceLiteralsWithObjectFields', src)
14
13
  }
15
14
 
16
15
  let isUrl
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@symbo.ls/atoms",
3
- "version": "2.11.480",
3
+ "version": "2.11.491",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
- "gitHead": "14db2b8d241d45fa80f588a2e0a6c50f5dbd8bee",
6
+ "gitHead": "ddd06b2b342480b2e20c02df04f9856d4ddf7060",
7
7
  "dependencies": {
8
8
  "@domql/state": "^2.5.0",
9
9
  "@domql/utils": "^2.5.0",