isomorfeus-preact 10.6.7 → 10.6.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 678bb5948b2fb7b0174bf957048f66f7c16662841e9fa51b0d69e90f8c6425b4
4
- data.tar.gz: 7b68f3dfd52944f74dd8f2d2e19f5fad77743d0db6f142ad433ab3f050777876
3
+ metadata.gz: 31712ed0f9ae9ffdad128f734581d46f8e8c42c9b2e4660fd023e8c8e6c29cd9
4
+ data.tar.gz: 5d8035565fe46d1f4d35becbd6b2af8981034ba5c2040f748ecf19733c46b150
5
5
  SHA512:
6
- metadata.gz: 9b8060b615a763e967125dc5b90b9659ebcda3d84858b3d51c2c3e233c0fd2eb2490260a766169b6ec1b38bb4e889609410f4a7cae6011fbf0813064e7e502b2
7
- data.tar.gz: 8700117f152176dda74bdb970d84ca946baafd53d68b3c4d2f7610e30f06aa32196754e5de0624da4f08be03415053e156421f033f6ffd6142ca957f03b1884b
6
+ metadata.gz: dd8454cfe6a04e9f96cce37ea4d4431e4fb66e575951acd0f4e588a8120350dc5393112db237895a452cea5e1bcc61bb5e95e918ad0ef34f94bdd0c3ba5b4b34
7
+ data.tar.gz: 28ab752e804690e31fb180c44e3b9226bac2bf09114f46a258b9d15c7bdbee570c9068c22898ee91f5d1a4d47ac5cfb150a0a4159fc00ba85754b99766051430
@@ -2,6 +2,7 @@ module Isomorfeus
2
2
  module Preact
3
3
  module Imports
4
4
  def self.add
5
+ Isomorfeus.add_web_js_import('preact/debug') if Isomorfeus.development?
5
6
  Isomorfeus.add_common_js_import('preact', 'Preact', '*')
6
7
  Isomorfeus.add_common_js_import('preact/hooks', 'PreactHooks', '*')
7
8
  Isomorfeus.add_common_js_import('wouter-preact', nil, ['Router', 'Link', 'Redirect', 'Route', 'Switch'])
@@ -70,7 +70,7 @@ module LucidApp
70
70
  return Opal.global.Preact.createElement(Opal.global.LucidApplicationContext.Provider, { value: { iso_store: this.state.isomorfeus_store_state, iso_theme: base.css_theme }}, children);
71
71
  }
72
72
  data_access() {
73
- this.state.isomorfeus_store_state;
73
+ return this.state.isomorfeus_store_state;
74
74
  }
75
75
  listener() {
76
76
  let next_state = Opal.Isomorfeus.store.native.getState();
@@ -16,7 +16,6 @@ module LucidComponent
16
16
  return Opal.global.Preact.createElement(base.lucid_preact_component, Object.assign({}, props, value));
17
17
  };
18
18
  base.preact_component.displayName = #{wrapper_name};
19
-
20
19
  base.lucid_preact_component = class extends Opal.global.Preact.Component {
21
20
  constructor(props) {
22
21
  super(props);
data/lib/nano_css.rb CHANGED
@@ -64,7 +64,7 @@ module NanoCSS
64
64
  var sheet = renderer.sh.sheet;
65
65
 
66
66
  // Unknown pseudo-selectors will throw, this try/catch swallows all errors.
67
- try { sheet.insertRule(rawCssRule, sheet.cssRules.length); }
67
+ try { sheet.insertRule(rawCssRule, sheet.cssRules.length); }
68
68
  catch (error) {}
69
69
  } else {
70
70
  // Test if .insertRule() works in dev mode. Unknown pseudo-selectors will throw when
@@ -126,8 +126,8 @@ module NanoCSS
126
126
 
127
127
  return renderer;
128
128
  };
129
- }
130
-
129
+ }
130
+
131
131
  # addons
132
132
 
133
133
  %x{
@@ -136,7 +136,7 @@ module NanoCSS
136
136
  if (process.env.NODE_ENV !== 'production') {
137
137
  blocks = {};
138
138
  }
139
-
139
+
140
140
  renderer.rule = function (css, block) {
141
141
  // Warn user if CSS selectors clash.
142
142
  if (process.env.NODE_ENV !== 'production') {
@@ -147,36 +147,36 @@ module NanoCSS
147
147
  'For example, use nano.rule({color: "red"}, "RedText").'
148
148
  );
149
149
  }
150
-
150
+
151
151
  if (blocks[block]) {
152
- console.error('Block name "' + block + '" used more than once.');
152
+ console.error('nano-css block name "' + block + '" used more than once.');
153
153
  }
154
-
154
+
155
155
  blocks[block] = 1;
156
156
  }
