@blocklet/constant 1.16.41-beta-20250325-154552-2bf78c26 → 1.16.41-beta-20250331-010247-966fcfb0
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/index.d.ts +1 -0
- package/index.js +41 -1
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -812,6 +812,7 @@ export declare const BlockletEvents: Readonly<{
|
|
|
812
812
|
spaceConnected: "blocklet.spaceConnected";
|
|
813
813
|
nftConsumed: "blocklet.nftConsumed";
|
|
814
814
|
securityConfigUpdated: "blocklet.securityConfigUpdated";
|
|
815
|
+
configTheme: "blocklet.configTheme";
|
|
815
816
|
}>;
|
|
816
817
|
export declare const BlockletInternalEvents: Readonly<{
|
|
817
818
|
appConfigChanged: "blocklet.appConfigChanged";
|
package/index.js
CHANGED
|
@@ -868,6 +868,7 @@ var BlockletStatus = Object.freeze({
|
|
|
868
868
|
added: 0,
|
|
869
869
|
downloading: 1,
|
|
870
870
|
downloaded: 2,
|
|
871
|
+
// Deprecated
|
|
871
872
|
installing: 3,
|
|
872
873
|
installed: 4,
|
|
873
874
|
starting: 5,
|
|
@@ -877,6 +878,7 @@ var BlockletStatus = Object.freeze({
|
|
|
877
878
|
error: 9,
|
|
878
879
|
upgrading: 10,
|
|
879
880
|
restarting: 11,
|
|
881
|
+
// Deprecated
|
|
880
882
|
corrupted: 12,
|
|
881
883
|
waiting: 13,
|
|
882
884
|
deleted: 14
|
|
@@ -891,27 +893,42 @@ var SUSPENDED_REASON = {
|
|
|
891
893
|
var fromBlockletStatus = fromEntry(BlockletStatus);
|
|
892
894
|
var toBlockletStatus = toEntry(BlockletStatus);
|
|
893
895
|
var BlockletSource = Object.freeze({
|
|
896
|
+
// Installed from Blocklet Store
|
|
894
897
|
registry: 0,
|
|
898
|
+
// Installed from local development source folder
|
|
895
899
|
local: 1,
|
|
900
|
+
// Installed from uploading bundle directly
|
|
896
901
|
upload: 2,
|
|
902
|
+
// Installed from a url (similar to Blocklet Store)
|
|
897
903
|
url: 3,
|
|
904
|
+
// Installed by custom creation
|
|
898
905
|
custom: 4
|
|
899
906
|
});
|
|
900
907
|
var fromBlockletSource = fromEntry(BlockletSource);
|
|
901
908
|
var toBlockletSource = toEntry(BlockletSource);
|
|
902
909
|
var BlockletGroup = Object.freeze({
|
|
910
|
+
// Only static website
|
|
911
|
+
// The website is served by by Blocklet Server at runtime
|
|
903
912
|
static: "static",
|
|
913
|
+
// The runtime instance is provided by its own backend server
|
|
904
914
|
dapp: "dapp",
|
|
915
|
+
// This type is used to combine other component blocklets
|
|
916
|
+
// No instance will be spawned at runtime
|
|
905
917
|
gateway: "gateway",
|
|
918
|
+
// This type is used to pack other blocklets
|
|
919
|
+
// No instance will be spawned at runtime
|
|
920
|
+
// The difference is that a pack is a component in an app, whereas a gateway is an app itself.
|
|
906
921
|
pack: "pack"
|
|
907
922
|
});
|
|
908
923
|
var BLOCKLET_GROUPS = ["dapp", "static", "gateway", "pack"];
|
|
909
924
|
var BlockletEvents = Object.freeze({
|
|
925
|
+
// status updated
|
|
910
926
|
added: "blocklet.added",
|
|
911
927
|
downloadFailed: "blocklet.downloadFailed",
|
|
912
928
|
installed: "blocklet.installed",
|
|
913
929
|
installFailed: "blocklet.installFailed",
|
|
914
930
|
upgraded: "blocklet.upgraded",
|
|
931
|
+
// only for internal use (refresh router)
|
|
915
932
|
removed: "blocklet.removed",
|
|
916
933
|
started: "blocklet.started",
|
|
917
934
|
startFailed: "blocklet.startFailed",
|
|
@@ -923,20 +940,30 @@ var BlockletEvents = Object.freeze({
|
|
|
923
940
|
componentUpgraded: "blocklet.componentUpgraded",
|
|
924
941
|
componentUpgradeFailed: "blocklet.componentUpgradeFailed",
|
|
925
942
|
componentRemoved: "blocklet.componentRemoved",
|
|
943
|
+
// 关闭自动备份
|
|
926
944
|
disableAutoBackup: "blocklet.disableAutoBackup",
|
|
945
|
+
// 备份还原进度
|
|
927
946
|
backupProgress: "blocklet.backupProgress",
|
|
928
947
|
restoreProgress: "blocklet.restoreProgress",
|
|
929
948
|
downloadBundleProgress: "blocklet.downloadBundleProgress",
|
|
949
|
+
// state updated
|
|
930
950
|
updated: "blocklet.updated",
|
|
931
951
|
domainStatus: "blocklet.domainStatus",
|
|
932
952
|
storeChange: "blocklet.storeChange",
|
|
933
953
|
appDidChanged: "blocklet.appDidChanged",
|
|
954
|
+
// purchase
|
|
934
955
|
purchaseChange: "blocklet.purchaseChange",
|
|
956
|
+
// cert
|
|
935
957
|
certError: "blocklet.certError",
|
|
936
958
|
certIssued: "blocklet.certIssued",
|
|
959
|
+
// did-space
|
|
937
960
|
spaceConnected: "blocklet.spaceConnected",
|
|
961
|
+
// install by nft
|
|
938
962
|
nftConsumed: "blocklet.nftConsumed",
|
|
939
|
-
|
|
963
|
+
// securityConfig
|
|
964
|
+
securityConfigUpdated: "blocklet.securityConfigUpdated",
|
|
965
|
+
// appearance
|
|
966
|
+
configTheme: "blocklet.configTheme"
|
|
940
967
|
});
|
|
941
968
|
var BlockletInternalEvents = Object.freeze({
|
|
942
969
|
appConfigChanged: "blocklet.appConfigChanged",
|
|
@@ -949,6 +976,7 @@ var BlockletInternalEvents = Object.freeze({
|
|
|
949
976
|
componentRemoved: "blocklet._componentRemoved",
|
|
950
977
|
componentConfigChanged: "blocklet._componentConfigChanged",
|
|
951
978
|
componentsUpdated: "blocklet.componentsUpdated"
|
|
979
|
+
// deprecated, for backward compatibility
|
|
952
980
|
});
|
|
953
981
|
var TeamEvents = Object.freeze({
|
|
954
982
|
userAdded: "user.added",
|
|
@@ -1045,32 +1073,40 @@ var BLOCKLET_LATEST_SPEC_VERSION = "1.2.8";
|
|
|
1045
1073
|
var BLOCKLET_LATEST_REQUIREMENT_SERVER = ">=1.7.0";
|
|
1046
1074
|
var BLOCKLET_LATEST_REQUIREMENT_ABTNODE = ">=1.5.15";
|
|
1047
1075
|
var BLOCKLET_CONFIGURABLE_KEY = {
|
|
1076
|
+
// APP Config Key that start with BLOCKLET_ cannot set to child component
|
|
1048
1077
|
BLOCKLET_CLUSTER_SIZE: "BLOCKLET_CLUSTER_SIZE",
|
|
1049
1078
|
BLOCKLET_APP_NAME: "BLOCKLET_APP_NAME",
|
|
1050
1079
|
BLOCKLET_APP_DESCRIPTION: "BLOCKLET_APP_DESCRIPTION",
|
|
1051
1080
|
BLOCKLET_APP_SK: "BLOCKLET_APP_SK",
|
|
1052
1081
|
BLOCKLET_APP_LOGO: "BLOCKLET_APP_LOGO",
|
|
1082
|
+
// deprecated
|
|
1053
1083
|
BLOCKLET_APP_LOGO_SQUARE: "BLOCKLET_APP_LOGO_SQUARE",
|
|
1054
1084
|
BLOCKLET_APP_LOGO_RECT: "BLOCKLET_APP_LOGO_RECT",
|
|
1055
1085
|
BLOCKLET_APP_LOGO_FAVICON: "BLOCKLET_APP_LOGO_FAVICON",
|
|
1056
1086
|
BLOCKLET_APP_SPLASH_PORTRAIT: "BLOCKLET_APP_SPLASH_PORTRAIT",
|
|
1057
1087
|
BLOCKLET_APP_SPLASH_LANDSCAPE: "BLOCKLET_APP_SPLASH_LANDSCAPE",
|
|
1058
1088
|
BLOCKLET_APP_OG_IMAGE: "BLOCKLET_APP_OG_IMAGE",
|
|
1089
|
+
// background image for open graph
|
|
1059
1090
|
BLOCKLET_APP_OG_COLOR: "BLOCKLET_APP_OG_COLOR",
|
|
1091
|
+
// text color for open graph, dark | light
|
|
1060
1092
|
BLOCKLET_APP_URL: "BLOCKLET_APP_URL",
|
|
1061
1093
|
BLOCKLET_APP_LANGUAGES: "BLOCKLET_APP_LANGUAGES",
|
|
1062
1094
|
BLOCKLET_PASSPORT_COLOR: "BLOCKLET_PASSPORT_COLOR",
|
|
1063
1095
|
BLOCKLET_WALLET_TYPE: "BLOCKLET_WALLET_TYPE",
|
|
1096
|
+
// deprecated
|
|
1064
1097
|
BLOCKLET_DELETABLE: "BLOCKLET_DELETABLE",
|
|
1065
1098
|
BLOCKLET_APP_TENANT_MODE: "BLOCKLET_APP_TENANT_MODE",
|
|
1066
1099
|
BLOCKLET_APP_COPYRIGHT_OWNER: "BLOCKLET_APP_COPYRIGHT_OWNER",
|
|
1067
1100
|
BLOCKLET_APP_COPYRIGHT_YEAR: "BLOCKLET_APP_COPYRIGHT_YEAR",
|
|
1101
|
+
// 应用使用 DID Spaces 存储 文件/nft 的时候使用的环境变量
|
|
1068
1102
|
BLOCKLET_APP_SPACE_ENDPOINT: "BLOCKLET_APP_SPACE_ENDPOINT",
|
|
1069
1103
|
BLOCKLET_APP_SPACES_URL: "BLOCKLET_APP_SPACES_URL",
|
|
1104
|
+
// 应用使用 DID Spaces 备份的时候使用的环境变量
|
|
1070
1105
|
BLOCKLET_APP_BACKUP_ENDPOINT: "BLOCKLET_APP_BACKUP_ENDPOINT",
|
|
1071
1106
|
BLOCKLET_APP_CHAIN_HOST: "BLOCKLET_APP_CHAIN_HOST",
|
|
1072
1107
|
BLOCKLET_APP_CHAIN_TYPE: "BLOCKLET_APP_CHAIN_TYPE",
|
|
1073
1108
|
BLOCKLET_APP_CHAIN_ID: "BLOCKLET_APP_CHAIN_ID",
|
|
1109
|
+
// Component Key
|
|
1074
1110
|
COMPONENT_ACCESS_WHO: "COMPONENT_ACCESS_WHO"
|
|
1075
1111
|
};
|
|
1076
1112
|
var DID_SPACES = {
|
|
@@ -1081,9 +1117,13 @@ var DID_SPACES = {
|
|
|
1081
1117
|
}
|
|
1082
1118
|
};
|
|
1083
1119
|
var BLOCKLET_APP_SPACE_REQUIREMENT = {
|
|
1120
|
+
// 安装应用的时候,启动流程必须绑定 DID Space
|
|
1084
1121
|
REQUIRED: "required",
|
|
1085
1122
|
REQUIRED_ON_SETUP: "requiredOnSetup",
|
|
1123
|
+
// 等价于 REQUIRED
|
|
1124
|
+
// 安装应用的时候,绑定 DID Space 是可选的
|
|
1086
1125
|
OPTIONAL: "optional",
|
|
1126
|
+
// 所有的数据都将存储到用户各自的 DID Space
|
|
1087
1127
|
REQUIRED_ON_CONNECT: "requiredOnConnect"
|
|
1088
1128
|
};
|
|
1089
1129
|
var CHAIN_INFO_CONFIG = {
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.16.41-beta-
|
|
6
|
+
"version": "1.16.41-beta-20250331-010247-966fcfb0",
|
|
7
7
|
"description": "Blocklet constants",
|
|
8
8
|
"main": "index.js",
|
|
9
9
|
"type": "commonjs",
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"ts-jest": "^29.2.5",
|
|
37
37
|
"typescript": "^5.6.3"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "3c7f691205d82118ef5e8d60fbb2dd84fe7b7b7c"
|
|
40
40
|
}
|