@symbo.ls/atoms 3.6.3 → 3.6.6

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/Img.js +2 -1
  2. package/Picture.js +1 -1
  3. package/package.json +4 -4
package/Img.js CHANGED
@@ -13,7 +13,8 @@ export const Img = {
13
13
  let isUrl
14
14
  try { isUrl = new URL(src) } catch (e) { }
15
15
  if (isUrl) return src
16
- const file = context.files && context.files[src]
16
+ const fileSrc = src && src.startsWith('/files/') ? src.slice(7) : src
17
+ const file = context.files && (context.files[src] || context.files[fileSrc])
17
18
  if (file) return file.content && file.content.src
18
19
  },
19
20
  title: ({ props }) => props.title || props.alt
package/Picture.js CHANGED
@@ -29,6 +29,6 @@ export const Picture = {
29
29
  width: 'inherit',
30
30
  ignoreChildExtends: true,
31
31
  height: 'inherit',
32
- src: (element, state) => element.parent.src || state.src
32
+ src: (element, state) => element.parent.props?.src || element.parent.src || state.src
33
33
  }
34
34
  }
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@symbo.ls/atoms",
3
- "version": "3.6.3",
3
+ "version": "3.6.6",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
6
  "gitHead": "9fc1b79b41cdc725ca6b24aec64920a599634681",
7
7
  "dependencies": {
8
- "@domql/state": "^3.6.3",
9
- "@domql/utils": "^3.6.3",
10
- "@symbo.ls/scratch": "^3.6.3"
8
+ "@domql/state": "^3.6.6",
9
+ "@domql/utils": "^3.6.6",
10
+ "@symbo.ls/scratch": "^3.6.6"
11
11
  },
12
12
  "source": "index.js",
13
13
  "devDependencies": {