smbls 0.15.34 → 0.15.35

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.
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "UI Library built on Scratch and DOMQL",
4
4
  "private": false,
5
5
  "author": "symbo.ls",
6
- "version": "0.15.34",
6
+ "version": "0.15.35",
7
7
  "repository": "https://github.com/symbo-ls/smbls",
8
8
  "main": "src/index.js",
9
9
  "files": [
@@ -51,6 +51,7 @@ const convertPropsToClass = (props, result, element) => {
51
51
 
52
52
  const applyMediaProps = (key, props, result, element) => {
53
53
  const { context } = element
54
+ console.log(context, element)
54
55
  if (!context.SYSTEM || !context.SYSTEM.MEDIA) return
55
56
  const globalTheme = getSystemTheme(element)
56
57
  const { MEDIA } = context.SYSTEM
@@ -0,0 +1,18 @@
1
+ 'use strict'
2
+
3
+ export const Picture = {
4
+ tag: 'picture',
5
+
6
+ childExtend: {
7
+ tag: 'source',
8
+ attr: {
9
+ media: ({ props, key, context }) => {
10
+ const { MEDIA } = context.SYSTEM
11
+ return MEDIA[(props.media || key).slice(1)]
12
+ },
13
+ srcset: ({ props }) => props.srcset
14
+ }
15
+ },
16
+
17
+ Img: ({ props }) => ({ src: props.src })
18
+ }