@next-bricks/data-view 0.14.0 → 0.14.2

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 (28) hide show
  1. package/dist/bricks.json +6 -6
  2. package/dist/chunks/3494.4abaa53c.js +2 -0
  3. package/dist/chunks/3494.4abaa53c.js.map +1 -0
  4. package/dist/chunks/{6301.9023c47c.js → 6301.3c283b1c.js} +2 -2
  5. package/dist/chunks/{6301.9023c47c.js.map → 6301.3c283b1c.js.map} +1 -1
  6. package/dist/chunks/7782.11601d27.js +2 -0
  7. package/dist/chunks/7782.11601d27.js.map +1 -0
  8. package/dist/chunks/7822.1c4bf248.js +2 -0
  9. package/dist/chunks/7822.1c4bf248.js.map +1 -0
  10. package/dist/chunks/{complex-search.8bae1f77.js → complex-search.e09dc15c.js} +2 -2
  11. package/dist/chunks/{complex-search.8bae1f77.js.map → complex-search.e09dc15c.js.map} +1 -1
  12. package/dist/chunks/{main.78bfe79b.js → main.0a9023ef.js} +2 -2
  13. package/dist/chunks/{main.78bfe79b.js.map → main.0a9023ef.js.map} +1 -1
  14. package/dist/chunks/{modern-style-treemap.1bacb40b.js → modern-style-treemap.052eb4c9.js} +3 -3
  15. package/dist/chunks/{modern-style-treemap.1bacb40b.js.map → modern-style-treemap.052eb4c9.js.map} +1 -1
  16. package/dist/index.2bf1df0b.js +2 -0
  17. package/dist/{index.5f28649b.js.map → index.2bf1df0b.js.map} +1 -1
  18. package/dist/manifest.json +136 -103
  19. package/dist/types.json +253 -253
  20. package/package.json +3 -3
  21. package/dist/chunks/3494.a4f4c9fb.js +0 -2
  22. package/dist/chunks/3494.a4f4c9fb.js.map +0 -1
  23. package/dist/chunks/7782.d3ddfa4c.js +0 -2
  24. package/dist/chunks/7782.d3ddfa4c.js.map +0 -1
  25. package/dist/chunks/7822.a0b2c2c0.js +0 -2
  26. package/dist/chunks/7822.a0b2c2c0.js.map +0 -1
  27. package/dist/index.5f28649b.js +0 -2
  28. /package/dist/chunks/{modern-style-treemap.1bacb40b.js.LICENSE.txt → modern-style-treemap.052eb4c9.js.LICENSE.txt} +0 -0
package/dist/types.json CHANGED
@@ -40,6 +40,60 @@
40
40
  "events": [],
41
41
  "methods": []
42
42
  },
43
+ "data-view.modern-style-component-title": {
44
+ "properties": [
45
+ {
46
+ "name": "hideLeftComponent",
47
+ "annotation": {
48
+ "type": "keyword",
49
+ "value": "boolean"
50
+ }
51
+ },
52
+ {
53
+ "name": "hideRightComponent",
54
+ "annotation": {
55
+ "type": "keyword",
56
+ "value": "boolean"
57
+ }
58
+ },
59
+ {
60
+ "name": "componentTitle",
61
+ "annotation": {
62
+ "type": "keyword",
63
+ "value": "string"
64
+ }
65
+ },
66
+ {
67
+ "name": "titleTextStyle",
68
+ "annotation": {
69
+ "type": "reference",
70
+ "typeName": {
71
+ "type": "identifier",
72
+ "name": "CSSProperties"
73
+ }
74
+ }
75
+ },
76
+ {
77
+ "name": "squareColor",
78
+ "annotation": {
79
+ "type": "indexedAccess",
80
+ "objectType": {
81
+ "type": "reference",
82
+ "typeName": {
83
+ "type": "identifier",
84
+ "name": "CSSProperties"
85
+ }
86
+ },
87
+ "indexType": {
88
+ "type": "jsLiteral",
89
+ "value": "color"
90
+ }
91
+ }
92
+ }
93
+ ],
94
+ "events": [],
95
+ "methods": []
96
+ },
43
97
  "data-view.modern-style-page-title": {
44
98
  "properties": [
45
99
  {
@@ -283,60 +337,6 @@
283
337
  }
284
338
  ]
285
339
  },
