@dooboostore/simple-web-component 1.0.35 → 1.0.36

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.
Files changed (136) hide show
  1. package/README.md +21 -21
  2. package/dist/cjs/decorators/addEventListener.js +12 -4
  3. package/dist/cjs/decorators/addEventListener.js.map +2 -2
  4. package/dist/cjs/decorators/applyAttribute.js +19 -18
  5. package/dist/cjs/decorators/applyAttribute.js.map +2 -2
  6. package/dist/cjs/decorators/applyClass.js +23 -22
  7. package/dist/cjs/decorators/applyClass.js.map +2 -2
  8. package/dist/cjs/decorators/applyNode.js +18 -17
  9. package/dist/cjs/decorators/applyNode.js.map +2 -2
  10. package/dist/cjs/decorators/applyStyle.js +20 -19
  11. package/dist/cjs/decorators/applyStyle.js.map +2 -2
  12. package/dist/cjs/decorators/attribute.js +16 -15
  13. package/dist/cjs/decorators/attribute.js.map +2 -2
  14. package/dist/cjs/decorators/{changedAttributeHost.js → changedAttributeThis.js} +6 -6
  15. package/dist/cjs/decorators/changedAttributeThis.js.map +7 -0
  16. package/dist/cjs/decorators/elementDefine.js +21 -20
  17. package/dist/cjs/decorators/elementDefine.js.map +2 -2
  18. package/dist/cjs/decorators/emitCustomEvent.js +18 -16
  19. package/dist/cjs/decorators/emitCustomEvent.js.map +2 -2
  20. package/dist/cjs/decorators/index.js +1 -1
  21. package/dist/cjs/decorators/index.js.map +1 -1
  22. package/dist/cjs/decorators/query.js +38 -60
  23. package/dist/cjs/decorators/query.js.map +2 -2
  24. package/dist/cjs/decorators/queryAll.js +31 -63
  25. package/dist/cjs/decorators/queryAll.js.map +2 -2
  26. package/dist/cjs/decorators/setProperty.js +13 -12
  27. package/dist/cjs/decorators/setProperty.js.map +2 -2
  28. package/dist/cjs/elements/SwcAsync.js +6 -6
  29. package/dist/cjs/elements/SwcAsync.js.map +1 -1
  30. package/dist/cjs/elements/SwcChoose.js +5 -5
  31. package/dist/cjs/elements/SwcChoose.js.map +1 -1
  32. package/dist/cjs/elements/SwcIf.js +6 -6
  33. package/dist/cjs/elements/SwcIf.js.map +1 -1
  34. package/dist/cjs/elements/SwcLoop.js +5 -5
  35. package/dist/cjs/elements/SwcLoop.js.map +1 -1
  36. package/dist/cjs/elements/register.js +18 -18
  37. package/dist/cjs/elements/register.js.map +1 -1
  38. package/dist/cjs/types.js.map +1 -1
  39. package/dist/cjs/utils/Utils.js +13 -13
  40. package/dist/cjs/utils/Utils.js.map +2 -2
  41. package/dist/esm/decorators/addEventListener.js +12 -4
  42. package/dist/esm/decorators/addEventListener.js.map +2 -2
  43. package/dist/esm/decorators/applyAttribute.js +19 -18
  44. package/dist/esm/decorators/applyAttribute.js.map +2 -2
  45. package/dist/esm/decorators/applyClass.js +23 -22
  46. package/dist/esm/decorators/applyClass.js.map +2 -2
  47. package/dist/esm/decorators/applyNode.js +18 -17
  48. package/dist/esm/decorators/applyNode.js.map +2 -2
  49. package/dist/esm/decorators/applyStyle.js +20 -19
  50. package/dist/esm/decorators/applyStyle.js.map +2 -2
  51. package/dist/esm/decorators/attribute.js +16 -15
  52. package/dist/esm/decorators/attribute.js.map +2 -2
  53. package/dist/esm/decorators/{changedAttributeHost.js → changedAttributeThis.js} +3 -3
  54. package/dist/esm/decorators/changedAttributeThis.js.map +7 -0
  55. package/dist/esm/decorators/elementDefine.js +19 -18
  56. package/dist/esm/decorators/elementDefine.js.map +2 -2
  57. package/dist/esm/decorators/emitCustomEvent.js +18 -16
  58. package/dist/esm/decorators/emitCustomEvent.js.map +2 -2
  59. package/dist/esm/decorators/index.js +1 -1
  60. package/dist/esm/decorators/index.js.map +1 -1
  61. package/dist/esm/decorators/query.js +38 -60
  62. package/dist/esm/decorators/query.js.map +2 -2
  63. package/dist/esm/decorators/queryAll.js +31 -63
  64. package/dist/esm/decorators/queryAll.js.map +2 -2
  65. package/dist/esm/decorators/setProperty.js +13 -12
  66. package/dist/esm/decorators/setProperty.js.map +2 -2
  67. package/dist/esm/elements/SwcAsync.js +7 -7
  68. package/dist/esm/elements/SwcAsync.js.map +1 -1
  69. package/dist/esm/elements/SwcChoose.js +6 -6
  70. package/dist/esm/elements/SwcChoose.js.map +1 -1
  71. package/dist/esm/elements/SwcIf.js +7 -7
  72. package/dist/esm/elements/SwcIf.js.map +1 -1
  73. package/dist/esm/elements/SwcLoop.js +6 -6
  74. package/dist/esm/elements/SwcLoop.js.map +1 -1
  75. package/dist/esm/elements/register.js +19 -19
  76. package/dist/esm/elements/register.js.map +1 -1
  77. package/dist/esm/types.js.map +1 -1
  78. package/dist/esm/utils/Utils.js +13 -13
  79. package/dist/esm/utils/Utils.js.map +2 -2
  80. package/dist/esm-bundle/dooboostore-simple-web-component.esm.js +271 -308
  81. package/dist/esm-bundle/dooboostore-simple-web-component.esm.js.map +4 -4
  82. package/dist/types/decorators/addEventListener.d.ts +5 -7
  83. package/dist/types/decorators/addEventListener.d.ts.map +1 -1
  84. package/dist/types/decorators/applyAttribute.d.ts +4 -4
  85. package/dist/types/decorators/applyAttribute.d.ts.map +1 -1
  86. package/dist/types/decorators/applyClass.d.ts +6 -6
  87. package/dist/types/decorators/applyClass.d.ts.map +1 -1
  88. package/dist/types/decorators/applyNode.d.ts +6 -6
  89. package/dist/types/decorators/applyNode.d.ts.map +1 -1
  90. package/dist/types/decorators/applyStyle.d.ts +4 -4
  91. package/dist/types/decorators/applyStyle.d.ts.map +1 -1
  92. package/dist/types/decorators/attribute.d.ts +5 -5
  93. package/dist/types/decorators/attribute.d.ts.map +1 -1
  94. package/dist/types/decorators/changedAttributeThis.d.ts +18 -0
  95. package/dist/types/decorators/changedAttributeThis.d.ts.map +1 -0
  96. package/dist/types/decorators/elementDefine.d.ts.map +1 -1
  97. package/dist/types/decorators/emitCustomEvent.d.ts +4 -9
  98. package/dist/types/decorators/emitCustomEvent.d.ts.map +1 -1
  99. package/dist/types/decorators/index.d.ts +1 -1
  100. package/dist/types/decorators/query.d.ts +17 -63
  101. package/dist/types/decorators/query.d.ts.map +1 -1
  102. package/dist/types/decorators/queryAll.d.ts +6 -63
  103. package/dist/types/decorators/queryAll.d.ts.map +1 -1
  104. package/dist/types/decorators/setProperty.d.ts +1 -1
  105. package/dist/types/decorators/setProperty.d.ts.map +1 -1
  106. package/dist/types/types.d.ts +2 -2
  107. package/dist/types/types.d.ts.map +1 -1
  108. package/dist/types/utils/Utils.d.ts +7 -7
  109. package/dist/types/utils/Utils.d.ts.map +1 -1
  110. package/dist/umd-bundle/dooboostore-simple-web-component.umd.js +271 -308
  111. package/dist/umd-bundle/dooboostore-simple-web-component.umd.js.map +4 -4
  112. package/package.json +4 -4
  113. package/src/decorators/addEventListener.ts +11 -9
  114. package/src/decorators/applyAttribute.ts +16 -15
  115. package/src/decorators/applyClass.ts +18 -17
  116. package/src/decorators/applyNode.ts +21 -20
  117. package/src/decorators/applyStyle.ts +17 -16
  118. package/src/decorators/attribute.ts +20 -19
  119. package/src/decorators/{changedAttributeHost.ts → changedAttributeThis.ts} +10 -12
  120. package/src/decorators/elementDefine.ts +21 -20
  121. package/src/decorators/emitCustomEvent.ts +21 -26
  122. package/src/decorators/index.ts +1 -1
  123. package/src/decorators/query.ts +51 -124
  124. package/src/decorators/queryAll.ts +30 -127
  125. package/src/decorators/setProperty.ts +12 -11
  126. package/src/elements/SwcAsync.ts +7 -7
  127. package/src/elements/SwcChoose.ts +6 -6
  128. package/src/elements/SwcIf.ts +8 -8
  129. package/src/elements/SwcLoop.ts +6 -6
  130. package/src/elements/register.ts +20 -20
  131. package/src/types.ts +5 -5
  132. package/src/utils/Utils.ts +17 -18
  133. package/dist/cjs/decorators/changedAttributeHost.js.map +0 -7
  134. package/dist/esm/decorators/changedAttributeHost.js.map +0 -7
  135. package/dist/types/decorators/changedAttributeHost.d.ts +0 -20
  136. package/dist/types/decorators/changedAttributeHost.d.ts.map +0 -1
