enigmatic 0.9.13 → 0.9.14

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/index.css CHANGED
@@ -1,9 +1,28 @@
1
1
  body {
2
- display: grid;
3
2
  font-family: Roboto, Helvetica, sans-serif;
4
3
  margin: 0;
5
4
  }
6
5
 
6
+ .grid {
7
+ display: grid;
8
+ grid-template-columns: var(--cols);
9
+ grid-template-rows: var(--rows);
10
+ }
11
+
12
+ .single-center {
13
+ place-items: center;
14
+ height: 100vh;
15
+ }
16
+
17
+ .grail {
18
+ grid-template-columns: 1fr 4fr 1fr;
19
+ grid-template-rows: 1fr 7fr 1fr;
20
+ }
21
+
22
+ .span {
23
+ grid-column: span var(--span);
24
+ }
25
+
7
26
  .right {
8
27
  float: right;
9
28
  }
@@ -12,9 +31,9 @@ body {
12
31
  float: left;
13
32
  }
14
33
 
15
-
16
34
  .center {
17
35
  place-items: center;
36
+ text-align: center;
18
37
  }
19
38
 
20
39
  @font-face {
@@ -89,71 +108,11 @@ body {
89
108
  bottom: 0;
90
109
  }
91
110
 
92
- footer {
93
- position: fixed;
94
- bottom: 0;
95
- margin: 10px;
96
- display: flex;
97
- }
98
-
99
- header {
100
- position: fixed;
101
- top: 0;
102
- margin: 10px;
103
- display: flex;
104
- }
105
-
106
- .grid {
107
- display: grid;
108
- }
109
-
110
- .threebythree {
111
- grid-template: repeat(3, 1fr) / repeat(3, 1fr)
112
- }
113
-
114
- .threerow {
115
- grid-template-rows: 2fr 16fr 1fr;
116
- }
117
-
118
- .grail {
119
- grid-template-columns: 1fr 4fr 1fr;
120
- grid-template-rows: 1fr 7fr 1fr;
121
- }
122
-
123
- .span-2 {
124
- grid-column: span 2;
125
- }
126
-
127
- .span-3 {
128
- grid-column: span 3;
129
- }
130
-
131
- .span-4 {
132
- grid-column: span 4;
133
- }
134
-
135
- .span-5 {
136
- grid-column: span 5;
137
- }
138
-
139
- .span-6 {
140
- grid-column: span 6;
141
- }
142
-
143
- .flat {
144
- border: 0;
145
- outline-width: 0
146
- }
147
-
148
111
  .fill {
149
112
  height: 100vh;
150
113
  width: 100wh;
151
114
  }
152
115
 
153
- .border {
154
- border: 1px solid black
155
- }
156
-
157
116
  .roboto {
158
117
  font-family: 'Roboto', sans-serif;
159
118
  }
@@ -166,29 +125,19 @@ a {
166
125
  box-shadow: 6px 6px 6px #dbdbdb
167
126
  }
168
127
 
169
- .loading {
170
- border: 4px solid #dbdbdb;
171
- border-radius: 50%;
172
- border-top: 6px solid #000000;
173
- width: 10px;
174
- height: 10px;
175
- -webkit-animation: spin 1s linear infinite;
176
- animation: spin 1s linear infinite;
177
- }
178
-
179
128
  .cursor {
180
- cursor: default
129
+ cursor: default;
181
130
  }
182
131
 
183
- navy, .bg-navy {
132
+ .bg-navy {
184
133
  background-color: #001f3f
185
134
  }
186
135
 
187
- blue, .bg-blue {
136
+ .bg-blue {
188
137
  background-color: #0074d9
189
138
  }
190
139
 
191
- aqua, .bg-aqua {
140
+ .bg-aqua {
192
141
  background-color: #7fdbff
193
142
  }
194
143
 
@@ -196,27 +145,27 @@ aqua, .bg-aqua {
196
145
  background-color: #2ecc40
197
146
  }
198
147
 
199
- yellow, .bg-yellow {
148
+ .bg-yellow {
200
149
  background-color: #ffdc00
201
150
  }
202
151
 
203
- orange, .bg-orange {
152
+ .bg-orange {
204
153
  background-color: #ff851b
205
154
  }
206
155
 
207
- red, .bg-red {
156
+ .bg-red {
208
157
  background-color: #ff4136
209
158
  }
210
159
 
211
- white, .bg-white {
160
+ .bg-white {
212
161
  background-color: #fff
213
162
  }
214
163
 
215
- gray, .bg-gray {
164
+ .bg-gray {
216
165
  background-color: #aaa
217
166
  }
218
167
 
219
- black, .bg-black {
168
+ .bg-black {
220
169
  background-color: #111
221
170
  }
222
171
 
@@ -236,10 +185,6 @@ black, .bg-black {
236
185
  color: #2ecc40
237
186
  }
238
187
 
239
- .lime {
240
- color: #01ff70
241
- }
242
-
243
188
  .yellow {
244
189
  color: #ffdc00
245
190
  }
@@ -252,10 +197,6 @@ black, .bg-black {
252
197
  color: #ff4136
253
198
  }
254
199
 
255
- .fuchsia {
256
- color: #f012be
257
- }
258
-
259
200
  .purple {
260
201
  color: #b10dc9
261
202
  }
@@ -265,7 +206,7 @@ black, .bg-black {
265
206
  }
266
207
 
267
208
  .white {
268
- color: #fff !important
209
+ color: #fff;
269
210
  }
270
211
 
271
212
  .silver {
@@ -304,14 +245,6 @@ black, .bg-black {
304
245
  padding: 15px
305
246
  }
306
247
 
307
- .border {
308
- border: 6px solid #eee;
309
- }
310
-
311
- .front {
312
- z-index: 100
313
- }
314
-
315
248
  img {
316
249
  max-width: 100%;
317
250
  height: auto
@@ -438,6 +371,13 @@ li:hover {
438
371
  cursor: pointer;
439
372
  }
440
373
 
441
- .horizontal {
374
+ .flex {
442
375
  display: flex;
376
+ }
377
+
378
+ .round {
379
+ vertical-align: middle;
380
+ width: 50px;
381
+ height: 50px;
382
+ border-radius: 50%;
443
383
  }
package/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ // e-e
1
2
  window.$ = document.querySelector.bind(document)
2
3
  window.$$ = document.querySelectorAll.bind(document)
3
4
  window.body = document.body
@@ -23,18 +24,16 @@ window.loadCSS = src => {
23
24
 
24
25
  class Data {
25
26
  _ = {}
26
- set (name, value) {
27
+ set (name= new Error('data.set() needs a name'), value) {
27
28
  this._[name] = value
28
29
  for(const e of $$(`[data*=${name}]`)) {
29
30
  let v = this._
30
31
  for(const k of e.getAttribute('data').split('.')) {
31
32
  v = v[k]
32
33
  }
33
- //e.style.setProperty('--data', value)
34
- if(e.set)
34
+ if(e.set){
35
35
  e.set(v)
36
- else if(e.tagName == 'IMG')
37
- e.src = v
36
+ }
38
37
  }
39
38
  for (const e of $$(`[data=ALL]`)) {
40
39
  e.set(this._)
@@ -58,6 +57,7 @@ class EnigmaticElement extends HTMLElement {
58
57
  for (let attr of this.attributes) {
59
58
  this[attr.name] = attr.value
60
59
  }
60
+ this.innerTemplate = this.innerHTML
61
61
  }
62
62
  async show () {
63
63
  return new Promise(r => {
@@ -119,12 +119,16 @@ window.addEventListener('DOMContentLoaded', (event) => {
119
119
  body.appendChild(child)
120
120
  return child
121
121
  }
122
- loadCSS('index.css')
123
122
  if(window.main) window.main(document)
124
123
  })
125
124
 
126
- window.ce = (type, func) => {
127
- const cname = type.replace('-', '')
128
- eval(`customElements.define("${type}", class x extends HTMLElement { connectedCallback() { ${func} } })`)
129
- return func
125
+ window.ready = async () => {
126
+ return new Promise(r => {
127
+ if(document.readyState === 'complete')
128
+ r(true)
129
+ document.onreadystatechange = () => {
130
+ if (document.readyState === 'complete')
131
+ r()
132
+ }
133
+ })
130
134
  }
package/package.json CHANGED
@@ -8,5 +8,5 @@
8
8
  "type": "git",
9
9
  "url": "git://github.com/digplan/enigmatic.git"
10
10
  },
11
- "version": "0.9.13"
11
+ "version": "0.9.14"
12
12
  }
File without changes