286
- "data-view.modern-style-component-title": {
287
- "properties": [
288
- {
289
- "name": "hideLeftComponent",
290
- "annotation": {
291
- "type": "keyword",
292
- "value": "boolean"
293
- }
294
- },
295
- {
296
- "name": "hideRightComponent",
297
- "annotation": {
298
- "type": "keyword",
299
- "value": "boolean"
300
- }
301
- },
302
- {
303
- "name": "componentTitle",
304
- "annotation": {
305
- "type": "keyword",
306
- "value": "string"
307
- }
308
- },
309
- {
310
- "name": "titleTextStyle",
311
- "annotation": {
312
- "type": "reference",
313
- "typeName": {
314
- "type": "identifier",
315
- "name": "CSSProperties"
316
- }
317
- }
318
- },
319
- {
320
- "name": "squareColor",
321
- "annotation": {
322
- "type": "indexedAccess",
323
- "objectType": {
324
- "type": "reference",
325
- "typeName": {
326
- "type": "identifier",
327
- "name": "CSSProperties"
328
- }
329
- },
330
- "indexType": {
331
- "type": "jsLiteral",
332
- "value": "color"
333
- }
334
- }
335
- }
336
- ],
337
- "events": [],
338
- "methods": []
339
- },
340
340
  "data-view.battery-chart": {
341
341
  "properties": [
342
342
  {
@@ -1348,159 +1348,6 @@
1348
1348
  "events": [],
1349
1349
  "methods": []
1350
1350
  },
1351
- "data-view.grid-background": {
1352
- "properties": [
1353
- {
1354
- "name": "color",
1355
- "annotation": {
1356
- "type": "indexedAccess",
1357
- "objectType": {
1358
- "type": "reference",
1359
- "typeName": {
1360
- "type": "qualifiedName",
1361
- "left": {
1362
- "type": "identifier",
1363
- "name": "React"
1364
- },
1365
- "right": {
1366
- "type": "identifier",
1367
- "name": "CSSProperties"
1368
- }
1369
- }
1370
- },
1371
- "indexType": {
1372
- "type": "jsLiteral",
1373
- "value": "color"
1374
- }
1375
- }
1376
- },
1377
- {
1378
- "name": "maskStyle",
1379
- "annotation": {
1380
- "type": "reference",
1381
- "typeName": {
1382
- "type": "qualifiedName",
1383
- "left": {
1384
- "type": "identifier",
1385
- "name": "React"
1386
- },
1387
- "right": {
1388
- "type": "identifier",
1389
- "name": "CSSProperties"
1390
- }
1391
- }
1392
- }
1393
- },
1394
- {
1395
- "name": "particleColor",
1396
- "annotation": {
1397
- "type": "reference",
1398
- "typeName": {
1399
- "type": "identifier",
1400
- "name": "ParticleColor"
1401
- }
1402
- }
1403
- }
1404
- ],
1405
- "events": [],
1406
- "methods": [],
1407
- "types": [
1408
- {
1409
- "type": "interface",
1410
- "name": "ParticleColor",
1411
- "body": [
1412
- {
1413
- "type": "propertySignature",
1414
- "key": {
1415
- "type": "identifier",
1416
- "name": "startColor"
1417
- },
1418
- "annotation": {
1419
- "type": "indexedAccess",
1420
- "objectType": {
1421
- "type": "reference",
1422
- "typeName": {
1423
- "type": "qualifiedName",
1424
- "left": {
1425
- "type": "identifier",
1426
- "name": "React"
1427
- },
1428
- "right": {
1429
- "type": "identifier",
1430
- "name": "CSSProperties"
1431
- }
1432
- }
1433
- },
1434
- "indexType": {
1435
- "type": "jsLiteral",
1436
- "value": "color"
1437
- }
1438
- },
1439
- "computed": false
1440
- },
1441
- {
1442
- "type": "propertySignature",
1443
- "key": {
1444
- "type": "identifier",
1445
- "name": "endColor"
1446
- },
1447
- "annotation": {
1448
- "type": "indexedAccess",
1449
- "objectType": {
1450
- "type": "reference",
1451
- "typeName": {
1452
- "type": "qualifiedName",
1453
- "left": {
1454
- "type": "identifier",
1455
- "name": "React"
1456
- },
1457
- "right": {
1458
- "type": "identifier",
1459
- "name": "CSSProperties"
1460
- }
1461
- }
1462
- },
1463
- "indexType": {
1464
- "type": "jsLiteral",
1465
- "value": "color"
1466
- }
1467
- },
1468
- "computed": false
1469
- }
1470
- ]
1471
- }
1472
- ]
1473
- },
1474
- "data-view.gear-background": {
1475
- "properties": [
1476
- {
1477
- "name": "color",
1478
- "annotation": {
1479
- "type": "indexedAccess",
1480
- "objectType": {
1481
- "type": "reference",
1482
- "typeName": {
1483
- "type": "qualifiedName",
1484
- "left": {
1485
- "type": "identifier",
1486
- "name": "React"
1487
- },
1488
- "right": {
1489
- "type": "identifier",
1490
- "name": "CSSProperties"
1491
- }
1492
- }
1493
- },
1494
- "indexType": {
1495
- "type": "jsLiteral",
1496
- "value": "color"
1497
- }
1498
- }
1499
- }
1500
- ],
1501
- "events": [],
1502
- "methods": []
1503
- },
1504
1351
  "data-view.title-text": {
1505
1352
  "properties": [
1506
1353
  {
@@ -1692,52 +1539,6 @@
1692
1539
  }
1693
1540
  ]
1694
1541
  },
1695
- "data-view.top-title-bar": {
1696
- "properties": [
1697
- {
1698
- "name": "text",
1699
- "annotation": {
1700
- "type": "keyword",
1701
- "value": "string"
1702
- }
1703
- },
1704
- {
1705
- "name": "type",
1706
- "annotation": {
1707
- "type": "reference",
1708
- "typeName": {
1709
- "type": "identifier",
1710
- "name": "TitleBarType"
1711
- }
1712
- }
1713
- }
1714
- ],
1715
- "events": [],
1716
- "methods": [],
1717
- "types": [
1718
- {
1719
- "type": "typeAlias",
1720
- "name": "TitleBarType",
1721
- "annotation": {
1722
- "type": "union",
1723
- "types": [
1724
- {
1725
- "type": "jsLiteral",
1726
- "value": "normal"
1727
- },
1728
- {
1729
- "type": "jsLiteral",
1730
- "value": "sample"
1731
- },
1732
- {
1733
- "type": "jsLiteral",
1734
- "value": "square"
1735
- }
1736
- ]
1737
- }
1738
- }
1739
- ]
1740
- },
1741
1542
  "data-view.lights-component-title": {
1742
1543
  "properties": [
1743
1544
  {
@@ -1894,6 +1695,205 @@
1894
1695
  ],
1895
1696
  "methods": []
1896
1697
  },
1698
+ "data-view.grid-background": {
1699
+ "properties": [
1700
+ {
1701
+ "name": "color",
1702
+ "annotation": {
1703
+ "type": "indexedAccess",
1704
+ "objectType": {
1705
+ "type": "reference",
1706
+ "typeName": {
1707
+ "type": "qualifiedName",
1708
+ "left": {
1709
+ "type": "identifier",
1710
+ "name": "React"
1711
+ },
1712
+ "right": {
1713
+ "type": "identifier",
1714
+ "name": "CSSProperties"
1715
+ }
1716
+ }
1717
+ },
1718
+ "indexType": {
1719
+ "type": "jsLiteral",
1720
+ "value": "color"
1721
+ }
1722
+ }
1723
+ },
1724
+ {
1725
+ "name": "maskStyle",
1726
+ "annotation": {
1727
+ "type": "reference",
1728
+ "typeName": {
1729
+ "type": "qualifiedName",
1730
+ "left": {
1731
+ "type": "identifier",
1732
+ "name": "React"
1733
+ },
1734
+ "right": {
1735
+ "type": "identifier",
1736
+ "name": "CSSProperties"
1737
+ }
1738
+ }
1739
+ }
1740
+ },
1741
+ {
1742
+ "name": "particleColor",
1743
+ "annotation": {
1744
+ "type": "reference",
1745
+ "typeName": {
1746
+ "type": "identifier",
1747
+ "name": "ParticleColor"
1748
+ }
1749
+ }
1750
+ }
1751
+ ],
1752
+ "events": [],
1753
+ "methods": [],
1754
+ "types": [
1755
+ {
1756
+ "type": "interface",
1757
+ "name": "ParticleColor",
1758
+ "body": [
1759
+ {
1760
+ "type": "propertySignature",
1761
+ "key": {
1762
+ "type": "identifier",
1763
+ "name": "startColor"
1764
+ },
1765
+ "annotation": {
1766
+ "type": "indexedAccess",
1767
+ "objectType": {
1768
+ "type": "reference",
1769
+ "typeName": {
1770
+ "type": "qualifiedName",
1771
+ "left": {
1772
+ "type": "identifier",
1773
+ "name": "React"
1774
+ },
1775
+ "right": {
1776
+ "type": "identifier",
1777
+ "name": "CSSProperties"
1778
+ }
1779
+ }
1780
+ },
1781
+ "indexType": {
1782
+ "type": "jsLiteral",
1783
+ "value": "color"
1784
+ }
1785
+ },
1786
+ "computed": false
1787
+ },
1788
+ {
1789
+ "type": "propertySignature",
1790
+ "key": {
1791
+ "type": "identifier",
1792
+ "name": "endColor"
1793
+ },
1794
+ "annotation": {
1795
+ "type": "indexedAccess",
1796
+ "objectType": {
1797
+ "type": "reference",
1798
+ "typeName": {
1799
+ "type": "qualifiedName",
1800
+ "left": {
1801
+ "type": "identifier",
1802
+ "name": "React"
1803
+ },
1804
+ "right": {
1805
+ "type": "identifier",
1806
+ "name": "CSSProperties"
1807
+ }
1808
+ }
1809
+ },
1810
+ "indexType": {
1811
+ "type": "jsLiteral",
1812
+ "value": "color"
1813
+ }
1814
+ },
1815
+ "computed": false
1816
+ }
1817
+ ]
1818
+ }
1819
+ ]
1820
+ },
1821
+ "data-view.gear-background": {
1822
+ "properties": [
1823
+ {
1824
+ "name": "color",
1825
+ "annotation": {
1826
+ "type": "indexedAccess",
1827
+ "objectType": {
1828
+ "type": "reference",
1829
+ "typeName": {
1830
+ "type": "qualifiedName",
1831
+ "left": {
1832
+ "type": "identifier",
1833
+ "name": "React"
1834
+ },
1835
+ "right": {
1836
+ "type": "identifier",
1837
+ "name": "CSSProperties"
1838
+ }
1839
+ }
1840
+ },
1841
+ "indexType": {
1842
+ "type": "jsLiteral",
1843
+ "value": "color"
1844
+ }
1845
+ }
1846
+ }
1847
+ ],
1848
+ "events": [],
1849
+ "methods": []
1850
+ },
1851
+ "data-view.top-title-bar": {
1852
+ "properties": [
1853
+ {
1854
+ "name": "text",
1855
+ "annotation": {
1856
+ "type": "keyword",
1857
+ "value": "string"
1858
+ }
1859
+ },
1860
+ {
1861
+ "name": "type",
1862
+ "annotation": {
1863
+ "type": "reference",
1864
+ "typeName": {
1865
+ "type": "identifier",
1866
+ "name": "TitleBarType"
1867
+ }
1868
+ }
1869
+ }
1870
+ ],
1871
+ "events": [],
1872
+ "methods": [],
1873
+ "types": [
1874
+ {
1875
+ "type": "typeAlias",
1876
+ "name": "TitleBarType",
1877
+ "annotation": {
1878
+ "type": "union",
1879
+ "types": [
1880
+ {
1881
+ "type": "jsLiteral",
1882
+ "value": "normal"
1883
+ },
1884
+ {
1885
+ "type": "jsLiteral",
1886
+ "value": "sample"
1887
+ },
1888
+ {
1889
+ "type": "jsLiteral",
1890
+ "value": "square"
1891
+ }
1892
+ ]
1893
+ }
1894
+ }
1895
+ ]
1896
+ },
1897
1897
  "data-view.cabinet-container": {
1898
1898
  "properties": [
1899
1899
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next-bricks/data-view",
3
- "version": "0.14.0",
3
+ "version": "0.14.2",
4
4
  "homepage": "https://github.com/easyops-cn/next-bricks/tree/master/bricks/data-view",
5
5
  "repository": {
6
6
  "type": "git",
@@ -34,10 +34,10 @@
34
34
  "postpublish": "mv package.json.bak package.json"
35
35
  },
36
36
  "devDependencies": {
37
- "@next-core/build-next-bricks": "^1.13.3",
37
+ "@next-core/build-next-bricks": "^1.13.4",
38
38
  "@next-core/test-next": "^1.0.8",
39
39
  "@types/d3-hierarchy": "^3.1.2",
40
40
  "@types/three": "^0.150.1"
41
41
  },
42
- "gitHead": "8f90d8bf4be05e550f79564b26a739db10a16e11"
42
+ "gitHead": "3262862c39b7e09c20ec0a172f840078652c8f70"
43
43
  }
@@ -1,2 +0,0 @@
1
- "use strict";(self.webpackChunk_next_bricks_data_view=self.webpackChunk_next_bricks_data_view||[]).push([[3494,7822,4795],{4795:(e,t,r)=>{function n(e,t,r,n,a,i,u){try{var c=e[i](u),s=c.value}catch(e){return void r(e)}c.done?t(s):Promise.resolve(s).then(n,a)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(a,i){var u=e.apply(t,r);function c(e){n(u,a,i,c,s,"next",e)}function s(e){n(u,a,i,c,s,"throw",e)}c(void 0)}))}}r.d(t,{Z:()=>a})},7822:(e,t,r)=>{r.r(t),r.d(t,{ReactUseBrick:()=>c,ReactUseMultipleBricks:()=>s,useCurrentApp:()=>v,useCurrentTheme:()=>d,useRecentApps:()=>f});var n,a=r(4795),i=r(8657),u=r(5135),c=function(e){var{useBrick:t,data:r}=e,[n,c]=(0,i.useState)(null),s=(0,i.useRef)(),[o,l]=(0,i.useState)(),d=(0,i.useRef)(0);(0,i.useEffect)((()=>{function e(){return(e=(0,a.Z)((function*(){try{c(yield u.__secret_internals.renderUseBrick(t,r)),l(++d.current)}catch(e){console.error("Render useBrick failed:",t,"with data:",r),(0,u.handleHttpError)(e)}}))).apply(this,arguments)}!function(){e.apply(this,arguments)}()}),[r,t]);var f=(0,i.useCallback)((e=>{e?s.current=u.__secret_internals.mountUseBrick(n,e):(u.__secret_internals.unmountUseBrick(n,s.current),s.current=void 0)}),[n]);if(!n)return null;var{tagName:v}=n;if(null===v)return null;var p=v;return i.createElement(p,{key:o,ref:f})},s=function(e){var{useBrick:t,data:r}=e;return Array.isArray(t)?i.createElement(i.Fragment,null,t.map(((e,t)=>i.createElement(c,{key:t,useBrick:e,data:r})))):i.createElement(c,{useBrick:t,data:r})};if(window.dll&&null!==(n=window.BRICK_NEXT_VERSIONS)&&void 0!==n&&null!==(n=n["brick-container"])&&void 0!==n&&n.startsWith("2.")){var{SingleBrickAsComponentFactory:o,BrickAsComponentFactory:l}=window.dll("tYg3");o&&l&&(c=o(i),s=l(i))}function d(){var[e,t]=(0,i.useState)(u.getCurrentTheme);return(0,i.useEffect)((()=>{var e=e=>{t(e.detail)};return window.addEventListener("theme.change",e),()=>{window.removeEventListener("theme.change",e)}}),[]),e}function f(){var[e,t]=i.useState((()=>(0,u.getRuntime)().getRecentApps()));return i.useEffect((()=>{var e=e=>{t(e.detail)};return window.addEventListener("app.change",e),()=>window.removeEventListener("app.change",e)}),[]),e}function v(){return f().currentApp}}}]);
2
- //# sourceMappingURL=3494.a4f4c9fb.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"chunks/3494.a4f4c9fb.js","mappings":"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","sources":["webpack:///../../node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","webpack:///../../node_modules/@next-core/react-runtime/dist/esm/ReactUseBrick.js","webpack:///../../node_modules/@next-core/react-runtime/dist/esm/useCurrentTheme.js","webpack:///../../node_modules/@next-core/react-runtime/dist/esm/useRecentApps.js","webpack:///../../node_modules/@next-core/react-runtime/dist/esm/useCurrentApp.js"],"sourcesContent":["function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}","import _asyncToGenerator from \"@babel/runtime/helpers/asyncToGenerator\";\nvar _window$BRICK_NEXT_VE;\nimport React, { useCallback, useEffect, useRef, useState } from \"react\";\nimport { __secret_internals, handleHttpError } from \"@next-core/runtime\";\n// Note: always synchronize code in LegacyUseBrick:\n// `bricks/v2-adapter/src/data-providers/legacy-brick-kit/getLegacyUseBrick.ts`\nvar ReactUseBrick = function ReactUseBrick(_ref) {\n var {\n useBrick,\n data\n } = _ref;\n var [renderResult, setRenderResult] = useState(null);\n var mountResult = useRef();\n var [renderKey, setRenderKey] = useState();\n var IdCounterRef = useRef(0);\n useEffect(() => {\n function init() {\n return _init.apply(this, arguments);\n }\n function _init() {\n _init = _asyncToGenerator(function* () {\n try {\n setRenderResult(yield __secret_internals.renderUseBrick(useBrick, data));\n setRenderKey(getUniqueId(IdCounterRef));\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error(\"Render useBrick failed:\", useBrick, \"with data:\", data);\n handleHttpError(error);\n }\n });\n return _init.apply(this, arguments);\n }\n init();\n }, [data, useBrick]);\n var refCallback = useCallback(element => {\n if (element) {\n mountResult.current = __secret_internals.mountUseBrick(\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n renderResult, element);\n } else {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n __secret_internals.unmountUseBrick(renderResult, mountResult.current);\n mountResult.current = undefined;\n }\n }, [renderResult]);\n if (!renderResult) {\n // Fallback when loading/\n return null;\n // return <span>🌀 Loading...</span>;\n }\n\n var {\n tagName\n } = renderResult;\n if (tagName === null) {\n return null;\n }\n var WebComponent = tagName;\n return /*#__PURE__*/React.createElement(WebComponent, {\n key: renderKey,\n ref: refCallback\n });\n};\nfunction getUniqueId(ref) {\n return ++ref.current;\n}\nvar ReactUseMultipleBricks = function ReactUseMultipleBricks(_ref2) {\n var {\n useBrick,\n data\n } = _ref2;\n if (Array.isArray(useBrick)) {\n return /*#__PURE__*/React.createElement(React.Fragment, null, useBrick.map((item, index) => /*#__PURE__*/React.createElement(ReactUseBrick, {\n key: index,\n useBrick: item,\n data: data\n })));\n }\n return /*#__PURE__*/React.createElement(ReactUseBrick, {\n useBrick: useBrick,\n data: data\n });\n};\n\n// istanbul ignore next\n// Make v3 bricks compatible with Brick Next v2.\nif (window.dll && (_window$BRICK_NEXT_VE = window.BRICK_NEXT_VERSIONS) !== null && _window$BRICK_NEXT_VE !== void 0 && (_window$BRICK_NEXT_VE = _window$BRICK_NEXT_VE[\"brick-container\"]) !== null && _window$BRICK_NEXT_VE !== void 0 && _window$BRICK_NEXT_VE.startsWith(\"2.\")) {\n var {\n SingleBrickAsComponentFactory,\n BrickAsComponentFactory\n } = window.dll(\"tYg3\");\n if (SingleBrickAsComponentFactory && BrickAsComponentFactory) {\n ReactUseBrick = SingleBrickAsComponentFactory(React);\n ReactUseMultipleBricks = BrickAsComponentFactory(React);\n }\n}\nexport { ReactUseBrick, ReactUseMultipleBricks };\n//# sourceMappingURL=ReactUseBrick.js.map","import { useEffect, useState } from \"react\";\nimport { getCurrentTheme } from \"@next-core/runtime\";\nexport function useCurrentTheme() {\n var [currentTheme, setCurrentTheme] = useState(getCurrentTheme);\n useEffect(() => {\n var listenToThemeChange = event => {\n setCurrentTheme(event.detail);\n };\n window.addEventListener(\"theme.change\", listenToThemeChange);\n return () => {\n window.removeEventListener(\"theme.change\", listenToThemeChange);\n };\n }, []);\n return currentTheme;\n}\n//# sourceMappingURL=useCurrentTheme.js.map","import React from \"react\";\nimport { getRuntime } from \"@next-core/runtime\";\nexport function useRecentApps() {\n var [recentApps, setRecentApps] = React.useState(() => getRuntime().getRecentApps());\n React.useEffect(() => {\n var listener = event => {\n setRecentApps(event.detail);\n };\n window.addEventListener(\"app.change\", listener);\n return () => window.removeEventListener(\"app.change\", listener);\n }, []);\n return recentApps;\n}\n//# sourceMappingURL=useRecentApps.js.map","import { useRecentApps } from \"./useRecentApps.js\";\n\n/**\n * 获取当前所在微应用信息的 React hooks。\n *\n * @example\n *\n * ```tsx\n * function MyReactComponent() {\n * const app = useCurrentApp();\n * return <div>{app.id}</div>;\n * }\n * ```\n *\n * @returns 当前所在微应用的信息。\n */\nexport function useCurrentApp() {\n return useRecentApps().currentApp;\n}\n//# sourceMappingURL=useCurrentApp.js.map"],"names":["asyncGeneratorStep","gen","resolve","reject","_next","_throw","key","arg","info","value","error","done","Promise","then","_asyncToGenerator","fn","self","this","args","arguments","apply","err","undefined","_window$BRICK_NEXT_VE","ReactUseBrick","_ref","useBrick","data","renderResult","setRenderResult","useState","mountResult","useRef","renderKey","setRenderKey","IdCounterRef","useEffect","_init","__secret_internals","renderUseBrick","current","console","handleHttpError","init","refCallback","useCallback","element","mountUseBrick","unmountUseBrick","tagName","WebComponent","ref","ReactUseMultipleBricks","_ref2","Array","isArray","map","item","index","window","dll","BRICK_NEXT_VERSIONS","startsWith","SingleBrickAsComponentFactory","BrickAsComponentFactory","useCurrentTheme","currentTheme","setCurrentTheme","getCurrentTheme","listenToThemeChange","event","detail","addEventListener","removeEventListener","useRecentApps","recentApps","setRecentApps","getRuntime","getRecentApps","listener","useCurrentApp","currentApp"],"sourceRoot":""}