157
157
  }
158
-
158
+
159
159
  block = block || renderer.hash(css);
160
160
  block = renderer.pfx + block;
161
161
  renderer.put('.' + block, css);
162
-
162
+
163
163
  return ' ' + block;
164
164
  };
165
165
  };
166
166
  }
167
167
 
168
168
  %x{
169
- self.sheet = function (renderer) {
169
+ self.sheet = function (renderer) {
170
170
  renderer.sheet = function (map, block) {
171
171
  var result = {};
172
-
172
+
173
173
  if (!block) {
174
174
  block = renderer.hash(map);
175
175
  }
176
-
176
+
177
177
  var onElementModifier = function (elementModifier) {
178
178
  var styles = map[elementModifier];
179
-
179
+
180
180
  if ((process.env.NODE_ENV !== 'production') && renderer.sourcemaps) {
181
181
  // In dev mode emit CSS immediately to generate sourcemaps.
182
182
  result[elementModifier] = renderer.rule(styles, block + '-' + elementModifier);
@@ -186,22 +186,22 @@ module NanoCSS
186
186
  enumerable: true,
187
187
  get: function () {
188
188
  var classNames = renderer.rule(styles, block + '-' + elementModifier);
189
-
189
+
190
190
  Object.defineProperty(result, elementModifier, {
191
191
  value: classNames,
192
192
  enumerable: true
193
193
  });
194
-
194
+
195
195
  return classNames;
196
196
  },
197
197
  });
198
198
  }
199
199
  };
200
-
200
+
201
201
  for (var elementModifier in map) {
202
202
  onElementModifier(elementModifier);
203
203
  }
204
-
204
+
205
205
  return result;
206
206
  };
207
207
  };
@@ -216,11 +216,11 @@ module NanoCSS
216
216
  var len1 = parents.length;
217
217
  var len2 = selectors.length;
218
218
  var i, j, sel, pos, parent, replacedSelector;
219
-
219
+
220
220
  for (i = 0; i < len2; i++) {
221
221
  sel = selectors[i];
222
222
  pos = sel.indexOf('&');
223
-
223
+
224
224
  if (pos > -1) {
225
225
  for (j = 0; j < len1; j++) {
226
226
  parent = parents[j];
@@ -230,7 +230,7 @@ module NanoCSS
230
230
  } else {
231
231
  for (j = 0; j < len1; j++) {
232
232
  parent = parents[j];
233
-
233
+
234
234
  if (parent) {
235
235
  result.push(parent + ' ' + sel);
236
236
  } else {
@@ -239,7 +239,7 @@ module NanoCSS
239
239
  }
240
240
  }
241
241
  }
242
-
242
+
243
243
  return result.join(',');
244
244
  };
245
245
  };
@@ -248,28 +248,28 @@ module NanoCSS
248
248
  %x{
249
249
  self.hydrate = function (renderer) {
250
250
  var hydrated = {};
251
-
251
+
252
252
  renderer.hydrate = function (sh) {
253
253
  var cssRules = sh.cssRules || sh.sheet.cssRules;
254
-
254
+
255
255
  for (var i = 0; i < cssRules.length; i++)
256
256
  hydrated[cssRules[i].selectorText] = 1;
257
257
  };
258
-
258
+
259
259
  if (renderer.client) {
260
260
  if (renderer.sh) renderer.hydrate(renderer.sh);
261
-
261
+
262
262
  var put = renderer.put;
263
-
263
+
264
264
  renderer.put = function (selector, css) {
265
265
  if (selector in hydrated) return;
266
-
266
+
267
267
  put(selector, css);
268
268
  };
269
269
  }
270
270
  };
271
271
  }
