vite-uni-dev-tool 0.0.48 → 1.0.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/README.md +20 -0
- package/dist/const.cjs +1 -0
- package/dist/const.d.ts +78 -161
- package/dist/const.d.ts.map +1 -1
- package/dist/const.js +1 -47
- package/dist/core-shared.d.ts +44 -0
- package/dist/core-shared.d.ts.map +1 -0
- package/dist/core-shared.js +1 -0
- package/dist/core.d.ts +2 -40
- package/dist/core.d.ts.map +1 -1
- package/dist/core.js +4 -159
- package/dist/i18n/index.cjs +1 -0
- package/dist/i18n/index.d.ts +9 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/i18n/index.js +1 -0
- package/dist/i18n/instance.cjs +1 -0
- package/dist/i18n/instance.d.ts +15 -0
- package/dist/i18n/instance.d.ts.map +1 -0
- package/dist/i18n/instance.js +1 -0
- package/dist/i18n/locales/en.cjs +1 -0
- package/dist/i18n/locales/en.d.ts +470 -0
- package/dist/i18n/locales/en.d.ts.map +1 -0
- package/dist/i18n/locales/en.js +1 -0
- package/dist/i18n/locales/zh-Hans.cjs +1 -0
- package/dist/i18n/locales/zh-Hans.d.ts +476 -0
- package/dist/i18n/locales/zh-Hans.d.ts.map +1 -0
- package/dist/i18n/locales/zh-Hans.js +1 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/modules/devConsole/index.cjs +4 -0
- package/dist/{devConsole → modules/devConsole}/index.d.ts +1 -1
- package/dist/modules/devConsole/index.d.ts.map +1 -0
- package/dist/modules/devConsole/index.js +4 -0
- package/dist/modules/devEvent/index.cjs +5 -0
- package/dist/modules/devEvent/index.d.ts +115 -0
- package/dist/modules/devEvent/index.d.ts.map +1 -0
- package/dist/modules/devEvent/index.js +5 -0
- package/dist/modules/devIntercept/index.cjs +13 -0
- package/dist/modules/devIntercept/index.d.ts +71 -0
- package/dist/modules/devIntercept/index.d.ts.map +1 -0
- package/dist/modules/devIntercept/index.js +13 -0
- package/dist/modules/devStore/index.cjs +1 -0
- package/dist/modules/devStore/index.d.ts +159 -0
- package/dist/modules/devStore/index.d.ts.map +1 -0
- package/dist/modules/devStore/index.js +1 -0
- package/dist/modules/devToolInfo/index.cjs +1 -0
- package/dist/modules/devToolInfo/index.d.ts +27 -0
- package/dist/modules/devToolInfo/index.d.ts.map +1 -0
- package/dist/modules/devToolInfo/index.js +1 -0
- package/dist/plugins/uniDevTool/transform/transformApp.cjs +44 -0
- package/dist/plugins/uniDevTool/transform/transformApp.d.ts.map +1 -1
- package/dist/plugins/uniDevTool/transform/transformApp.js +17 -17
- package/dist/plugins/uniDevTool/transform/transformMain.cjs +3 -0
- package/dist/plugins/uniDevTool/transform/transformMain.d.ts.map +1 -1
- package/dist/plugins/uniDevTool/transform/transformMain.js +3 -3
- package/dist/plugins/uniDevTool/transform/transformVue.cjs +41 -0
- package/dist/plugins/uniDevTool/transform/transformVue.d.ts +1 -2
- package/dist/plugins/uniDevTool/transform/transformVue.d.ts.map +1 -1
- package/dist/plugins/uniDevTool/transform/transformVue.js +32 -19
- package/dist/plugins/uniDevTool/uniDevTool.cjs +5 -0
- package/dist/plugins/uniDevTool/uniDevTool.d.ts +3 -11
- package/dist/plugins/uniDevTool/uniDevTool.d.ts.map +1 -1
- package/dist/plugins/uniDevTool/uniDevTool.js +3 -3
- package/dist/plugins/uniGlobalComponents/uniGlobalComponents.cjs +19 -0
- package/dist/plugins/uniGlobalComponents/uniGlobalComponents.d.ts.map +1 -1
- package/dist/plugins/uniGlobalComponents/uniGlobalComponents.js +11 -19
- package/dist/plugins/uniParseStock/index.d.ts +10 -0
- package/dist/plugins/uniParseStock/index.d.ts.map +1 -0
- package/dist/plugins/utils/index.cjs +2 -0
- package/dist/plugins/utils/index.d.ts +1 -3
- package/dist/plugins/utils/index.d.ts.map +1 -1
- package/dist/plugins/utils/index.js +2 -2
- package/dist/shims-uni.d.ts +140 -0
- package/dist/type.d.ts +174 -16
- package/dist/type.d.ts.map +1 -1
- package/dist/utils/array.cjs +1 -0
- package/dist/utils/array.d.ts.map +1 -1
- package/dist/utils/array.js +1 -12
- package/dist/utils/date.cjs +1 -0
- package/dist/utils/date.d.ts.map +1 -1
- package/dist/utils/date.js +1 -59
- package/dist/utils/file.cjs +1 -0
- package/dist/utils/file.d.ts.map +1 -1
- package/dist/utils/file.js +1 -85
- package/dist/utils/function.cjs +1 -0
- package/dist/utils/function.d.ts +13 -0
- package/dist/utils/function.d.ts.map +1 -1
- package/dist/utils/function.js +1 -68
- package/dist/utils/index.cjs +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -63
- package/dist/utils/ip.cjs +1 -0
- package/dist/utils/ip.d.ts +1 -1
- package/dist/utils/ip.d.ts.map +1 -1
- package/dist/utils/ip.js +1 -45
- package/dist/utils/language.cjs +1 -0
- package/dist/utils/language.d.ts +2 -1
- package/dist/utils/language.d.ts.map +1 -1
- package/dist/utils/language.js +1 -63
- package/dist/utils/object.cjs +1 -0
- package/dist/utils/object.d.ts +4 -5
- package/dist/utils/object.d.ts.map +1 -1
- package/dist/utils/object.js +1 -136
- package/dist/utils/openLink.cjs +1 -0
- package/dist/utils/openLink.d.ts.map +1 -1
- package/dist/utils/openLink.js +1 -28
- package/dist/utils/page.cjs +1 -0
- package/dist/utils/page.d.ts.map +1 -1
- package/dist/utils/page.js +1 -7
- package/dist/utils/platform.cjs +1 -0
- package/dist/utils/platform.d.ts.map +1 -1
- package/dist/utils/platform.js +1 -17
- package/dist/utils/string.cjs +1 -0
- package/dist/utils/string.d.ts.map +1 -1
- package/dist/utils/string.js +1 -114
- package/dist/utils/utils.cjs +1 -0
- package/dist/utils/utils.d.ts +1 -1
- package/dist/utils/utils.d.ts.map +1 -1
- package/dist/utils/utils.js +1 -126
- package/dist/v3/AppTransition/index.vue +170 -0
- package/dist/v3/AutoSizer/index.vue +4 -5
- package/dist/v3/AutoSizer/index1.vue +4 -6
- package/dist/v3/AutoSizer/utils.ts +1 -1
- package/dist/v3/CaptureScreen/index.vue +19 -8
- package/dist/v3/CircularButton/index.vue +64 -13
- package/dist/v3/ConsoleList/ConsoleItem.vue +56 -5
- package/dist/v3/ConsoleList/RunJSInput.vue +10 -6
- package/dist/v3/ConsoleList/index.vue +51 -35
- package/dist/v3/CustomSwiper/CustomSwiperItem.vue +49 -0
- package/dist/v3/CustomSwiper/index.vue +104 -0
- package/dist/v3/DevTool/fps-collector.render.ts +148 -0
- package/dist/v3/DevTool/index.vue +209 -102
- package/dist/v3/DevToolButton/index.vue +40 -59
- package/dist/v3/DevToolTitle/index.vue +4 -1
- package/dist/v3/DevToolWindow/DevToolOverlay.vue +182 -0
- package/dist/v3/DevToolWindow/const.ts +47 -69
- package/dist/v3/DevToolWindow/hooks/dataUtils.ts +48 -0
- package/dist/v3/DevToolWindow/hooks/useDevToolData.ts +338 -0
- package/dist/v3/DevToolWindow/hooks/useDevToolHandlers.ts +549 -0
- package/dist/v3/DevToolWindow/hooks/useDevToolOverlay.ts +184 -0
- package/dist/v3/DevToolWindow/index.css +89 -0
- package/dist/v3/DevToolWindow/index.vue +800 -1450
- package/dist/v3/DraggableContainer/index.vue +456 -0
- package/dist/v3/ElEvent/ElEventItem.vue +4 -3
- package/dist/v3/ElEvent/index.vue +26 -9
- package/dist/v3/Empty/index.vue +1 -0
- package/dist/v3/FilterInput/index.vue +8 -22
- package/dist/v3/FilterSelect/index.vue +37 -24
- package/dist/v3/Instance/components/InstanceTreeNode.vue +265 -0
- package/dist/v3/Instance/flatten.ts +226 -0
- package/dist/v3/Instance/index.vue +94 -0
- package/dist/v3/Instance/registry.ts +49 -0
- package/dist/v3/Instance/transformTree.ts +375 -0
- package/dist/v3/Instance/transformTreeCtx.ts +268 -0
- package/dist/v3/{InstanceTree → Instance}/typing.d.ts +15 -2
- package/dist/v3/InstanceDetail/index.vue +433 -44
- package/dist/v3/JsonDetail/index.vue +12 -8
- package/dist/v3/JsonPretty/components/Brackets/index.vue +1 -0
- package/dist/v3/JsonPretty/components/Carets/index.vue +2 -1
- package/dist/v3/JsonPretty/components/CheckController/index.vue +26 -15
- package/dist/v3/JsonPretty/components/TreeNode/index.vue +42 -20
- package/dist/v3/JsonPretty/index.vue +60 -37
- package/dist/v3/JsonPretty/utils/index.ts +41 -44
- package/dist/v3/MovableContainer/index.vue +89 -0
- package/dist/v3/NFCList/NFCItem.vue +14 -14
- package/dist/v3/NFCList/NFCTool.vue +99 -81
- package/dist/v3/NFCList/index.vue +14 -10
- package/dist/v3/NetworkList/InterceptConfig.vue +154 -364
- package/dist/v3/NetworkList/InterceptItem.vue +14 -6
- package/dist/v3/NetworkList/NetworkDetail.vue +34 -29
- package/dist/v3/NetworkList/NetworkIntercept.vue +11 -8
- package/dist/v3/NetworkList/NetworkItem.vue +27 -11
- package/dist/v3/NetworkList/NetworkSend.vue +132 -290
- package/dist/v3/NetworkList/hooks/useNetworkForm.ts +86 -0
- package/dist/v3/NetworkList/index.vue +32 -24
- package/dist/v3/NetworkList/utils.ts +101 -0
- package/dist/v3/Performance/index.vue +495 -0
- package/dist/v3/Performance/modules/PerformanceMetrics.vue +153 -0
- package/dist/v3/Performance/modules/PerformanceWidget.vue +249 -0
- package/dist/v3/Performance/modules/usePerformanceChart.ts +460 -0
- package/dist/v3/Performance/modules/usePerformanceData.ts +258 -0
- package/dist/v3/Pick/index.vue +322 -0
- package/dist/v3/PiniaList/index.vue +38 -17
- package/dist/v3/RouteList/index.vue +32 -15
- package/dist/v3/RunJS/index.vue +30 -10
- package/dist/v3/ScanCodeList/ScanCodeItem.vue +2 -9
- package/dist/v3/ScanCodeList/index.vue +12 -9
- package/dist/v3/SettingButton/index.vue +45 -0
- package/dist/v3/SettingList/index.css +120 -0
- package/dist/v3/SettingList/index.vue +96 -537
- package/dist/v3/SettingList/modules/SettingDevTool.vue +208 -0
- package/dist/v3/SettingList/modules/SettingInfo.vue +119 -0
- package/dist/v3/SettingList/modules/SettingLanguage.vue +74 -0
- package/dist/v3/SettingList/modules/SettingLog.vue +230 -0
- package/dist/v3/SettingList/modules/SettingNetwork.vue +120 -0
- package/dist/v3/SettingList/modules/SettingTheme.vue +312 -0
- package/dist/v3/SourceCode/Line.vue +15 -2
- package/dist/v3/SourceCode/index.vue +25 -24
- package/dist/v3/SourceCode/parseCode.ts +114 -56
- package/dist/v3/StorageList/index.vue +33 -33
- package/dist/v3/Tabs/index.vue +31 -28
- package/dist/v3/Tag/index.vue +39 -20
- package/dist/v3/TransferList/TransferDetail.vue +268 -0
- package/dist/v3/TransferList/TransferItem.vue +125 -0
- package/dist/v3/TransferList/index.vue +181 -0
- package/dist/v3/UniEvent/UniEventItem.vue +1 -0
- package/dist/v3/UniEvent/index.vue +28 -29
- package/dist/v3/{VirtualListPro → VirtualList}/AutoSize.vue +1 -1
- package/dist/v3/VirtualList/index.vue +382 -82
- package/dist/v3/VuexList/index.vue +38 -17
- package/dist/v3/WebSocket/WebSocketDetail.vue +142 -80
- package/dist/v3/WebSocket/WebSocketItem.vue +10 -4
- package/dist/v3/WebSocket/index.vue +44 -30
- package/dist/v3/hooks/useNFC/index.ts +6 -6
- package/dist/v3/hooks/useNFC/typing.d.ts +2 -2
- package/dist/v3/hooks/useNFC/useNFCAndroid.ts +215 -626
- package/dist/v3/hooks/useNFC/useNFCMpWeiXin.ts +54 -85
- package/dist/v3/hooks/useNFC/utils.ts +3 -3
- package/dist/v3/hooks/useRequest/index.ts +2 -2
- package/dist/v3/hooks/useScanCode/index.ts +10 -8
- package/dist/v3/styles/theme.css +290 -0
- package/dist/v3/styles/theme.ts +12 -0
- package/package.json +25 -5
- package/dist/devConsole/index.d.ts.map +0 -1
- package/dist/devConsole/index.js +0 -273
- package/dist/devEvent/index.d.ts +0 -328
- package/dist/devEvent/index.d.ts.map +0 -1
- package/dist/devEvent/index.js +0 -697
- package/dist/devEventBus/index.d.ts +0 -42
- package/dist/devEventBus/index.d.ts.map +0 -1
- package/dist/devEventBus/index.js +0 -70
- package/dist/devIntercept/index.d.ts +0 -281
- package/dist/devIntercept/index.d.ts.map +0 -1
- package/dist/devIntercept/index.js +0 -949
- package/dist/devRunJS/index.d.ts +0 -67
- package/dist/devRunJS/index.d.ts.map +0 -1
- package/dist/devStore/index.d.ts +0 -199
- package/dist/devStore/index.d.ts.map +0 -1
- package/dist/devStore/index.js +0 -562
- package/dist/devToolInfo/index.d.ts +0 -17
- package/dist/devToolInfo/index.d.ts.map +0 -1
- package/dist/devToolInfo/index.js +0 -15
- package/dist/v3/AutoSizer/utils.d.ts +0 -5
- package/dist/v3/AutoSizer/utils.d.ts.map +0 -1
- package/dist/v3/ConsoleList/staticTips.d.ts +0 -13
- package/dist/v3/ConsoleList/staticTips.d.ts.map +0 -1
- package/dist/v3/DevToolWindow/const.d.ts +0 -46
- package/dist/v3/DevToolWindow/const.d.ts.map +0 -1
- package/dist/v3/InstanceTree/components/InstanceTreeNode.vue +0 -81
- package/dist/v3/InstanceTree/flatten.d.ts +0 -10
- package/dist/v3/InstanceTree/flatten.d.ts.map +0 -1
- package/dist/v3/InstanceTree/flatten.ts +0 -75
- package/dist/v3/InstanceTree/index.vue +0 -51
- package/dist/v3/InstanceTree/transformTree.d.ts +0 -17
- package/dist/v3/InstanceTree/transformTree.d.ts.map +0 -1
- package/dist/v3/InstanceTree/transformTree.ts +0 -237
- package/dist/v3/JsonPretty/hooks/useClipboard.d.ts +0 -4
- package/dist/v3/JsonPretty/hooks/useClipboard.d.ts.map +0 -1
- package/dist/v3/JsonPretty/hooks/useError.d.ts +0 -8
- package/dist/v3/JsonPretty/hooks/useError.d.ts.map +0 -1
- package/dist/v3/JsonPretty/type.d.ts +0 -94
- package/dist/v3/JsonPretty/type.d.ts.map +0 -1
- package/dist/v3/JsonPretty/utils/index.d.ts +0 -10
- package/dist/v3/JsonPretty/utils/index.d.ts.map +0 -1
- package/dist/v3/NFCList/const.d.ts +0 -13
- package/dist/v3/NFCList/const.d.ts.map +0 -1
- package/dist/v3/NetworkList/const.d.ts +0 -5
- package/dist/v3/NetworkList/const.d.ts.map +0 -1
- package/dist/v3/SourceCode/parseCode.d.ts +0 -27
- package/dist/v3/SourceCode/parseCode.d.ts.map +0 -1
- package/dist/v3/UploadList/UploadDetail.vue +0 -255
- package/dist/v3/UploadList/UploadItem.vue +0 -122
- package/dist/v3/UploadList/index.vue +0 -125
- package/dist/v3/VirtualListPro/index.vue +0 -229
- package/dist/v3/hooks/useContainerStyle.d.ts +0 -15
- package/dist/v3/hooks/useContainerStyle.d.ts.map +0 -1
- package/dist/v3/hooks/useNFC/index.d.ts +0 -5
- package/dist/v3/hooks/useNFC/index.d.ts.map +0 -1
- package/dist/v3/hooks/useNFC/useNFCAndroid.d.ts +0 -2
- package/dist/v3/hooks/useNFC/useNFCAndroid.d.ts.map +0 -1
- package/dist/v3/hooks/useNFC/useNFCMpWeiXin.d.ts +0 -2
- package/dist/v3/hooks/useNFC/useNFCMpWeiXin.d.ts.map +0 -1
- package/dist/v3/hooks/useNFC/utils.d.ts +0 -95
- package/dist/v3/hooks/useNFC/utils.d.ts.map +0 -1
- package/dist/v3/hooks/useRequest/index.d.ts +0 -126
- package/dist/v3/hooks/useRequest/index.d.ts.map +0 -1
- package/dist/v3/hooks/useRequest/utils.d.ts +0 -35
- package/dist/v3/hooks/useRequest/utils.d.ts.map +0 -1
- package/dist/v3/hooks/useScanCode/index.d.ts +0 -36
- package/dist/v3/hooks/useScanCode/index.d.ts.map +0 -1
- /package/dist/v3/{VirtualListPro → VirtualList}/readme.md +0 -0
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
|
|
21
21
|
export default function useNFCMpWeiXin(
|
|
22
22
|
listener: NFC.Listener,
|
|
23
|
-
|
|
23
|
+
_options?: NFC.NfcOption,
|
|
24
24
|
): NFC.NfcResult {
|
|
25
25
|
/** 是否支持 nfc */
|
|
26
26
|
const isSupportNFC = ref<boolean | undefined>(false);
|
|
@@ -48,11 +48,11 @@ export default function useNFCMpWeiXin(
|
|
|
48
48
|
let nfcInstance: NFC.Instance | undefined;
|
|
49
49
|
|
|
50
50
|
/** ndef 写入方式比较特殊,需要特殊处理 */
|
|
51
|
-
|
|
51
|
+
const isNdef = ref(false);
|
|
52
52
|
|
|
53
53
|
let maxTransceiveLength = 0;
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
const _checkInterval: any = null;
|
|
56
56
|
|
|
57
57
|
/**
|
|
58
58
|
* 初始化 nfc adapter
|
|
@@ -303,7 +303,9 @@ export default function useNFCMpWeiXin(
|
|
|
303
303
|
data.value.manufacturer = atqaInfo?.manufacturer;
|
|
304
304
|
data.value.cardFeatures = atqaInfo?.cardFeatures;
|
|
305
305
|
data.value.reserved = atqaInfo?.reserved;
|
|
306
|
-
} catch (
|
|
306
|
+
} catch (_error) {
|
|
307
|
+
// ignore error
|
|
308
|
+
}
|
|
307
309
|
|
|
308
310
|
try {
|
|
309
311
|
const sak = await getSak(nfcA);
|
|
@@ -312,7 +314,9 @@ export default function useNFCMpWeiXin(
|
|
|
312
314
|
data.value.sak = sak.sak;
|
|
313
315
|
data.value.sakType = sakType;
|
|
314
316
|
data.value.sakHex = sakHex;
|
|
315
|
-
} catch (
|
|
317
|
+
} catch (_error) {
|
|
318
|
+
// ignore error
|
|
319
|
+
}
|
|
316
320
|
}
|
|
317
321
|
|
|
318
322
|
if (nfcInstance) {
|
|
@@ -484,7 +488,7 @@ export default function useNFCMpWeiXin(
|
|
|
484
488
|
}
|
|
485
489
|
|
|
486
490
|
nfcInstance?.close?.({
|
|
487
|
-
success: (
|
|
491
|
+
success: (_res) => {
|
|
488
492
|
isConnected.value = false;
|
|
489
493
|
nfcInstance = undefined;
|
|
490
494
|
resolve({
|
|
@@ -604,7 +608,7 @@ export default function useNFCMpWeiXin(
|
|
|
604
608
|
*
|
|
605
609
|
* @param {NFC.NdefData} data
|
|
606
610
|
*/
|
|
607
|
-
async function
|
|
611
|
+
async function writeNdef(data: NFC.NdefRecord[]) {
|
|
608
612
|
if (!isNdef.value) {
|
|
609
613
|
uni.showToast({
|
|
610
614
|
title: 'NFC 标签不支持 NDEF',
|
|
@@ -711,55 +715,34 @@ export default function useNFCMpWeiXin(
|
|
|
711
715
|
* @param {string} [language='zh'] 微信小程序下无效
|
|
712
716
|
* @return {*}
|
|
713
717
|
*/
|
|
714
|
-
async function
|
|
718
|
+
async function writeNdefText(
|
|
715
719
|
text: string,
|
|
716
|
-
|
|
720
|
+
_language = 'zh',
|
|
717
721
|
): Promise<{ errMsg: string }> {
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
]);
|
|
726
|
-
} catch (error) {
|
|
727
|
-
return Promise.reject({
|
|
728
|
-
errMsg: '数据写入失败',
|
|
729
|
-
error,
|
|
730
|
-
});
|
|
731
|
-
}
|
|
722
|
+
return writeNdef([
|
|
723
|
+
{
|
|
724
|
+
tnf: 1,
|
|
725
|
+
type: 'T',
|
|
726
|
+
payload: stringToArrayBuffer(text),
|
|
727
|
+
},
|
|
728
|
+
]);
|
|
732
729
|
}
|
|
733
730
|
|
|
734
731
|
function writeNdefUri(uri: string): Promise<{ errMsg: string }> {
|
|
735
732
|
const record = createUriNdefRecord(uri);
|
|
736
|
-
|
|
737
|
-
return writeNdf([record]);
|
|
738
|
-
} catch (error) {
|
|
739
|
-
return Promise.reject({
|
|
740
|
-
errMsg: '数据写入失败',
|
|
741
|
-
error,
|
|
742
|
-
});
|
|
743
|
-
}
|
|
733
|
+
return writeNdef([record]);
|
|
744
734
|
}
|
|
745
735
|
|
|
746
736
|
function writeNdefAndroidApp(
|
|
747
737
|
packageName: string,
|
|
748
738
|
): Promise<{ errMsg: string }> {
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
]);
|
|
757
|
-
} catch (error) {
|
|
758
|
-
return Promise.reject({
|
|
759
|
-
errMsg: '数据写入失败',
|
|
760
|
-
error,
|
|
761
|
-
});
|
|
762
|
-
}
|
|
739
|
+
return writeNdef([
|
|
740
|
+
{
|
|
741
|
+
tnf: 4,
|
|
742
|
+
type: 'android.com:pkg',
|
|
743
|
+
payload: stringToArrayBuffer(packageName),
|
|
744
|
+
},
|
|
745
|
+
]);
|
|
763
746
|
}
|
|
764
747
|
|
|
765
748
|
function writeNdefWifi({
|
|
@@ -767,49 +750,35 @@ export default function useNFCMpWeiXin(
|
|
|
767
750
|
password,
|
|
768
751
|
authType,
|
|
769
752
|
}: NFC.WSCConfig): Promise<{ errMsg: string }> {
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
]);
|
|
784
|
-
} catch (error) {
|
|
785
|
-
return Promise.reject({
|
|
786
|
-
errMsg: '数据写入失败',
|
|
787
|
-
error,
|
|
788
|
-
});
|
|
789
|
-
}
|
|
753
|
+
const mimeType = 'application/vnd.wfa.wsc';
|
|
754
|
+
const wifiData = generateWSCBytesForAndroid({
|
|
755
|
+
ssid,
|
|
756
|
+
password,
|
|
757
|
+
authType,
|
|
758
|
+
});
|
|
759
|
+
return writeNdef([
|
|
760
|
+
{
|
|
761
|
+
tnf: 2,
|
|
762
|
+
type: mimeType,
|
|
763
|
+
payload: arrayNumberToArrayBuffer(wifiData),
|
|
764
|
+
},
|
|
765
|
+
]);
|
|
790
766
|
}
|
|
791
767
|
|
|
792
768
|
function writeNdefVcard(
|
|
793
769
|
cardInfo: NFC.VCardContactInfo,
|
|
794
770
|
): Promise<{ errMsg: string }> {
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
]);
|
|
807
|
-
} catch (error) {
|
|
808
|
-
return Promise.reject({
|
|
809
|
-
errMsg: '数据写入失败',
|
|
810
|
-
error,
|
|
811
|
-
});
|
|
812
|
-
}
|
|
771
|
+
const mimeType = 'text/vcard';
|
|
772
|
+
const cardString = formatCardInfo(cardInfo);
|
|
773
|
+
|
|
774
|
+
const cardData = stringToArrayBuffer(cardString);
|
|
775
|
+
return writeNdef([
|
|
776
|
+
{
|
|
777
|
+
tnf: 2,
|
|
778
|
+
type: mimeType,
|
|
779
|
+
payload: cardData,
|
|
780
|
+
},
|
|
781
|
+
]);
|
|
813
782
|
}
|
|
814
783
|
|
|
815
784
|
onMounted(() => {
|
|
@@ -833,8 +802,8 @@ export default function useNFCMpWeiXin(
|
|
|
833
802
|
connect,
|
|
834
803
|
close,
|
|
835
804
|
write,
|
|
836
|
-
|
|
837
|
-
|
|
805
|
+
writeNdef,
|
|
806
|
+
writeNdefText,
|
|
838
807
|
writeNdefUri,
|
|
839
808
|
writeNdefAndroidApp,
|
|
840
809
|
writeNdefWifi,
|
|
@@ -308,7 +308,7 @@ export function createUriNdefRecord(uri: string): NFC.NdefRecord {
|
|
|
308
308
|
let suffix = uri;
|
|
309
309
|
|
|
310
310
|
// 查找匹配的前缀
|
|
311
|
-
for (const [protocol,
|
|
311
|
+
for (const [protocol, _code] of Object.entries(uriPrefixMap)) {
|
|
312
312
|
if (uri.startsWith(protocol) && protocol.length > prefix.length) {
|
|
313
313
|
prefix = protocol;
|
|
314
314
|
}
|
|
@@ -476,7 +476,7 @@ export function parseUniversalTLV(
|
|
|
476
476
|
try {
|
|
477
477
|
const convertedData = targetTlvConfig.converter(currentValue);
|
|
478
478
|
parseResult[targetTlvConfig.fieldName] = convertedData;
|
|
479
|
-
} catch (
|
|
479
|
+
} catch (_e) {
|
|
480
480
|
parseResult[targetTlvConfig.fieldName] = null;
|
|
481
481
|
}
|
|
482
482
|
}
|
|
@@ -495,7 +495,7 @@ const TLVConverterTools = {
|
|
|
495
495
|
return new TextDecoder('utf-8', { fatal: false }).decode(
|
|
496
496
|
new Uint8Array(bytes),
|
|
497
497
|
);
|
|
498
|
-
} catch (
|
|
498
|
+
} catch (_e) {
|
|
499
499
|
return bytes.map((byte) => String.fromCharCode(byte)).join('');
|
|
500
500
|
}
|
|
501
501
|
},
|
|
@@ -438,7 +438,7 @@ const useRequest = <R, P extends any[]>(
|
|
|
438
438
|
if (allowPolling) {
|
|
439
439
|
intervalTimer = setTimeout(poll, option?.pollingInterval);
|
|
440
440
|
}
|
|
441
|
-
} catch (
|
|
441
|
+
} catch (_error) {
|
|
442
442
|
// execService 内部已经处理了错误,这里只需要确保继续轮询或停止
|
|
443
443
|
if (
|
|
444
444
|
option?.pollingErrorRetryCount &&
|
|
@@ -489,7 +489,7 @@ const useRequest = <R, P extends any[]>(
|
|
|
489
489
|
try {
|
|
490
490
|
await execService(params);
|
|
491
491
|
cancel();
|
|
492
|
-
} catch (
|
|
492
|
+
} catch (_error) {
|
|
493
493
|
if (option.errorRetryCount && option.errorRetryCount < errorCount) {
|
|
494
494
|
cancel();
|
|
495
495
|
return;
|
|
@@ -39,7 +39,7 @@ export default function useScanCode(
|
|
|
39
39
|
},
|
|
40
40
|
) {
|
|
41
41
|
let main: any;
|
|
42
|
-
|
|
42
|
+
const show = ref(true);
|
|
43
43
|
|
|
44
44
|
let lastTime: number | null = null;
|
|
45
45
|
let nextTime: number | null = null;
|
|
@@ -75,11 +75,13 @@ export default function useScanCode(
|
|
|
75
75
|
_codeQueryTag = false;
|
|
76
76
|
}, options?.scanDelay || 150);
|
|
77
77
|
|
|
78
|
-
show.value
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
78
|
+
if (show.value) {
|
|
79
|
+
callback?.(code);
|
|
80
|
+
options?.onScanEnd?.(code);
|
|
81
|
+
// 单独使用该 hooks 时,删除收集
|
|
82
|
+
// @ts-ignore
|
|
83
|
+
uni?.__dev_tool_scan_code_collection__?.(code, 'broadcast');
|
|
84
|
+
}
|
|
83
85
|
}
|
|
84
86
|
|
|
85
87
|
function initScan() {
|
|
@@ -104,7 +106,7 @@ export default function useScanCode(
|
|
|
104
106
|
{
|
|
105
107
|
onReceive: function (_context: any, intent: any) {
|
|
106
108
|
plus.android.importClass(intent);
|
|
107
|
-
|
|
109
|
+
const code = intent.getStringExtra(options?.broadcastStringDataLabel); // 换你的广播标签
|
|
108
110
|
queryCode(code);
|
|
109
111
|
},
|
|
110
112
|
},
|
|
@@ -114,7 +116,7 @@ export default function useScanCode(
|
|
|
114
116
|
onShow(() => {
|
|
115
117
|
initScan();
|
|
116
118
|
startScan();
|
|
117
|
-
show.value =
|
|
119
|
+
show.value = !options?.disabled?.value;
|
|
118
120
|
});
|
|
119
121
|
onHide(() => {
|
|
120
122
|
show.value = false;
|
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
/* Global DevTool Theme Variables */
|
|
2
|
+
|
|
3
|
+
.dev-tool {
|
|
4
|
+
/* Generic Colors */
|
|
5
|
+
--dev-tool-main-color: #9254de;
|
|
6
|
+
--dev-tool-warn-color: #ffa940;
|
|
7
|
+
--dev-tool-error-color: #ff4d4f;
|
|
8
|
+
--dev-tool-success-color: #bae637;
|
|
9
|
+
|
|
10
|
+
/* Shared Base Tokens */
|
|
11
|
+
--dev-tool-text-color-placeholder: #8c8c8c;
|
|
12
|
+
|
|
13
|
+
-webkit-tap-highlight-color: transparent;
|
|
14
|
+
transition: color 0.3s, background-color 0.3s, border-color 0.3s, box-shadow 0.3s;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/* Light Theme */
|
|
18
|
+
.dev-tool-light {
|
|
19
|
+
--dev-tool-bg-color: rgb(255 255 255 / 80%);
|
|
20
|
+
--dev-tool-bg2-color: rgb(252 252 252 / 95%);
|
|
21
|
+
--dev-tool-bg3-color: #fff;
|
|
22
|
+
--dev-tool-text-color: #1f1f1f;
|
|
23
|
+
--dev-tool-border-color: #f0f0f0;
|
|
24
|
+
--dev-tool-info-color: #8c8c8c;
|
|
25
|
+
--dev-tool-log-color: #f5f5f5;
|
|
26
|
+
--dev-tool-nil-color: #8c8c8c;
|
|
27
|
+
--dev-tool-number-color: #096dd9;
|
|
28
|
+
--dev-tool-boolean-color: #096dd9;
|
|
29
|
+
--dev-tool-symbol-color: #c41d7f;
|
|
30
|
+
--dev-tool-active-bg-color: #f0f0f0;
|
|
31
|
+
--dev-tool-time-line-color: #9254de;
|
|
32
|
+
--dev-tool-note-color: #8c8c8c;
|
|
33
|
+
--dev-tool-keyword-color: #9254de;
|
|
34
|
+
--dev-tool-bracket-color: #8c8c8c;
|
|
35
|
+
--dev-tool-quotation-color: #389e0d;
|
|
36
|
+
--dev-tool-string-color: #389e0d;
|
|
37
|
+
--dev-tool-function-color: #096dd9;
|
|
38
|
+
--dev-tool-attribute-color: #c41d7f;
|
|
39
|
+
--dev-tool-operator-color: #08979c;
|
|
40
|
+
--dev-tool-warn-bg-color: #fff7e6;
|
|
41
|
+
--dev-tool-error-bg-color: #fff1f0;
|
|
42
|
+
--dev-tool-success-bg-color: #f6ffed;
|
|
43
|
+
--dev-tool-normal-bg-color: #f5f5f5;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/* Dark Theme */
|
|
47
|
+
.dev-tool-dark {
|
|
48
|
+
/* Base background - Deep Charcoal */
|
|
49
|
+
--dev-tool-bg-color: rgb(18 18 18 / 85%);
|
|
50
|
+
--dev-tool-bg2-color: #1a1a1a;
|
|
51
|
+
--dev-tool-bg3-color: #242424;
|
|
52
|
+
--dev-tool-text-color: rgb(255 255 255 / 85%);
|
|
53
|
+
--dev-tool-border-color: #333;
|
|
54
|
+
--dev-tool-info-color: #8c8c8c;
|
|
55
|
+
--dev-tool-log-color: #202020;
|
|
56
|
+
--dev-tool-nil-color: #bfbfbf;
|
|
57
|
+
|
|
58
|
+
/* Syntax Highlighting */
|
|
59
|
+
--dev-tool-number-color: #40a9ff;
|
|
60
|
+
--dev-tool-boolean-color: #40a9ff;
|
|
61
|
+
--dev-tool-symbol-color: #ff7eb6;
|
|
62
|
+
--dev-tool-active-bg-color: #2f2f2f;
|
|
63
|
+
--dev-tool-time-line-color: #b37feb;
|
|
64
|
+
--dev-tool-note-color: #666;
|
|
65
|
+
--dev-tool-keyword-color: #b37feb;
|
|
66
|
+
--dev-tool-bracket-color: #666;
|
|
67
|
+
--dev-tool-quotation-color: #95de64;
|
|
68
|
+
--dev-tool-string-color: #95de64;
|
|
69
|
+
--dev-tool-function-color: #40a9ff;
|
|
70
|
+
--dev-tool-attribute-color: #ff7eb6;
|
|
71
|
+
--dev-tool-operator-color: #5cdbd3;
|
|
72
|
+
|
|
73
|
+
/* Status Backgrounds */
|
|
74
|
+
--dev-tool-warn-bg-color: rgb(255 169 64 / 20%);
|
|
75
|
+
--dev-tool-error-bg-color: rgb(255 77 79 / 20%);
|
|
76
|
+
--dev-tool-success-bg-color: rgb(186 230 55 / 15%);
|
|
77
|
+
--dev-tool-normal-bg-color: #1a1a1a;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/* Eye Protection Mode (Warm Sepia) */
|
|
81
|
+
.dev-tool-eye {
|
|
82
|
+
--dev-tool-bg-color: rgb(250 249 222 / 85%);
|
|
83
|
+
--dev-tool-bg2-color: rgb(253 252 240 / 95%);
|
|
84
|
+
--dev-tool-bg3-color: #fdfcfb;
|
|
85
|
+
--dev-tool-text-color: #333;
|
|
86
|
+
--dev-tool-border-color: #e6e4c0;
|
|
87
|
+
--dev-tool-main-color: #859900;
|
|
88
|
+
--dev-tool-info-color: #839496;
|
|
89
|
+
--dev-tool-log-color: #fdf6e3;
|
|
90
|
+
--dev-tool-active-bg-color: #e6e4c0;
|
|
91
|
+
--dev-tool-keyword-color: #d33682;
|
|
92
|
+
--dev-tool-string-color: #2aa198;
|
|
93
|
+
--dev-tool-function-color: #268bd2;
|
|
94
|
+
|
|
95
|
+
/* Soft Status Backgrounds */
|
|
96
|
+
--dev-tool-warn-bg-color: #fcf4dc;
|
|
97
|
+
--dev-tool-error-bg-color: #f8e7e7;
|
|
98
|
+
--dev-tool-success-bg-color: #eef3e2;
|
|
99
|
+
--dev-tool-normal-bg-color: #eee8d5;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/* Sakura Theme (Romantic Pink) */
|
|
103
|
+
.dev-tool-sakura {
|
|
104
|
+
--dev-tool-bg-color: rgb(255 240 245 / 85%);
|
|
105
|
+
--dev-tool-bg2-color: rgb(255 245 250 / 95%);
|
|
106
|
+
--dev-tool-bg3-color: #fffafb;
|
|
107
|
+
--dev-tool-text-color: #5d4037;
|
|
108
|
+
--dev-tool-border-color: #f8bbd0;
|
|
109
|
+
--dev-tool-main-color: #ec407a;
|
|
110
|
+
--dev-tool-info-color: #880e4f;
|
|
111
|
+
--dev-tool-log-color: #fce4ec;
|
|
112
|
+
--dev-tool-active-bg-color: #f8bbd0;
|
|
113
|
+
--dev-tool-keyword-color: #c2185b;
|
|
114
|
+
--dev-tool-string-color: #e91e63;
|
|
115
|
+
--dev-tool-function-color: #ad1457;
|
|
116
|
+
|
|
117
|
+
/* Sweet Status Backgrounds */
|
|
118
|
+
--dev-tool-warn-bg-color: #fff8e1;
|
|
119
|
+
--dev-tool-error-bg-color: #ffebee;
|
|
120
|
+
--dev-tool-success-bg-color: #f1f8e9;
|
|
121
|
+
--dev-tool-normal-bg-color: #fce4ec;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/* Frost Theme (Cool Light Blue) */
|
|
125
|
+
.dev-tool-frost {
|
|
126
|
+
--dev-tool-bg-color: rgb(240 249 255 / 85%);
|
|
127
|
+
--dev-tool-bg2-color: rgb(248 250 252 / 95%);
|
|
128
|
+
--dev-tool-bg3-color: #fcfdfe;
|
|
129
|
+
--dev-tool-text-color: #1e293b;
|
|
130
|
+
--dev-tool-border-color: #e2e8f0;
|
|
131
|
+
--dev-tool-main-color: #0ea5e9;
|
|
132
|
+
--dev-tool-info-color: #64748b;
|
|
133
|
+
--dev-tool-log-color: #f1f5f9;
|
|
134
|
+
--dev-tool-active-bg-color: #f1f5f9;
|
|
135
|
+
--dev-tool-keyword-color: #0284c7;
|
|
136
|
+
--dev-tool-string-color: #059669;
|
|
137
|
+
--dev-tool-function-color: #2563eb;
|
|
138
|
+
|
|
139
|
+
/* Cool Status Backgrounds */
|
|
140
|
+
--dev-tool-warn-bg-color: #fffbeb;
|
|
141
|
+
--dev-tool-error-bg-color: #fef2f2;
|
|
142
|
+
--dev-tool-success-bg-color: #f0fdf4;
|
|
143
|
+
--dev-tool-normal-bg-color: #f1f5f9;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/* Sunny Theme (Warm Bright Yellow) */
|
|
147
|
+
.dev-tool-sunny {
|
|
148
|
+
--dev-tool-bg-color: rgb(255 251 235 / 85%);
|
|
149
|
+
--dev-tool-bg2-color: rgb(254 252 232 / 95%);
|
|
150
|
+
--dev-tool-bg3-color: #fffdf2;
|
|
151
|
+
--dev-tool-text-color: #451a03;
|
|
152
|
+
--dev-tool-border-color: #fef3c7;
|
|
153
|
+
--dev-tool-main-color: #d97706;
|
|
154
|
+
--dev-tool-info-color: #92400e;
|
|
155
|
+
--dev-tool-log-color: #fffbeb;
|
|
156
|
+
--dev-tool-active-bg-color: #fef3c7;
|
|
157
|
+
--dev-tool-keyword-color: #b45309;
|
|
158
|
+
--dev-tool-string-color: #15803d;
|
|
159
|
+
--dev-tool-function-color: #ea580c;
|
|
160
|
+
|
|
161
|
+
/* Warm Status Backgrounds */
|
|
162
|
+
--dev-tool-warn-bg-color: #fff7ed;
|
|
163
|
+
--dev-tool-error-bg-color: #fef2f2;
|
|
164
|
+
--dev-tool-success-bg-color: #f0fdf4;
|
|
165
|
+
--dev-tool-normal-bg-color: #fff9db;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/* Emerald Theme (Jewel Green Dark) */
|
|
169
|
+
.dev-tool-emerald {
|
|
170
|
+
--dev-tool-bg-color: rgb(2 28 18 / 90%);
|
|
171
|
+
--dev-tool-bg2-color: rgb(5 40 25 / 80%);
|
|
172
|
+
--dev-tool-bg3-color: #021a12;
|
|
173
|
+
--dev-tool-text-color: #ecfdf5;
|
|
174
|
+
--dev-tool-border-color: #064e3b;
|
|
175
|
+
--dev-tool-main-color: #10b981;
|
|
176
|
+
--dev-tool-info-color: #34d399;
|
|
177
|
+
--dev-tool-log-color: #021a12;
|
|
178
|
+
--dev-tool-active-bg-color: #064e3b;
|
|
179
|
+
--dev-tool-keyword-color: #6ee7b7;
|
|
180
|
+
--dev-tool-string-color: #10b981;
|
|
181
|
+
--dev-tool-function-color: #6ee7b7;
|
|
182
|
+
|
|
183
|
+
/* Status Backgrounds */
|
|
184
|
+
--dev-tool-warn-bg-color: rgb(251 191 36 / 15%);
|
|
185
|
+
--dev-tool-error-bg-color: rgb(244 63 94 / 15%);
|
|
186
|
+
--dev-tool-success-bg-color: rgb(52 211 153 / 15%);
|
|
187
|
+
--dev-tool-normal-bg-color: #042f2e;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/* Midnight Blue Theme */
|
|
191
|
+
.dev-tool-midnight {
|
|
192
|
+
--dev-tool-bg-color: rgb(15 17 26 / 90%);
|
|
193
|
+
--dev-tool-bg2-color: rgb(26 28 37 / 80%);
|
|
194
|
+
--dev-tool-bg3-color: #1e212b;
|
|
195
|
+
--dev-tool-text-color: #a6accd;
|
|
196
|
+
--dev-tool-border-color: #2b2d3a;
|
|
197
|
+
--dev-tool-info-color: #94a3b8;
|
|
198
|
+
--dev-tool-log-color: #0f172a;
|
|
199
|
+
--dev-tool-nil-color: #64748b;
|
|
200
|
+
--dev-tool-main-color: #82aaff;
|
|
201
|
+
|
|
202
|
+
/* Syntax Highlighting */
|
|
203
|
+
--dev-tool-number-color: #7dd3fc;
|
|
204
|
+
--dev-tool-boolean-color: #7dd3fc;
|
|
205
|
+
--dev-tool-symbol-color: #f472b6;
|
|
206
|
+
--dev-tool-active-bg-color: #2b2d3a;
|
|
207
|
+
--dev-tool-time-line-color: #38bdf8;
|
|
208
|
+
--dev-tool-note-color: #475569;
|
|
209
|
+
--dev-tool-keyword-color: #c792ea;
|
|
210
|
+
--dev-tool-bracket-color: #475569;
|
|
211
|
+
--dev-tool-quotation-color: #c3e88d;
|
|
212
|
+
--dev-tool-string-color: #c3e88d;
|
|
213
|
+
--dev-tool-function-color: #82aaff;
|
|
214
|
+
--dev-tool-attribute-color: #c792ea;
|
|
215
|
+
--dev-tool-operator-color: #2dd4bf;
|
|
216
|
+
|
|
217
|
+
/* Status Backgrounds */
|
|
218
|
+
--dev-tool-warn-bg-color: rgb(251 191 36 / 15%);
|
|
219
|
+
--dev-tool-error-bg-color: rgb(244 63 94 / 15%);
|
|
220
|
+
--dev-tool-success-bg-color: rgb(52 211 153 / 15%);
|
|
221
|
+
--dev-tool-normal-bg-color: #1a1a1a;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
/* Gulf Blue Theme (Deep Ocean) */
|
|
225
|
+
.dev-tool-gulf {
|
|
226
|
+
--dev-tool-bg-color: rgb(15 32 55 / 90%);
|
|
227
|
+
--dev-tool-bg2-color: rgb(20 40 70 / 80%);
|
|
228
|
+
--dev-tool-bg3-color: #0a1b35;
|
|
229
|
+
--dev-tool-text-color: #e0f2fe;
|
|
230
|
+
--dev-tool-border-color: #1e3a8a;
|
|
231
|
+
--dev-tool-info-color: #7dd3fc;
|
|
232
|
+
--dev-tool-log-color: #0a1b35;
|
|
233
|
+
--dev-tool-nil-color: #38bdf8;
|
|
234
|
+
--dev-tool-main-color: #38bdf8;
|
|
235
|
+
|
|
236
|
+
/* Syntax Highlighting (Ocean Blue) */
|
|
237
|
+
--dev-tool-number-color: #7dd3fc;
|
|
238
|
+
--dev-tool-boolean-color: #7dd3fc;
|
|
239
|
+
--dev-tool-symbol-color: #f472b6;
|
|
240
|
+
--dev-tool-active-bg-color: #1e3a8a;
|
|
241
|
+
--dev-tool-time-line-color: #38bdf8;
|
|
242
|
+
--dev-tool-note-color: #1e40af;
|
|
243
|
+
--dev-tool-keyword-color: #818cf8;
|
|
244
|
+
--dev-tool-bracket-color: #1e40af;
|
|
245
|
+
--dev-tool-quotation-color: #34d399;
|
|
246
|
+
--dev-tool-string-color: #34d399;
|
|
247
|
+
--dev-tool-function-color: #38bdf8;
|
|
248
|
+
--dev-tool-attribute-color: #c084fc;
|
|
249
|
+
--dev-tool-operator-color: #2dd4bf;
|
|
250
|
+
|
|
251
|
+
/* Status Backgrounds */
|
|
252
|
+
--dev-tool-warn-bg-color: rgb(245 158 11 / 15%);
|
|
253
|
+
--dev-tool-error-bg-color: rgb(244 63 94 / 15%);
|
|
254
|
+
--dev-tool-success-bg-color: rgb(16 185 129 / 15%);
|
|
255
|
+
--dev-tool-normal-bg-color: #112240;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
/* Lava Orange Theme (Warm Night) */
|
|
259
|
+
.dev-tool-lava {
|
|
260
|
+
--dev-tool-bg-color: rgb(26 5 5 / 90%);
|
|
261
|
+
--dev-tool-bg2-color: rgb(45 10 10 / 80%);
|
|
262
|
+
--dev-tool-bg3-color: #3d0d0d;
|
|
263
|
+
--dev-tool-text-color: #ffebee;
|
|
264
|
+
--dev-tool-border-color: #7f0000;
|
|
265
|
+
--dev-tool-info-color: #9a3412;
|
|
266
|
+
--dev-tool-log-color: #fff7ed;
|
|
267
|
+
--dev-tool-nil-color: #c2410c;
|
|
268
|
+
--dev-tool-main-color: #ef5350;
|
|
269
|
+
|
|
270
|
+
/* Syntax Highlighting */
|
|
271
|
+
--dev-tool-number-color: #ffab91;
|
|
272
|
+
--dev-tool-boolean-color: #ffab91;
|
|
273
|
+
--dev-tool-symbol-color: #ef5350;
|
|
274
|
+
--dev-tool-active-bg-color: #7f0000;
|
|
275
|
+
--dev-tool-time-line-color: #ef5350;
|
|
276
|
+
--dev-tool-note-color: #a8a29e;
|
|
277
|
+
--dev-tool-keyword-color: #f48fb1;
|
|
278
|
+
--dev-tool-bracket-color: #a8a29e;
|
|
279
|
+
--dev-tool-quotation-color: #ffab91;
|
|
280
|
+
--dev-tool-string-color: #ffab91;
|
|
281
|
+
--dev-tool-function-color: #ef5350;
|
|
282
|
+
--dev-tool-attribute-color: #be123c;
|
|
283
|
+
--dev-tool-operator-color: #c2410c;
|
|
284
|
+
|
|
285
|
+
/* Warm Status Backgrounds */
|
|
286
|
+
--dev-tool-warn-bg-color: #fff7ed;
|
|
287
|
+
--dev-tool-error-bg-color: #fef2f2;
|
|
288
|
+
--dev-tool-success-bg-color: #f0fdf4;
|
|
289
|
+
--dev-tool-normal-bg-color: #ffedd5;
|
|
290
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export const THEME_MAIN_COLORS: Record<string, string> = {
|
|
2
|
+
light: '#9254de',
|
|
3
|
+
dark: '#9254de',
|
|
4
|
+
eye: '#6c71c4',
|
|
5
|
+
midnight: '#38bdf8',
|
|
6
|
+
gulf: '#2dd4bf',
|
|
7
|
+
lava: '#f97316',
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export const getThemeMainColor = (theme: string = 'light') => {
|
|
11
|
+
return THEME_MAIN_COLORS[theme] || THEME_MAIN_COLORS.light;
|
|
12
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite-uni-dev-tool",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "vite-uni-dev-tool, debug, uni-app, 一处编写,到处调试",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vite",
|
|
@@ -19,12 +19,29 @@
|
|
|
19
19
|
}
|
|
20
20
|
],
|
|
21
21
|
"license": "MIT",
|
|
22
|
-
"
|
|
22
|
+
"type": "module",
|
|
23
|
+
"main": "dist/index.cjs",
|
|
24
|
+
"module": "dist/index.js",
|
|
23
25
|
"types": "dist/index.d.ts",
|
|
26
|
+
"exports": {
|
|
27
|
+
".": {
|
|
28
|
+
"types": "./dist/index.d.ts",
|
|
29
|
+
"import": "./dist/index.js",
|
|
30
|
+
"require": "./dist/index.cjs"
|
|
31
|
+
},
|
|
32
|
+
"./core": {
|
|
33
|
+
"types": "./dist/core.d.ts",
|
|
34
|
+
"import": "./dist/core.js"
|
|
35
|
+
},
|
|
36
|
+
"./dist/*": "./dist/*",
|
|
37
|
+
"./shims-uni.d.ts": "./dist/shims-uni.d.ts"
|
|
38
|
+
},
|
|
24
39
|
"files": [
|
|
25
|
-
"./dist/"
|
|
40
|
+
"./dist/",
|
|
41
|
+
"README.md"
|
|
26
42
|
],
|
|
27
43
|
"scripts": {
|
|
44
|
+
"build": "vite build",
|
|
28
45
|
"build:lib": "vite build"
|
|
29
46
|
},
|
|
30
47
|
"peerDependencies": {
|
|
@@ -33,7 +50,10 @@
|
|
|
33
50
|
"@dcloudio/uni-h5": ">=3.0.0-4020920240930001",
|
|
34
51
|
"@dcloudio/uni-components": "3.0.0-4020920240930001"
|
|
35
52
|
},
|
|
36
|
-
"dependencies": {
|
|
53
|
+
"dependencies": {
|
|
54
|
+
"miniprogram-ci": "^2.1.14",
|
|
55
|
+
"source-map": "^0.7.4"
|
|
56
|
+
},
|
|
37
57
|
"devDependencies": {},
|
|
38
58
|
"authors": [
|
|
39
59
|
"1264174856@qq.com"
|
|
@@ -41,4 +61,4 @@
|
|
|
41
61
|
"publishConfig": {
|
|
42
62
|
"access": "public"
|
|
43
63
|
}
|
|
44
|
-
}
|
|
64
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../dev/devConsole/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAUvC;;;;;;;;;GASG;AACH,qBAAa,UAAU;IACrB,KAAK,EAAE,QAAQ,CAAC;IAEhB;;;;OAIG;IACH,OAAO,sBAA6B;IAEpC;;;;OAIG;IACH,QAAQ,sBAA6B;gBAEzB,KAAK,EAAE,QAAQ;IAI3B;;;;;;OAMG;IACH,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,WAAW,EAAE,IAAI,EAAE,GAAG,EAAE;IAwC9C;;;;;OAKG;IACH,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE;IAIlB;;;;;OAKG;IACH,IAAI,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE;IAInB;;;;;OAKG;IACH,IAAI,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE;IAInB;;;;;OAKG;IACH,KAAK,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE;IAIpB;;;;;OAKG;IACH,IAAI,CAAC,KAAK,EAAE,MAAM;IAKlB;;;;;OAKG;IACH,OAAO,CAAC,KAAK,EAAE,MAAM;IAoCrB;;;;OAIG;IACH,KAAK;IAKL;;;;;OAKG;IACH,KAAK,CAAC,KAAK,GAAE,MAAW;IA8BxB;;;;;OAKG;IACH,UAAU,CAAC,KAAK,GAAE,MAAW;IAI7B;;;;;OAKG;IACH,MAAM,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE;IAIrB;;;;;OAKG;IACH,KAAK,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE;IAIpB;;;;;OAKG;IACH,GAAG,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE;IAIlB;;;;;OAKG;IACH,MAAM,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE;IAIrB;;;;;OAKG;IACH,KAAK,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE;IAIpB;;;;;OAKG;IACH,cAAc,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE;IAI7B;;;;OAIG;IACH,QAAQ;IAIR;;;;;OAKG;IACH,KAAK,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE;IAIpB;;;;;OAKG;IACH,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE;IAIxB;;;;;OAKG;IACH,KAAK,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE;CAuBrB"}
|