saby-customizer 0.0.0-pre.21 → 0.0.0-pre.25

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/octicons.js CHANGED
@@ -4224,40 +4224,25 @@ var require$$0 = {
4224
4224
  zap: zap
4225
4225
  };
4226
4226
 
4227
- /*
4228
- object-assign
4229
- (c) Sindre Sorhus
4230
- @license MIT
4231
- */
4232
- /* eslint-disable no-unused-vars */
4233
4227
  var getOwnPropertySymbols = Object.getOwnPropertySymbols;
4234
4228
  var hasOwnProperty = Object.prototype.hasOwnProperty;
4235
4229
  var propIsEnumerable = Object.prototype.propertyIsEnumerable;
4236
-
4237
4230
  function toObject(val) {
4238
4231
  if (val === null || val === undefined) {
4239
4232
  throw new TypeError('Object.assign cannot be called with null or undefined');
4240
4233
  }
4241
-
4242
4234
  return Object(val);
4243
4235
  }
4244
-
4245
4236
  function shouldUseNative() {
4246
4237
  try {
4247
4238
  if (!Object.assign) {
4248
4239
  return false;
4249
4240
  }
4250
-
4251
- // Detect buggy property enumeration order in older V8 versions.
4252
-
4253
- // https://bugs.chromium.org/p/v8/issues/detail?id=4118
4254
- var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
4241
+ var test1 = new String('abc');
4255
4242
  test1[5] = 'de';
4256
4243
  if (Object.getOwnPropertyNames(test1)[0] === '5') {
4257
4244
  return false;
4258
4245
  }
4259
-
4260
- // https://bugs.chromium.org/p/v8/issues/detail?id=3056
4261
4246
  var test2 = {};
4262
4247
  for (var i = 0; i < 10; i++) {
4263
4248
  test2['_' + String.fromCharCode(i)] = i;
@@ -4268,8 +4253,6 @@ function shouldUseNative() {
4268
4253
  if (order2.join('') !== '0123456789') {
4269
4254
  return false;
4270
4255
  }
4271
-
4272
- // https://bugs.chromium.org/p/v8/issues/detail?id=3056
4273
4256
  var test3 = {};
4274
4257
  'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
4275
4258
  test3[letter] = letter;
@@ -4278,28 +4261,22 @@ function shouldUseNative() {
4278
4261
  'abcdefghijklmnopqrst') {
4279
4262
  return false;
4280
4263
  }
4281
-
4282
4264
  return true;
4283
4265
  } catch (err) {
4284
- // We don't expect any of the above to throw, but better to be safe.
4285
4266
  return false;
4286
4267
  }
4287
4268
  }
4288
-
4289
4269
  var objectAssign$1 = shouldUseNative() ? Object.assign : function (target, source) {
4290
4270
  var from;
4291
4271
  var to = toObject(target);
4292
4272
  var symbols;
4293
-
4294
4273
  for (var s = 1; s < arguments.length; s++) {
4295
4274
  from = Object(arguments[s]);
4296
-
4297
4275
  for (var key in from) {
4298
4276
  if (hasOwnProperty.call(from, key)) {
4299
4277
  to[key] = from[key];
4300
4278
  }
4301
4279
  }
4302
-
4303
4280
  if (getOwnPropertySymbols) {
4304
4281
  symbols = getOwnPropertySymbols(from);
4305
4282
  for (var i = 0; i < symbols.length; i++) {
@@ -4309,24 +4286,17 @@ var objectAssign$1 = shouldUseNative() ? Object.assign : function (target, sourc
4309
4286
  }
4310
4287
  }
4311
4288
  }
4312
-
4313
4289
  return to;
4314
4290
  };
4315
4291
 
4316
4292
  const data = require$$0;
4317
4293
  const objectAssign = objectAssign$1;
4318
-
4319
4294
  const DEFAULT_HEIGHT = 16;
4320
-
4321
4295
  for (const key of Object.keys(data)) {
4322
- // Returns a string representation of html attributes
4323
4296
  const htmlAttributes = (icon, defaultOptions, options) => {
4324
4297
  const attributes = [];
4325
4298
  const attrObj = objectAssign({}, defaultOptions, options);
4326
-
4327
- // If the user passed in options
4328
4299
  if (options) {
4329
- // If any of the width or height is passed in
4330
4300
  if (options['width'] || options['height']) {
4331
4301
  attrObj['width'] = options['width']
4332
4302
  ? options['width']
@@ -4335,34 +4305,22 @@ for (const key of Object.keys(data)) {
4335
4305
  ? options['height']
4336
4306
  : (parseInt(options['width']) * defaultOptions['height']) / defaultOptions['width'];
4337
4307
  }
4338
-
4339
- // If the user passed in class
4340
4308
  if (options['class']) {
4341
4309
  attrObj['class'] = `octicon octicon-${key} ${options['class']}`;
4342
4310
  attrObj['class'].trim();
4343
4311
  }
4344
-
4345
- // If the user passed in aria-label
4346
4312
  if (options['aria-label']) {
4347
4313
  attrObj['aria-label'] = options['aria-label'];
4348
4314
  attrObj['role'] = 'img';
4349
-
4350
- // Un-hide the icon
4351
4315
  delete attrObj['aria-hidden'];
4352
4316
  }
4353
4317
  }
4354
-
4355
4318
  for (const option of Object.keys(attrObj)) {
4356
4319
  attributes.push(`${option}="${attrObj[option]}"`);
4357
4320
  }
4358
-
4359
4321
  return attributes.join(' ').trim()
4360
4322
  };
4361
-
4362
- // Set the symbol for easy access
4363
4323
  data[key].symbol = key;
4364
-
4365
- // Set options for each icon height
4366
4324
  for (const height of Object.keys(data[key].heights)) {
4367
4325
  data[key].heights[height].options = {
4368
4326
  version: '1.1',
@@ -4373,8 +4331,6 @@ for (const key of Object.keys(data)) {
4373
4331
  'aria-hidden': 'true'
4374
4332
  };
4375
4333
  }
4376
-
4377
- // Function to return an SVG object
4378
4334
  data[key].toSVG = function (options = {}) {
4379
4335
  const {height, width} = options;
4380
4336
  const naturalHeight = closestNaturalHeight(Object.keys(data[key].heights), height || width || DEFAULT_HEIGHT);
@@ -4383,10 +4339,7 @@ for (const key of Object.keys(data)) {
4383
4339
  }</svg>`
4384
4340
  };
4385
4341
  }
4386
-
4387
- // Import data into exports
4388
4342
  var octicons = data;
4389
-
4390
4343
  function closestNaturalHeight(naturalHeights, height) {
4391
4344
  return naturalHeights
4392
4345
  .map(naturalHeight => parseInt(naturalHeight, 10))
package/package.json CHANGED
@@ -9,14 +9,15 @@
9
9
  },
10
10
  "repository": "github:saby-customizer/saby-customizer.github.io",
11
11
  "license": "Unlicense",
12
- "version": "0.0.0-pre.21",
12
+ "version": "0.0.0-pre.25",
13
13
  "type": "module",
14
14
  "main": "./userscript.js",
15
15
  "exports": {
16
16
  ".": "./userscript.js",
17
17
  "./lib.js": "./lib.js",
18
18
  "./material.js": "./material.js",
19
- "./octicons.js": "./octicons.js"
19
+ "./octicons.js": "./octicons.js",
20
+ "./userscript.js": "./userscript.js"
20
21
  },
21
22
  "files": [
22
23
  "features",
package/userscript.js CHANGED
@@ -10,7 +10,7 @@ import { oom } from '@notml/core'
10
10
  // Компоненты material используемые в проекте
11
11
  // await import('./lib/material.js')
12
12
  // @ts-ignore https://github.com/material-components/material-web/issues/2780
13
- await import('./material.js')
13
+ await import('https://cdn.jsdelivr.net/npm/saby-customizer/material.js')
14
14
 
15
15
  // Библиотеки компонентов плагина
16
16
  // TODO: Перевести на опциональную загрузку