272
-
272
+
273
273
  %x{
274
274
  var UNITLESS_NUMBER_PROPS = [
275
275
  'animation-iteration-count',
@@ -305,7 +305,7 @@ module NanoCSS
305
305
  'widows',
306
306
  'z-index',
307
307
  'zoom',
308
-
308
+
309
309
  // SVG-related properties
310
310
  'fill-opacity',
311
311
  'flood-opacity',
@@ -316,34 +316,34 @@ module NanoCSS
316
316
  'stroke-opacity',
317
317
  'stroke-width',
318
318
  ];
319
-
319
+
320
320
  var unitlessCssProperties = {};
321
-
321
+
322
322
  for (var i = 0; i < UNITLESS_NUMBER_PROPS.length; i++) {
323
323
  var prop = UNITLESS_NUMBER_PROPS[i];
324
-
324
+
325
325
  unitlessCssProperties[prop] = 1;
326
326
  unitlessCssProperties['-webkit-' + prop] = 1;
327
327
  unitlessCssProperties['-ms-' + prop] = 1;
328
328
  unitlessCssProperties['-moz-' + prop] = 1;
329
329
  unitlessCssProperties['-o-' + prop] = 1;
330
330
  }
331
-
331
+
332
332
  self.unitless = function (renderer) {
333
333
  var decl = renderer.decl;
334
-
334
+
335
335
  renderer.decl = function (prop, value) {
336
336
  var str = decl(prop, value);
337
-
337
+
338
338
  if (typeof value === 'number') {
339
339
  var pos = str.indexOf(':');
340
340
  var propKebab = str.substr(0, pos);
341
-
341
+
342
342
  if (!unitlessCssProperties[propKebab]) {
343
343
  return decl(prop, value + 'px');
344
344
  }
345
345
  }
346
-
346
+
347
347
  return str;
348
348
  };
349
349
  };
@@ -352,13 +352,13 @@ module NanoCSS
352
352
  %x{
353
353
  self.global = function (renderer) {
354
354
  var selector = renderer.selector;
355
-
355
+
356
356
  renderer.selector = function (parent, current) {
357
357
  if (parent.indexOf(':global') > -1) parent = '';
358
-
358
+
359
359
  return selector(parent, current);
360
360
  };
361
-
361
+
362
362
  renderer.global = function (css) {
363
363
  return renderer.put('', css);
364
364
  };
@@ -366,58 +366,58 @@ module NanoCSS
366
366
  }
367
367
 
368
368
  %x{
369
- self.keyframes = function (renderer, config) {
369
+ self.keyframes = function (renderer, config) {
370
370
  config = renderer.assign({
371
371
  prefixes: ['-webkit-', '-moz-', '-o-', ''],
372
372
  }, config || {});
373
-
373
+
374
374
  var prefixes = config.prefixes;
375
-
375
+
376
376
  if (renderer.client) {
377
377
  // Craete @keyframe Stylesheet `ksh`.
378
378
  document.head.appendChild(renderer.ksh = document.createElement('style'));
379
379
  }
380
-
380
+
381
381
  var putAt = renderer.putAt;
382
-
382
+
383
383
  renderer.putAt = function (__, keyframes, prelude) {
384
384
  // @keyframes
385
385
  if (prelude[1] === 'k') {
386
386
  var str = '';
387
-
387
+
388
388
  for (var keyframe in keyframes) {
389
389
  var decls = keyframes[keyframe];
390
390
  var strDecls = '';
391
-
391
+
392
392
  for (var prop in decls)
393
393
  strDecls += renderer.decl(prop, decls[prop]);
394
-
394
+
395
395
  str += keyframe + '{' + strDecls + '}';
396
396
  }
397
-
397
+
398
398
  for (var i = 0; i < prefixes.length; i++) {
399
399
  var prefix = prefixes[i];
400
400
  var rawKeyframes = prelude.replace('@keyframes', '@' + prefix + 'keyframes') + '{' + str + '}';
401
-
401
+
402
402
  if (renderer.client) {
403
403
  renderer.ksh.appendChild(document.createTextNode(rawKeyframes));
404
404
  } else {
405
405
  renderer.putRaw(rawKeyframes);
406
406
  }
407
407
  }
408
-
408
+
409
409
  return;
410
410
  }
411
-
411
+
412
412
  putAt(__, keyframes, prelude);
413
413
  };
414
-
414
+
415
415
  renderer.keyframes = function (keyframes, block) {
416
416
  if (!block) block = renderer.hash(keyframes);
417
417
  block = renderer.pfx + block;
418
-
418
+
419
419
  renderer.putAt('', keyframes, '@keyframes ' + block);
420
-
420
+
421
421
  return block;
422
422
  };
423
423
  };
@@ -434,7 +434,7 @@ module NanoCSS
434
434
  opacity: 1,
435
435
  }
436
436
  },
437
-
437
+
438
438
  '.fadeIn': {
439
439
  animation: 'fadeIn .4s linear',
440
440
  }
@@ -453,7 +453,7 @@ module NanoCSS
453
453
  opacity: 0,
454
454
  }
455
455
  },
456
-
456
+
457
457
  '.fadeOut': {
458
458
  animation: 'fadeOut .3s linear',
459
459
  'animation-fill-mode': 'forwards',
@@ -1,3 +1,3 @@
1
1
  module Preact
2
- VERSION = '10.6.7'
2
+ VERSION = '10.6.11'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: isomorfeus-preact
3
3
  version: !ruby/object:Gem::Version
4
- version: 10.6.7
4
+ version: 10.6.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Biedermann
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-01-18 00:00:00.000000000 Z
11
+ date: 2022-01-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby