@symbo.ls/create 2.11.450 → 2.11.452

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.
@@ -604,7 +604,7 @@ var require_object = __commonJS({
604
604
  diff: () => diff,
605
605
  diffArrays: () => diffArrays,
606
606
  diffObjects: () => diffObjects,
607
- exec: () => exec6,
607
+ exec: () => exec7,
608
608
  flattenRecursive: () => flattenRecursive,
609
609
  hasOwnProperty: () => hasOwnProperty,
610
610
  isCyclic: () => isCyclic,
@@ -631,7 +631,7 @@ var require_object = __commonJS({
631
631
  var import_string = require_string();
632
632
  var import_node = require_node();
633
633
  var ENV3 = "development";
634
- var exec6 = (param, element, state, context) => {
634
+ var exec7 = (param, element, state, context) => {
635
635
  if ((0, import_types.isFunction)(param)) {
636
636
  return param.call(
637
637
  element,
@@ -644,7 +644,7 @@ var require_object = __commonJS({
644
644
  };
645
645
  var map = (obj, extention, element) => {
646
646
  for (const e in extention) {
647
- obj[e] = exec6(extention[e], element);
647
+ obj[e] = exec7(extention[e], element);
648
648
  }
649
649
  };
650
650
  var merge6 = (element, obj, excludeFrom = []) => {
@@ -2477,7 +2477,7 @@ var require_cjs2 = __commonJS({
2477
2477
  diff: () => diff,
2478
2478
  diffArrays: () => diffArrays,
2479
2479
  diffObjects: () => diffObjects,
2480
- exec: () => exec6,
2480
+ exec: () => exec7,
2481
2481
  flattenRecursive: () => flattenRecursive,
2482
2482
  hasOwnProperty: () => hasOwnProperty,
2483
2483
  isCyclic: () => isCyclic,
@@ -2504,7 +2504,7 @@ var require_cjs2 = __commonJS({
2504
2504
  var import_string = require_string3();
2505
2505
  var import_node = require_node4();
2506
2506
  var ENV22 = "development";
2507
- var exec6 = (param, element, state, context) => {
2507
+ var exec7 = (param, element, state, context) => {
2508
2508
  if ((0, import_types.isFunction)(param)) {
2509
2509
  return param.call(
2510
2510
  element,
@@ -2517,7 +2517,7 @@ var require_cjs2 = __commonJS({
2517
2517
  };
2518
2518
  var map = (obj, extention, element) => {
2519
2519
  for (const e in extention) {
2520
- obj[e] = exec6(extention[e], element);
2520
+ obj[e] = exec7(extention[e], element);
2521
2521
  }
2522
2522
  };
2523
2523
  var merge52 = (element, obj, excludeFrom = []) => {
@@ -4302,7 +4302,7 @@ var require_cjs2 = __commonJS({
4302
4302
  diff: () => diff,
4303
4303
  diffArrays: () => diffArrays,
4304
4304
  diffObjects: () => diffObjects,
4305
- exec: () => exec6,
4305
+ exec: () => exec7,
4306
4306
  flattenRecursive: () => flattenRecursive,
4307
4307
  hasOwnProperty: () => hasOwnProperty,
4308
4308
  isEmpty: () => isEmpty,
@@ -4328,7 +4328,7 @@ var require_cjs2 = __commonJS({
4328
4328
  var import_string = require_string22();
4329
4329
  var import_node = require_node22();
4330
4330
  var ENV22 = "development";
4331
- var exec6 = (param, element, state, context) => {
4331
+ var exec7 = (param, element, state, context) => {
4332
4332
  if ((0, import_types.isFunction)(param)) {
4333
4333
  return param.call(
4334
4334
  element,
@@ -4341,7 +4341,7 @@ var require_cjs2 = __commonJS({
4341
4341
  };
4342
4342
  var map = (obj, extention, element) => {
4343
4343
  for (const e in extention) {
4344
- obj[e] = exec6(extention[e], element);
4344
+ obj[e] = exec7(extention[e], element);
4345
4345
  }
4346
4346
  };
4347
4347
  var merge52 = (element, obj, excludeFrom = []) => {
@@ -8317,7 +8317,7 @@ var require_cjs3 = __commonJS({
8317
8317
  diff: () => diff,
8318
8318
  diffArrays: () => diffArrays,
8319
8319
  diffObjects: () => diffObjects,
8320
- exec: () => exec6,
8320
+ exec: () => exec7,
8321
8321
  flattenRecursive: () => flattenRecursive,
8322
8322
  hasOwnProperty: () => hasOwnProperty,
8323
8323
  isEmpty: () => isEmpty,
@@ -8343,7 +8343,7 @@ var require_cjs3 = __commonJS({
8343
8343
  var import_string = require_string3();
8344
8344
  var import_node = require_node4();
8345
8345
  var ENV3 = "development";
8346
- var exec6 = (param, element, state, context) => {
8346
+ var exec7 = (param, element, state, context) => {
8347
8347
  if ((0, import_types.isFunction)(param)) {
8348
8348
  return param.call(
8349
8349
  element,
@@ -8356,7 +8356,7 @@ var require_cjs3 = __commonJS({
8356
8356
  };
8357
8357
  var map = (obj, extention, element) => {
8358
8358
  for (const e in extention) {
8359
- obj[e] = exec6(extention[e], element);
8359
+ obj[e] = exec7(extention[e], element);
8360
8360
  }
8361
8361
  };
8362
8362
  var merge6 = (element, obj, excludeFrom = []) => {
@@ -11404,21 +11404,21 @@ var require_create3 = __commonJS({
11404
11404
  var import_ignore = require_ignore2();
11405
11405
  var import_inherit = require_inherit2();
11406
11406
  var createPropsStack = (element, parent) => {
11407
- const { props: props2, __ref } = element;
11408
- const propsStack = __ref.__props = (0, import_inherit.inheritParentProps)(element, parent);
11407
+ const { props: props2, __ref: ref } = element;
11408
+ const propsStack = ref.__props = (0, import_inherit.inheritParentProps)(element, parent);
11409
11409
  if ((0, import_utils32.isObject)(props2))
11410
11410
  propsStack.push(props2);
11411
11411
  else if (props2 === "inherit" && parent.props)
11412
11412
  propsStack.push(parent.props);
11413
11413
  else if (props2)
11414
11414
  propsStack.push(props2);
11415
- if ((0, import_utils32.isArray)(__ref.__extend)) {
11416
- __ref.__extend.forEach((extend) => {
11415
+ if ((0, import_utils32.isArray)(ref.__extend)) {
11416
+ ref.__extend.forEach((extend) => {
11417
11417
  if (extend.props && extend.props !== props2)
11418
11418
  propsStack.push(extend.props);
11419
11419
  });
11420
11420
  }
11421
- __ref.__props = propsStack;
11421
+ ref.__props = propsStack;
11422
11422
  return propsStack;
11423
11423
  };
11424
11424
  var syncProps = (props2, element) => {
@@ -12992,8 +12992,8 @@ var require_methods2 = __commonJS({
12992
12992
  if (v === param)
12993
12993
  return childElem;
12994
12994
  else if ((0, import_utils32.isFunction)(param)) {
12995
- const exec6 = param(childElem, childElem.state, childElem.context);
12996
- if (childElem.state && exec6) {
12995
+ const exec7 = param(childElem, childElem.state, childElem.context);
12996
+ if (childElem.state && exec7) {
12997
12997
  return childElem;
12998
12998
  }
12999
12999
  }
@@ -13014,8 +13014,8 @@ var require_methods2 = __commonJS({
13014
13014
  if (v === param)
13015
13015
  results.push(childElem);
13016
13016
  else if ((0, import_utils32.isFunction)(param)) {
13017
- const exec6 = param(childElem, childElem.state, childElem.context);
13018
- if (childElem.state && exec6)
13017
+ const exec7 = param(childElem, childElem.state, childElem.context);
13018
+ if (childElem.state && exec7)
13019
13019
  results.push(childElem);
13020
13020
  }
13021
13021
  (_a = childElem == null ? void 0 : childElem.lookdownAll) == null ? void 0 : _a.call(childElem, param, results);
@@ -13077,6 +13077,7 @@ var require_methods2 = __commonJS({
13077
13077
  const obj = {};
13078
13078
  const keyList = keys.call(element);
13079
13079
  keyList.forEach((v) => {
13080
+ var _a;
13080
13081
  if (excl.includes(v))
13081
13082
  return;
13082
13083
  const val = element[v];
@@ -13092,7 +13093,7 @@ var require_methods2 = __commonJS({
13092
13093
  } else if (v === "props") {
13093
13094
  const { __element, update, ...props2 } = element[v];
13094
13095
  obj[v] = props2;
13095
- } else if ((0, import_utils32.isDefined)(val))
13096
+ } else if ((0, import_utils32.isDefined)(val) && !((_a = element.context) == null ? void 0 : _a.methods[v]))
13096
13097
  obj[v] = val;
13097
13098
  });
13098
13099
  return obj;
@@ -14835,7 +14836,7 @@ var require_object3 = __commonJS({
14835
14836
  diff: () => diff,
14836
14837
  diffArrays: () => diffArrays,
14837
14838
  diffObjects: () => diffObjects,
14838
- exec: () => exec6,
14839
+ exec: () => exec7,
14839
14840
  flattenRecursive: () => flattenRecursive,
14840
14841
  hasOwnProperty: () => hasOwnProperty,
14841
14842
  isEmpty: () => isEmpty,
@@ -14858,7 +14859,7 @@ var require_object3 = __commonJS({
14858
14859
  var import_types = require_types2();
14859
14860
  var import_array = require_array2();
14860
14861
  var import_string = require_string2();
14861
- var exec6 = (param, element, state, context) => {
14862
+ var exec7 = (param, element, state, context) => {
14862
14863
  if ((0, import_types.isFunction)(param)) {
14863
14864
  return param(
14864
14865
  element,
@@ -14870,7 +14871,7 @@ var require_object3 = __commonJS({
14870
14871
  };
14871
14872
  var map = (obj, extention, element) => {
14872
14873
  for (const e in extention) {
14873
- obj[e] = exec6(extention[e], element);
14874
+ obj[e] = exec7(extention[e], element);
14874
14875
  }
14875
14876
  };
14876
14877
  var merge6 = (element, obj, excludeFrom = []) => {
@@ -15923,7 +15924,7 @@ var utilImports_exports = {};
15923
15924
  __export(utilImports_exports, {
15924
15925
  applyCSS: () => applyCSS,
15925
15926
  init: () => init,
15926
- reInit: () => reInit,
15927
+ reinit: () => reinit,
15927
15928
  scratchSystem: () => import_scratch2.scratchSystem,
15928
15929
  scratchUtils: () => import_scratch2.scratchUtils,
15929
15930
  set: () => import_scratch2.set
@@ -17110,8 +17111,8 @@ var dynamic_default = {};
17110
17111
 
17111
17112
  // ../init/index.js
17112
17113
  var CONFIG = (0, import_scratch.getActiveConfig)();
17113
- var mergeWithLocalFile = (config = CONFIG, RC_FILE) => {
17114
- const rcfile = (0, import_utils2.isObject)(RC_FILE) ? RC_FILE : dynamic_default || {};
17114
+ var mergeWithLocalFile = (config = CONFIG, options) => {
17115
+ const rcfile = (0, import_utils2.isObject)(options.localFile) ? options.localFile : dynamic_default || {};
17115
17116
  const clonedFile = (0, import_utils2.deepClone)(rcfile.designSystem || {});
17116
17117
  return (0, import_utils2.deepMerge)(config, clonedFile);
17117
17118
  };
@@ -17126,7 +17127,7 @@ var SET_OPTIONS = {
17126
17127
  };
17127
17128
  var init = (config, options = SET_OPTIONS) => {
17128
17129
  const emotion2 = options.emotion || emotion;
17129
- const resultConfig = mergeWithLocalFile(config || {});
17130
+ const resultConfig = mergeWithLocalFile(config || {}, options);
17130
17131
  const conf = (0, import_scratch.set)({
17131
17132
  verbose: options.verbose,
17132
17133
  useReset: options.useReset,
@@ -17165,15 +17166,20 @@ var init = (config, options = SET_OPTIONS) => {
17165
17166
  var UPDATE_OPTIONS = {
17166
17167
  emotion
17167
17168
  };
17168
- var reInit = (config, RC_FILE, options = UPDATE_OPTIONS) => {
17169
+ var reinit = (config, options = UPDATE_OPTIONS) => {
17169
17170
  const emotion2 = options.emotion || emotion;
17170
- const resultConfig = mergeWithLocalFile(config || {}, RC_FILE);
17171
+ const resultConfig = mergeWithLocalFile(config || {}, options);
17172
+ const prevStyles = document.querySelector('[data-emotion="smbls"]');
17173
+ console.log(prevStyles);
17171
17174
  const conf = (0, import_scratch.set)({
17172
17175
  verbose: false,
17173
17176
  ...resultConfig
17174
17177
  });
17175
- emotion2.injectGlobal({ ":root": conf.CSS_VARS });
17176
- emotion2.injectGlobal(conf.RESET);
17178
+ if (!options.preventInject) {
17179
+ emotion2.injectGlobal({ ":root": conf.CSS_VARS });
17180
+ emotion2.injectGlobal(conf.RESET);
17181
+ }
17182
+ return conf;
17177
17183
  };
17178
17184
  var applyCSS = (styles, options = UPDATE_OPTIONS) => {
17179
17185
  const emotion2 = options.emotion || emotion;
@@ -17719,8 +17725,8 @@ var Img = {
17719
17725
  attr: {
17720
17726
  src: (el) => {
17721
17727
  const { props: props2, context } = el;
17722
- const { exec: exec6, isString: isString13, replaceLiteralsWithObjectFields: replaceLiteralsWithObjectFields3 } = context.utils;
17723
- let src = (props2.preSrc || "") + exec6(props2.src, el);
17728
+ const { exec: exec7, isString: isString13, replaceLiteralsWithObjectFields: replaceLiteralsWithObjectFields3 } = context.utils;
17729
+ let src = (props2.preSrc || "") + exec7(props2.src, el);
17724
17730
  if (isString13(src) && src.includes("{{")) {
17725
17731
  src = replaceLiteralsWithObjectFields3(src, el.state);
17726
17732
  }
@@ -17805,8 +17811,8 @@ var getComputedBackgroundColor = ({ props: props2 }) => {
17805
17811
  return (0, import_scratch6.getColor)(props2.shapeDirectionColor) || (0, import_scratch6.getColor)(props2.borderColor) || (0, import_scratch6.getColor)(props2.backgroundColor) || (0, import_scratch6.getColor)(props2.background);
17806
17812
  };
17807
17813
  var inheritTransition = ({ props: props2, deps }) => {
17808
- const exec6 = Timing.class.transition({ props: props2, deps });
17809
- return exec6 && exec6.transition;
17814
+ const exec7 = Timing.class.transition({ props: props2, deps });
17815
+ return exec7 && exec7.transition;
17810
17816
  };
17811
17817
  var SHAPES = {
17812
17818
  rectangle: {},
@@ -19004,20 +19010,22 @@ var Circle = {
19004
19010
 
19005
19011
  // ../uikit/Icon/index.js
19006
19012
  var import_utils15 = __toESM(require_cjs());
19007
- var getIconName = ({ key, props: props2, context, deps, state }) => {
19008
- let iconName = props2.name || props2.icon || key;
19013
+ var getIconName = (el, s) => {
19014
+ const { key, props: props2, deps } = el;
19015
+ let iconName = (0, import_utils15.exec)(props2.name || props2.icon || key, el);
19009
19016
  if ((0, import_utils15.isString)(iconName) && iconName.includes("{{")) {
19010
- iconName = deps.replaceLiteralsWithObjectFields(iconName, state);
19017
+ iconName = deps.replaceLiteralsWithObjectFields(iconName, s);
19011
19018
  }
19012
19019
  return deps.isString(iconName) ? iconName : key;
19013
19020
  };
19014
19021
  var Icon = {
19015
19022
  extend: "Svg",
19016
19023
  deps: { isString: import_utils15.isString, replaceLiteralsWithObjectFields: import_utils15.replaceLiteralsWithObjectFields },
19017
- props: ({ key, props: props2, parent, context, deps, state }) => {
19024
+ props: (el, s) => {
19025
+ const { props: props2, parent, context, deps, state } = el;
19018
19026
  const { ICONS, SEMANTIC_ICONS, useIconSprite, verbose } = context && context.designSystem;
19019
19027
  const { toCamelCase } = context && context.utils;
19020
- let iconName = getIconName({ key, props: props2, parent, context, deps, state });
19028
+ let iconName = getIconName(el, s);
19021
19029
  const camelCase = toCamelCase(iconName);
19022
19030
  const isArray5 = camelCase.split(/([a-z])([A-Z])/g);
19023
19031
  const semanticIconRootName = isArray5[1] ? isArray5[0] : iconName.split(".")[0].split(" ")[0];
@@ -19045,11 +19053,14 @@ var Icon = {
19045
19053
  };
19046
19054
  }
19047
19055
  let activeIconName;
19048
- if (props2.active) {
19049
- activeIconName = props2[".active"].name || props2[".active"].icon;
19056
+ if (props2.isActive) {
19057
+ activeIconName = props2[".isActive"].name || props2[".isActive"].icon;
19050
19058
  }
19051
- if (parent && parent.props && parent.props.active && parent.props[".active"] && parent.props[".active"].icon) {
19052
- activeIconName = parent.props[".active"].icon.name || parent.props[".active"].icon.icon || parent.props[".active"].icon;
19059
+ if (parent && parent.props && parent.props.isActive && parent.props[".isActive"] && parent.props[".isActive"].icon) {
19060
+ activeIconName = (0, import_utils15.exec)(
19061
+ parent.props[".isActive"].icon.name || parent.props[".isActive"].icon.icon || parent.props[".isActive"].icon,
19062
+ el
19063
+ );
19053
19064
  }
19054
19065
  if ((0, import_utils15.isString)(activeIconName) && activeIconName.includes("{{")) {
19055
19066
  activeIconName = deps.replaceLiteralsWithObjectFields(activeIconName, state);
@@ -19087,10 +19098,9 @@ var IconText = {
19087
19098
  lineHeight: 1
19088
19099
  },
19089
19100
  Icon: {
19090
- props: ({ parent, props: props2 }) => ({ icon: parent.props.icon }),
19101
+ props: ({ parent }) => ({ icon: parent.props.icon }),
19091
19102
  if: ({ parent, props: props2 }) => {
19092
- const doesExist = parent.props.icon || parent.props.Icon || props2.name || props2.icon || props2.sfSymbols || parent.props.sfSymbols;
19093
- return doesExist;
19103
+ return parent.props.icon || parent.props.Icon || props2.name || props2.icon || props2.sfSymbols || parent.props.sfSymbols;
19094
19104
  }
19095
19105
  },
19096
19106
  text: ({ props: props2 }) => props2.text,
@@ -19382,8 +19392,8 @@ var Link = {
19382
19392
  },
19383
19393
  attr: {
19384
19394
  href: (el, s, ctx) => {
19385
- const { isString: isString13, exec: exec6, replaceLiteralsWithObjectFields: replaceLiteralsWithObjectFields3 } = ctx.utils;
19386
- const href = exec6(el.props.href, el) || exec6(exec6(el.props, el).href, el);
19395
+ const { isString: isString13, exec: exec7, replaceLiteralsWithObjectFields: replaceLiteralsWithObjectFields3 } = ctx.utils;
19396
+ const href = exec7(el.props.href, el) || exec7(exec7(el.props, el).href, el);
19387
19397
  if (isString13(href) && href.includes("{{")) {
19388
19398
  return replaceLiteralsWithObjectFields3(href, s);
19389
19399
  }
@@ -19399,8 +19409,8 @@ var RouterLink = {
19399
19409
  click: (event, el, s) => {
19400
19410
  const { props: props2, context: ctx } = el;
19401
19411
  const { href: h, scrollToTop, stopPropagation } = props2;
19402
- const { exec: exec6, isString: isString13, replaceLiteralsWithObjectFields: replaceLiteralsWithObjectFields3, isDefined: isDefined2 } = ctx.utils;
19403
- let href = exec6(h, el, s);
19412
+ const { exec: exec7, isString: isString13, replaceLiteralsWithObjectFields: replaceLiteralsWithObjectFields3, isDefined: isDefined2 } = ctx.utils;
19413
+ let href = exec7(h, el, s);
19404
19414
  if (isString13(href) && href.includes("{{")) {
19405
19415
  href = replaceLiteralsWithObjectFields3(href, s);
19406
19416
  }
@@ -21,7 +21,7 @@ var utilImports_exports = {};
21
21
  __export(utilImports_exports, {
22
22
  applyCSS: () => import_init.applyCSS,
23
23
  init: () => import_init.init,
24
- reInit: () => import_init.reInit,
24
+ reinit: () => import_init.reinit,
25
25
  scratchSystem: () => import_scratch.scratchSystem,
26
26
  scratchUtils: () => import_scratch.scratchUtils,
27
27
  set: () => import_scratch.set
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@symbo.ls/create",
3
- "version": "2.11.450",
3
+ "version": "2.11.452",
4
4
  "license": "MIT",
5
- "gitHead": "4153a92a328d62db727ee4c99cd53f389ee6e05b",
5
+ "gitHead": "65799b9b9cb6d7e6e5e3f0cfc0b1140ccc506b2b",
6
6
  "files": [
7
7
  "src",
8
8
  "dist"
@@ -35,10 +35,10 @@
35
35
  "@domql/report": "^2.5.0",
36
36
  "@domql/router": "^2.5.0",
37
37
  "@symbo.ls/fetch": "^2.11.450",
38
- "@symbo.ls/init": "^2.11.450",
38
+ "@symbo.ls/init": "^2.11.452",
39
39
  "@symbo.ls/scratch": "^2.11.450",
40
- "@symbo.ls/sync": "^2.11.450",
41
- "@symbo.ls/uikit": "^2.11.450",
40
+ "@symbo.ls/sync": "^2.11.452",
41
+ "@symbo.ls/uikit": "^2.11.451",
42
42
  "@symbo.ls/utils": "^2.11.446",
43
43
  "domql": "^2.5.0"
44
44
  },
@@ -5,6 +5,6 @@ import { scratchUtils, scratchSystem, set } from '@symbo.ls/scratch'
5
5
  export { scratchUtils, scratchSystem, set }
6
6
  export * from '@domql/utils'
7
7
  export * from '@symbo.ls/utils'
8
- export { init, reInit, applyCSS } from '@symbo.ls/init'
8
+ export { init, reinit, applyCSS } from '@symbo.ls/init'
9
9
  export * from '@domql/report'
10
10
  export * from '@domql/router'