@symbo.ls/button 0.4.3 → 0.5.8

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 (126) hide show
  1. package/package.json +8 -2
  2. package/packages/react/index.js +7 -0
  3. package/packages/react/node_modules/.yarn-integrity +91 -0
  4. package/packages/react/node_modules/@domql/cache/LICENSE +21 -0
  5. package/packages/react/node_modules/@domql/cache/index.js +0 -0
  6. package/packages/react/node_modules/@domql/cache/package.json +10 -0
  7. package/packages/react/node_modules/@domql/cookie/LICENSE +21 -0
  8. package/packages/react/node_modules/@domql/cookie/index.js +22 -0
  9. package/packages/react/node_modules/@domql/cookie/package.json +10 -0
  10. package/packages/react/node_modules/@domql/define/LICENSE +21 -0
  11. package/packages/react/node_modules/@domql/define/index.js +13 -0
  12. package/packages/react/node_modules/@domql/define/package.json +11 -0
  13. package/packages/react/node_modules/@domql/domql/LICENSE +21 -0
  14. package/packages/react/node_modules/@domql/domql/package.json +33 -0
  15. package/packages/react/node_modules/@domql/domql/src/all_exports.js +17 -0
  16. package/packages/react/node_modules/@domql/domql/src/index.js +15 -0
  17. package/packages/react/node_modules/@domql/element/LICENSE +21 -0
  18. package/packages/react/node_modules/@domql/element/package.json +20 -0
  19. package/packages/react/node_modules/@domql/element/src/assign.js +22 -0
  20. package/packages/react/node_modules/@domql/element/src/create.js +125 -0
  21. package/packages/react/node_modules/@domql/element/src/index.js +8 -0
  22. package/packages/react/node_modules/@domql/element/src/iterate.js +80 -0
  23. package/packages/react/node_modules/@domql/element/src/methods.js +96 -0
  24. package/packages/react/node_modules/@domql/element/src/set.js +44 -0
  25. package/packages/react/node_modules/@domql/element/src/update.js +98 -0
  26. package/packages/react/node_modules/@domql/event/LICENSE +21 -0
  27. package/packages/react/node_modules/@domql/event/package.json +14 -0
  28. package/packages/react/node_modules/@domql/event/src/can.js +10 -0
  29. package/packages/react/node_modules/@domql/event/src/index.js +11 -0
  30. package/packages/react/node_modules/@domql/event/src/is.js +13 -0
  31. package/packages/react/node_modules/@domql/event/src/on.js +33 -0
  32. package/packages/react/node_modules/@domql/event/src/store.js +6 -0
  33. package/packages/react/node_modules/@domql/event/src/wrappers.js +14 -0
  34. package/packages/react/node_modules/@domql/event/yarn-error.log +44 -0
  35. package/packages/react/node_modules/@domql/id/LICENSE +21 -0
  36. package/packages/react/node_modules/@domql/id/index.js +12 -0
  37. package/packages/react/node_modules/@domql/id/package.json +10 -0
  38. package/packages/react/node_modules/@domql/mixins/LICENSE +21 -0
  39. package/packages/react/node_modules/@domql/mixins/package.json +12 -0
  40. package/packages/react/node_modules/@domql/mixins/src/attr.js +19 -0
  41. package/packages/react/node_modules/@domql/mixins/src/classList.js +37 -0
  42. package/packages/react/node_modules/@domql/mixins/src/content.js +17 -0
  43. package/packages/react/node_modules/@domql/mixins/src/data.js +21 -0
  44. package/packages/react/node_modules/@domql/mixins/src/html.js +17 -0
  45. package/packages/react/node_modules/@domql/mixins/src/index.js +11 -0
  46. package/packages/react/node_modules/@domql/mixins/src/registry.js +55 -0
  47. package/packages/react/node_modules/@domql/mixins/src/state.js +16 -0
  48. package/packages/react/node_modules/@domql/mixins/src/style.js +14 -0
  49. package/packages/react/node_modules/@domql/mixins/src/text.js +19 -0
  50. package/packages/react/node_modules/@domql/node/LICENSE +21 -0
  51. package/packages/react/node_modules/@domql/node/package.json +17 -0
  52. package/packages/react/node_modules/@domql/node/src/cache.js +52 -0
  53. package/packages/react/node_modules/@domql/node/src/create.js +86 -0
  54. package/packages/react/node_modules/@domql/node/src/index.js +5 -0
  55. package/packages/react/node_modules/@domql/node/src/registry.js +139 -0
  56. package/packages/react/node_modules/@domql/parse/LICENSE +21 -0
  57. package/packages/react/node_modules/@domql/parse/index.js +16 -0
  58. package/packages/react/node_modules/@domql/parse/package.json +10 -0
  59. package/packages/react/node_modules/@domql/props/LICENSE +21 -0
  60. package/packages/react/node_modules/@domql/props/package.json +10 -0
  61. package/packages/react/node_modules/@domql/props/src/index.js +62 -0
  62. package/packages/react/node_modules/@domql/proto/LICENSE +21 -0
  63. package/packages/react/node_modules/@domql/proto/index.js +66 -0
  64. package/packages/react/node_modules/@domql/proto/package.json +10 -0
  65. package/packages/react/node_modules/@domql/react-transformer/LICENSE +21 -0
  66. package/packages/react/node_modules/@domql/react-transformer/index.js +25 -0
  67. package/packages/react/node_modules/@domql/react-transformer/package.json +12 -0
  68. package/packages/react/node_modules/@domql/react-transformer/yarn-error.log +41 -0
  69. package/packages/react/node_modules/@domql/report/LICENSE +21 -0
  70. package/packages/react/node_modules/@domql/report/index.js +62 -0
  71. package/packages/react/node_modules/@domql/report/package.json +7 -0
  72. package/packages/react/node_modules/@domql/state/LICENSE +21 -0
  73. package/packages/react/node_modules/@domql/state/package.json +11 -0
  74. package/packages/react/node_modules/@domql/state/src/index.js +51 -0
  75. package/packages/react/node_modules/@domql/tree/LICENSE +21 -0
  76. package/packages/react/node_modules/@domql/tree/index.js +6 -0
  77. package/packages/react/node_modules/@domql/tree/package.json +10 -0
  78. package/packages/react/node_modules/@domql/tree/root.js +8 -0
  79. package/packages/react/node_modules/@domql/utils/LICENSE +21 -0
  80. package/packages/react/node_modules/@domql/utils/package.json +13 -0
  81. package/packages/react/node_modules/@domql/utils/src/index.js +5 -0
  82. package/packages/react/node_modules/@domql/utils/src/node.js +10 -0
  83. package/packages/react/node_modules/@domql/utils/src/object.js +193 -0
  84. package/packages/react/node_modules/@domql/utils/src/protoUtils.js +119 -0
  85. package/packages/react/node_modules/js-tokens/CHANGELOG.md +151 -0
  86. package/packages/react/node_modules/js-tokens/LICENSE +21 -0
  87. package/packages/react/node_modules/js-tokens/README.md +240 -0
  88. package/packages/react/node_modules/js-tokens/index.js +23 -0
  89. package/packages/react/node_modules/js-tokens/package.json +30 -0
  90. package/packages/react/node_modules/loose-envify/LICENSE +21 -0
  91. package/packages/react/node_modules/loose-envify/README.md +45 -0
  92. package/packages/react/node_modules/loose-envify/cli.js +16 -0
  93. package/packages/react/node_modules/loose-envify/custom.js +4 -0
  94. package/packages/react/node_modules/loose-envify/index.js +3 -0
  95. package/packages/react/node_modules/loose-envify/loose-envify.js +36 -0
  96. package/packages/react/node_modules/loose-envify/package.json +36 -0
  97. package/packages/react/node_modules/loose-envify/replace.js +65 -0
  98. package/packages/react/node_modules/object-assign/index.js +90 -0
  99. package/packages/react/node_modules/object-assign/license +21 -0
  100. package/packages/react/node_modules/object-assign/package.json +42 -0
  101. package/packages/react/node_modules/object-assign/readme.md +61 -0
  102. package/packages/react/node_modules/react/LICENSE +21 -0
  103. package/packages/react/node_modules/react/README.md +13 -0
  104. package/packages/react/node_modules/react/build-info.json +8 -0
  105. package/packages/react/node_modules/react/cjs/react-jsx-dev-runtime.development.js +1203 -0
  106. package/packages/react/node_modules/react/cjs/react-jsx-dev-runtime.production.min.js +9 -0
  107. package/packages/react/node_modules/react/cjs/react-jsx-dev-runtime.profiling.min.js +9 -0
  108. package/packages/react/node_modules/react/cjs/react-jsx-runtime.development.js +1221 -0
  109. package/packages/react/node_modules/react/cjs/react-jsx-runtime.production.min.js +10 -0
  110. package/packages/react/node_modules/react/cjs/react-jsx-runtime.profiling.min.js +10 -0
  111. package/packages/react/node_modules/react/cjs/react.development.js +2333 -0
  112. package/packages/react/node_modules/react/cjs/react.production.min.js +23 -0
  113. package/packages/react/node_modules/react/index.js +7 -0
  114. package/packages/react/node_modules/react/jsx-dev-runtime.js +7 -0
  115. package/packages/react/node_modules/react/jsx-runtime.js +7 -0
  116. package/packages/react/node_modules/react/package.json +39 -0
  117. package/packages/react/node_modules/react/umd/react.development.js +3357 -0
  118. package/packages/react/node_modules/react/umd/react.production.min.js +31 -0
  119. package/packages/react/node_modules/react/umd/react.profiling.min.js +36 -0
  120. package/packages/react/node_modules/regenerator-runtime/LICENSE +21 -0
  121. package/packages/react/node_modules/regenerator-runtime/README.md +31 -0
  122. package/packages/react/node_modules/regenerator-runtime/package.json +19 -0
  123. package/packages/react/node_modules/regenerator-runtime/path.js +11 -0
  124. package/packages/react/node_modules/regenerator-runtime/runtime.js +754 -0
  125. package/packages/react/package.json +6 -2
  126. package/packages/react/yarn.lock +183 -0
