@snapshot-labs/snapshot.js 0.12.16 → 0.12.17
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 +47 -0
- package/dist/snapshot.esm.js +47 -0
- package/dist/snapshot.min.js +2 -2
- package/dist/src/index.d.ts +35 -0
- package/dist/src/schemas/index.d.ts +35 -0
- package/package.json +1 -1
- package/src/schemas/space.json +35 -0
- package/src/utils.ts +7 -0
package/dist/snapshot.cjs.js
CHANGED
|
@@ -868,6 +868,46 @@ var definitions = {
|
|
|
868
868
|
additionalProperties: false
|
|
869
869
|
}
|
|
870
870
|
},
|
|
871
|
+
labels: {
|
|
872
|
+
type: "array",
|
|
873
|
+
maxItems: 100,
|
|
874
|
+
uniqueItems: true,
|
|
875
|
+
items: {
|
|
876
|
+
type: "object",
|
|
877
|
+
properties: {
|
|
878
|
+
id: {
|
|
879
|
+
type: "string",
|
|
880
|
+
title: "Id",
|
|
881
|
+
minLength: 1,
|
|
882
|
+
maxLength: 8
|
|
883
|
+
},
|
|
884
|
+
name: {
|
|
885
|
+
type: "string",
|
|
886
|
+
title: "Name",
|
|
887
|
+
minLength: 1,
|
|
888
|
+
maxLength: 32
|
|
889
|
+
},
|
|
890
|
+
description: {
|
|
891
|
+
type: "string",
|
|
892
|
+
title: "Description",
|
|
893
|
+
minLength: 1,
|
|
894
|
+
maxLength: 100
|
|
895
|
+
},
|
|
896
|
+
color: {
|
|
897
|
+
type: "string",
|
|
898
|
+
title: "Color",
|
|
899
|
+
format: "color"
|
|
900
|
+
}
|
|
901
|
+
},
|
|
902
|
+
required: [
|
|
903
|
+
"id",
|
|
904
|
+
"name",
|
|
905
|
+
"description",
|
|
906
|
+
"color"
|
|
907
|
+
],
|
|
908
|
+
additionalProperties: false
|
|
909
|
+
}
|
|
910
|
+
},
|
|
871
911
|
parent: {
|
|
872
912
|
type: "string",
|
|
873
913
|
title: "parent"
|
|
@@ -3868,6 +3908,13 @@ ajv.addFormat('long', {
|
|
|
3868
3908
|
ajv.addFormat('lowercase', {
|
|
3869
3909
|
validate: (value) => value === value.toLowerCase()
|
|
3870
3910
|
});
|
|
3911
|
+
ajv.addFormat('color', {
|
|
3912
|
+
validate: (value) => {
|
|
3913
|
+
if (!value)
|
|
3914
|
+
return false;
|
|
3915
|
+
return !!value.match(/^#[0-9A-F]{6}$/);
|
|
3916
|
+
}
|
|
3917
|
+
});
|
|
3871
3918
|
ajv.addFormat('ethValue', {
|
|
3872
3919
|
validate: (value) => {
|
|
3873
3920
|
if (!value.match(/^([0-9]|[1-9][0-9]+)(\.[0-9]+)?$/))
|
package/dist/snapshot.esm.js
CHANGED
|
@@ -858,6 +858,46 @@ var definitions = {
|
|
|
858
858
|
additionalProperties: false
|
|
859
859
|
}
|
|
860
860
|
},
|
|
861
|
+
labels: {
|
|
862
|
+
type: "array",
|
|
863
|
+
maxItems: 100,
|
|
864
|
+
uniqueItems: true,
|
|
865
|
+
items: {
|
|
866
|
+
type: "object",
|
|
867
|
+
properties: {
|
|
868
|
+
id: {
|
|
869
|
+
type: "string",
|
|
870
|
+
title: "Id",
|
|
871
|
+
minLength: 1,
|
|
872
|
+
maxLength: 8
|
|
873
|
+
},
|
|
874
|
+
name: {
|
|
875
|
+
type: "string",
|
|
876
|
+
title: "Name",
|
|
877
|
+
minLength: 1,
|
|
878
|
+
maxLength: 32
|
|
879
|
+
},
|
|
880
|
+
description: {
|
|
881
|
+
type: "string",
|
|
882
|
+
title: "Description",
|
|
883
|
+
minLength: 1,
|
|
884
|
+
maxLength: 100
|
|
885
|
+
},
|
|
886
|
+
color: {
|
|
887
|
+
type: "string",
|
|
888
|
+
title: "Color",
|
|
889
|
+
format: "color"
|
|
890
|
+
}
|
|
891
|
+
},
|
|
892
|
+
required: [
|
|
893
|
+
"id",
|
|
894
|
+
"name",
|
|
895
|
+
"description",
|
|
896
|
+
"color"
|
|
897
|
+
],
|
|
898
|
+
additionalProperties: false
|
|
899
|
+
}
|
|
900
|
+
},
|
|
861
901
|
parent: {
|
|
862
902
|
type: "string",
|
|
863
903
|
title: "parent"
|
|
@@ -3858,6 +3898,13 @@ ajv.addFormat('long', {
|
|
|
3858
3898
|
ajv.addFormat('lowercase', {
|
|
3859
3899
|
validate: (value) => value === value.toLowerCase()
|
|
3860
3900
|
});
|
|
3901
|
+
ajv.addFormat('color', {
|
|
3902
|
+
validate: (value) => {
|
|
3903
|
+
if (!value)
|
|
3904
|
+
return false;
|
|
3905
|
+
return !!value.match(/^#[0-9A-F]{6}$/);
|
|
3906
|
+
}
|
|
3907
|
+
});
|
|
3861
3908
|
ajv.addFormat('ethValue', {
|
|
3862
3909
|
validate: (value) => {
|
|
3863
3910
|
if (!value.match(/^([0-9]|[1-9][0-9]+)(\.[0-9]+)?$/))
|