@next-bricks/data-view 0.14.1 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bricks.json +3 -3
- package/dist/chunks/{3458.4c99153d.js → 3458.49e46648.js} +2 -2
- package/dist/chunks/{8691.dcf26a0c.js.map → 3458.49e46648.js.map} +1 -1
- package/dist/chunks/3494.2ac2c572.js +2 -0
- package/dist/chunks/3494.2ac2c572.js.map +1 -0
- package/dist/chunks/4550.18341e69.js +2 -0
- package/dist/chunks/4550.18341e69.js.map +1 -0
- package/dist/chunks/{5636.e1796a6a.js → 5636.8046938c.js} +2 -2
- package/dist/chunks/{5636.e1796a6a.js.map → 5636.8046938c.js.map} +1 -1
- package/dist/chunks/{6205.47b27d26.js → 6205.fe7ef46f.js} +2 -2
- package/dist/chunks/{6205.47b27d26.js.map → 6205.fe7ef46f.js.map} +1 -1
- package/dist/chunks/6301.1f3fd7fe.js +2 -0
- package/dist/chunks/6301.1f3fd7fe.js.map +1 -0
- package/dist/chunks/{7164.272521bc.js → 7164.5ceba161.js} +2 -2
- package/dist/chunks/{7164.272521bc.js.map → 7164.5ceba161.js.map} +1 -1
- package/dist/chunks/7782.cc445401.js +2 -0
- package/dist/chunks/7782.cc445401.js.map +1 -0
- package/dist/chunks/7822.aee914cb.js +2 -0
- package/dist/chunks/7822.aee914cb.js.map +1 -0
- package/dist/chunks/{8691.dcf26a0c.js → 8691.1f6ac1b8.js} +2 -2
- package/dist/chunks/{3458.4c99153d.js.map → 8691.1f6ac1b8.js.map} +1 -1
- package/dist/chunks/{complex-search.9df082ca.js → complex-search.e46ab236.js} +2 -2
- package/dist/chunks/{complex-search.9df082ca.js.map → complex-search.e46ab236.js.map} +1 -1
- package/dist/chunks/{graph-text.e6e84fc4.js → graph-text.9e3f6f43.js} +2 -2
- package/dist/chunks/{graph-text.e6e84fc4.js.map → graph-text.9e3f6f43.js.map} +1 -1
- package/dist/chunks/{main.1cc50c45.js → main.239ba5f2.js} +2 -2
- package/dist/chunks/{main.1cc50c45.js.map → main.239ba5f2.js.map} +1 -1
- package/dist/chunks/modern-style-treemap.6dd5618b.js +3 -0
- package/dist/chunks/modern-style-treemap.6dd5618b.js.map +1 -0
- package/dist/{index.6404f146.js → index.1f94ec29.js} +2 -2
- package/dist/{index.6404f146.js.map → index.1f94ec29.js.map} +1 -1
- package/dist/manifest.json +55 -55
- package/dist/types.json +131 -131
- package/package.json +2 -2
- package/dist/chunks/3494.b3abd8ab.js +0 -2
- package/dist/chunks/3494.b3abd8ab.js.map +0 -1
- package/dist/chunks/6301.be3f60e6.js +0 -2
- package/dist/chunks/6301.be3f60e6.js.map +0 -1
- package/dist/chunks/7782.bb582139.js +0 -2
- package/dist/chunks/7782.bb582139.js.map +0 -1
- package/dist/chunks/7822.fef16e7a.js +0 -2
- package/dist/chunks/7822.fef16e7a.js.map +0 -1
- package/dist/chunks/9526.b1b920ff.js +0 -2
- package/dist/chunks/9526.b1b920ff.js.map +0 -1
- package/dist/chunks/modern-style-treemap.52ca84fd.js +0 -3
- package/dist/chunks/modern-style-treemap.52ca84fd.js.map +0 -1
- package/dist-types/utils/debounceByAnimationFrame.d.ts +0 -4
- package/dist-types/utils/debounceByAnimationFrame.spec.d.ts +0 -1
- /package/dist/chunks/{modern-style-treemap.52ca84fd.js.LICENSE.txt → modern-style-treemap.6dd5618b.js.LICENSE.txt} +0 -0
package/dist/types.json
CHANGED
|
@@ -94,56 +94,6 @@
|
|
|
94
94
|
"events": [],
|
|
95
95
|
"methods": []
|
|
96
96
|
},
|
|
97
|
-
"data-view.modern-style-page-title": {
|
|
98
|
-
"properties": [
|
|
99
|
-
{
|
|
100
|
-
"name": "pageTitle",
|
|
101
|
-
"annotation": {
|
|
102
|
-
"type": "keyword",
|
|
103
|
-
"value": "string"
|
|
104
|
-
}
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
"name": "description",
|
|
108
|
-
"annotation": {
|
|
109
|
-
"type": "keyword",
|
|
110
|
-
"value": "string"
|
|
111
|
-
}
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
"name": "backgroundStyle",
|
|
115
|
-
"annotation": {
|
|
116
|
-
"type": "reference",
|
|
117
|
-
"typeName": {
|
|
118
|
-
"type": "identifier",
|
|
119
|
-
"name": "CSSProperties"
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
},
|
|
123
|
-
{
|
|
124
|
-
"name": "leftRoundStyle",
|
|
125
|
-
"annotation": {
|
|
126
|
-
"type": "reference",
|
|
127
|
-
"typeName": {
|
|
128
|
-
"type": "identifier",
|
|
129
|
-
"name": "CSSProperties"
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
"name": "rightRoundStyle",
|
|
135
|
-
"annotation": {
|
|
136
|
-
"type": "reference",
|
|
137
|
-
"typeName": {
|
|
138
|
-
"type": "identifier",
|
|
139
|
-
"name": "CSSProperties"
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
],
|
|
144
|
-
"events": [],
|
|
145
|
-
"methods": []
|
|
146
|
-
},
|
|
147
97
|
"data-view.tabs-drawer": {
|
|
148
98
|
"properties": [
|
|
149
99
|
{
|
|
@@ -337,6 +287,56 @@
|
|
|
337
287
|
}
|
|
338
288
|
]
|
|
339
289
|
},
|
|
290
|
+
"data-view.modern-style-page-title": {
|
|
291
|
+
"properties": [
|
|
292
|
+
{
|
|
293
|
+
"name": "pageTitle",
|
|
294
|
+
"annotation": {
|
|
295
|
+
"type": "keyword",
|
|
296
|
+
"value": "string"
|
|
297
|
+
}
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
"name": "description",
|
|
301
|
+
"annotation": {
|
|
302
|
+
"type": "keyword",
|
|
303
|
+
"value": "string"
|
|
304
|
+
}
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
"name": "backgroundStyle",
|
|
308
|
+
"annotation": {
|
|
309
|
+
"type": "reference",
|
|
310
|
+
"typeName": {
|
|
311
|
+
"type": "identifier",
|
|
312
|
+
"name": "CSSProperties"
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
"name": "leftRoundStyle",
|
|
318
|
+
"annotation": {
|
|
319
|
+
"type": "reference",
|
|
320
|
+
"typeName": {
|
|
321
|
+
"type": "identifier",
|
|
322
|
+
"name": "CSSProperties"
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
"name": "rightRoundStyle",
|
|
328
|
+
"annotation": {
|
|
329
|
+
"type": "reference",
|
|
330
|
+
"typeName": {
|
|
331
|
+
"type": "identifier",
|
|
332
|
+
"name": "CSSProperties"
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
],
|
|
337
|
+
"events": [],
|
|
338
|
+
"methods": []
|
|
339
|
+
},
|
|
340
340
|
"data-view.battery-chart": {
|
|
341
341
|
"properties": [
|
|
342
342
|
{
|
|
@@ -1644,6 +1644,87 @@
|
|
|
1644
1644
|
"events": [],
|
|
1645
1645
|
"methods": []
|
|
1646
1646
|
},
|
|
1647
|
+
"data-view.gear-background": {
|
|
1648
|
+
"properties": [
|
|
1649
|
+
{
|
|
1650
|
+
"name": "color",
|
|
1651
|
+
"annotation": {
|
|
1652
|
+
"type": "indexedAccess",
|
|
1653
|
+
"objectType": {
|
|
1654
|
+
"type": "reference",
|
|
1655
|
+
"typeName": {
|
|
1656
|
+
"type": "qualifiedName",
|
|
1657
|
+
"left": {
|
|
1658
|
+
"type": "identifier",
|
|
1659
|
+
"name": "React"
|
|
1660
|
+
},
|
|
1661
|
+
"right": {
|
|
1662
|
+
"type": "identifier",
|
|
1663
|
+
"name": "CSSProperties"
|
|
1664
|
+
}
|
|
1665
|
+
}
|
|
1666
|
+
},
|
|
1667
|
+
"indexType": {
|
|
1668
|
+
"type": "jsLiteral",
|
|
1669
|
+
"value": "color"
|
|
1670
|
+
}
|
|
1671
|
+
}
|
|
1672
|
+
}
|
|
1673
|
+
],
|
|
1674
|
+
"events": [],
|
|
1675
|
+
"methods": []
|
|
1676
|
+
},
|
|
1677
|
+
"data-view.loading-panel": {
|
|
1678
|
+
"properties": [
|
|
1679
|
+
{
|
|
1680
|
+
"name": "customTitle",
|
|
1681
|
+
"annotation": {
|
|
1682
|
+
"type": "keyword",
|
|
1683
|
+
"value": "string"
|
|
1684
|
+
}
|
|
1685
|
+
},
|
|
1686
|
+
{
|
|
1687
|
+
"name": "loading",
|
|
1688
|
+
"annotation": {
|
|
1689
|
+
"type": "keyword",
|
|
1690
|
+
"value": "boolean"
|
|
1691
|
+
}
|
|
1692
|
+
},
|
|
1693
|
+
{
|
|
1694
|
+
"name": "useRealTimeProgress",
|
|
1695
|
+
"annotation": {
|
|
1696
|
+
"type": "keyword",
|
|
1697
|
+
"value": "boolean"
|
|
1698
|
+
}
|
|
1699
|
+
},
|
|
1700
|
+
{
|
|
1701
|
+
"name": "progress",
|
|
1702
|
+
"annotation": {
|
|
1703
|
+
"type": "keyword",
|
|
1704
|
+
"value": "number"
|
|
1705
|
+
}
|
|
1706
|
+
},
|
|
1707
|
+
{
|
|
1708
|
+
"name": "intervalTime",
|
|
1709
|
+
"annotation": {
|
|
1710
|
+
"type": "keyword",
|
|
1711
|
+
"value": "number"
|
|
1712
|
+
}
|
|
1713
|
+
}
|
|
1714
|
+
],
|
|
1715
|
+
"events": [
|
|
1716
|
+
{
|
|
1717
|
+
"name": "end",
|
|
1718
|
+
"detail": {
|
|
1719
|
+
"annotation": {
|
|
1720
|
+
"type": "keyword",
|
|
1721
|
+
"value": "void"
|
|
1722
|
+
}
|
|
1723
|
+
}
|
|
1724
|
+
}
|
|
1725
|
+
],
|
|
1726
|
+
"methods": []
|
|
1727
|
+
},
|
|
1647
1728
|
"data-view.top-title-bar": {
|
|
1648
1729
|
"properties": [
|
|
1649
1730
|
{
|
|
@@ -1690,36 +1771,6 @@
|
|
|
1690
1771
|
}
|
|
1691
1772
|
]
|
|
1692
1773
|
},
|
|
1693
|
-
"data-view.gear-background": {
|
|
1694
|
-
"properties": [
|
|
1695
|
-
{
|
|
1696
|
-
"name": "color",
|
|
1697
|
-
"annotation": {
|
|
1698
|
-
"type": "indexedAccess",
|
|
1699
|
-
"objectType": {
|
|
1700
|
-
"type": "reference",
|
|
1701
|
-
"typeName": {
|
|
1702
|
-
"type": "qualifiedName",
|
|
1703
|
-
"left": {
|
|
1704
|
-
"type": "identifier",
|
|
1705
|
-
"name": "React"
|
|
1706
|
-
},
|
|
1707
|
-
"right": {
|
|
1708
|
-
"type": "identifier",
|
|
1709
|
-
"name": "CSSProperties"
|
|
1710
|
-
}
|
|
1711
|
-
}
|
|
1712
|
-
},
|
|
1713
|
-
"indexType": {
|
|
1714
|
-
"type": "jsLiteral",
|
|
1715
|
-
"value": "color"
|
|
1716
|
-
}
|
|
1717
|
-
}
|
|
1718
|
-
}
|
|
1719
|
-
],
|
|
1720
|
-
"events": [],
|
|
1721
|
-
"methods": []
|
|
1722
|
-
},
|
|
1723
1774
|
"data-view.grid-background": {
|
|
1724
1775
|
"properties": [
|
|
1725
1776
|
{
|
|
@@ -1843,57 +1894,6 @@
|
|
|
1843
1894
|
}
|
|
1844
1895
|
]
|
|
1845
1896
|
},
|
|
1846
|
-
"data-view.loading-panel": {
|
|
1847
|
-
"properties": [
|
|
1848
|
-
{
|
|
1849
|
-
"name": "customTitle",
|
|
1850
|
-
"annotation": {
|
|
1851
|
-
"type": "keyword",
|
|
1852
|
-
"value": "string"
|
|
1853
|
-
}
|
|
1854
|
-
},
|
|
1855
|
-
{
|
|
1856
|
-
"name": "loading",
|
|
1857
|
-
"annotation": {
|
|
1858
|
-
"type": "keyword",
|
|
1859
|
-
"value": "boolean"
|
|
1860
|
-
}
|
|
1861
|
-
},
|
|
1862
|
-
{
|
|
1863
|
-
"name": "useRealTimeProgress",
|
|
1864
|
-
"annotation": {
|
|
1865
|
-
"type": "keyword",
|
|
1866
|
-
"value": "boolean"
|
|
1867
|
-
}
|
|
1868
|
-
},
|
|
1869
|
-
{
|
|
1870
|
-
"name": "progress",
|
|
1871
|
-
"annotation": {
|
|
1872
|
-
"type": "keyword",
|
|
1873
|
-
"value": "number"
|
|
1874
|
-
}
|
|
1875
|
-
},
|
|
1876
|
-
{
|
|
1877
|
-
"name": "intervalTime",
|
|
1878
|
-
"annotation": {
|
|
1879
|
-
"type": "keyword",
|
|
1880
|
-
"value": "number"
|
|
1881
|
-
}
|
|
1882
|
-
}
|
|
1883
|
-
],
|
|
1884
|
-
"events": [
|
|
1885
|
-
{
|
|
1886
|
-
"name": "end",
|
|
1887
|
-
"detail": {
|
|
1888
|
-
"annotation": {
|
|
1889
|
-
"type": "keyword",
|
|
1890
|
-
"value": "void"
|
|
1891
|
-
}
|
|
1892
|
-
}
|
|
1893
|
-
}
|
|
1894
|
-
],
|
|
1895
|
-
"methods": []
|
|
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.
|
|
3
|
+
"version": "0.15.0",
|
|
4
4
|
"homepage": "https://github.com/easyops-cn/next-bricks/tree/master/bricks/data-view",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"@types/d3-hierarchy": "^3.1.2",
|
|
40
40
|
"@types/three": "^0.150.1"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "d59e4e97ae83ff53dcff6a285e35c2c4906d74e3"
|
|
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(3269),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.b3abd8ab.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"chunks/3494.b3abd8ab.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":""}
|