@symbo.ls/starter-kit 2.34.2 → 3.2.3

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/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # Symbols Starter Kit
2
- Example dev setup (boilerplate) to use [DOMQL](https://github.com/domql/domql). You can also check out [Symbols developers documentation](https://symbols.app/developers) for advanced use.
2
+ Example dev setup (boilerplate) to use [DOMQL](https://github.com/domql/domql). You can also check live editor [Playground](https://domql.com/playground/).
3
3
 
4
4
  ### Setup
5
5
 
@@ -10,10 +10,10 @@ git clone git@github.com:symbo-ls/starter-kit.git
10
10
 
11
11
  2. Install scripts
12
12
  ```
13
- npm install
13
+ yarn
14
14
  ```
15
15
 
16
16
  3. Run the project
17
17
  ```
18
- npm start
18
+ yarn start
19
19
  ```
package/example/app.js CHANGED
@@ -1,16 +1,11 @@
1
1
  'use strict'
2
2
 
3
- import { Flex } from 'smbls'
4
-
5
3
  export const App = {
6
- extend: Flex,
7
-
8
- props: {
9
- theme: 'document',
10
- flow: 'column',
11
- height: '100vh',
12
- align: 'center space-between'
13
- },
4
+ display: 'flex',
5
+ theme: 'document',
6
+ flow: 'column',
7
+ height: '100vh',
8
+ align: 'center space-between',
14
9
 
15
10
  Header: {},
16
11
 
@@ -1,22 +1,16 @@
1
1
  'use strict'
2
2
 
3
- import { Flex, Link } from 'smbls'
4
-
5
3
  export const Header = {
6
- extend: Flex,
7
- props: {
8
- minWidth: '100%',
9
- padding: 'Z B',
10
- align: 'center space-between'
11
- },
12
-
4
+ display: 'flex',
5
+ minWidth: '100%',
6
+ padding: 'Z B',
7
+ align: 'center space-between',
13
8
  Flex: {
14
- props: { gap: 'C' },
15
- childExtend: {
16
- extend: Link,
17
- props: ({ props }) => ({
18
- textDecoration: window.location.pathname === props.href ? 'underline' : 'none'
19
- })
9
+ gap: 'C',
10
+ childExtends: {
11
+ extends: 'Link',
12
+ textDecoration: ({ props }) =>
13
+ window.location.pathname === props.href ? 'underline' : 'none'
20
14
  },
21
15
  Text_logo: { href: '/', text: 'Hello!' },
22
16
  Text_about: { href: '/about', text: 'About' }
@@ -26,43 +20,35 @@ export const Header = {
26
20
  }
27
21
 
28
22
  export const ThemeSwitcher = {
29
- extend: Flex,
30
- props: { gap: 'A2' },
31
- childExtend: {
32
- props: (element, state) => ({
33
- active: state.globalTheme === element.key,
34
- cursor: 'pointer',
35
- '.active': {
36
- fontWeight: '900'
37
- }
38
- }),
39
- on: {
40
- click: (event, element, state) => {
41
- state.update({ globalTheme: element.key })
42
- }
23
+ display: 'flex',
24
+ gap: 'A2',
25
+ childExtends: {
26
+ isActive: (element, state) => state.globalTheme === element.key,
27
+ cursor: 'pointer',
28
+ '.isActive': {
29
+ fontWeight: '900'
30
+ },
31
+ onClick: (event, element, state) => {
32
+ state.update({ globalTheme: element.key })
43
33
  }
44
34
  },
45
- dark: { text: 'Dark' },
46
- light: { text: 'Light' },
47
- midnight: { text: 'Midnight' }
35
+ Dark: { text: 'Dark' },
36
+ Light: { text: 'Light' },
37
+ Midnight: { text: 'Midnight' }
48
38
  }
49
39
 
50
40
  export const Footer = {
51
- props: {
52
- padding: 'Z B',
53
- order: 9
54
- }
41
+ padding: 'Z B',
42
+ order: 9
55
43
  }
56
44
 
57
45
  export const TestComponent = {
58
- props: {
59
- padding: 'Z B',
60
- round: 'A',
61
- margin: 'A -Z C',
62
- background: 'orange .35',
63
- text: 'test',
64
- ':hover': {
65
- background: 'orange .35 +35'
66
- }
46
+ padding: 'Z B',
47
+ round: 'A',
48
+ margin: 'A -Z C',
49
+ background: 'orange .35',
50
+ text: 'test',
51
+ ':hover': {
52
+ background: 'orange .35 +35'
67
53
  }
68
54
  }
package/example/pages.js CHANGED
@@ -6,13 +6,11 @@ export default {
6
6
  P: 'Lorem ipsum dolor sit amet',
7
7
  TestComponent: {},
8
8
  Link: {
9
- props: {
10
- href: 'https://symbols.app/developers',
11
- target: '_blank',
12
- ':hover': {
13
- '& svg': {
14
- margin: '- Y - -'
15
- }
9
+ href: 'https://symbols.app/developers',
10
+ target: '_blank',
11
+ ':hover': {
12
+ '& svg': {
13
+ margin: '- Y - -'
16
14
  }
17
15
  },
18
16
  Icon: {
package/package.json CHANGED
@@ -1,29 +1,30 @@
1
1
  {
2
2
  "name": "@symbo.ls/starter-kit",
3
- "version": "2.34.2",
3
+ "version": "3.2.3",
4
4
  "description": "Example dev setup to use Symbols",
5
5
  "author": "symbo.ls",
6
6
  "repository": "https://github.com/symbo-ls/starter-kit",
7
7
  "scripts": {
8
- "start": "parcel index.html",
9
- "build": "parcel build index.html"
8
+ "start": "npx parcel index.html --no-cache --watch-dir=../domql",
9
+ "fetch": "npx @symbo.ls/cli fetch",
10
+ "build": "npx parcel build index.html"
10
11
  },
11
12
  "dependencies": {
12
- "smbls": "^2.34.2"
13
+ "smbls": "^3.2.3"
13
14
  },
14
15
  "devDependencies": {
15
- "@babel/core": "^7.28.4",
16
- "@babel/eslint-parser": "^7.28.4",
17
- "@babel/preset-env": "^7.28.3",
18
- "@parcel/babel-preset-env": "^2.16.0",
19
- "@parcel/transformer-inline-string": "^2.16.0",
20
- "@parcel/transformer-raw": "^2.16.0",
21
- "buffer": "^6.0.3",
22
- "eslint": "^9.37.0",
16
+ "@babel/core": "^7.26.0",
17
+ "@babel/eslint-parser": "^7.26.10",
18
+ "@babel/preset-env": "^7.26.9",
19
+ "@parcel/babel-preset-env": "^2.11.0",
20
+ "@parcel/transformer-inline-string": "^2.13.3",
21
+ "@parcel/transformer-raw": "^2.13.3",
22
+ "buffer": "^5.5.0||^6.0.0",
23
+ "eslint": "^9.28.0",
23
24
  "eslint-config-standard": "^17.1.0",
24
- "eslint-plugin-import": "^2.32.0",
25
- "parcel": "^2.16.0",
25
+ "eslint-plugin-import": "^2.31.0",
26
+ "parcel": "^2.13.3",
26
27
  "standard": "^17.1.2"
27
28
  },
28
- "gitHead": "fb12105837bedc8f038614c2cf77ed7a5e02619b"
29
+ "gitHead": "9fc1b79b41cdc725ca6b24aec64920a599634681"
29
30
  }
package/src/components.js CHANGED
@@ -1,22 +1,16 @@
1
1
  'use strict'
2
2
 
3
- import { Flex, Link } from 'smbls'
4
-
5
3
  export const Header = {
6
- extend: Flex,
7
- props: {
8
- minWidth: '100%',
9
- padding: 'Z B',
10
- align: 'center space-between'
11
- },
12
-
4
+ display: 'flex',
5
+ minWidth: '100%',
6
+ padding: 'Z B',
7
+ align: 'center space-between',
13
8
  Flex: {
14
- props: { gap: 'C' },
15
- childExtend: {
16
- extend: Link,
17
- props: ({ props }) => ({
18
- textDecoration: window.location.pathname === props.href ? 'underline' : 'none'
19
- })
9
+ gap: 'C',
10
+ childExtends: {
11
+ extends: 'Link',
12
+ textDecoration: ({ props }) =>
13
+ window.location.pathname === props.href ? 'underline' : 'none'
20
14
  },
21
15
  Text_logo: { href: '/', text: 'Hello!' },
22
16
  Text_about: { href: '/about', text: 'About' }
@@ -26,30 +20,38 @@ export const Header = {
26
20
  }
27
21
 
28
22
  export const ThemeSwitcher = {
29
- extend: Flex,
30
- props: { gap: 'A2' },
31
- childExtend: {
32
- props: (element, state) => ({
33
- active: state.globalTheme === element.key,
34
- cursor: 'pointer',
35
- '.active': {
36
- fontWeight: '900'
37
- }
38
- }),
39
- on: {
40
- click: (event, element, state) => {
41
- state.update({ globalTheme: element.key })
42
- }
23
+ display: 'flex',
24
+ gap: 'A2',
25
+ childExtends: {
26
+ isActive: (element, state) =>
27
+ state.globalTheme === element.key.toLowerCase(),
28
+ cursor: 'pointer',
29
+ '.isActive': {
30
+ fontWeight: '900'
31
+ },
32
+ onClick: (event, element, state, ctx) => {
33
+ console.log(element.key.toLowerCase())
34
+ ctx.designSystem.globalTheme = element.key.toLowerCase()
35
+ state.update({ globalTheme: element.key.toLowerCase() })
43
36
  }
44
37
  },
45
- dark: { text: 'Dark' },
46
- light: { text: 'Light' },
47
- midnight: { text: 'Midnight' }
38
+ Dark: { text: 'Dark' },
39
+ Light: { text: 'Light' },
40
+ Midnight: { text: 'Midnight' }
48
41
  }
49
42
 
50
43
  export const Footer = {
51
- props: {
52
- padding: 'Z B',
53
- order: 9
44
+ padding: 'Z B',
45
+ order: 9
46
+ }
47
+
48
+ export const TestComponent = {
49
+ padding: 'Z B',
50
+ round: 'A',
51
+ margin: 'A -Z C',
52
+ background: 'orange .35',
53
+ text: 'test',
54
+ ':hover': {
55
+ background: 'orange .35 +35'
54
56
  }
55
57
  }
@@ -70,7 +70,7 @@ const TYPOGRAPHY = {
70
70
  const SPACING = {}
71
71
 
72
72
  const options = {
73
- verbose: false,
73
+ verbose: true,
74
74
  useReset: true,
75
75
  useDocumentTheme: true,
76
76
  useFontImport: true,
package/src/index.js CHANGED
@@ -1,28 +1,27 @@
1
1
  'use strict'
2
2
 
3
- import { create, Flex } from 'smbls'
3
+ import { create } from 'smbls'
4
4
 
5
5
  import designSystem from './designSystem'
6
6
  import * as components from './components'
7
7
  import pages from './pages'
8
8
 
9
- create({
10
- extend: Flex,
9
+ async function initialize () {
10
+ let fetched_context
11
+ try {
12
+ fetched_context = await import('../smbls_dist')
13
+ } catch (error) {
14
+ console.error('Failed to load fetched_context:', error)
15
+ }
11
16
 
12
- props: {
13
- theme: 'document',
14
- flow: 'column',
15
- height: '100vh',
16
- align: 'center space-between'
17
- },
17
+ create(
18
+ {},
19
+ fetched_context || {
20
+ designSystem,
21
+ components,
22
+ pages
23
+ }
24
+ )
25
+ }
18
26
 
19
- Header: {},
20
-
21
- content: {},
22
-
23
- Footer: { text: 'Footer' }
24
- }, {
25
- designSystem,
26
- components,
27
- pages
28
- })
27
+ initialize()
package/src/pages.js CHANGED
@@ -2,11 +2,29 @@
2
2
 
3
3
  export default {
4
4
  '/': {
5
- H1: { text: 'Hello Symbols' },
6
- P: { text: 'Lorem ipsum dolor sit amet' }
5
+ Header: {},
6
+ TestComponent: {},
7
+ Link: {
8
+ href: 'https://symbols.app/developers',
9
+ target: '_blank',
10
+ ':hover': {
11
+ '& svg': {
12
+ margin: '- Y - -'
13
+ }
14
+ },
15
+ Icon: {
16
+ transition: 'margin ease A',
17
+ margin: '- X - -',
18
+ name: 'arrow up right'
19
+ },
20
+ Span: 'Checkout Docs'
21
+ }
7
22
  },
8
23
  '/about': {
9
- H3: { text: 'This is Symbols starter-kit' },
10
- P: { text: 'Lorem ipsum dolor sit amet' }
24
+ Header: {},
25
+ Link: {
26
+ href: '/',
27
+ text: 'Go Back'
28
+ }
11
29
  }
12
30
  }
package/symbols.json CHANGED
@@ -1,3 +1,4 @@
1
1
  {
2
- "key": "projectName.symbo.ls"
2
+ "key": "smart-capital.symbo.ls",
3
+ "distDir": "smbls_dist"
3
4
  }