@@ -1151,41 +1151,37 @@ var dooboostoreSimpleWebComponent = (() => {
1151
1151
  SWC_NOT_FOUND: () => SWC_NOT_FOUND,
1152
1152
  SwcUtils: () => SwcUtils,
1153
1153
  addClass: () => addClass,
1154
- addClassHost: () => addClassHost,
1154
+ addClassThis: () => addClassThis,
1155
1155
  addEventListener: () => addEventListener,
1156
1156
  addEventListenerAppHost: () => addEventListenerAppHost,
1157
- addEventListenerHost: () => addEventListenerHost,
1157
+ addEventListenerDocument: () => addEventListenerDocument,
1158
+ addEventListenerThis: () => addEventListenerThis,
1159
+ addEventListenerWindow: () => addEventListenerWindow,
1158
1160
  allAppHost: () => allAppHost,
1159
- allFirstAppHost: () => allFirstAppHost,
1160
- allFirstHost: () => allFirstHost,
1161
- allHost: () => allHost,
1162
- allLastAppHost: () => allLastAppHost,
1163
- allLastHost: () => allLastHost,
1164
1161
  allParentHost: () => allParentHost,
1165
- appHost: () => appHost,
1166
1162
  applyAttribute: () => applyAttribute,
1167
- applyAttributeHost: () => applyAttributeHost,
1163
+ applyAttributeThis: () => applyAttributeThis,
1168
1164
  applyClass: () => applyClass,
1169
- applyClassHost: () => applyClassHost,
1165
+ applyClassThis: () => applyClassThis,
1170
1166
  applyInnerHtmlNode: () => applyInnerHtmlNode,
1171
- applyInnerHtmlNodeHost: () => applyInnerHtmlNodeHost,
1167
+ applyInnerHtmlNodeThis: () => applyInnerHtmlNodeThis,
1172
1168
  applyInnerTextNode: () => applyInnerTextNode,
1173
1169
  applyNode: () => applyNode,
1174
- applyNodeHost: () => applyNodeHost,
1170
+ applyNodeThis: () => applyNodeThis,
1175
1171
  applyReplaceChildrenNode: () => applyReplaceChildrenNode,
1176
- applyReplaceChildrenNodeHost: () => applyReplaceChildrenNodeHost,
1172
+ applyReplaceChildrenNodeThis: () => applyReplaceChildrenNodeThis,
1177
1173
  applyStyle: () => applyStyle,
1178
- applyStyleHost: () => applyStyleHost,
1174
+ applyStyleThis: () => applyStyleThis,
1179
1175
  attribute: () => attribute,
1180
- attributeHost: () => attributeHost,
1181
- changedAttributeHost: () => changedAttributeHost,
1176
+ attributeThis: () => attributeThis,
1177
+ changedAttributeThis: () => changedAttributeThis,
1182
1178
  commentNode: () => commentNode,
1183
1179
  convertAttributeValue: () => convertAttributeValue,
1184
1180
  convertValue: () => convertValue2,
1185
1181
  createElement: () => createElement,
1186
1182
  elementDefine: () => elementDefine,
1187
1183
  emitCustomEvent: () => emitCustomEvent,
1188
- emitCustomEventHost: () => emitCustomEventHost,
1184
+ emitCustomEventThis: () => emitCustomEventThis,
1189
1185
  ensureInit: () => ensureInit,
1190
1186
  findAllApplyNodeMetadata: () => findAllApplyNodeMetadata,
1191
1187
  findAllAttributeApplyMetadata: () => findAllAttributeApplyMetadata,
@@ -1194,8 +1190,6 @@ var dooboostoreSimpleWebComponent = (() => {
1194
1190
  findAllClassMetadata: () => findAllClassMetadata,
1195
1191
  findAllLifecycleMetadata: () => findAllLifecycleMetadata,
1196
1192
  findAllStyleMetadata: () => findAllStyleMetadata,
1197
- firstAppHost: () => firstAppHost,
1198
- firstHost: () => firstHost,
1199
1193
  getAddEventListenerMetadata: () => getAddEventListenerMetadata,
1200
1194
  getAttributeValue: () => getAttributeValue,
1201
1195
  getChangedAttributeMetadata: () => getChangedAttributeMetadata,
@@ -1207,7 +1201,6 @@ var dooboostoreSimpleWebComponent = (() => {
1207
1201
  getQueryMetadata: () => getQueryMetadata,
1208
1202
  getSubscribeSwcAppMessageWhileConnectedMetadata: () => getSubscribeSwcAppMessageWhileConnectedMetadata,
1209
1203
  getSubscribeSwcAppRouteChangeWhileConnectedMetadata: () => getSubscribeSwcAppRouteChangeWhileConnectedMetadata,
1210
- host: () => host,
1211
1204
  htmlAElement: () => htmlAElement,
1212
1205
  htmlArticleElement: () => htmlArticleElement,
1213
1206
  htmlButtonElement: () => htmlButtonElement,
@@ -1219,8 +1212,6 @@ var dooboostoreSimpleWebComponent = (() => {
1219
1212
  htmlSectionElement: () => htmlSectionElement,
1220
1213
  htmlSpanElement: () => htmlSpanElement,
1221
1214
  htmlUlElement: () => htmlUlElement,
1222
- lastAppHost: () => lastAppHost,
1223
- lastHost: () => lastHost,
1224
1215
  onAddEventListener: () => onAddEventListener,
1225
1216
  onAdopted: () => onAdopted,
1226
1217
  onAdoptedAfter: () => onAdoptedAfter,
@@ -1233,38 +1224,41 @@ var dooboostoreSimpleWebComponent = (() => {
1233
1224
  onDisconnectedAfter: () => onDisconnectedAfter,
1234
1225
  onDisconnectedBefore: () => onDisconnectedBefore,
1235
1226
  onInitialize: () => onInitialize,
1236
- parentHost: () => parentHost,
1237
1227
  publishSwcAppMessage: () => publishSwcAppMessage,
1238
1228
  query: () => query,
1239
1229
  queryAll: () => queryAll,
1240
- queryAllHost: () => queryAllHost,
1230
+ queryAllThis: () => queryAllThis,
1231
+ queryAppHost: () => queryAppHost,
1232
+ queryDocument: () => queryDocument,
1241
1233
  queryHost: () => queryHost,
1234
+ queryThis: () => queryThis,
1235
+ queryWindow: () => queryWindow,
1242
1236
  removeAttribute: () => removeAttribute,
1243
- removeAttributeHost: () => removeAttributeHost,
1237
+ removeAttributeThis: () => removeAttributeThis,
1244
1238
  removeClass: () => removeClass,
1245
- removeClassHost: () => removeClassHost,
1239
+ removeClassThis: () => removeClassThis,
1246
1240
  removeStyle: () => removeStyle,
1247
- removeStyleHost: () => removeStyleHost,
1241
+ removeStyleThis: () => removeStyleThis,
1248
1242
  resolveTargetEls: () => resolveTargetEls,
1249
1243
  setAttribute: () => setAttribute,
1250
- setAttributeHost: () => setAttributeHost,
1244
+ setAttributeThis: () => setAttributeThis,
1251
1245
  setClass: () => setClass,
1252
- setClassHost: () => setClassHost,
1246
+ setClassThis: () => setClassThis,
1253
1247
  setProperty: () => setProperty,
1254
- setPropertyHost: () => setPropertyHost,
1248
+ setPropertyThis: () => setPropertyThis,
1255
1249
  setStyle: () => setStyle,
1256
- setStyleHost: () => setStyleHost,
1250
+ setStyleThis: () => setStyleThis,
1257
1251
  subscribeSwcAppMessageWhileConnected: () => subscribeSwcAppMessageWhileConnected,
1258
1252
  subscribeSwcAppRouteChangeWhileConnected: () => subscribeSwcAppRouteChangeWhileConnected,
1259
1253
  textNode: () => textNode,
1260
1254
  toggleClass: () => toggleClass,
1261
- toggleClassHost: () => toggleClassHost,
1255
+ toggleClassThis: () => toggleClassThis,
1262
1256
  updateAttribute: () => updateAttribute,
1263
- updateAttributeHost: () => updateAttributeHost,
1257
+ updateAttributeThis: () => updateAttributeThis,
1264
1258
  updateClass: () => updateClass,
1265
- updateClassHost: () => updateClassHost,
1259
+ updateClassThis: () => updateClassThis,
1266
1260
  updateStyle: () => updateStyle,
1267
- updateStyleHost: () => updateStyleHost
1261
+ updateStyleThis: () => updateStyleThis
1268
1262
  });
1269
1263
  var import_reflect_metadata2 = __toESM(require_Reflect(), 1);
1270
1264
 
@@ -6029,11 +6023,17 @@ var dooboostoreSimpleWebComponent = (() => {
6029
6023
  const constructor = target instanceof Function ? target : target.constructor;
6030
6024
  return ReflectUtils.getMetadata(ADD_EVENT_LISTENER_METADATA_KEY, constructor);
6031
6025
  };
6032
- function addEventListenerHost(type, options) {
6033
- return addEventListener(":host", type, options);
6026
+ function addEventListenerThis(type, options) {
6027
+ return addEventListener("$this", type, options);
6034
6028
  }
6035
6029
  function addEventListenerAppHost(type, options) {
6036
- return addEventListener(":appHost", type, options);
6030
+ return addEventListener("$appHost", type, options);
6031
+ }
6032
+ function addEventListenerWindow(type, options) {
6033
+ return addEventListener("$window", type, options);
6034
+ }
6035
+ function addEventListenerDocument(type, options) {
6036
+ return addEventListener("$document", type, options);
6037
6037
  }
6038
6038
 
6039
6039
  // src/decorators/lifecycles.ts
@@ -6283,7 +6283,7 @@ var dooboostoreSimpleWebComponent = (() => {
6283
6283
  }
6284
6284
  return current;
6285
6285
  };
6286
- SwcUtils2.findNearestSwcHost = (el) => {
6286
+ SwcUtils2.findNearestSwcHostIncludingSelf = (el) => {
6287
6287
  const el1 = el;
6288
6288
  if (el1.__swc_host) return el1.__swc_host;
6289
6289
  let current = el.parentElement || el.getRootNode?.()?.host;
@@ -6296,26 +6296,26 @@ var dooboostoreSimpleWebComponent = (() => {
6296
6296
  }
6297
6297
  return void 0;
6298
6298
  };
6299
- SwcUtils2.findAllSwcHosts = (el) => {
6299
+ SwcUtils2.findAllSwcHostsIncludingSelf = (el) => {
6300
6300
  const hosts = [];
6301
- let current = (0, SwcUtils2.findNearestSwcHost)(el);
6301
+ let current = (0, SwcUtils2.findNearestSwcHostIncludingSelf)(el);
6302
6302
  while (current) {
6303
6303
  hosts.push(current);
6304
- current = (0, SwcUtils2.findNearestSwcHost)(current);
6304
+ current = (0, SwcUtils2.findNearestSwcHostIncludingSelf)(current);
6305
6305
  }
6306
6306
  return hosts.reverse();
6307
6307
  };
6308
6308
  SwcUtils2.getHosts = (el) => {
6309
- const ancestors = (0, SwcUtils2.findAllSwcHosts)(el);
6309
+ const ancestors = (0, SwcUtils2.findAllSwcHostsIncludingSelf)(el);
6310
6310
  if (getElementConfig(el)) return [...ancestors, el];
6311
6311
  return ancestors;
6312
6312
  };
6313
6313
  SwcUtils2.getHost = (el) => {
6314
6314
  if (getElementConfig(el)) return el;
6315
- return (0, SwcUtils2.findNearestSwcHost)(el);
6315
+ return (0, SwcUtils2.findNearestSwcHostIncludingSelf)(el);
6316
6316
  };
6317
6317
  SwcUtils2.getAppHosts = (el) => {
6318
- const hosts = SwcUtils2.findAllParentAppHostsDirect(el);
6318
+ const hosts = SwcUtils2.findAllAppHostsIncludingSelfDirect(el);
6319
6319
  return hosts;
6320
6320
  };
6321
6321
  SwcUtils2.getAppHost = (el) => {
@@ -6323,11 +6323,11 @@ var dooboostoreSimpleWebComponent = (() => {
6323
6323
  const appHostsWithoutSelf = appHosts.filter((h) => h !== el);
6324
6324
  return appHostsWithoutSelf.length > 0 ? appHostsWithoutSelf[appHostsWithoutSelf.length - 1] : void 0;
6325
6325
  };
6326
- SwcUtils2.findParentAppHostDirect = (el) => {
6327
- const appHosts = (0, SwcUtils2.findAllParentAppHostsDirect)(el);
6326
+ SwcUtils2.findAppHostIncludingSelfDirect = (el) => {
6327
+ const appHosts = (0, SwcUtils2.findAllAppHostsIncludingSelfDirect)(el);
6328
6328
  return appHosts.length > 0 ? appHosts[appHosts.length - 1] : null;
6329
6329
  };
6330
- SwcUtils2.findAllParentAppHostsDirect = (el) => {
6330
+ SwcUtils2.findAllAppHostsIncludingSelfDirect = (el) => {
6331
6331
  const appHosts = [];
6332
6332
  const w = el.ownerDocument?.defaultView || (typeof window !== "undefined" ? window : void 0);
6333
6333
  if (!w) {
@@ -6353,7 +6353,7 @@ var dooboostoreSimpleWebComponent = (() => {
6353
6353
  return appHosts.reverse();
6354
6354
  };
6355
6355
  SwcUtils2.getHostSet = (el) => {
6356
- const ancestors = (0, SwcUtils2.findAllSwcHosts)(el);
6356
+ const ancestors = (0, SwcUtils2.findAllSwcHostsIncludingSelf)(el);
6357
6357
  const $host = ancestors.length > 0 ? ancestors[ancestors.length - 1] : null;
6358
6358
  const $parentHost = ancestors.length > 1 ? ancestors[ancestors.length - 2] : null;
6359
6359
  const $hosts = ancestors;
@@ -6367,7 +6367,7 @@ var dooboostoreSimpleWebComponent = (() => {
6367
6367
  }
6368
6368
  curr = curr.parentElement || curr.getRootNode().host;
6369
6369
  }
6370
- const $appHosts = SwcUtils2.findAllParentAppHostsDirect(el);
6370
+ const $appHosts = SwcUtils2.findAllAppHostsIncludingSelfDirect(el);
6371
6371
  const $appHost = $appHosts.length > 0 ? $appHosts[$appHosts.length - 1] === el ? $appHosts.length > 1 ? $appHosts[$appHosts.length - 2] : null : $appHosts[$appHosts.length - 1] : null;
6372
6372
  const $firstAppHost = $appHosts.length > 0 ? $appHosts[0] : null;
6373
6373
  return {
@@ -6375,7 +6375,7 @@ var dooboostoreSimpleWebComponent = (() => {
6375
6375
  $parentHost,
6376
6376
  $hosts,
6377
6377
  $firstHost,
6378
- $lastHost: $parentHost,
6378
+ $lastHost: $host,
6379
6379
  $templateHost: el.__swc_template_host,
6380
6380
  $appHost,
6381
6381
  $appHosts,
@@ -6433,25 +6433,27 @@ var dooboostoreSimpleWebComponent = (() => {
6433
6433
  const conf = getElementConfig(this);
6434
6434
  const currentWin = this._resolveWindow?.(conf) || (typeof window !== "undefined" ? window : void 0);
6435
6435
  const eventTargets = [];
6436
- if (selectorOrTarget === ":window") eventTargets.push(currentWin);
6437
- else if (selectorOrTarget === ":document") eventTargets.push(currentWin.document);
6438
- else if (selectorOrTarget === ":parentHost") {
6436
+ if (selectorOrTarget === "$window") eventTargets.push(currentWin);
6437
+ else if (selectorOrTarget === "$document") eventTargets.push(currentWin.document);
6438
+ else if (selectorOrTarget === "$host") {
6439
+ if (hostSet.$host) eventTargets.push(hostSet.$host);
6440
+ } else if (selectorOrTarget === "$parentHost") {
6439
6441
  if (hostSet.$parentHost) eventTargets.push(hostSet.$parentHost);
6440
- } else if (selectorOrTarget === ":appHost") {
6442
+ } else if (selectorOrTarget === "$appHost") {
6441
6443
  if (hostSet.$appHost) eventTargets.push(hostSet.$appHost);
6442
- } else if (selectorOrTarget === ":firstHost") {
6444
+ } else if (selectorOrTarget === "$firstHost") {
6443
6445
  if (hostSet.$firstHost) eventTargets.push(hostSet.$firstHost);
6444
- } else if (selectorOrTarget === ":lastHost") {
6446
+ } else if (selectorOrTarget === "$lastHost") {
6445
6447
  if (hostSet.$lastHost) eventTargets.push(hostSet.$lastHost);
6446
- } else if (selectorOrTarget === ":firstAppHost") {
6448
+ } else if (selectorOrTarget === "$firstAppHost") {
6447
6449
  if (hostSet.$firstAppHost) eventTargets.push(hostSet.$firstAppHost);
6448
- } else if (selectorOrTarget === ":lastAppHost") {
6450
+ } else if (selectorOrTarget === "$lastAppHost") {
6449
6451
  if (hostSet.$lastAppHost) eventTargets.push(hostSet.$lastAppHost);
6450
- } else if (selectorOrTarget === ":hosts") {
6452
+ } else if (selectorOrTarget === "$hosts") {
6451
6453
  hostSet.$hosts.forEach((h) => eventTargets.push(h));
6452
- } else if (selectorOrTarget === ":appHosts") {
6454
+ } else if (selectorOrTarget === "$appHosts") {
6453
6455
  hostSet.$appHosts.forEach((h) => eventTargets.push(h));
6454
- } else if (selectorOrTarget === ":host" || !selectorOrTarget) {
6456
+ } else if (selectorOrTarget === "$this" || !selectorOrTarget) {
6455
6457
  eventTargets.push(this);
6456
6458
  } else {
6457
6459
  const r = fullOptions.root || "auto";
@@ -6487,20 +6489,20 @@ var dooboostoreSimpleWebComponent = (() => {
6487
6489
  const constructor = target instanceof Function ? target : target.constructor;
6488
6490
  return ReflectUtils.getMetadata(EMIT_CUSTOM_EVENT_METADATA_KEY, constructor);
6489
6491
  };
6490
- function emitCustomEventHost(type, optionsOrAttributeaName) {
6492
+ function emitCustomEventThis(type, optionsOrAttributeaName) {
6491
6493
  if (optionsOrAttributeaName && typeof optionsOrAttributeaName === "string") {
6492
- return emitCustomEventHost(type, { attributeName: optionsOrAttributeaName });
6494
+ return emitCustomEventThis(type, { attributeName: optionsOrAttributeaName });
6493
6495
  } else if (optionsOrAttributeaName && typeof optionsOrAttributeaName === "object") {
6494
6496
  if (!optionsOrAttributeaName.attributeName) {
6495
6497
  optionsOrAttributeaName.attributeName = `on-emit-${type}`;
6496
6498
  }
6497
- return emitCustomEvent(":host", type, optionsOrAttributeaName);
6499
+ return emitCustomEvent("$this", type, optionsOrAttributeaName);
6498
6500
  } else {
6499
- return emitCustomEvent(":host", type, { attributeName: `on-emit-${type}` });
6501
+ return emitCustomEvent("$this", type, { attributeName: `on-emit-${type}` });
6500
6502
  }
6501
6503
  }
6502
6504
 
6503
- // src/decorators/changedAttributeHost.ts
6505
+ // src/decorators/changedAttributeThis.ts
6504
6506
  var ON_ATTRIBUTE_CHANGED_METADATA_KEY = Symbol.for("simple-web-component:on-attribute-changed");
6505
6507
  var convertValue = (val, type) => {
6506
6508
  if (val === null || val === void 0) return val;
@@ -6508,7 +6510,7 @@ var dooboostoreSimpleWebComponent = (() => {
6508
6510
  if (type === Boolean) return val === "false" || val === "0" ? false : true;
6509
6511
  return val;
6510
6512
  };
6511
- function changedAttributeHost(attributeName, options = {}) {
6513
+ function changedAttributeThis(attributeName, options = {}) {
6512
6514
  return (target, propertyKey) => {
6513
6515
  const constructor = target.constructor;
6514
6516
  let metaList = ReflectUtils.getOwnMetadata(ON_ATTRIBUTE_CHANGED_METADATA_KEY, constructor);
@@ -6575,25 +6577,26 @@ var dooboostoreSimpleWebComponent = (() => {
6575
6577
  const handleResult = (resolvedValue) => {
6576
6578
  if (resolvedValue !== void 0) {
6577
6579
  const win = this.ownerDocument?.defaultView || window;
6578
- const host2 = this;
6579
- const hostSet = { ...SwcUtils.getHelperAndHostSet(win, host2), $this: this };
6580
+ const host = this;
6581
+ const hostSet = { ...SwcUtils.getHelperAndHostSet(win, host), $this: this };
6580
6582
  const r = finalOptions.root || "auto";
6581
6583
  const targetEls = [];
6582
6584
  const applyRoot = (t) => {
6583
6585
  if (!t || !(t instanceof win.HTMLElement)) return;
6584
6586
  targetEls.push(t);
6585
6587
  };
6586
- if (selector === ":parentHost") applyRoot(hostSet.$parentHost);
6587
- else if (selector === ":appHost") applyRoot(hostSet.$appHost);
6588
- else if (selector === ":firstHost") applyRoot(hostSet.$firstHost);
6589
- else if (selector === ":lastHost") applyRoot(hostSet.$lastHost);
6590
- else if (selector === ":firstAppHost") applyRoot(hostSet.$firstAppHost);
6591
- else if (selector === ":lastAppHost") applyRoot(hostSet.$lastAppHost);
6592
- else if (selector === ":hosts") hostSet.$hosts.forEach(applyRoot);
6593
- else if (selector === ":appHosts") hostSet.$appHosts.forEach(applyRoot);
6594
- else if (selector === ":host" || !selector) applyRoot(host2);
6588
+ if (selector === "$this" || !selector) applyRoot(host);
6589
+ else if (selector === "$host") applyRoot(hostSet.$host);
6590
+ else if (selector === "$parentHost") applyRoot(hostSet.$parentHost);
6591
+ else if (selector === "$appHost") applyRoot(hostSet.$appHost);
6592
+ else if (selector === "$firstHost") applyRoot(hostSet.$firstHost);
6593
+ else if (selector === "$lastHost") applyRoot(hostSet.$lastHost);
6594
+ else if (selector === "$firstAppHost") applyRoot(hostSet.$firstAppHost);
6595
+ else if (selector === "$lastAppHost") applyRoot(hostSet.$lastAppHost);
6596
+ else if (selector === "$hosts") hostSet.$hosts.forEach(applyRoot);
6597
+ else if (selector === "$appHosts") hostSet.$appHosts.forEach(applyRoot);
6595
6598
  else {
6596
- const targetRoot = r === "auto" ? host2.shadowRoot || host2 : r === "shadow" ? host2.shadowRoot : host2;
6599
+ const targetRoot = r === "auto" ? host.shadowRoot || host : r === "shadow" ? host.shadowRoot : host;
6597
6600
  if (targetRoot) {
6598
6601
  const found = targetRoot.querySelectorAll(selector);
6599
6602
  if (found) targetEls.push(...Array.from(found));
@@ -6654,12 +6657,12 @@ var dooboostoreSimpleWebComponent = (() => {
6654
6657
  var setAttribute = (selector, nameOrOptions, options = {}) => createAttributeDecorator("set")(selector, nameOrOptions, options);
6655
6658
  var updateAttribute = (selector, nameOrOptions, options = {}) => createAttributeDecorator("update")(selector, nameOrOptions, options);
6656
6659
  var removeAttribute = (selector, nameOrOptions, options = {}) => createAttributeDecorator("remove")(selector, nameOrOptions, options);
6657
- function applyAttributeHost(action = "update", options = {}) {
6658
- return createAttributeDecorator(action)(":host", options);
6660
+ function applyAttributeThis(action = "update", options = {}) {
6661
+ return createAttributeDecorator(action)("$this", options);
6659
6662
  }
6660
- var setAttributeHost = (nameOrOptions, options = {}) => createAttributeDecorator("set")(":host", nameOrOptions, options);
6661
- var updateAttributeHost = (nameOrOptions, options = {}) => createAttributeDecorator("update")(":host", nameOrOptions, options);
6662
- var removeAttributeHost = (nameOrOptions, options = {}) => createAttributeDecorator("remove")(":host", nameOrOptions, options);
6663
+ var setAttributeThis = (nameOrOptions, options = {}) => createAttributeDecorator("set")("$this", nameOrOptions, options);
6664
+ var updateAttributeThis = (nameOrOptions, options = {}) => createAttributeDecorator("update")("$this", nameOrOptions, options);
6665
+ var removeAttributeThis = (nameOrOptions, options = {}) => createAttributeDecorator("remove")("$this", nameOrOptions, options);
6663
6666
  var findAllAttributeApplyMetadata = (target) => {
6664
6667
  const result = /* @__PURE__ */ new Map();
6665
6668
  const maps = ReflectUtils.findAllMetadata(ATTRIBUTE_APPLY_METADATA_KEY, target);
@@ -6704,26 +6707,28 @@ var dooboostoreSimpleWebComponent = (() => {
6704
6707
  return t;
6705
6708
  };
6706
6709
  const hostSet = SwcUtils.getHostSet(this);
6707
- if (selector === ":parentHost")
6710
+ if (selector === "$this")
6711
+ return applyRoot(this);
6712
+ if (selector === "$host")
6713
+ return applyRoot(hostSet.$host);
6714
+ if (selector === "$parentHost")
6708
6715
  return applyRoot(hostSet.$parentHost);
6709
- if (selector === ":appHost")
6716
+ if (selector === "$appHost")
6710
6717
  return applyRoot(hostSet.$appHost);
6711
- if (selector === ":firstHost")
6718
+ if (selector === "$firstHost")
6712
6719
  return applyRoot(hostSet.$firstHost);
6713
- if (selector === ":lastHost")
6720
+ if (selector === "$lastHost")
6714
6721
  return applyRoot(hostSet.$lastHost);
6715
- if (selector === ":firstAppHost")
6722
+ if (selector === "$firstAppHost")
6716
6723
  return applyRoot(hostSet.$firstAppHost);
6717
- if (selector === ":lastAppHost")
6724
+ if (selector === "$lastAppHost")
6718
6725
  return applyRoot(hostSet.$lastAppHost);
6719
6726
  const config = getElementConfig(this);
6720
6727
  const win = config?.window || window;
6721
- if (selector === ":window")
6728
+ if (selector === "$window")
6722
6729
  return win;
6723
- if (selector === ":document")
6730
+ if (selector === "$document")
6724
6731
  return win.document;
6725
- if (selector === ":host")
6726
- return applyRoot(this);
6727
6732
  if (r === "shadow")
6728
6733
  return this.shadowRoot ? this.shadowRoot.querySelector(selector) : null;
6729
6734
  if (r === "light")
@@ -6738,7 +6743,7 @@ var dooboostoreSimpleWebComponent = (() => {
6738
6743
  ensureInit(this);
6739
6744
  if (nv === null || nv === void 0) {
6740
6745
  const selector = selectorOrTarget;
6741
- if (selector.startsWith(":") && selector !== ":host")
6746
+ if (selector.startsWith("$") && selector !== "$this")
6742
6747
  return;
6743
6748
  const r = options.root || "auto";
6744
6749
  const targets = [];
@@ -6766,75 +6771,54 @@ var dooboostoreSimpleWebComponent = (() => {
6766
6771
  });
6767
6772
  };
6768
6773
  }
6769
- function queryHost(targetOrOptions, propertyKey) {
6770
- if (propertyKey !== void 0 && (typeof propertyKey === "string" || typeof propertyKey === "symbol")) {
6771
- return query(":host", {})(targetOrOptions, propertyKey);
6772
- }
6773
- if (typeof targetOrOptions === "object" && targetOrOptions !== null) {
6774
- return query(":host", targetOrOptions);
6775
- } else {
6776
- return query(":host", {});
6777
- }
6778
- }
6779
- var host = queryHost;
6780
- function parentHost(targetOrOptions, propertyKey) {
6781
- if (propertyKey !== void 0 && (typeof propertyKey === "string" || typeof propertyKey === "symbol")) {
6782
- return query(":parentHost", {})(targetOrOptions, propertyKey);
6783
- }
6784
- if (typeof targetOrOptions === "object" && targetOrOptions !== null) {
6785
- return query(":parentHost", targetOrOptions);
6786
- } else {
6787
- return query(":parentHost", {});
6788
- }
6789
- }
6790
- function appHost(targetOrOptions, propertyKey) {
6774
+ function queryThis(targetOrOptions, propertyKey) {
6791
6775
  if (propertyKey !== void 0 && (typeof propertyKey === "string" || typeof propertyKey === "symbol")) {
6792
- return query(":appHost", {})(targetOrOptions, propertyKey);
6776
+ return query("$this", {})(targetOrOptions, propertyKey);
6793
6777
  }
6794
6778
  if (typeof targetOrOptions === "object" && targetOrOptions !== null) {
6795
- return query(":appHost", targetOrOptions);
6779
+ return query("$this", targetOrOptions);
6796
6780
  } else {
6797
- return query(":appHost", {});
6781
+ return query("$this", {});
6798
6782
  }
6799
6783
  }
6800
- function firstHost(targetOrOptions, propertyKey) {
6784
+ function queryWindow(targetOrOptions, propertyKey) {
6801
6785
  if (propertyKey !== void 0 && (typeof propertyKey === "string" || typeof propertyKey === "symbol")) {
6802
- return query(":firstHost", {})(targetOrOptions, propertyKey);
6786
+ return query("$window", {})(targetOrOptions, propertyKey);
6803
6787
  }
6804
6788
  if (typeof targetOrOptions === "object" && targetOrOptions !== null) {
6805
- return query(":firstHost", targetOrOptions);
6789
+ return query("$window", targetOrOptions);
6806
6790
  } else {
6807
- return query(":firstHost", {});
6791
+ return query("$window", {});
6808
6792
  }
6809
6793
  }
6810
- function lastHost(targetOrOptions, propertyKey) {
6794
+ function queryDocument(targetOrOptions, propertyKey) {
6811
6795
  if (propertyKey !== void 0 && (typeof propertyKey === "string" || typeof propertyKey === "symbol")) {
6812
- return query(":lastHost", {})(targetOrOptions, propertyKey);
6796
+ return query("$document", {})(targetOrOptions, propertyKey);
6813
6797
  }
6814
6798
  if (typeof targetOrOptions === "object" && targetOrOptions !== null) {
6815
- return query(":lastHost", targetOrOptions);
6799
+ return query("$document", targetOrOptions);
6816
6800
  } else {
6817
- return query(":lastHost", {});
6801
+ return query("$document", {});
6818
6802
  }
6819
6803
  }
6820
- function firstAppHost(targetOrOptions, propertyKey) {
6804
+ function queryHost(targetOrOptions, propertyKey) {
6821
6805
  if (propertyKey !== void 0 && (typeof propertyKey === "string" || typeof propertyKey === "symbol")) {
6822
- return query(":firstAppHost", {})(targetOrOptions, propertyKey);
6806
+ return query("$host", {})(targetOrOptions, propertyKey);
6823
6807
  }
6824
6808
  if (typeof targetOrOptions === "object" && targetOrOptions !== null) {
6825
- return query(":firstAppHost", targetOrOptions);
6809
+ return query("$host", targetOrOptions);
6826
6810
  } else {
6827
- return query(":firstAppHost", {});
6811
+ return query("$host", {});
6828
6812
  }
6829
6813
  }
6830
- function lastAppHost(targetOrOptions, propertyKey) {
6814
+ function queryAppHost(targetOrOptions, propertyKey) {
6831
6815
  if (propertyKey !== void 0 && (typeof propertyKey === "string" || typeof propertyKey === "symbol")) {
6832
- return query(":lastAppHost", {})(targetOrOptions, propertyKey);
6816
+ return query("$appHost", {})(targetOrOptions, propertyKey);
6833
6817
  }
6834
6818
  if (typeof targetOrOptions === "object" && targetOrOptions !== null) {
6835
- return query(":lastAppHost", targetOrOptions);
6819
+ return query("$appHost", targetOrOptions);
6836
6820
  } else {
6837
- return query(":lastAppHost", {});
6821
+ return query("$appHost", {});
6838
6822
  }
6839
6823
  }
6840
6824
  var getQueryMetadata = (target) => {
@@ -6883,17 +6867,31 @@ var dooboostoreSimpleWebComponent = (() => {
6883
6867
  return results;
6884
6868
  };
6885
6869
  const hostSet = SwcUtils.getHostSet(this);
6886
- if (selector === ":hosts")
6870
+ if (selector === "$hosts")
6887
6871
  return applyRoot(hostSet.$hosts);
6888
- if (selector === ":appHosts")
6872
+ if (selector === "$appHosts")
6889
6873
  return applyRoot(hostSet.$appHosts);
6874
+ if (selector === "$host")
6875
+ return applyRoot(hostSet.$host);
6876
+ if (selector === "$parentHost")
6877
+ return applyRoot(hostSet.$parentHost);
6878
+ if (selector === "$appHost")
6879
+ return applyRoot(hostSet.$appHost);
6880
+ if (selector === "$firstHost")
6881
+ return applyRoot(hostSet.$firstHost);
6882
+ if (selector === "$lastHost")
6883
+ return applyRoot(hostSet.$lastHost);
6884
+ if (selector === "$firstAppHost")
6885
+ return applyRoot(hostSet.$firstAppHost);
6886
+ if (selector === "$lastAppHost")
6887
+ return applyRoot(hostSet.$lastAppHost);
6890
6888
  const config = getElementConfig(this);
6891
6889
  const win = config?.window || window;
6892
- if (selector === ":window")
6890
+ if (selector === "$window")
6893
6891
  return [win];
6894
- if (selector === ":document")
6892
+ if (selector === "$document")
6895
6893
  return [win.document];
6896
- if (selector === ":host")
6894
+ if (selector === "$this")
6897
6895
  return applyRoot(this);
6898
6896
  if (r === "shadow")
6899
6897
  return this.shadowRoot ? Array.from(this.shadowRoot.querySelectorAll(selector)) : [];
@@ -6911,7 +6909,7 @@ var dooboostoreSimpleWebComponent = (() => {
6911
6909
  ensureInit(this);
6912
6910
  if (nv === null || nv === void 0 || Array.isArray(nv) && nv.length === 0) {
6913
6911
  const selector = selectorOrTarget;
6914
- if (selector.startsWith(":") && selector !== ":host")
6912
+ if (selector.startsWith("$") && selector !== "$this")
6915
6913
  return;
6916
6914
  const r = options.root || "auto";
6917
6915
  let targets = [];
@@ -6934,75 +6932,34 @@ var dooboostoreSimpleWebComponent = (() => {
6934
6932
  });
6935
6933
  };
6936
6934
  }
6937
- function queryAllHost(targetOrOptions, propertyKey) {
6935
+ function queryAllThis(targetOrOptions, propertyKey) {
6938
6936
  if (propertyKey !== void 0 && (typeof propertyKey === "string" || typeof propertyKey === "symbol")) {
6939
- return queryAll(":host", {})(targetOrOptions, propertyKey);
6937
+ return queryAll("$this", {})(targetOrOptions, propertyKey);
6940
6938
  }
6941
6939
  if (typeof targetOrOptions === "object" && targetOrOptions !== null) {
6942
- return queryAll(":host", targetOrOptions);
6940
+ return queryAll("$this", targetOrOptions);
6943
6941
  } else {
6944
- return queryAll(":host", {});
6942
+ return queryAll("$this", {});
6945
6943
  }
6946
6944
  }
6947
- var allHost = queryAllHost;
6948
6945
  function allParentHost(targetOrOptions, propertyKey) {
6949
6946
  if (propertyKey !== void 0 && (typeof propertyKey === "string" || typeof propertyKey === "symbol")) {
6950
- return queryAll(":parentHost", {})(targetOrOptions, propertyKey);
6947
+ return queryAll("$host", {})(targetOrOptions, propertyKey);
6951
6948
  }
6952
6949
  if (typeof targetOrOptions === "object" && targetOrOptions !== null) {
6953
- return queryAll(":parentHost", targetOrOptions);
6950
+ return queryAll("$host", targetOrOptions);
6954
6951
  } else {
6955
- return queryAll(":parentHost", {});
6952
+ return queryAll("$host", {});
6956
6953
  }
6957
6954
  }
6958
6955
  function allAppHost(targetOrOptions, propertyKey) {
6959
6956
  if (propertyKey !== void 0 && (typeof propertyKey === "string" || typeof propertyKey === "symbol")) {
6960
- return queryAll(":appHost", {})(targetOrOptions, propertyKey);
6961
- }
6962
- if (typeof targetOrOptions === "object" && targetOrOptions !== null) {
6963
- return queryAll(":appHost", targetOrOptions);
6964
- } else {
6965
- return queryAll(":appHost", {});
6966
- }
6967
- }
6968
- function allFirstHost(targetOrOptions, propertyKey) {
6969
- if (propertyKey !== void 0 && (typeof propertyKey === "string" || typeof propertyKey === "symbol")) {
6970
- return queryAll(":firstHost", {})(targetOrOptions, propertyKey);
6971
- }
6972
- if (typeof targetOrOptions === "object" && targetOrOptions !== null) {
6973
- return queryAll(":firstHost", targetOrOptions);
6974
- } else {
6975
- return queryAll(":firstHost", {});
6976
- }
6977
- }
6978
- function allLastHost(targetOrOptions, propertyKey) {
6979
- if (propertyKey !== void 0 && (typeof propertyKey === "string" || typeof propertyKey === "symbol")) {
6980
- return queryAll(":lastHost", {})(targetOrOptions, propertyKey);
6981
- }
6982
- if (typeof targetOrOptions === "object" && targetOrOptions !== null) {
6983
- return queryAll(":lastHost", targetOrOptions);
6984
- } else {
6985
- return queryAll(":lastHost", {});
6986
- }
6987
- }
6988
- function allFirstAppHost(targetOrOptions, propertyKey) {
6989
- if (propertyKey !== void 0 && (typeof propertyKey === "string" || typeof propertyKey === "symbol")) {
6990
- return queryAll(":firstAppHost", {})(targetOrOptions, propertyKey);
6991
- }
6992
- if (typeof targetOrOptions === "object" && targetOrOptions !== null) {
6993
- return queryAll(":firstAppHost", targetOrOptions);
6994
- } else {
6995
- return queryAll(":firstAppHost", {});
6996
- }
6997
- }
6998
- function allLastAppHost(targetOrOptions, propertyKey) {
6999
- if (propertyKey !== void 0 && (typeof propertyKey === "string" || typeof propertyKey === "symbol")) {
7000
- return queryAll(":lastAppHost", {})(targetOrOptions, propertyKey);
6957
+ return queryAll("$appHost", {})(targetOrOptions, propertyKey);
7001
6958
  }
7002
6959
  if (typeof targetOrOptions === "object" && targetOrOptions !== null) {
7003
- return queryAll(":lastAppHost", targetOrOptions);
6960
+ return queryAll("$appHost", targetOrOptions);
7004
6961
  } else {
7005
- return queryAll(":lastAppHost", {});
6962
+ return queryAll("$appHost", {});
7006
6963
  }
7007
6964
  }
7008
6965
  var getQueryAllMetadata = (target) => {
@@ -7912,7 +7869,7 @@ var dooboostoreSimpleWebComponent = (() => {
7912
7869
  });
7913
7870
  }
7914
7871
  const hostSet = SwcUtils.getHostSet(inst);
7915
- const appHosts = SwcUtils.findAllParentAppHostsDirect(inst);
7872
+ const appHosts = SwcUtils.findAllAppHostsIncludingSelfDirect(inst);
7916
7873
  inst._executeSwcScript?.("swc-on-constructor", hostSet);
7917
7874
  const cMethods = findAllLifecycleMetadata(inst, ON_INITIALIZE_METADATA_KEY);
7918
7875
  if (cMethods) {
@@ -7930,9 +7887,9 @@ var dooboostoreSimpleWebComponent = (() => {
7930
7887
  if (!(node instanceof HTMLElement)) continue;
7931
7888
  const script = node.getAttribute?.(attrName);
7932
7889
  if (script && !getElementConfig(node)) {
7933
- const host2 = SwcUtils.findNearestSwcHost(node);
7934
- if (host2 && host2.isConnected && typeof host2.__swc_executeAttributeEvent === "function") {
7935
- await host2.__swc_executeAttributeEvent(node, attrName, script, event);
7890
+ const host = SwcUtils.findNearestSwcHostIncludingSelf(node);
7891
+ if (host && host.isConnected && typeof host.__swc_executeAttributeEvent === "function") {
7892
+ await host.__swc_executeAttributeEvent(node, attrName, script, event);
7936
7893
  event.__swc_handled = true;
7937
7894
  break;
7938
7895
  }
@@ -7974,7 +7931,7 @@ var dooboostoreSimpleWebComponent = (() => {
7974
7931
  proto._resolveWindow = function(localConfig) {
7975
7932
  ensureInit(this);
7976
7933
  if (localConfig?.window) return localConfig.window;
7977
- const ancestors = SwcUtils.findAllSwcHosts(this);
7934
+ const ancestors = SwcUtils.findAllSwcHostsIncludingSelf(this);
7978
7935
  for (let i = ancestors.length - 1; i >= 0; i--) {
7979
7936
  const aConf = getElementConfig(ancestors[i]);
7980
7937
  if (aConf?.window) return aConf.window;
@@ -8078,7 +8035,7 @@ var dooboostoreSimpleWebComponent = (() => {
8078
8035
  metadata.extends = extendsTagName;
8079
8036
  }
8080
8037
  const emitCustomEventList = getEmitCustomEventMetadataList(constructor) || [];
8081
- const emitHostCustomEventList = emitCustomEventList.filter((meta) => meta.selector === ":host" || meta.selector === "");
8038
+ const emitHostCustomEventList = emitCustomEventList.filter((meta) => meta.selector === "$this" || meta.selector === "");
8082
8039
  const addEventListenerList = getAddEventListenerMetadata(constructor) || [];
8083
8040
  const attrChangeMap = findAllAttributeChangedMetadata(constructor);
8084
8041
  const attributeList = findAllAttributeMetadata(constructor);
@@ -8086,7 +8043,7 @@ var dooboostoreSimpleWebComponent = (() => {
8086
8043
  const swcLifecycleAttributes = ["swc-on-constructor", "swc-on-connected", "swc-on-disconnected", "swc-on-before-connected", "swc-on-after-connected", "swc-on-before-disconnected", "swc-on-after-disconnected", "swc-on-before-adopted", "swc-on-after-adopted", "swc-on-attribute-changed"];
8087
8044
  const swcOnEvents = DOM_EVENT_NAMES.map((e) => `swc-on-${e}`);
8088
8045
  const attributeApplyNames = Array.from(applyAttributeMap.values()).map((it) => it.options.name).filter(Boolean);
8089
- const hostAttributes = attributeList.filter((it) => it.selector === ":host").map((it) => it.options.name || String(it.propertyKey));
8046
+ const hostAttributes = attributeList.filter((it) => it.selector === "$this").map((it) => it.options.name || String(it.propertyKey));
8090
8047
  const originalStaticObservedAttributes = constructor.observedAttributes ?? [];
8091
8048
  const mergedObservedAttributes = [.../* @__PURE__ */ new Set([...metadata.observedAttributes ?? [], ...originalStaticObservedAttributes, ...attrChangeMap.keys(), ...attributeApplyNames, ...hostAttributes, ...emitHostCustomEventList.map((it) => it.options.attributeName).filter(Boolean), ...swcLifecycleAttributes, ...swcOnEvents])];
8092
8049
  const connectedInnerHtmlList = getOnConnectedInnerHtmlMetadata(constructor) || [];
@@ -8097,13 +8054,13 @@ var dooboostoreSimpleWebComponent = (() => {
8097
8054
  proto.connectedCallback = async function() {
8098
8055
  ensureInit(this);
8099
8056
  helperHostSet = SwcUtils.getHelperAndHostSet(win, this);
8100
- const appHost2 = helperHostSet.$appHost;
8057
+ const appHost = helperHostSet.$appHost;
8101
8058
  try {
8102
- if (appHost2 && typeof appHost2._connected === "function") {
8103
- await appHost2._connected(this);
8104
- } else if (appHost2 && typeof appHost2) {
8105
- appHost2._connected_safari ?? (appHost2._connected_safari = []);
8106
- appHost2._connected_safari.push(this);
8059
+ if (appHost && typeof appHost._connected === "function") {
8060
+ await appHost._connected(this);
8061
+ } else if (appHost && typeof appHost) {
8062
+ appHost._connected_safari ?? (appHost._connected_safari = []);
8063
+ appHost._connected_safari.push(this);
8107
8064
  }
8108
8065
  const conf = getElementConfig(this);
8109
8066
  const currentWin = this._resolveWindow(conf);
@@ -8172,7 +8129,7 @@ var dooboostoreSimpleWebComponent = (() => {
8172
8129
  const delegateListeners = [];
8173
8130
  const nonDelegateListeners = [];
8174
8131
  addEventListenerList.forEach((meta) => {
8175
- if (meta.options.delegate && meta.selector !== ":window" && meta.selector !== ":document" && meta.selector !== ":parentHost" && meta.selector !== ":appHost" && meta.selector !== ":firstHost" && meta.selector !== ":lastHost" && meta.selector !== ":firstAppHost" && meta.selector !== ":lastAppHost" && meta.selector !== ":hosts" && meta.selector !== ":appHosts" && meta.selector !== ":host" && meta.selector !== "") {
8132
+ if (meta.options.delegate && meta.selector !== "$window" && meta.selector !== "$document" && meta.selector !== "$host" && meta.selector !== "$appHost" && meta.selector !== "$firstHost" && meta.selector !== "$lastHost" && meta.selector !== "$firstAppHost" && meta.selector !== "$lastAppHost" && meta.selector !== "$hosts" && meta.selector !== "$appHosts" && meta.selector !== "$this" && meta.selector !== "") {
8176
8133
  delegateListeners.push(meta);
8177
8134
  } else {
8178
8135
  nonDelegateListeners.push(meta);
@@ -8244,17 +8201,18 @@ var dooboostoreSimpleWebComponent = (() => {
8244
8201
  if ((r === "shadow" || r === "all") && target.shadowRoot) bindTargets.push(target.shadowRoot);
8245
8202
  }
8246
8203
  };
8247
- if (selector === ":window") bindTargets.push(currentWin);
8248
- else if (selector === ":document") bindTargets.push(currentWin.document);
8249
- else if (selector === ":parentHost") applyRootOption(helperHostSet.$parentHost);
8250
- else if (selector === ":appHost") applyRootOption(helperHostSet.$appHost);
8251
- else if (selector === ":firstHost") applyRootOption(helperHostSet.$firstHost);
8252
- else if (selector === ":lastHost") applyRootOption(helperHostSet.$lastHost);
8253
- else if (selector === ":firstAppHost") applyRootOption(helperHostSet.$firstAppHost);
8254
- else if (selector === ":lastAppHost") applyRootOption(helperHostSet.$lastAppHost);
8255
- else if (selector === ":hosts") helperHostSet.$hosts.forEach(applyRootOption);
8256
- else if (selector === ":appHosts") helperHostSet.$appHosts.forEach(applyRootOption);
8257
- else if (selector === ":host" || !selector) applyRootOption(this);
8204
+ if (selector === "$window") bindTargets.push(currentWin);
8205
+ else if (selector === "$document") bindTargets.push(currentWin.document);
8206
+ else if (selector === "$host") applyRootOption(helperHostSet.$host);
8207
+ else if (selector === "$parentHost") applyRootOption(helperHostSet.$parentHost);
8208
+ else if (selector === "$appHost") applyRootOption(helperHostSet.$appHost);
8209
+ else if (selector === "$firstHost") applyRootOption(helperHostSet.$firstHost);
8210
+ else if (selector === "$lastHost") applyRootOption(helperHostSet.$lastHost);
8211
+ else if (selector === "$firstAppHost") applyRootOption(helperHostSet.$firstAppHost);
8212
+ else if (selector === "$lastAppHost") applyRootOption(helperHostSet.$lastAppHost);
8213
+ else if (selector === "$hosts") helperHostSet.$hosts.forEach(applyRootOption);
8214
+ else if (selector === "$appHosts") helperHostSet.$appHosts.forEach(applyRootOption);
8215
+ else if (selector === "$this" || !selector) applyRootOption(this);
8258
8216
  else {
8259
8217
  const searchRoots = [];
8260
8218
  if (r === "auto") searchRoots.push(this.shadowRoot || this);
@@ -8308,17 +8266,17 @@ var dooboostoreSimpleWebComponent = (() => {
8308
8266
  }
8309
8267
  }
8310
8268
  } finally {
8311
- if (appHost2 && typeof appHost2._connectedDone === "function") {
8312
- await appHost2._connectedDone(this);
8269
+ if (appHost && typeof appHost._connectedDone === "function") {
8270
+ await appHost._connectedDone(this);
8313
8271
  }
8314
8272
  }
8315
8273
  };
8316
8274
  const originalDisconnected = proto.disconnectedCallback;
8317
8275
  proto.disconnectedCallback = function() {
8318
8276
  console.log("disconnnnnnnnnnnnnnnnnnn", helperHostSet, this);
8319
- const appHost2 = helperHostSet.$appHost;
8320
- if (appHost2 && typeof appHost2._disconnected === "function") {
8321
- appHost2._disconnected(this);
8277
+ const appHost = helperHostSet.$appHost;
8278
+ if (appHost && typeof appHost._disconnected === "function") {
8279
+ appHost._disconnected(this);
8322
8280
  }
8323
8281
  this._executeSwcScript("swc-on-before-disconnected", helperHostSet);
8324
8282
  const bMethods = findAllLifecycleMetadata(this, ON_BEFORE_DISCONNECTED_METADATA_KEY);
@@ -8458,20 +8416,21 @@ var dooboostoreSimpleWebComponent = (() => {
8458
8416
  if ((r === "shadow" || r === "all") && target.shadowRoot) results.push(target.shadowRoot);
8459
8417
  }
8460
8418
  };
8461
- if (selector === ":host" || !selector) {
8419
+ if (selector === "$this" || !selector) {
8462
8420
  applyRoot(inst);
8463
- } else if (selector === ":window") {
8421
+ } else if (selector === "$window") {
8464
8422
  results.push(currentWin);
8465
- } else if (selector === ":document") {
8423
+ } else if (selector === "$document") {
8466
8424
  results.push(currentWin.document);
8467
8425
  } else {
8468
8426
  const hostSet = SwcUtils.getHostSet(inst);
8469
- if (selector === ":parentHost") applyRoot(hostSet.$parentHost);
8470
- else if (selector === ":appHost") applyRoot(hostSet.$appHost);
8471
- else if (selector === ":firstHost") applyRoot(hostSet.$firstHost);
8472
- else if (selector === ":lastHost") applyRoot(hostSet.$lastHost);
8473
- else if (selector === ":firstAppHost") applyRoot(hostSet.$firstAppHost);
8474
- else if (selector === ":lastAppHost") applyRoot(hostSet.$lastAppHost);
8427
+ if (selector === "$host") applyRoot(hostSet.$host);
8428
+ else if (selector === "$parentHost") applyRoot(hostSet.$parentHost);
8429
+ else if (selector === "$appHost") applyRoot(hostSet.$appHost);
8430
+ else if (selector === "$firstHost") applyRoot(hostSet.$firstHost);
8431
+ else if (selector === "$lastHost") applyRoot(hostSet.$lastHost);
8432
+ else if (selector === "$firstAppHost") applyRoot(hostSet.$firstAppHost);
8433
+ else if (selector === "$lastAppHost") applyRoot(hostSet.$lastAppHost);
8475
8434
  else {
8476
8435
  if (r === "shadow") {
8477
8436
  const found = inst.shadowRoot?.querySelectorAll(selector);
@@ -8543,22 +8502,22 @@ var dooboostoreSimpleWebComponent = (() => {
8543
8502
  }
8544
8503
  };
8545
8504
  }
8546
- function attributeHost(targetOrAttrOrOptions, propertyKeyOrOptions) {
8505
+ function attributeThis(targetOrAttrOrOptions, propertyKeyOrOptions) {
8547
8506
  if (propertyKeyOrOptions !== void 0 && (typeof propertyKeyOrOptions === "string" || typeof propertyKeyOrOptions === "symbol")) {
8548
- return attribute(":host", { name: String(propertyKeyOrOptions) })(targetOrAttrOrOptions, propertyKeyOrOptions);
8507
+ return attribute("$this", { name: String(propertyKeyOrOptions) })(targetOrAttrOrOptions, propertyKeyOrOptions);
8549
8508
  }
8550
8509
  if (typeof targetOrAttrOrOptions === "string") {
8551
8510
  const attrName = targetOrAttrOrOptions;
8552
8511
  const options = typeof propertyKeyOrOptions === "object" ? propertyKeyOrOptions : {};
8553
- return attribute(":host", { ...options, name: attrName });
8512
+ return attribute("$this", { ...options, name: attrName });
8554
8513
  } else if (typeof targetOrAttrOrOptions === "object") {
8555
8514
  const options = targetOrAttrOrOptions;
8556
8515
  return (target, propertyKey) => {
8557
- return attribute(":host", { ...options, name: String(propertyKey) })(target, propertyKey);
8516
+ return attribute("$this", { ...options, name: String(propertyKey) })(target, propertyKey);
8558
8517
  };
8559
8518
  } else {
8560
8519
  return (target, propertyKey) => {
8561
- return attribute(":host", { name: String(propertyKey) })(target, propertyKey);
8520
+ return attribute("$this", { name: String(propertyKey) })(target, propertyKey);
8562
8521
  };
8563
8522
  }
8564
8523
  }
@@ -8627,11 +8586,12 @@ var dooboostoreSimpleWebComponent = (() => {
8627
8586
  if (r === "all") return t.shadowRoot || t;
8628
8587
  return t;
8629
8588
  };
8630
- if (selector === ":host") return applyRoot(this);
8631
- if (selector === ":parentHost") return applyRoot(hostSet.$parentHost);
8632
- if (selector === ":appHost") return applyRoot(hostSet.$appHost);
8633
- if (selector === ":firstHost") return applyRoot(hostSet.$firstHost);
8634
- if (selector === ":lastHost") return applyRoot(hostSet.$lastHost);
8589
+ if (selector === "$this") return applyRoot(this);
8590
+ if (selector === "$host") return applyRoot(hostSet.$host);
8591
+ if (selector === "$parentHost") return applyRoot(hostSet.$parentHost);
8592
+ if (selector === "$appHost") return applyRoot(hostSet.$appHost);
8593
+ if (selector === "$firstHost") return applyRoot(hostSet.$firstHost);
8594
+ if (selector === "$lastHost") return applyRoot(hostSet.$lastHost);
8635
8595
  const targetRoot = applyRoot(this);
8636
8596
  return targetRoot ? targetRoot.querySelector(selector) : null;
8637
8597
  };
@@ -8669,20 +8629,20 @@ var dooboostoreSimpleWebComponent = (() => {
8669
8629
  });
8670
8630
  return result;
8671
8631
  };
8672
- function applyNodeHost(targetOrOptions, propertyKey, descriptor) {
8673
- if (propertyKey !== void 0) return applyNode(":host", { position: "beforeEnd" })(targetOrOptions, propertyKey, descriptor);
8632
+ function applyNodeThis(targetOrOptions, propertyKey, descriptor) {
8633
+ if (propertyKey !== void 0) return applyNode("$this", { position: "beforeEnd" })(targetOrOptions, propertyKey, descriptor);
8674
8634
  const opt = targetOrOptions || {};
8675
- return applyNode(":host", { position: "beforeEnd", ...opt });
8635
+ return applyNode("$this", { position: "beforeEnd", ...opt });
8676
8636
  }
8677
- function applyReplaceChildrenNodeHost(targetOrOptions, propertyKey, descriptor) {
8678
- if (propertyKey !== void 0) return applyNode(":host", { position: "replaceChildren" })(targetOrOptions, propertyKey, descriptor);
8637
+ function applyReplaceChildrenNodeThis(targetOrOptions, propertyKey, descriptor) {
8638
+ if (propertyKey !== void 0) return applyNode("$this", { position: "replaceChildren" })(targetOrOptions, propertyKey, descriptor);
8679
8639
  const opt = targetOrOptions || {};
8680
- return applyNode(":host", { position: "replaceChildren", ...opt });
8640
+ return applyNode("$this", { position: "replaceChildren", ...opt });
8681
8641
  }
8682
- function applyInnerHtmlNodeHost(targetOrOptions, propertyKey, descriptor) {
8683
- if (propertyKey !== void 0) return applyNode(":host", { position: "innerHtml" })(targetOrOptions, propertyKey, descriptor);
8642
+ function applyInnerHtmlNodeThis(targetOrOptions, propertyKey, descriptor) {
8643
+ if (propertyKey !== void 0) return applyNode("$this", { position: "innerHtml" })(targetOrOptions, propertyKey, descriptor);
8684
8644
  const opt = targetOrOptions || {};
8685
- return applyNode(":host", { position: "innerHtml", ...opt });
8645
+ return applyNode("$this", { position: "innerHtml", ...opt });
8686
8646
  }
8687
8647
  function applyReplaceChildrenNode(selector, options = {}) {
8688
8648
  return applyNode(selector, { ...options, position: "replaceChildren" });
@@ -8720,25 +8680,26 @@ var dooboostoreSimpleWebComponent = (() => {
8720
8680
  const handleResult = (resolvedValue) => {
8721
8681
  if (resolvedValue !== void 0) {
8722
8682
  const win = this.ownerDocument?.defaultView || window;
8723
- const host2 = this;
8724
- const hostSet = { ...SwcUtils.getHelperAndHostSet(win, host2), $this: this };
8683
+ const host = this;
8684
+ const hostSet = { ...SwcUtils.getHelperAndHostSet(win, host), $this: this };
8725
8685
  const r = finalOptions.root || "auto";
8726
8686
  const targetEls = [];
8727
8687
  const applyRoot = (t) => {
8728
8688
  if (!t || !(t instanceof win.HTMLElement)) return;
8729
8689
  targetEls.push(t);
8730
8690
  };
8731
- if (selector === ":parentHost") applyRoot(hostSet.$parentHost);
8732
- else if (selector === ":appHost") applyRoot(hostSet.$appHost);
8733
- else if (selector === ":firstHost") applyRoot(hostSet.$firstHost);
8734
- else if (selector === ":lastHost") applyRoot(hostSet.$lastHost);
8735
- else if (selector === ":firstAppHost") applyRoot(hostSet.$firstAppHost);
8736
- else if (selector === ":lastAppHost") applyRoot(hostSet.$lastAppHost);
8737
- else if (selector === ":hosts") hostSet.$hosts.forEach(applyRoot);
8738
- else if (selector === ":appHosts") hostSet.$appHosts.forEach(applyRoot);
8739
- else if (selector === ":host" || !selector) applyRoot(host2);
8691
+ if (selector === "$this" || !selector) applyRoot(host);
8692
+ else if (selector === "$host") applyRoot(hostSet.$host);
8693
+ else if (selector === "$parentHost") applyRoot(hostSet.$parentHost);
8694
+ else if (selector === "$appHost") applyRoot(hostSet.$appHost);
8695
+ else if (selector === "$firstHost") applyRoot(hostSet.$firstHost);
8696
+ else if (selector === "$lastHost") applyRoot(hostSet.$lastHost);
8697
+ else if (selector === "$firstAppHost") applyRoot(hostSet.$firstAppHost);
8698
+ else if (selector === "$lastAppHost") applyRoot(hostSet.$lastAppHost);
8699
+ else if (selector === "$hosts") hostSet.$hosts.forEach(applyRoot);
8700
+ else if (selector === "$appHosts") hostSet.$appHosts.forEach(applyRoot);
8740
8701
  else {
8741
- const targetRoot = r === "auto" ? host2.shadowRoot || host2 : r === "shadow" ? host2.shadowRoot : host2;
8702
+ const targetRoot = r === "auto" ? host.shadowRoot || host : r === "shadow" ? host.shadowRoot : host;
8742
8703
  if (targetRoot) {
8743
8704
  const found = targetRoot.querySelectorAll(selector);
8744
8705
  if (found) targetEls.push(...Array.from(found));
@@ -8812,14 +8773,14 @@ var dooboostoreSimpleWebComponent = (() => {
8812
8773
  var addClass = (selector, classMapOrOptions, options = {}) => createClassDecorator("add")(selector, classMapOrOptions, options);
8813
8774
  var removeClass = (selector, classMapOrOptions, options = {}) => createClassDecorator("remove")(selector, classMapOrOptions, options);
8814
8775
  var toggleClass = (selector, classMapOrOptions, options = {}) => createClassDecorator("toggle")(selector, classMapOrOptions, options);
8815
- function applyClassHost(action = "update", options = {}) {
8816
- return createClassDecorator(action)(":host", options);
8776
+ function applyClassThis(action = "update", options = {}) {
8777
+ return createClassDecorator(action)("$this", options);
8817
8778
  }
8818
- var setClassHost = (classMapOrOptions, options = {}) => createClassDecorator("set")(":host", classMapOrOptions, options);
8819
- var updateClassHost = (classMapOrOptions, options = {}) => createClassDecorator("update")(":host", classMapOrOptions, options);
8820
- var addClassHost = (classMapOrOptions, options = {}) => createClassDecorator("add")(":host", classMapOrOptions, options);
8821
- var removeClassHost = (classMapOrOptions, options = {}) => createClassDecorator("remove")(":host", classMapOrOptions, options);
8822
- var toggleClassHost = (classMapOrOptions, options = {}) => createClassDecorator("toggle")(":host", classMapOrOptions, options);
8779
+ var setClassThis = (classMapOrOptions, options = {}) => createClassDecorator("set")("$this", classMapOrOptions, options);
8780
+ var updateClassThis = (classMapOrOptions, options = {}) => createClassDecorator("update")("$this", classMapOrOptions, options);
8781
+ var addClassThis = (classMapOrOptions, options = {}) => createClassDecorator("add")("$this", classMapOrOptions, options);
8782
+ var removeClassThis = (classMapOrOptions, options = {}) => createClassDecorator("remove")("$this", classMapOrOptions, options);
8783
+ var toggleClassThis = (classMapOrOptions, options = {}) => createClassDecorator("toggle")("$this", classMapOrOptions, options);
8823
8784
  var findAllClassMetadata = (target) => {
8824
8785
  const result = /* @__PURE__ */ new Map();
8825
8786
  const maps = ReflectUtils.findAllMetadata(CLASS_METADATA_KEY, target);
@@ -8850,25 +8811,26 @@ var dooboostoreSimpleWebComponent = (() => {
8850
8811
  const handleResult = (resolvedValue) => {
8851
8812
  if (resolvedValue !== void 0) {
8852
8813
  const win = this.ownerDocument?.defaultView || window;
8853
- const host2 = this;
8854
- const hostSet = SwcUtils.getHelperAndHostSet(win, host2);
8814
+ const host = this;
8815
+ const hostSet = { ...SwcUtils.getHelperAndHostSet(win, host), $this: this };
8855
8816
  const r = options.root || "auto";
8856
8817
  const targetEls = [];
8857
8818
  const applyRoot = (t) => {
8858
8819
  if (!t || !(t instanceof win.HTMLElement)) return;
8859
8820
  targetEls.push(t);
8860
8821
  };
8861
- if (selector === ":parentHost") applyRoot(hostSet.$parentHost);
8862
- else if (selector === ":appHost") applyRoot(hostSet.$appHost);
8863
- else if (selector === ":firstHost") applyRoot(hostSet.$firstHost);
8864
- else if (selector === ":lastHost") applyRoot(hostSet.$lastHost);
8865
- else if (selector === ":firstAppHost") applyRoot(hostSet.$firstAppHost);
8866
- else if (selector === ":lastAppHost") applyRoot(hostSet.$lastAppHost);
8867
- else if (selector === ":hosts") hostSet.$hosts.forEach(applyRoot);
8868
- else if (selector === ":appHosts") hostSet.$appHosts.forEach(applyRoot);
8869
- else if (selector === ":host" || !selector) applyRoot(host2);
8822
+ if (selector === "$this" || !selector) applyRoot(host);
8823
+ else if (selector === "$host") applyRoot(hostSet.$host);
8824
+ else if (selector === "$parentHost") applyRoot(hostSet.$parentHost);
8825
+ else if (selector === "$appHost") applyRoot(hostSet.$appHost);
8826
+ else if (selector === "$firstHost") applyRoot(hostSet.$firstHost);
8827
+ else if (selector === "$lastHost") applyRoot(hostSet.$lastHost);
8828
+ else if (selector === "$firstAppHost") applyRoot(hostSet.$firstAppHost);
8829
+ else if (selector === "$lastAppHost") applyRoot(hostSet.$lastAppHost);
8830
+ else if (selector === "$hosts") hostSet.$hosts.forEach(applyRoot);
8831
+ else if (selector === "$appHosts") hostSet.$appHosts.forEach(applyRoot);
8870
8832
  else {
8871
- const targetRoot = r === "auto" ? host2.shadowRoot || host2 : r === "shadow" ? host2.shadowRoot : host2;
8833
+ const targetRoot = r === "auto" ? host.shadowRoot || host : r === "shadow" ? host.shadowRoot : host;
8872
8834
  if (targetRoot) {
8873
8835
  const found = targetRoot.querySelectorAll(selector);
8874
8836
  if (found) targetEls.push(...Array.from(found));
@@ -8926,12 +8888,12 @@ var dooboostoreSimpleWebComponent = (() => {
8926
8888
  var setStyle = (selector, options = {}) => createStyleDecorator("set")(selector, options);
8927
8889
  var updateStyle = (selector, options = {}) => createStyleDecorator("update")(selector, options);
8928
8890
  var removeStyle = (selector, options = {}) => createStyleDecorator("remove")(selector, options);
8929
- function applyStyleHost(action = "update", options = {}) {
8930
- return createStyleDecorator(action)(":host", options);
8891
+ function applyStyleThis(action = "update", options = {}) {
8892
+ return createStyleDecorator(action)("$this", options);
8931
8893
  }
8932
- var setStyleHost = (options = {}) => createStyleDecorator("set")(":host", options);
8933
- var updateStyleHost = (options = {}) => createStyleDecorator("update")(":host", options);
8934
- var removeStyleHost = (options = {}) => createStyleDecorator("remove")(":host", options);
8894
+ var setStyleThis = (options = {}) => createStyleDecorator("set")("$this", options);
8895
+ var updateStyleThis = (options = {}) => createStyleDecorator("update")("$this", options);
8896
+ var removeStyleThis = (options = {}) => createStyleDecorator("remove")("$this", options);
8935
8897
  var findAllStyleMetadata = (target) => {
8936
8898
  const result = /* @__PURE__ */ new Map();
8937
8899
  const maps = ReflectUtils.findAllMetadata(STYLE_METADATA_KEY, target);
@@ -8970,25 +8932,26 @@ var dooboostoreSimpleWebComponent = (() => {
8970
8932
  const handleResult = (resolvedValue) => {
8971
8933
  if (resolvedValue !== void 0) {
8972
8934
  const win = this.ownerDocument?.defaultView || window;
8973
- const host2 = this;
8974
- const hostSet = { ...SwcUtils.getHelperAndHostSet(win, host2), $this: this };
8935
+ const host = this;
8936
+ const hostSet = { ...SwcUtils.getHelperAndHostSet(win, host), $this: this };
8975
8937
  const r = finalOptions.root || "auto";
8976
8938
  const targetEls = [];
8977
8939
  const applyRoot = (t) => {
8978
8940
  if (!t || !(t instanceof win.HTMLElement)) return;
8979
8941
  targetEls.push(t);
8980
8942
  };
8981
- if (selector === ":parentHost") applyRoot(hostSet.$parentHost);
8982
- else if (selector === ":appHost") applyRoot(hostSet.$appHost);
8983
- else if (selector === ":firstHost") applyRoot(hostSet.$firstHost);
8984
- else if (selector === ":lastHost") applyRoot(hostSet.$lastHost);
8985
- else if (selector === ":firstAppHost") applyRoot(hostSet.$firstAppHost);
8986
- else if (selector === ":lastAppHost") applyRoot(hostSet.$lastAppHost);
8987
- else if (selector === ":hosts") hostSet.$hosts.forEach(applyRoot);
8988
- else if (selector === ":appHosts") hostSet.$appHosts.forEach(applyRoot);
8989
- else if (selector === ":host" || !selector) applyRoot(host2);
8943
+ if (selector === "$this" || !selector) applyRoot(host);
8944
+ else if (selector === "$host") applyRoot(hostSet.$host);
8945
+ else if (selector === "$parentHost") applyRoot(hostSet.$parentHost);
8946
+ else if (selector === "$appHost") applyRoot(hostSet.$appHost);
8947
+ else if (selector === "$firstHost") applyRoot(hostSet.$firstHost);
8948
+ else if (selector === "$lastHost") applyRoot(hostSet.$lastHost);
8949
+ else if (selector === "$firstAppHost") applyRoot(hostSet.$firstAppHost);
8950
+ else if (selector === "$lastAppHost") applyRoot(hostSet.$lastAppHost);
8951
+ else if (selector === "$hosts") hostSet.$hosts.forEach(applyRoot);
8952
+ else if (selector === "$appHosts") hostSet.$appHosts.forEach(applyRoot);
8990
8953
  else {
8991
- const targetRoot = r === "auto" ? host2.shadowRoot || host2 : r === "shadow" ? host2.shadowRoot : host2;
8954
+ const targetRoot = r === "auto" ? host.shadowRoot || host : r === "shadow" ? host.shadowRoot : host;
8992
8955
  if (targetRoot) {
8993
8956
  const found = targetRoot.querySelectorAll(selector);
8994
8957
  if (found) targetEls.push(...Array.from(found));
@@ -9021,8 +8984,8 @@ var dooboostoreSimpleWebComponent = (() => {
9021
8984
  };
9022
8985
  };
9023
8986
  };
9024
- var setPropertyHost = (propertyNameOrOptions, options = {}) => {
9025
- return setProperty(":host", propertyNameOrOptions, options);
8987
+ var setPropertyThis = (propertyNameOrOptions, options = {}) => {
8988
+ return setProperty("$this", propertyNameOrOptions, options);
9026
8989
  };
9027
8990
 
9028
8991
  // src/decorators/subscribeSwcAppRouteChangeWhileConnected.ts
@@ -9117,9 +9080,9 @@ var dooboostoreSimpleWebComponent = (() => {
9117
9080
  const result = originalMethod.apply(this, args);
9118
9081
  if (result instanceof Promise) {
9119
9082
  result.then((data) => {
9120
- const appHost2 = SwcUtils.getAppHost(this);
9121
- if (appHost2) {
9122
- appHost2.publishMessage({
9083
+ const appHost = SwcUtils.getAppHost(this);
9084
+ if (appHost) {
9085
+ appHost.publishMessage({
9123
9086
  publisher: this,
9124
9087
  data,
9125
9088
  type: messageType
@@ -9129,9 +9092,9 @@ var dooboostoreSimpleWebComponent = (() => {
9129
9092
  console.warn("publishSwcAppMessage async error:", err);
9130
9093
  });
9131
9094
  } else {
9132
- const appHost2 = SwcUtils.getAppHost(this);
9133
- if (appHost2) {
9134
- appHost2.publishMessage({
9095
+ const appHost = SwcUtils.getAppHost(this);
9096
+ if (appHost) {
9097
+ appHost.publishMessage({
9135
9098
  publisher: this,
9136
9099
  data: result,
9137
9100
  type: messageType