package/package.json CHANGED
@@ -1,7 +1,13 @@
1
1
  {
2
2
  "name": "@symbo.ls/button",
3
- "version": "0.4.3",
3
+ "version": "0.5.8",
4
4
  "main": "src/index.js",
5
5
  "license": "MIT",
6
- "gitHead": "f9ff8cad170955f2f2c63dbf530d04b76f2238e0"
6
+ "gitHead": "761a5fa98e6661bcf3b3488e9e0c7a9a42ee2e07",
7
+ "dependencies": {
8
+ "@symbo.ls/block": "^0.5.3",
9
+ "@symbo.ls/direction": "^0.5.3",
10
+ "@symbo.ls/icon-text": "^0.5.3",
11
+ "@symbo.ls/shape": "^0.5.3"
12
+ }
7
13
  }
@@ -1 +1,8 @@
1
1
  'use strict'
2
+
3
+ import { reactTransformer } from '@domql/react-transformer'
4
+ import { Button as component } from '@symbo.ls/button'
5
+
6
+ export const Button = (props, state) => {
7
+ return reactTransformer(component, props, state)
8
+ }
@@ -0,0 +1,91 @@
1
+ {
2
+ "systemParams": "darwin-x64-83",
3
+ "modulesFolders": [
4
+ "node_modules"
5
+ ],
6
+ "flags": [],
7
+ "linkedModules": [
8
+ "@domql/cache",
9
+ "@domql/cookie",
10
+ "@domql/define",
11
+ "@domql/domql",
12
+ "@domql/element",
13
+ "@domql/emotion",
14
+ "@domql/event",
15
+ "@domql/id",
16
+ "@domql/mixins",
17
+ "@domql/node",
18
+ "@domql/object",
19
+ "@domql/parse",
20
+ "@domql/props",
21
+ "@domql/proto",
22
+ "@domql/report",
23
+ "@domql/router",
24
+ "@domql/state",
25
+ "@domql/tree",
26
+ "@domql/utils",
27
+ "@rackai/classql",
28
+ "@rackai/domql",
29
+ "@rackai/editor",
30
+ "@rackai/scratch",
31
+ "@rackai/symbols",
32
+ "@symbo-ls/components",
33
+ "@symbo.ls/all",
34
+ "@symbo.ls/auth",
35
+ "@symbo.ls/config",
36
+ "@symbo.ls/fetch",
37
+ "@symbo.ls/grid-layouts",
38
+ "@symbo.ls/icons",
39
+ "@symbo.ls/loader",
40
+ "@symbo.ls/scratch",
41
+ "@symbols/all",
42
+ "@symbols/auth",
43
+ "@symbols/components",
44
+ "@symbols/config",
45
+ "@symbols/domql",
46
+ "@symbols/fetch",
47
+ "@symbols/icons",
48
+ "@symbols/loader",
49
+ "@symbols/scratch",
50
+ "@symbols/uikit",
51
+ "components",
52
+ "icons"
53
+ ],
54
+ "topLevelPatterns": [
55
+ "@domql/react-transformer@^1.3.0",
56
+ "@symbo.ls/button@^0.5.3"
57
+ ],
58
+ "lockfileEntries": {
59
+ "@domql/cache@latest": "https://registry.yarnpkg.com/@domql/cache/-/cache-1.3.0.tgz#cbcbee018ed6536ca1fd9dd6de9a5f533e942971",
60
+ "@domql/cookie@latest": "https://registry.yarnpkg.com/@domql/cookie/-/cookie-1.3.0.tgz#d305bc3ea4c7470d60fa37046661b054d5903876",
61
+ "@domql/define@latest": "https://registry.yarnpkg.com/@domql/define/-/define-1.3.0.tgz#f00b62feb33cb2118432d128403f00379152c4e3",
62
+ "@domql/domql@^1.3.0": "https://registry.yarnpkg.com/@domql/domql/-/domql-1.3.0.tgz#e207eb04e033bff95bab2ec2f04054877f075437",
63
+ "@domql/element@^1.3.0": "https://registry.yarnpkg.com/@domql/element/-/element-1.3.0.tgz#0a4bb937aafee695dfc22a46d33d4fd82cd52b39",
64
+ "@domql/element@latest": "https://registry.yarnpkg.com/@domql/element/-/element-1.3.0.tgz#0a4bb937aafee695dfc22a46d33d4fd82cd52b39",
65
+ "@domql/event@^1.3.0": "https://registry.yarnpkg.com/@domql/event/-/event-1.3.0.tgz#ac683e1f8b34734eb0ca49712537fdea1f04dafe",
66
+ "@domql/event@latest": "https://registry.yarnpkg.com/@domql/event/-/event-1.3.0.tgz#ac683e1f8b34734eb0ca49712537fdea1f04dafe",
67
+ "@domql/id@latest": "https://registry.yarnpkg.com/@domql/id/-/id-1.3.0.tgz#5b8dfd5af6ac952723411461b27ff3c726c2b15a",
68
+ "@domql/mixins@^1.3.0": "https://registry.yarnpkg.com/@domql/mixins/-/mixins-1.3.0.tgz#483a1c3bb785f5d4bbad0123f9b219540cba6d26",
69
+ "@domql/mixins@latest": "https://registry.yarnpkg.com/@domql/mixins/-/mixins-1.3.0.tgz#483a1c3bb785f5d4bbad0123f9b219540cba6d26",
70
+ "@domql/node@^1.3.0": "https://registry.yarnpkg.com/@domql/node/-/node-1.3.0.tgz#9082f49951391e62948ce22e77dcc8172bbe801a",
71
+ "@domql/node@latest": "https://registry.yarnpkg.com/@domql/node/-/node-1.3.0.tgz#9082f49951391e62948ce22e77dcc8172bbe801a",
72
+ "@domql/parse@latest": "https://registry.yarnpkg.com/@domql/parse/-/parse-1.3.0.tgz#539d8522324be477d1c171ae844ec7d4cc07c80e",
73
+ "@domql/props@latest": "https://registry.yarnpkg.com/@domql/props/-/props-1.3.0.tgz#ed0411fda65ca7c2cf1792c9248a6a2c12318b0a",
74
+ "@domql/proto@latest": "https://registry.yarnpkg.com/@domql/proto/-/proto-1.3.0.tgz#d59967a415fd5afefba58b9c1fd95f04a281d930",
75
+ "@domql/react-transformer@^1.3.0": "https://registry.yarnpkg.com/@domql/react-transformer/-/react-transformer-1.3.0.tgz#c496a8abf5ef20d24fc268c258711774cf9c09b9",
76
+ "@domql/report@^1.3.0": "https://registry.yarnpkg.com/@domql/report/-/report-1.3.0.tgz#8aa5112c0812518781ac8b7f6cee614d1ecd1ff5",
77
+ "@domql/report@latest": "https://registry.yarnpkg.com/@domql/report/-/report-1.3.0.tgz#8aa5112c0812518781ac8b7f6cee614d1ecd1ff5",
78
+ "@domql/state@latest": "https://registry.yarnpkg.com/@domql/state/-/state-1.3.0.tgz#a584d86233f031a1e531c03df518968f82da3124",
79
+ "@domql/tree@latest": "https://registry.yarnpkg.com/@domql/tree/-/tree-1.3.0.tgz#77613edc6a36ac0465aba7f9a89e7f70e35f3ba0",
80
+ "@domql/utils@^1.3.0": "https://registry.yarnpkg.com/@domql/utils/-/utils-1.3.0.tgz#647aa8fe2dd026e8dde520a436f362e274a02d06",
81
+ "@domql/utils@latest": "https://registry.yarnpkg.com/@domql/utils/-/utils-1.3.0.tgz#647aa8fe2dd026e8dde520a436f362e274a02d06",
82
+ "@symbo.ls/button@^0.5.3": "https://registry.yarnpkg.com/@symbo.ls/button/-/button-0.5.3.tgz#9232667f1f22a4218461516d4be89df7d298915d",
83
+ "js-tokens@^3.0.0 || ^4.0.0": "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499",
84
+ "loose-envify@^1.1.0": "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf",
85
+ "object-assign@^4.1.1": "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863",
86
+ "react@^17.0.2": "https://registry.yarnpkg.com/react/-/react-17.0.2.tgz#d0b5cc516d29eb3eee383f75b62864cfb6800037",
87
+ "regenerator-runtime@^0.13.9": "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz#8925742a98ffd90814988d7566ad30ca3b263b52"
88
+ },
89
+ "files": [],
90
+ "artifacts": {}
91
+ }
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2016 rackai
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,10 @@
1
+ {
2
+ "name": "@domql/cache",
3
+ "version": "1.3.0",
4
+ "main": "index.js",
5
+ "license": "MIT",
6
+ "scripts": {
7
+ "vpatch": "npm version patch && npm publish --access public"
8
+ },
9
+ "gitHead": "3140379c0f6da459a39068f32630275c6ea3b33f"
10
+ }
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2016 rackai
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,22 @@
1
+ 'use strict'
2
+
3
+ export const isMobile = (() => /Mobi/.test(navigator.userAgent))()
4
+
5
+ export const setCookie = (cname, cvalue, exdays = 365) => {
6
+ const d = new Date()
7
+ d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000))
8
+ const expires = `expires=${d.toUTCString()}`
9
+ document.cookie = `${cname}=${cvalue};${expires};path=/`
10
+ }
11
+
12
+ export const getCookie = (cname) => {
13
+ const name = `${cname}=`
14
+ const decodedCookie = decodeURIComponent(document.cookie)
15
+ const ca = decodedCookie.split(';')
16
+ for (let i = 0; i < ca.length; i++) {
17
+ let c = ca[i]
18
+ while (c.charAt(0) === ' ') c = c.substring(1)
19
+ if (c.indexOf(name) === 0) return c.substring(name.length, c.length)
20
+ }
21
+ return ''
22
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "name": "@domql/cookie",
3
+ "version": "1.3.0",
4
+ "main": "index.js",
5
+ "license": "MIT",
6
+ "scripts": {
7
+ "vpatch": "npm version patch && npm publish --access public"
8
+ },
9
+ "gitHead": "3140379c0f6da459a39068f32630275c6ea3b33f"
10
+ }
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2016 rackai
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,13 @@
1
+ 'use strict'
2
+
3
+ import { registry } from '@domql/mixins'
4
+ import { report } from '@domql/report'
5
+
6
+ export const define = (params, options = {}) => {
7
+ const { overwrite } = options
8
+ for (const param in params) {
9
+ if (registry[param] && !overwrite) {
10
+ report('OverwriteToBuiltin', param)
11
+ } else registry[param] = params[param]
12
+ }
13
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "@domql/define",
3
+ "version": "1.3.0",
4
+ "main": "index.js",
5
+ "license": "MIT",
6
+ "dependencies": {
7
+ "@domql/mixins": "^1.3.0",
8
+ "@domql/report": "^1.3.0"
9
+ },
10
+ "gitHead": "3140379c0f6da459a39068f32630275c6ea3b33f"
11
+ }
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2016 rackai
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "@domql/domql",
3
+ "description": "DOM rendering Javascript framework at early stage.",
4
+ "private": false,
5
+ "version": "1.3.0",
6
+ "main": "src/index.js",
7
+ "files": [
8
+ "src"
9
+ ],
10
+ "source": true,
11
+ "dependencies": {
12
+ "@domql/cache": "latest",
13
+ "@domql/cookie": "latest",
14
+ "@domql/define": "latest",
15
+ "@domql/element": "latest",
16
+ "@domql/event": "latest",
17
+ "@domql/id": "latest",
18
+ "@domql/mixins": "latest",
19
+ "@domql/node": "latest",
20
+ "@domql/parse": "latest",
21
+ "@domql/props": "latest",
22
+ "@domql/proto": "latest",
23
+ "@domql/report": "latest",
24
+ "@domql/state": "latest",
25
+ "@domql/tree": "latest",
26
+ "@domql/utils": "latest"
27
+ },
28
+ "publishConfig": {
29
+ "registry": "https://registry.npmjs.org"
30
+ },
31
+ "browserslist": "> 0.25%, not dead",
32
+ "gitHead": "3140379c0f6da459a39068f32630275c6ea3b33f"
33
+ }
@@ -0,0 +1,17 @@
1
+ 'use strict'
2
+
3
+ export * from '@domql/cache'
4
+ export * from '@domql/cookie'
5
+ export * from '@domql/define'
6
+ export * from '@domql/event'
7
+ export * from '@domql/id'
8
+ export * from '@domql/mixins'
9
+ export * from '@domql/node'
10
+ export * from '@domql/parse'
11
+ export * from '@domql/props'
12
+ export * from '@domql/proto'
13
+ export * from '@domql/report'
14
+ export * from '@domql/state'
15
+ export * from '@domql/tree'
16
+ export * from '@domql/utils'
17
+ export * from '@domql/element'
@@ -0,0 +1,15 @@
1
+ 'use strict'
2
+
3
+ import { create } from '@domql/element'
4
+ import { define } from '@domql/define'
5
+
6
+ export * as _ from './all_exports'
7
+
8
+ export { parse } from '@domql/parse'
9
+ export { define } from '@domql/define'
10
+ export { tree } from '@domql/tree'
11
+
12
+ export default {
13
+ create,
14
+ define
15
+ }
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2016 rackai
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,20 @@
1
+ {
2
+ "name": "@domql/element",
3
+ "version": "1.3.0",
4
+ "main": "src/index.js",
5
+ "license": "MIT",
6
+ "scripts": {
7
+ "vpatch": "npm version patch && npm publish --access public"
8
+ },
9
+ "dependencies": {
10
+ "@domql/event": "latest",
11
+ "@domql/mixins": "latest",
12
+ "@domql/node": "latest",
13
+ "@domql/props": "latest",
14
+ "@domql/proto": "latest",
15
+ "@domql/state": "latest",
16
+ "@domql/tree": "latest",
17
+ "@domql/utils": "latest"
18
+ },
19
+ "gitHead": "3140379c0f6da459a39068f32630275c6ea3b33f"
20
+ }
@@ -0,0 +1,22 @@
1
+ 'use strict'
2
+
3
+ /**
4
+ * Receives child and parent nodes as parametes
5
+ * and assigns them into real DOM tree
6
+ */
7
+ export const appendNode = (node, parentNode) => {
8
+ parentNode.appendChild(node)
9
+ return node
10
+ }
11
+
12
+ /**
13
+ * Receives elements and assigns the first
14
+ * parameter as a child of the second one
15
+ */
16
+ export const assignNode = (element, parent, key) => {
17
+ parent[key || element.key] = element
18
+ if (element.tag !== 'shadow') {
19
+ appendNode(element.node, parent.node)
20
+ }
21
+ return element
22
+ }
@@ -0,0 +1,125 @@
1
+ 'use strict'
2
+
3
+ import { root } from '@domql/tree'
4
+ import { applyPrototype } from '@domql/proto'
5
+ import { createNode, NODE_REGISTRY, cacheNode } from '@domql/node'
6
+ import { createState } from '@domql/state'
7
+ import { createProps } from '@domql/props'
8
+ import { assignClass } from '@domql/mixins'
9
+ import { on } from '@domql/event'
10
+ import { isFunction, isNumber, isString, createID, isNode } from '@domql/utils'
11
+
12
+ import { appendNode, assignNode } from './assign'
13
+ import { set } from './set'
14
+ import { update } from './update'
15
+ import { remove, lookup, log, keys, parse, parseDeep } from './methods'
16
+
17
+ const ENV = process.env.NODE_ENV
18
+
19
+ /**
20
+ * Creating a domQL element using passed parameters
21
+ */
22
+ export const create = (element, parent, key, options = {}) => {
23
+ // if ELEMENT is not given
24
+ if (element === undefined) element = {}
25
+ if (element === null) return
26
+
27
+ // define KEY
28
+ const assignedKey = element.key || key || createID.next().value
29
+
30
+ // if PARENT is not given
31
+ // if (parent === null) parent = root
32
+ // if (parent === undefined) parent = root
33
+ if (!parent) parent = root
34
+ if (isNode(parent)) parent = root[`${key}_parent`] = { node: parent }
35
+
36
+ // if element is STRING
37
+ if (isString(element) || isNumber(element)) {
38
+ element = {
39
+ text: element,
40
+ tag: (!element.proto && parent.childProto && parent.childProto.tag) ||
41
+ ((NODE_REGISTRY.body.indexOf(key) > -1) && key) || 'string'
42
+ }
43
+ }
44
+
45
+ // enable STATE
46
+ element.state = createState(element, parent)
47
+
48
+ // create PROTOtypal inheritance
49
+ applyPrototype(element, parent, options)
50
+
51
+ // create and assign a KEY
52
+ element.key = assignedKey
53
+
54
+ // set the PATH
55
+ if (ENV === 'test' || ENV === 'development') {
56
+ if (!parent.path) parent.path = []
57
+ element.path = parent.path.concat(assignedKey)
58
+ }
59
+
60
+ // if it already HAS A NODE
61
+ if (element.node) {
62
+ return assignNode(element, parent, assignedKey)
63
+ }
64
+
65
+ // generate a CLASS name
66
+ assignClass(element)
67
+
68
+ // assign METHODS
69
+ element.set = set
70
+ element.update = update
71
+ element.remove = remove
72
+ element.lookup = lookup
73
+ if (ENV === 'test' || ENV === 'development') {
74
+ element.keys = keys
75
+ element.parse = parse
76
+ element.parseDeep = parseDeep
77
+ element.log = log
78
+ }
79
+
80
+ // run `on.init`
81
+ if (element.on && isFunction(element.on.init)) {
82
+ on.init(element.on.init, element, element.state)
83
+ }
84
+
85
+ // enable TRANSFORM in data
86
+ if (!element.transform) element.transform = {}
87
+
88
+ // enable CACHING
89
+ if (!element.__cached) element.__cached = {}
90
+
91
+ // enable EXEC
92
+ if (!element.__exec) element.__exec = {}
93
+
94
+ // enable CHANGES storing
95
+ if (!element.__changes) element.__changes = []
96
+
97
+ // enable CHANGES storing
98
+ const hasRoot = parent.parent && parent.parent.key === ':root'
99
+ if (!element.__root) element.__root = hasRoot ? parent : parent.__root
100
+
101
+ // apply props settings
102
+ createProps(element, parent)
103
+
104
+ // don't render IF in condition
105
+ if (isFunction(element.if) && !element.if(element, element.state)) {
106
+ // TODO: move as fragment
107
+ const ifFragment = cacheNode({ tag: 'fragment' })
108
+ element.__ifFragment = appendNode(ifFragment, parent.node)
109
+ element.__ifFalsy = true
110
+ return
111
+ }
112
+
113
+ // CREATE a real NODE
114
+ createNode(element)
115
+
116
+ // assign NODE
117
+ assignNode(element, parent, key)
118
+
119
+ // run `on.render`
120
+ if (element.on && isFunction(element.on.render)) {
121
+ on.render(element.on.render, element, element.state)
122
+ }
123
+
124
+ return element
125
+ }
@@ -0,0 +1,8 @@
1
+ 'use strict'
2
+
3
+ export * from './assign'
4
+ export * from './iterate'
5
+ export * from './methods'
6
+ export * from './update'
7
+ export * from './create'
8
+ export * from './set'
@@ -0,0 +1,80 @@
1
+ 'use strict'
2
+
3
+ import { exec, isFunction, isNumber, isString, overwrite } from '@domql/utils'
4
+ import { isMethod } from './methods'
5
+
6
+ export const applyEvents = element => {
7
+ const { node, on } = element
8
+ for (const param in on) {
9
+ if (
10
+ param === 'init' ||
11
+ param === 'render' ||
12
+ param === 'update'
13
+ ) continue
14
+
15
+ const appliedFunction = element.on[param]
16
+ if (isFunction(appliedFunction)) {
17
+ node.addEventListener(param, event =>
18
+ appliedFunction(event, element, element.state),
19
+ true)
20
+ }
21
+ }
22
+ }
23
+
24
+ export const throughInitialExec = element => {
25
+ for (const param in element) {
26
+ const prop = element[param]
27
+ if (isFunction(prop) && !isMethod(param)) {
28
+ element.__exec[param] = prop
29
+ element[param] = prop(element, element.state)
30
+ }
31
+ }
32
+ }
33
+
34
+ export const throughUpdatedExec = (element, options) => {
35
+ const { __exec } = element
36
+ const changes = {}
37
+
38
+ for (const param in __exec) {
39
+ const prop = element[param]
40
+ const newExec = __exec[param](element, element.state)
41
+
42
+ // if element is string
43
+ if (prop && prop.node && (isString(newExec) || isNumber(newExec))) {
44
+ overwrite(prop, { text: newExec }, options)
45
+ } else if (newExec !== prop) {
46
+ element.__cached[param] = changes[param] = prop
47
+ element[param] = newExec
48
+ }
49
+ }
50
+
51
+ return changes
52
+ }
53
+
54
+ export const throughInitialDefine = element => {
55
+ const { define } = element
56
+ for (const param in define) {
57
+ let prop = element[param]
58
+
59
+ if (isFunction(prop) && !isMethod(param)) {
60
+ element.__exec[param] = prop
61
+ element[param] = prop = exec(prop, element)
62
+ }
63
+
64
+ element.__cached[param] = prop
65
+ element[param] = define[param](prop, element, element.state)
66
+ }
67
+ return element
68
+ }
69
+
70
+ export const throughUpdatedDefine = element => {
71
+ const { define, __exec } = element
72
+ const changes = {}
73
+ for (const param in define) {
74
+ const execParam = __exec[param]
75
+ if (execParam) element.__cached[param] = execParam(element, element.state)
76
+ const cached = exec(element.__cached[param], element)
77
+ element[param] = define[param](cached, element, element.state)
78
+ }
79
+ return changes
80
+ }