@snapshot-labs/snapshot.js 0.12.45 → 0.12.47
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/snapshot.cjs.js +56 -65
- package/dist/snapshot.esm.js +56 -65
- package/dist/snapshot.min.js +10 -10
- package/dist/src/index.d.ts +49 -21
- package/dist/src/schemas/index.d.ts +48 -21
- package/dist/src/utils/delegation.d.ts +1 -0
- package/dist/src/utils.d.ts +1 -0
- package/package.json +1 -1
- package/src/delegationSubgraphs.json +1 -0
- package/src/schemas/proposal.json +2 -10
- package/src/schemas/space.json +48 -5
- package/src/schemas/update-proposal.json +2 -10
- package/src/utils.ts +0 -42
package/dist/snapshot.cjs.js
CHANGED
|
@@ -539,7 +539,6 @@ var definitions = {
|
|
|
539
539
|
symbol: {
|
|
540
540
|
type: "string",
|
|
541
541
|
title: "symbol",
|
|
542
|
-
minLength: 1,
|
|
543
542
|
maxLength: 16
|
|
544
543
|
},
|
|
545
544
|
skin: {
|
|
@@ -567,10 +566,6 @@ var definitions = {
|
|
|
567
566
|
strategies: {
|
|
568
567
|
type: "array",
|
|
569
568
|
minItems: 1,
|
|
570
|
-
maxItemsWithSpaceType: {
|
|
571
|
-
"default": 8,
|
|
572
|
-
turbo: 10
|
|
573
|
-
},
|
|
574
569
|
uniqueItems: true,
|
|
575
570
|
items: {
|
|
576
571
|
type: "object",
|
|
@@ -978,6 +973,57 @@ var definitions = {
|
|
|
978
973
|
"bribeEnabled"
|
|
979
974
|
],
|
|
980
975
|
additionalProperties: false
|
|
976
|
+
},
|
|
977
|
+
skinSettings: {
|
|
978
|
+
type: "object",
|
|
979
|
+
properties: {
|
|
980
|
+
bg_color: {
|
|
981
|
+
type: "string",
|
|
982
|
+
format: "color"
|
|
983
|
+
},
|
|
984
|
+
link_color: {
|
|
985
|
+
type: "string",
|
|
986
|
+
format: "color"
|
|
987
|
+
},
|
|
988
|
+
text_color: {
|
|
989
|
+
type: "string",
|
|
990
|
+
format: "color"
|
|
991
|
+
},
|
|
992
|
+
content_color: {
|
|
993
|
+
type: "string",
|
|
994
|
+
format: "color"
|
|
995
|
+
},
|
|
996
|
+
border_color: {
|
|
997
|
+
type: "string",
|
|
998
|
+
format: "color"
|
|
999
|
+
},
|
|
1000
|
+
heading_color: {
|
|
1001
|
+
type: "string",
|
|
1002
|
+
format: "color"
|
|
1003
|
+
},
|
|
1004
|
+
primary_color: {
|
|
1005
|
+
type: "string",
|
|
1006
|
+
format: "color"
|
|
1007
|
+
},
|
|
1008
|
+
header_color: {
|
|
1009
|
+
type: "string",
|
|
1010
|
+
format: "color"
|
|
1011
|
+
},
|
|
1012
|
+
theme: {
|
|
1013
|
+
type: "string",
|
|
1014
|
+
"enum": [
|
|
1015
|
+
"light",
|
|
1016
|
+
"dark"
|
|
1017
|
+
]
|
|
1018
|
+
},
|
|
1019
|
+
logo: {
|
|
1020
|
+
type: "string",
|
|
1021
|
+
title: "logo",
|
|
1022
|
+
format: "customUrl",
|
|
1023
|
+
maxLength: 256
|
|
1024
|
+
}
|
|
1025
|
+
},
|
|
1026
|
+
additionalProperties: false
|
|
981
1027
|
}
|
|
982
1028
|
},
|
|
983
1029
|
required: [
|
|
@@ -1010,11 +1056,7 @@ var definitions$1 = {
|
|
|
1010
1056
|
body: {
|
|
1011
1057
|
type: "string",
|
|
1012
1058
|
title: "body",
|
|
1013
|
-
minLength: 0
|
|
1014
|
-
maxLengthWithSpaceType: {
|
|
1015
|
-
"default": 10000,
|
|
1016
|
-
turbo: 40000
|
|
1017
|
-
}
|
|
1059
|
+
minLength: 0
|
|
1018
1060
|
},
|
|
1019
1061
|
discussion: {
|
|
1020
1062
|
type: "string",
|
|
@@ -1025,11 +1067,7 @@ var definitions$1 = {
|
|
|
1025
1067
|
choices: {
|
|
1026
1068
|
type: "array",
|
|
1027
1069
|
title: "choices",
|
|
1028
|
-
minItems: 1
|
|
1029
|
-
maxLengthWithSpaceType: {
|
|
1030
|
-
"default": 500,
|
|
1031
|
-
turbo: 1000
|
|
1032
|
-
}
|
|
1070
|
+
minItems: 1
|
|
1033
1071
|
},
|
|
1034
1072
|
labels: {
|
|
1035
1073
|
type: "array",
|
|
@@ -1125,11 +1163,7 @@ var definitions$2 = {
|
|
|
1125
1163
|
body: {
|
|
1126
1164
|
type: "string",
|
|
1127
1165
|
title: "body",
|
|
1128
|
-
minLength: 0
|
|
1129
|
-
maxLengthWithSpaceType: {
|
|
1130
|
-
"default": 10000,
|
|
1131
|
-
turbo: 20000
|
|
1132
|
-
}
|
|
1166
|
+
minLength: 0
|
|
1133
1167
|
},
|
|
1134
1168
|
discussion: {
|
|
1135
1169
|
type: "string",
|
|
@@ -1140,11 +1174,7 @@ var definitions$2 = {
|
|
|
1140
1174
|
choices: {
|
|
1141
1175
|
type: "array",
|
|
1142
1176
|
title: "choices",
|
|
1143
|
-
minItems: 1
|
|
1144
|
-
maxLengthWithSpaceType: {
|
|
1145
|
-
"default": 500,
|
|
1146
|
-
turbo: 1000
|
|
1147
|
-
}
|
|
1177
|
+
minItems: 1
|
|
1148
1178
|
},
|
|
1149
1179
|
labels: {
|
|
1150
1180
|
type: "array",
|
|
@@ -3965,6 +3995,7 @@ var delegationSubgraphs = {
|
|
|
3965
3995
|
"137": "https://subgrapher.snapshot.org/delegation/137",
|
|
3966
3996
|
"146": "https://subgrapher.snapshot.org/delegation/146",
|
|
3967
3997
|
"250": "https://subgrapher.snapshot.org/delegation/250",
|
|
3998
|
+
"5000": "https://subgrapher.snapshot.org/delegation/5000",
|
|
3968
3999
|
"8453": "https://subgrapher.snapshot.org/delegation/8453",
|
|
3969
4000
|
"42161": "https://subgrapher.snapshot.org/delegation/42161",
|
|
3970
4001
|
"59144": "https://subgrapher.snapshot.org/delegation/59144",
|
|
@@ -4205,46 +4236,6 @@ ajv.addKeyword({
|
|
|
4205
4236
|
message: 'network not allowed'
|
|
4206
4237
|
}
|
|
4207
4238
|
});
|
|
4208
|
-
ajv.addKeyword({
|
|
4209
|
-
keyword: 'maxLengthWithSpaceType',
|
|
4210
|
-
validate: function validate(schema, data) {
|
|
4211
|
-
// @ts-ignore
|
|
4212
|
-
const spaceType = this.spaceType || 'default';
|
|
4213
|
-
const isValid = data.length <= schema[spaceType];
|
|
4214
|
-
if (!isValid) {
|
|
4215
|
-
// @ts-ignore
|
|
4216
|
-
validate.errors = [
|
|
4217
|
-
{
|
|
4218
|
-
keyword: 'maxLengthWithSpaceType',
|
|
4219
|
-
message: `must not have more than ${schema[spaceType]}`,
|
|
4220
|
-
params: { limit: schema[spaceType] }
|
|
4221
|
-
}
|
|
4222
|
-
];
|
|
4223
|
-
}
|
|
4224
|
-
return isValid;
|
|
4225
|
-
},
|
|
4226
|
-
errors: true
|
|
4227
|
-
});
|
|
4228
|
-
ajv.addKeyword({
|
|
4229
|
-
keyword: 'maxItemsWithSpaceType',
|
|
4230
|
-
validate: function validate(schema, data) {
|
|
4231
|
-
// @ts-ignore
|
|
4232
|
-
const spaceType = this.spaceType || 'default';
|
|
4233
|
-
const isValid = data.length <= schema[spaceType];
|
|
4234
|
-
if (!isValid) {
|
|
4235
|
-
// @ts-ignore
|
|
4236
|
-
validate.errors = [
|
|
4237
|
-
{
|
|
4238
|
-
keyword: 'maxItemsWithSpaceType',
|
|
4239
|
-
message: `must NOT have more than ${schema[spaceType]} items`,
|
|
4240
|
-
params: { limit: schema[spaceType] }
|
|
4241
|
-
}
|
|
4242
|
-
];
|
|
4243
|
-
}
|
|
4244
|
-
return isValid;
|
|
4245
|
-
},
|
|
4246
|
-
errors: true
|
|
4247
|
-
});
|
|
4248
4239
|
// Custom URL format to allow empty string values
|
|
4249
4240
|
// https://github.com/snapshot-labs/snapshot.js/pull/541/files
|
|
4250
4241
|
ajv.addFormat('customUrl', {
|
package/dist/snapshot.esm.js
CHANGED
|
@@ -529,7 +529,6 @@ var definitions = {
|
|
|
529
529
|
symbol: {
|
|
530
530
|
type: "string",
|
|
531
531
|
title: "symbol",
|
|
532
|
-
minLength: 1,
|
|
533
532
|
maxLength: 16
|
|
534
533
|
},
|
|
535
534
|
skin: {
|
|
@@ -557,10 +556,6 @@ var definitions = {
|
|
|
557
556
|
strategies: {
|
|
558
557
|
type: "array",
|
|
559
558
|
minItems: 1,
|
|
560
|
-
maxItemsWithSpaceType: {
|
|
561
|
-
"default": 8,
|
|
562
|
-
turbo: 10
|
|
563
|
-
},
|
|
564
559
|
uniqueItems: true,
|
|
565
560
|
items: {
|
|
566
561
|
type: "object",
|
|
@@ -968,6 +963,57 @@ var definitions = {
|
|
|
968
963
|
"bribeEnabled"
|
|
969
964
|
],
|
|
970
965
|
additionalProperties: false
|
|
966
|
+
},
|
|
967
|
+
skinSettings: {
|
|
968
|
+
type: "object",
|
|
969
|
+
properties: {
|
|
970
|
+
bg_color: {
|
|
971
|
+
type: "string",
|
|
972
|
+
format: "color"
|
|
973
|
+
},
|
|
974
|
+
link_color: {
|
|
975
|
+
type: "string",
|
|
976
|
+
format: "color"
|
|
977
|
+
},
|
|
978
|
+
text_color: {
|
|
979
|
+
type: "string",
|
|
980
|
+
format: "color"
|
|
981
|
+
},
|
|
982
|
+
content_color: {
|
|
983
|
+
type: "string",
|
|
984
|
+
format: "color"
|
|
985
|
+
},
|
|
986
|
+
border_color: {
|
|
987
|
+
type: "string",
|
|
988
|
+
format: "color"
|
|
989
|
+
},
|
|
990
|
+
heading_color: {
|
|
991
|
+
type: "string",
|
|
992
|
+
format: "color"
|
|
993
|
+
},
|
|
994
|
+
primary_color: {
|
|
995
|
+
type: "string",
|
|
996
|
+
format: "color"
|
|
997
|
+
},
|
|
998
|
+
header_color: {
|
|
999
|
+
type: "string",
|
|
1000
|
+
format: "color"
|
|
1001
|
+
},
|
|
1002
|
+
theme: {
|
|
1003
|
+
type: "string",
|
|
1004
|
+
"enum": [
|
|
1005
|
+
"light",
|
|
1006
|
+
"dark"
|
|
1007
|
+
]
|
|
1008
|
+
},
|
|
1009
|
+
logo: {
|
|
1010
|
+
type: "string",
|
|
1011
|
+
title: "logo",
|
|
1012
|
+
format: "customUrl",
|
|
1013
|
+
maxLength: 256
|
|
1014
|
+
}
|
|
1015
|
+
},
|
|
1016
|
+
additionalProperties: false
|
|
971
1017
|
}
|
|
972
1018
|
},
|
|
973
1019
|
required: [
|
|
@@ -1000,11 +1046,7 @@ var definitions$1 = {
|
|
|
1000
1046
|
body: {
|
|
1001
1047
|
type: "string",
|
|
1002
1048
|
title: "body",
|
|
1003
|
-
minLength: 0
|
|
1004
|
-
maxLengthWithSpaceType: {
|
|
1005
|
-
"default": 10000,
|
|
1006
|
-
turbo: 40000
|
|
1007
|
-
}
|
|
1049
|
+
minLength: 0
|
|
1008
1050
|
},
|
|
1009
1051
|
discussion: {
|
|
1010
1052
|
type: "string",
|
|
@@ -1015,11 +1057,7 @@ var definitions$1 = {
|
|
|
1015
1057
|
choices: {
|
|
1016
1058
|
type: "array",
|
|
1017
1059
|
title: "choices",
|
|
1018
|
-
minItems: 1
|
|
1019
|
-
maxLengthWithSpaceType: {
|
|
1020
|
-
"default": 500,
|
|
1021
|
-
turbo: 1000
|
|
1022
|
-
}
|
|
1060
|
+
minItems: 1
|
|
1023
1061
|
},
|
|
1024
1062
|
labels: {
|
|
1025
1063
|
type: "array",
|
|
@@ -1115,11 +1153,7 @@ var definitions$2 = {
|
|
|
1115
1153
|
body: {
|
|
1116
1154
|
type: "string",
|
|
1117
1155
|
title: "body",
|
|
1118
|
-
minLength: 0
|
|
1119
|
-
maxLengthWithSpaceType: {
|
|
1120
|
-
"default": 10000,
|
|
1121
|
-
turbo: 20000
|
|
1122
|
-
}
|
|
1156
|
+
minLength: 0
|
|
1123
1157
|
},
|
|
1124
1158
|
discussion: {
|
|
1125
1159
|
type: "string",
|
|
@@ -1130,11 +1164,7 @@ var definitions$2 = {
|
|
|
1130
1164
|
choices: {
|
|
1131
1165
|
type: "array",
|
|
1132
1166
|
title: "choices",
|
|
1133
|
-
minItems: 1
|
|
1134
|
-
maxLengthWithSpaceType: {
|
|
1135
|
-
"default": 500,
|
|
1136
|
-
turbo: 1000
|
|
1137
|
-
}
|
|
1167
|
+
minItems: 1
|
|
1138
1168
|
},
|
|
1139
1169
|
labels: {
|
|
1140
1170
|
type: "array",
|
|
@@ -3955,6 +3985,7 @@ var delegationSubgraphs = {
|
|
|
3955
3985
|
"137": "https://subgrapher.snapshot.org/delegation/137",
|
|
3956
3986
|
"146": "https://subgrapher.snapshot.org/delegation/146",
|
|
3957
3987
|
"250": "https://subgrapher.snapshot.org/delegation/250",
|
|
3988
|
+
"5000": "https://subgrapher.snapshot.org/delegation/5000",
|
|
3958
3989
|
"8453": "https://subgrapher.snapshot.org/delegation/8453",
|
|
3959
3990
|
"42161": "https://subgrapher.snapshot.org/delegation/42161",
|
|
3960
3991
|
"59144": "https://subgrapher.snapshot.org/delegation/59144",
|
|
@@ -4195,46 +4226,6 @@ ajv.addKeyword({
|
|
|
4195
4226
|
message: 'network not allowed'
|
|
4196
4227
|
}
|
|
4197
4228
|
});
|
|
4198
|
-
ajv.addKeyword({
|
|
4199
|
-
keyword: 'maxLengthWithSpaceType',
|
|
4200
|
-
validate: function validate(schema, data) {
|
|
4201
|
-
// @ts-ignore
|
|
4202
|
-
const spaceType = this.spaceType || 'default';
|
|
4203
|
-
const isValid = data.length <= schema[spaceType];
|
|
4204
|
-
if (!isValid) {
|
|
4205
|
-
// @ts-ignore
|
|
4206
|
-
validate.errors = [
|
|
4207
|
-
{
|
|
4208
|
-
keyword: 'maxLengthWithSpaceType',
|
|
4209
|
-
message: `must not have more than ${schema[spaceType]}`,
|
|
4210
|
-
params: { limit: schema[spaceType] }
|
|
4211
|
-
}
|
|
4212
|
-
];
|
|
4213
|
-
}
|
|
4214
|
-
return isValid;
|
|
4215
|
-
},
|
|
4216
|
-
errors: true
|
|
4217
|
-
});
|
|
4218
|
-
ajv.addKeyword({
|
|
4219
|
-
keyword: 'maxItemsWithSpaceType',
|
|
4220
|
-
validate: function validate(schema, data) {
|
|
4221
|
-
// @ts-ignore
|
|
4222
|
-
const spaceType = this.spaceType || 'default';
|
|
4223
|
-
const isValid = data.length <= schema[spaceType];
|
|
4224
|
-
if (!isValid) {
|
|
4225
|
-
// @ts-ignore
|
|
4226
|
-
validate.errors = [
|
|
4227
|
-
{
|
|
4228
|
-
keyword: 'maxItemsWithSpaceType',
|
|
4229
|
-
message: `must NOT have more than ${schema[spaceType]} items`,
|
|
4230
|
-
params: { limit: schema[spaceType] }
|
|
4231
|
-
}
|
|
4232
|
-
];
|
|
4233
|
-
}
|
|
4234
|
-
return isValid;
|
|
4235
|
-
},
|
|
4236
|
-
errors: true
|
|
4237
|
-
});
|
|
4238
4229
|
// Custom URL format to allow empty string values
|
|
4239
4230
|
// https://github.com/snapshot-labs/snapshot.js/pull/541/files
|
|
4240
4231
|
ajv.addFormat('customUrl', {
|