@symbo.ls/create 2.11.499 → 2.11.501

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.
@@ -3673,6 +3673,22 @@ var require_cjs2 = __commonJS({
3673
3673
  tag,
3674
3674
  props: { ...element }
3675
3675
  });
3676
+ if (newElem.props.data) {
3677
+ newElem.data = newElem.props.data;
3678
+ delete newElem.props.data;
3679
+ }
3680
+ if (newElem.props.state) {
3681
+ newElem.state = newElem.props.state;
3682
+ delete newElem.props.state;
3683
+ }
3684
+ if (newElem.props.attr) {
3685
+ newElem.attr = newElem.props.attr;
3686
+ delete newElem.props.attr;
3687
+ }
3688
+ if (newElem.props.if) {
3689
+ newElem.if = newElem.props.if;
3690
+ delete newElem.props.if;
3691
+ }
3676
3692
  if (childExtends)
3677
3693
  newElem.childExtend = childExtends;
3678
3694
  return newElem;
@@ -5944,6 +5960,7 @@ var require_cjs2 = __commonJS({
5944
5960
  ANIMATION: () => ANIMATION,
5945
5961
  BREAKPOINTS: () => BREAKPOINTS,
5946
5962
  CASES: () => CASES,
5963
+ CLASS: () => CLASS,
5947
5964
  COLOR: () => COLOR2,
5948
5965
  CONFIG: () => CONFIG3,
5949
5966
  CSS_VARS: () => CSS_VARS,
@@ -6322,6 +6339,7 @@ var require_cjs2 = __commonJS({
6322
6339
  ANIMATION: () => ANIMATION,
6323
6340
  BREAKPOINTS: () => BREAKPOINTS,
6324
6341
  CASES: () => CASES,
6342
+ CLASS: () => CLASS,
6325
6343
  COLOR: () => COLOR2,
6326
6344
  DEVICES: () => DEVICES,
6327
6345
  DOCUMENT: () => DOCUMENT,
@@ -6472,6 +6490,8 @@ var require_cjs2 = __commonJS({
6472
6490
  var TEMPLATES = {};
6473
6491
  var defaultProps4 = {};
6474
6492
  var GRID = defaultProps4;
6493
+ var defaultProps5 = {};
6494
+ var CLASS = defaultProps5;
6475
6495
  var RESET = {};
6476
6496
  var CSS_VARS = {};
6477
6497
  var CONFIG3 = {
@@ -12882,7 +12902,7 @@ var init_Media = __esm({
12882
12902
  return (0, import_utils7.overwriteDeep)(result, convertPropsToClass(props4, result, element));
12883
12903
  };
12884
12904
  applyTrueProps = (props4, result, element) => (0, import_utils7.merge)(result, convertPropsToClass(props4, result, element));
12885
- beforeClassAssign = (element, s) => {
12905
+ beforeClassAssign = (element, s, ctx) => {
12886
12906
  const { props: props4, class: className, context } = element;
12887
12907
  const CLASS_NAMES = {
12888
12908
  media: {},
@@ -12909,7 +12929,17 @@ var init_Media = __esm({
12909
12929
  }
12910
12930
  if (setter)
12911
12931
  setter(key, props4[key], CLASS_NAMES, element);
12912
- else if (key === "true")
12932
+ else if (key === "class") {
12933
+ const value2 = element.props.class;
12934
+ if (!element.call("isString", value2))
12935
+ return;
12936
+ const classArr = value2.split(" ");
12937
+ const scratchClasses = ctx.designSystem.CLASS;
12938
+ CLASS_NAMES.class = classArr.reduce((accumulator, current) => {
12939
+ const scratchClass = scratchClasses[current];
12940
+ return (0, import_utils7.merge)(accumulator, scratchClass);
12941
+ }, {});
12942
+ } else if (key === "true")
12913
12943
  applyTrueProps(props4[key], CLASS_NAMES, element);
12914
12944
  }
12915
12945
  const parentProps = element.parent && element.parent.props;
@@ -22742,9 +22772,9 @@ var init_client = __esm({
22742
22772
  }
22743
22773
  });
22744
22774
 
22745
- // ../sync/dist/cjs/Notifications.js
22746
- var require_Notifications = __commonJS({
22747
- "../sync/dist/cjs/Notifications.js"(exports, module2) {
22775
+ // ../sync/dist/cjs/SyncNotifications.js
22776
+ var require_SyncNotifications = __commonJS({
22777
+ "../sync/dist/cjs/SyncNotifications.js"(exports, module2) {
22748
22778
  "use strict";
22749
22779
  var __defProp2 = Object.defineProperty;
22750
22780
  var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
@@ -22763,12 +22793,12 @@ var require_Notifications = __commonJS({
22763
22793
  return to;
22764
22794
  };
22765
22795
  var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
22766
- var Notifications_exports = {};
22767
- __export2(Notifications_exports, {
22796
+ var SyncNotifications_exports = {};
22797
+ __export2(SyncNotifications_exports, {
22768
22798
  Notifications: () => Notifications2,
22769
22799
  connectedToSymbols: () => connectedToSymbols
22770
22800
  });
22771
- module2.exports = __toCommonJS2(Notifications_exports);
22801
+ module2.exports = __toCommonJS2(SyncNotifications_exports);
22772
22802
  var NOTIF_COLORS = {
22773
22803
  success: "green",
22774
22804
  error: "red",
@@ -23069,13 +23099,6 @@ var require_Inspect = __commonJS({
23069
23099
  }
23070
23100
  });
23071
23101
 
23072
- // ../sync/dist/cjs/DefaultSyncApp.js
23073
- var require_DefaultSyncApp = __commonJS({
23074
- "../sync/dist/cjs/DefaultSyncApp.js"() {
23075
- "use strict";
23076
- }
23077
- });
23078
-
23079
23102
  // ../sync/dist/cjs/index.js
23080
23103
  var require_cjs14 = __commonJS({
23081
23104
  "../sync/dist/cjs/index.js"(exports, module2) {
@@ -23110,10 +23133,9 @@ var require_cjs14 = __commonJS({
23110
23133
  var import_client = (init_client(), __toCommonJS(client_exports));
23111
23134
  var import_globals = require_cjs9();
23112
23135
  var import_utils25 = require_cjs();
23113
- var import_Notifications = require_Notifications();
23136
+ var import_SyncNotifications = require_SyncNotifications();
23114
23137
  var import_Inspect = require_Inspect();
23115
- __reExport2(sync_exports, require_DefaultSyncApp(), module2.exports);
23116
- __reExport2(sync_exports, require_Notifications(), module2.exports);
23138
+ __reExport2(sync_exports, require_SyncNotifications(), module2.exports);
23117
23139
  __reExport2(sync_exports, require_Inspect(), module2.exports);
23118
23140
  var isLocalhost = import_globals.window && import_globals.window.location && import_globals.window.location.host.includes("local");
23119
23141
  var onConnect = (element, state) => {
@@ -23159,7 +23181,7 @@ var require_cjs14 = __commonJS({
23159
23181
  (0, import_init3.init)(designSystem);
23160
23182
  }
23161
23183
  if (ctx.editor.verbose && event === "clients") {
23162
- (0, import_Notifications.connectedToSymbols)(data, el, s);
23184
+ (0, import_SyncNotifications.connectedToSymbols)(data, el, s);
23163
23185
  }
23164
23186
  };
23165
23187
  };
@@ -23179,7 +23201,7 @@ var require_cjs14 = __commonJS({
23179
23201
  }
23180
23202
  };
23181
23203
  var DefaultSyncApp = {
23182
- extend: [SyncComponent2, import_Inspect.Inspect, import_Notifications.Notifications]
23204
+ extend: [SyncComponent2, import_Inspect.Inspect, import_SyncNotifications.Notifications]
23183
23205
  };
23184
23206
  }
23185
23207
  });
@@ -27174,6 +27196,7 @@ var DEFAULT_CONFIG = {
27174
27196
  },
27175
27197
  DEVICES: {},
27176
27198
  CASES: {},
27199
+ CLASS: {},
27177
27200
  SVG: {}
27178
27201
  // TODO: Check with @nikoloza on this
27179
27202
  };
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@symbo.ls/create",
3
- "version": "2.11.499",
3
+ "version": "2.11.501",
4
4
  "license": "MIT",
5
- "gitHead": "f4de4fba03a8a03e68a7e4d072dbbfed0e98df67",
5
+ "gitHead": "fc87e36ca99f7c465a5261482fc88a62e0ba5dd0",
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.475",
38
- "@symbo.ls/init": "^2.11.497",
39
- "@symbo.ls/scratch": "^2.11.497",
40
- "@symbo.ls/sync": "^2.11.499",
41
- "@symbo.ls/uikit": "^2.11.499",
38
+ "@symbo.ls/init": "^2.11.501",
39
+ "@symbo.ls/scratch": "^2.11.500",
40
+ "@symbo.ls/sync": "^2.11.501",
41
+ "@symbo.ls/uikit": "^2.11.500",
42
42
  "@symbo.ls/utils": "^2.11.497",
43
43
  "domql": "^2.5.158"
44
44
  },