@panneau/protocol 5.0.0-alpha.1 → 5.0.0-alpha.3
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 +10 -9
- package/dist/conformance/index.d.ts.map +1 -1
- package/dist/conformance/index.js +34 -1
- package/dist/conformance/index.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -2
- package/dist/mock/example.d.ts.map +1 -1
- package/dist/mock/example.js +2 -1
- package/dist/mock/example.js.map +1 -1
- package/dist/mock/index.d.ts.map +1 -1
- package/dist/mock/index.js +20 -1
- package/dist/mock/index.js.map +1 -1
- package/dist/openapi.d.ts +2 -0
- package/dist/openapi.d.ts.map +1 -1
- package/dist/openapi.js +14 -2
- package/dist/openapi.js.map +1 -1
- package/dist/runtime/index.d.ts +1 -0
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/index.js +2 -1
- package/dist/schemas/action.d.ts +1 -0
- package/dist/schemas/action.d.ts.map +1 -1
- package/dist/schemas/action.js +1 -0
- package/dist/schemas/action.js.map +1 -1
- package/dist/schemas/api.d.ts +1 -0
- package/dist/schemas/api.d.ts.map +1 -1
- package/dist/schemas/api.js +2 -1
- package/dist/schemas/api.js.map +1 -1
- package/dist/schemas/definition.d.ts +55 -1
- package/dist/schemas/definition.d.ts.map +1 -1
- package/dist/schemas/definition.js +2 -5
- package/dist/schemas/definition.js.map +1 -1
- package/dist/schemas/index.d.ts +228 -1
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +10 -1
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/resource.d.ts +1 -0
- package/dist/schemas/resource.d.ts.map +1 -1
- package/dist/schemas/theme.d.ts +179 -0
- package/dist/schemas/theme.d.ts.map +1 -0
- package/dist/schemas/theme.js +66 -0
- package/dist/schemas/theme.js.map +1 -0
- package/dist/themes.d.ts +11 -0
- package/dist/themes.d.ts.map +1 -0
- package/dist/themes.js +80 -0
- package/dist/themes.js.map +1 -0
- package/package.json +2 -1
- package/schema/boot.schema.json +258 -12
- package/schema/definition.schema.json +258 -12
- package/schema/openapi.json +436 -12
- package/schema/theme.schema.json +234 -0
package/dist/schemas/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export * from './layout';
|
|
|
9
9
|
export * from './list';
|
|
10
10
|
export * from './action';
|
|
11
11
|
export * from './resource';
|
|
12
|
+
export * from './theme';
|
|
12
13
|
export * from './definition';
|
|
13
14
|
export * from './api';
|
|
14
15
|
export * from './boot';
|
|
@@ -402,6 +403,7 @@ export declare const namedSchemas: {
|
|
|
402
403
|
children: z.ZodOptional<z.ZodArray<typeof LayoutNode>>;
|
|
403
404
|
}, z.core.$loose>>>;
|
|
404
405
|
queued: z.ZodOptional<z.ZodBoolean>;
|
|
406
|
+
dryRun: z.ZodOptional<z.ZodBoolean>;
|
|
405
407
|
url: z.ZodOptional<z.ZodString>;
|
|
406
408
|
route: z.ZodOptional<z.ZodString>;
|
|
407
409
|
component: z.ZodOptional<z.ZodString>;
|
|
@@ -701,6 +703,7 @@ export declare const namedSchemas: {
|
|
|
701
703
|
children: z.ZodOptional<z.ZodArray<typeof LayoutNode>>;
|
|
702
704
|
}, z.core.$loose>>>;
|
|
703
705
|
queued: z.ZodOptional<z.ZodBoolean>;
|
|
706
|
+
dryRun: z.ZodOptional<z.ZodBoolean>;
|
|
704
707
|
url: z.ZodOptional<z.ZodString>;
|
|
705
708
|
route: z.ZodOptional<z.ZodString>;
|
|
706
709
|
component: z.ZodOptional<z.ZodString>;
|
|
@@ -790,6 +793,175 @@ export declare const namedSchemas: {
|
|
|
790
793
|
endpoint: z.ZodOptional<z.ZodString>;
|
|
791
794
|
maxSize: z.ZodOptional<z.ZodNumber>;
|
|
792
795
|
}, z.core.$loose>;
|
|
796
|
+
ThemeTokens: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
797
|
+
ToneValues: z.ZodObject<{
|
|
798
|
+
text: z.ZodString;
|
|
799
|
+
subtle: z.ZodString;
|
|
800
|
+
border: z.ZodString;
|
|
801
|
+
outline: z.ZodString;
|
|
802
|
+
solid: z.ZodString;
|
|
803
|
+
solidHover: z.ZodString;
|
|
804
|
+
solidText: z.ZodString;
|
|
805
|
+
}, z.core.$loose>;
|
|
806
|
+
ToneInput: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
807
|
+
text: z.ZodString;
|
|
808
|
+
subtle: z.ZodString;
|
|
809
|
+
border: z.ZodString;
|
|
810
|
+
outline: z.ZodString;
|
|
811
|
+
solid: z.ZodString;
|
|
812
|
+
solidHover: z.ZodString;
|
|
813
|
+
solidText: z.ZodString;
|
|
814
|
+
dark: z.ZodOptional<z.ZodObject<{
|
|
815
|
+
text: z.ZodOptional<z.ZodString>;
|
|
816
|
+
subtle: z.ZodOptional<z.ZodString>;
|
|
817
|
+
border: z.ZodOptional<z.ZodString>;
|
|
818
|
+
outline: z.ZodOptional<z.ZodString>;
|
|
819
|
+
solid: z.ZodOptional<z.ZodString>;
|
|
820
|
+
solidHover: z.ZodOptional<z.ZodString>;
|
|
821
|
+
solidText: z.ZodOptional<z.ZodString>;
|
|
822
|
+
}, z.core.$loose>>;
|
|
823
|
+
}, z.core.$loose>]>;
|
|
824
|
+
ThemeFontFace: z.ZodObject<{
|
|
825
|
+
family: z.ZodString;
|
|
826
|
+
src: z.ZodString;
|
|
827
|
+
weight: z.ZodOptional<z.ZodString>;
|
|
828
|
+
style: z.ZodOptional<z.ZodString>;
|
|
829
|
+
display: z.ZodOptional<z.ZodEnum<{
|
|
830
|
+
optional: "optional";
|
|
831
|
+
auto: "auto";
|
|
832
|
+
block: "block";
|
|
833
|
+
swap: "swap";
|
|
834
|
+
fallback: "fallback";
|
|
835
|
+
}>>;
|
|
836
|
+
unicodeRange: z.ZodOptional<z.ZodString>;
|
|
837
|
+
}, z.core.$loose>;
|
|
838
|
+
ThemeFontStylesheet: z.ZodObject<{
|
|
839
|
+
stylesheet: z.ZodString;
|
|
840
|
+
}, z.core.$loose>;
|
|
841
|
+
ThemeFont: z.ZodUnion<readonly [z.ZodObject<{
|
|
842
|
+
family: z.ZodString;
|
|
843
|
+
src: z.ZodString;
|
|
844
|
+
weight: z.ZodOptional<z.ZodString>;
|
|
845
|
+
style: z.ZodOptional<z.ZodString>;
|
|
846
|
+
display: z.ZodOptional<z.ZodEnum<{
|
|
847
|
+
optional: "optional";
|
|
848
|
+
auto: "auto";
|
|
849
|
+
block: "block";
|
|
850
|
+
swap: "swap";
|
|
851
|
+
fallback: "fallback";
|
|
852
|
+
}>>;
|
|
853
|
+
unicodeRange: z.ZodOptional<z.ZodString>;
|
|
854
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
855
|
+
stylesheet: z.ZodString;
|
|
856
|
+
}, z.core.$loose>]>;
|
|
857
|
+
Theme: z.ZodObject<{
|
|
858
|
+
label: z.ZodOptional<z.ZodString>;
|
|
859
|
+
tokens: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
860
|
+
dark: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
861
|
+
palette: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
862
|
+
tones: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
863
|
+
text: z.ZodString;
|
|
864
|
+
subtle: z.ZodString;
|
|
865
|
+
border: z.ZodString;
|
|
866
|
+
outline: z.ZodString;
|
|
867
|
+
solid: z.ZodString;
|
|
868
|
+
solidHover: z.ZodString;
|
|
869
|
+
solidText: z.ZodString;
|
|
870
|
+
dark: z.ZodOptional<z.ZodObject<{
|
|
871
|
+
text: z.ZodOptional<z.ZodString>;
|
|
872
|
+
subtle: z.ZodOptional<z.ZodString>;
|
|
873
|
+
border: z.ZodOptional<z.ZodString>;
|
|
874
|
+
outline: z.ZodOptional<z.ZodString>;
|
|
875
|
+
solid: z.ZodOptional<z.ZodString>;
|
|
876
|
+
solidHover: z.ZodOptional<z.ZodString>;
|
|
877
|
+
solidText: z.ZodOptional<z.ZodString>;
|
|
878
|
+
}, z.core.$loose>>;
|
|
879
|
+
}, z.core.$loose>]>>>;
|
|
880
|
+
components: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
881
|
+
variants: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
882
|
+
}, z.core.$loose>>>;
|
|
883
|
+
densities: z.ZodOptional<z.ZodObject<{
|
|
884
|
+
compact: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
885
|
+
comfortable: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
886
|
+
touch: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
887
|
+
}, z.core.$loose>>;
|
|
888
|
+
fonts: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
889
|
+
family: z.ZodString;
|
|
890
|
+
src: z.ZodString;
|
|
891
|
+
weight: z.ZodOptional<z.ZodString>;
|
|
892
|
+
style: z.ZodOptional<z.ZodString>;
|
|
893
|
+
display: z.ZodOptional<z.ZodEnum<{
|
|
894
|
+
optional: "optional";
|
|
895
|
+
auto: "auto";
|
|
896
|
+
block: "block";
|
|
897
|
+
swap: "swap";
|
|
898
|
+
fallback: "fallback";
|
|
899
|
+
}>>;
|
|
900
|
+
unicodeRange: z.ZodOptional<z.ZodString>;
|
|
901
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
902
|
+
stylesheet: z.ZodString;
|
|
903
|
+
}, z.core.$loose>]>>>;
|
|
904
|
+
}, z.core.$loose>;
|
|
905
|
+
DefinitionTheme: z.ZodObject<{
|
|
906
|
+
tokens: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
907
|
+
colorScheme: z.ZodOptional<z.ZodEnum<{
|
|
908
|
+
dark: "dark";
|
|
909
|
+
auto: "auto";
|
|
910
|
+
light: "light";
|
|
911
|
+
}>>;
|
|
912
|
+
density: z.ZodOptional<z.ZodEnum<{
|
|
913
|
+
auto: "auto";
|
|
914
|
+
compact: "compact";
|
|
915
|
+
comfortable: "comfortable";
|
|
916
|
+
touch: "touch";
|
|
917
|
+
}>>;
|
|
918
|
+
extends: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
919
|
+
label: z.ZodOptional<z.ZodString>;
|
|
920
|
+
dark: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
921
|
+
palette: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
922
|
+
tones: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
923
|
+
text: z.ZodString;
|
|
924
|
+
subtle: z.ZodString;
|
|
925
|
+
border: z.ZodString;
|
|
926
|
+
outline: z.ZodString;
|
|
927
|
+
solid: z.ZodString;
|
|
928
|
+
solidHover: z.ZodString;
|
|
929
|
+
solidText: z.ZodString;
|
|
930
|
+
dark: z.ZodOptional<z.ZodObject<{
|
|
931
|
+
text: z.ZodOptional<z.ZodString>;
|
|
932
|
+
subtle: z.ZodOptional<z.ZodString>;
|
|
933
|
+
border: z.ZodOptional<z.ZodString>;
|
|
934
|
+
outline: z.ZodOptional<z.ZodString>;
|
|
935
|
+
solid: z.ZodOptional<z.ZodString>;
|
|
936
|
+
solidHover: z.ZodOptional<z.ZodString>;
|
|
937
|
+
solidText: z.ZodOptional<z.ZodString>;
|
|
938
|
+
}, z.core.$loose>>;
|
|
939
|
+
}, z.core.$loose>]>>>;
|
|
940
|
+
components: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
941
|
+
variants: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
942
|
+
}, z.core.$loose>>>;
|
|
943
|
+
densities: z.ZodOptional<z.ZodObject<{
|
|
944
|
+
compact: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
945
|
+
comfortable: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
946
|
+
touch: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
947
|
+
}, z.core.$loose>>;
|
|
948
|
+
fonts: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
949
|
+
family: z.ZodString;
|
|
950
|
+
src: z.ZodString;
|
|
951
|
+
weight: z.ZodOptional<z.ZodString>;
|
|
952
|
+
style: z.ZodOptional<z.ZodString>;
|
|
953
|
+
display: z.ZodOptional<z.ZodEnum<{
|
|
954
|
+
optional: "optional";
|
|
955
|
+
auto: "auto";
|
|
956
|
+
block: "block";
|
|
957
|
+
swap: "swap";
|
|
958
|
+
fallback: "fallback";
|
|
959
|
+
}>>;
|
|
960
|
+
unicodeRange: z.ZodOptional<z.ZodString>;
|
|
961
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
962
|
+
stylesheet: z.ZodString;
|
|
963
|
+
}, z.core.$loose>]>>>;
|
|
964
|
+
}, z.core.$loose>;
|
|
793
965
|
Definition: z.ZodObject<{
|
|
794
966
|
protocol: z.ZodLiteral<1>;
|
|
795
967
|
name: z.ZodString;
|
|
@@ -1080,6 +1252,7 @@ export declare const namedSchemas: {
|
|
|
1080
1252
|
children: z.ZodOptional<z.ZodArray<typeof LayoutNode>>;
|
|
1081
1253
|
}, z.core.$loose>>>;
|
|
1082
1254
|
queued: z.ZodOptional<z.ZodBoolean>;
|
|
1255
|
+
dryRun: z.ZodOptional<z.ZodBoolean>;
|
|
1083
1256
|
url: z.ZodOptional<z.ZodString>;
|
|
1084
1257
|
route: z.ZodOptional<z.ZodString>;
|
|
1085
1258
|
component: z.ZodOptional<z.ZodString>;
|
|
@@ -1163,11 +1336,64 @@ export declare const namedSchemas: {
|
|
|
1163
1336
|
maxSize: z.ZodOptional<z.ZodNumber>;
|
|
1164
1337
|
}, z.core.$loose>>;
|
|
1165
1338
|
theme: z.ZodOptional<z.ZodObject<{
|
|
1339
|
+
tokens: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1166
1340
|
colorScheme: z.ZodOptional<z.ZodEnum<{
|
|
1167
|
-
light: "light";
|
|
1168
1341
|
dark: "dark";
|
|
1169
1342
|
auto: "auto";
|
|
1343
|
+
light: "light";
|
|
1170
1344
|
}>>;
|
|
1345
|
+
density: z.ZodOptional<z.ZodEnum<{
|
|
1346
|
+
auto: "auto";
|
|
1347
|
+
compact: "compact";
|
|
1348
|
+
comfortable: "comfortable";
|
|
1349
|
+
touch: "touch";
|
|
1350
|
+
}>>;
|
|
1351
|
+
extends: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
1352
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1353
|
+
dark: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1354
|
+
palette: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1355
|
+
tones: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
1356
|
+
text: z.ZodString;
|
|
1357
|
+
subtle: z.ZodString;
|
|
1358
|
+
border: z.ZodString;
|
|
1359
|
+
outline: z.ZodString;
|
|
1360
|
+
solid: z.ZodString;
|
|
1361
|
+
solidHover: z.ZodString;
|
|
1362
|
+
solidText: z.ZodString;
|
|
1363
|
+
dark: z.ZodOptional<z.ZodObject<{
|
|
1364
|
+
text: z.ZodOptional<z.ZodString>;
|
|
1365
|
+
subtle: z.ZodOptional<z.ZodString>;
|
|
1366
|
+
border: z.ZodOptional<z.ZodString>;
|
|
1367
|
+
outline: z.ZodOptional<z.ZodString>;
|
|
1368
|
+
solid: z.ZodOptional<z.ZodString>;
|
|
1369
|
+
solidHover: z.ZodOptional<z.ZodString>;
|
|
1370
|
+
solidText: z.ZodOptional<z.ZodString>;
|
|
1371
|
+
}, z.core.$loose>>;
|
|
1372
|
+
}, z.core.$loose>]>>>;
|
|
1373
|
+
components: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1374
|
+
variants: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
1375
|
+
}, z.core.$loose>>>;
|
|
1376
|
+
densities: z.ZodOptional<z.ZodObject<{
|
|
1377
|
+
compact: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1378
|
+
comfortable: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1379
|
+
touch: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
1380
|
+
}, z.core.$loose>>;
|
|
1381
|
+
fonts: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
1382
|
+
family: z.ZodString;
|
|
1383
|
+
src: z.ZodString;
|
|
1384
|
+
weight: z.ZodOptional<z.ZodString>;
|
|
1385
|
+
style: z.ZodOptional<z.ZodString>;
|
|
1386
|
+
display: z.ZodOptional<z.ZodEnum<{
|
|
1387
|
+
optional: "optional";
|
|
1388
|
+
auto: "auto";
|
|
1389
|
+
block: "block";
|
|
1390
|
+
swap: "swap";
|
|
1391
|
+
fallback: "fallback";
|
|
1392
|
+
}>>;
|
|
1393
|
+
unicodeRange: z.ZodOptional<z.ZodString>;
|
|
1394
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
1395
|
+
stylesheet: z.ZodString;
|
|
1396
|
+
}, z.core.$loose>]>>>;
|
|
1171
1397
|
}, z.core.$loose>>;
|
|
1172
1398
|
user: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
1173
1399
|
id: z.ZodString;
|
|
@@ -1241,6 +1467,7 @@ export declare const namedSchemas: {
|
|
|
1241
1467
|
except: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1242
1468
|
}, z.core.$loose>]>>;
|
|
1243
1469
|
values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1470
|
+
dryRun: z.ZodOptional<z.ZodBoolean>;
|
|
1244
1471
|
}, z.core.$loose>;
|
|
1245
1472
|
ActionItemResult: z.ZodObject<{
|
|
1246
1473
|
id: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAuBxB,OAAO,EAAa,SAAS,EAA8B,MAAM,UAAU,CAAC;AAC5E,OAAO,EAIH,QAAQ,EAKX,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,SAAS,EAAE,KAAK,EAAQ,MAAM,SAAS,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"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"}
|
package/dist/schemas/index.js
CHANGED
|
@@ -4,6 +4,7 @@ import { LayoutNode } from "./layout.js";
|
|
|
4
4
|
import { Action, ActionConfirm, ActionPlacement, ActionScope } from "./action.js";
|
|
5
5
|
import { Column, Filter, ListDefinition } from "./list.js";
|
|
6
6
|
import { Resource, ResourceFeatures } from "./resource.js";
|
|
7
|
+
import { DefinitionTheme, Theme, ThemeFont, ThemeFontFace, ThemeFontStylesheet, ThemeTokens, ToneInput, ToneValues } from "./theme.js";
|
|
7
8
|
import { Auth, AuthProvider, Definition, MenuItem, Page, Uploads, User, Widget } from "./definition.js";
|
|
8
9
|
import { ActionItemResult, ActionRequest, ActionResult, ActionRun, ActionRunResponse, Item, ItemResponse, ListResponse, Media, MediaListResponse, MediaResponse, MediaTransform, Pagination, PreviewResponse, Problem, SearchResponse, Selection, Session } from "./api.js";
|
|
9
10
|
import { BootConfig } from "./boot.js";
|
|
@@ -36,6 +37,14 @@ var namedSchemas = {
|
|
|
36
37
|
Page,
|
|
37
38
|
Widget,
|
|
38
39
|
Uploads,
|
|
40
|
+
ThemeTokens,
|
|
41
|
+
ToneValues,
|
|
42
|
+
ToneInput,
|
|
43
|
+
ThemeFontFace,
|
|
44
|
+
ThemeFontStylesheet,
|
|
45
|
+
ThemeFont,
|
|
46
|
+
Theme,
|
|
47
|
+
DefinitionTheme,
|
|
39
48
|
Definition,
|
|
40
49
|
Item,
|
|
41
50
|
Pagination,
|
|
@@ -63,6 +72,6 @@ function createSchemaRegistry() {
|
|
|
63
72
|
return registry;
|
|
64
73
|
}
|
|
65
74
|
//#endregion
|
|
66
|
-
export { Abilities, Action, ActionConfirm, ActionItemResult, ActionPlacement, ActionRequest, ActionResult, ActionRun, ActionRunResponse, ActionScope, Auth, AuthProvider, BlockType, BootConfig, Column, Condition, Definition, Field, Filter, Id, Item, ItemResponse, LayoutNode, ListDefinition, ListResponse, Media, MediaListResponse, MediaResponse, MediaTransform, MenuItem, Option, Page, Pagination, PreviewResponse, Problem, Resource, ResourceFeatures, RouteReference, Rule, SearchResponse, Selection, Session, Uploads, User, Widget, createSchemaRegistry, namedSchemas };
|
|
75
|
+
export { Abilities, Action, ActionConfirm, ActionItemResult, ActionPlacement, ActionRequest, ActionResult, ActionRun, ActionRunResponse, ActionScope, Auth, AuthProvider, BlockType, BootConfig, Column, Condition, Definition, DefinitionTheme, Field, Filter, Id, Item, ItemResponse, LayoutNode, ListDefinition, ListResponse, Media, MediaListResponse, MediaResponse, MediaTransform, MenuItem, Option, Page, Pagination, PreviewResponse, Problem, Resource, ResourceFeatures, RouteReference, Rule, SearchResponse, Selection, Session, Theme, ThemeFont, ThemeFontFace, ThemeFontStylesheet, ThemeTokens, ToneInput, ToneValues, Uploads, User, Widget, createSchemaRegistry, namedSchemas };
|
|
67
76
|
|
|
68
77
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../src/schemas/index.ts"],"sourcesContent":["import { z } from 'zod';\n\nimport { Action, ActionConfirm, ActionPlacement, ActionScope } from './action';\nimport {\n ActionItemResult,\n ActionRequest,\n ActionResult,\n ActionRun,\n ActionRunResponse,\n Item,\n ItemResponse,\n ListResponse,\n Media,\n MediaListResponse,\n MediaResponse,\n MediaTransform,\n Pagination,\n PreviewResponse,\n Problem,\n SearchResponse,\n Selection,\n Session,\n} from './api';\nimport { Abilities, Condition, Id, Option, RouteReference } from './common';\nimport {\n Auth,\n AuthProvider,\n Definition,\n MenuItem,\n Page,\n Uploads,\n User,\n Widget,\n} from './definition';\nimport { BlockType, Field, Rule } from './field';\nimport { LayoutNode } from './layout';\nimport { Column, Filter, ListDefinition } from './list';\nimport { Resource, ResourceFeatures } from './resource';\n\nexport * from './common';\nexport * from './field';\nexport * from './layout';\nexport * from './list';\nexport * from './action';\nexport * from './resource';\nexport * from './definition';\nexport * from './api';\nexport * from './boot';\n\n/** The named schemas of the protocol, as they appear in the generated JSON Schema and OpenAPI files. */\nexport const namedSchemas = {\n Id,\n Abilities,\n RouteReference,\n Condition,\n Option,\n Rule,\n BlockType,\n Field,\n LayoutNode,\n Column,\n Filter,\n ListDefinition,\n ActionScope,\n ActionPlacement,\n ActionConfirm,\n Action,\n ResourceFeatures,\n Resource,\n User,\n AuthProvider,\n Auth,\n MenuItem,\n Page,\n Widget,\n Uploads,\n Definition,\n Item,\n Pagination,\n ItemResponse,\n ListResponse,\n Problem,\n Selection,\n ActionRequest,\n ActionItemResult,\n ActionResult,\n ActionRun,\n ActionRunResponse,\n MediaTransform,\n Media,\n MediaResponse,\n MediaListResponse,\n Session,\n SearchResponse,\n PreviewResponse,\n} satisfies Record<string, z.ZodType>;\n\n/** A registry of the named schemas, used to reference them by name in generated files. */\nexport function createSchemaRegistry() {\n const registry = z.registry<{ id: string }>();\n Object.entries(namedSchemas).forEach(([id, schema]) => registry.add(schema, { id }));\n return registry;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/schemas/index.ts"],"sourcesContent":["import { z } from 'zod';\n\nimport { Action, ActionConfirm, ActionPlacement, ActionScope } from './action';\nimport {\n ActionItemResult,\n ActionRequest,\n ActionResult,\n ActionRun,\n ActionRunResponse,\n Item,\n ItemResponse,\n ListResponse,\n Media,\n MediaListResponse,\n MediaResponse,\n MediaTransform,\n Pagination,\n PreviewResponse,\n Problem,\n SearchResponse,\n Selection,\n Session,\n} from './api';\nimport { Abilities, Condition, Id, Option, RouteReference } from './common';\nimport {\n Auth,\n AuthProvider,\n Definition,\n MenuItem,\n Page,\n Uploads,\n User,\n Widget,\n} from './definition';\nimport { BlockType, Field, Rule } from './field';\nimport { LayoutNode } from './layout';\nimport { Column, Filter, ListDefinition } from './list';\nimport { Resource, ResourceFeatures } from './resource';\nimport {\n DefinitionTheme,\n Theme,\n ThemeFont,\n ThemeFontFace,\n ThemeFontStylesheet,\n ThemeTokens,\n ToneInput,\n ToneValues,\n} from './theme';\n\nexport * from './common';\nexport * from './field';\nexport * from './layout';\nexport * from './list';\nexport * from './action';\nexport * from './resource';\nexport * from './theme';\nexport * from './definition';\nexport * from './api';\nexport * from './boot';\n\n/** The named schemas of the protocol, as they appear in the generated JSON Schema and OpenAPI files. */\nexport const namedSchemas = {\n Id,\n Abilities,\n RouteReference,\n Condition,\n Option,\n Rule,\n BlockType,\n Field,\n LayoutNode,\n Column,\n Filter,\n ListDefinition,\n ActionScope,\n ActionPlacement,\n ActionConfirm,\n Action,\n ResourceFeatures,\n Resource,\n User,\n AuthProvider,\n Auth,\n MenuItem,\n Page,\n Widget,\n Uploads,\n ThemeTokens,\n ToneValues,\n ToneInput,\n ThemeFontFace,\n ThemeFontStylesheet,\n ThemeFont,\n Theme,\n DefinitionTheme,\n Definition,\n Item,\n Pagination,\n ItemResponse,\n ListResponse,\n Problem,\n Selection,\n ActionRequest,\n ActionItemResult,\n ActionResult,\n ActionRun,\n ActionRunResponse,\n MediaTransform,\n Media,\n MediaResponse,\n MediaListResponse,\n Session,\n SearchResponse,\n PreviewResponse,\n} satisfies Record<string, z.ZodType>;\n\n/** A registry of the named schemas, used to reference them by name in generated files. */\nexport function createSchemaRegistry() {\n const registry = z.registry<{ id: string }>();\n Object.entries(namedSchemas).forEach(([id, schema]) => registry.add(schema, { id }));\n return registry;\n}\n"],"mappings":";;;;;;;;;;;;;AA6DA,IAAa,eAAe;CACxB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACJ;;AAGA,SAAgB,uBAAuB;CACnC,MAAM,WAAW,EAAE,SAAyB;CAC5C,OAAO,QAAQ,YAAY,CAAC,CAAC,SAAS,CAAC,IAAI,YAAY,SAAS,IAAI,QAAQ,EAAE,GAAG,CAAC,CAAC;CACnF,OAAO;AACX"}
|
|
@@ -295,6 +295,7 @@ export declare const Resource: z.ZodObject<{
|
|
|
295
295
|
children: z.ZodOptional<z.ZodArray<typeof LayoutNode>>;
|
|
296
296
|
}, z.core.$loose>>>;
|
|
297
297
|
queued: z.ZodOptional<z.ZodBoolean>;
|
|
298
|
+
dryRun: z.ZodOptional<z.ZodBoolean>;
|
|
298
299
|
url: z.ZodOptional<z.ZodString>;
|
|
299
300
|
route: z.ZodOptional<z.ZodString>;
|
|
300
301
|
component: z.ZodOptional<z.ZodString>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resource.d.ts","sourceRoot":"","sources":["../../src/schemas/resource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAGtC,eAAO,MAAM,gBAAgB;;;;;;;;;;;iBAmB3B,CAAC;AAEH,eAAO,MAAM,QAAQ
|
|
1
|
+
{"version":3,"file":"resource.d.ts","sourceRoot":"","sources":["../../src/schemas/resource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAGtC,eAAO,MAAM,gBAAgB;;;;;;;;;;;iBAmB3B,CAAC;AAEH,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAsB6C,CAAC;AAEnE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAChE,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAC;AAChD,sEAAsE;AACtE,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAC"}
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const ThemeTokens: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
3
|
+
export declare const ToneValues: z.ZodObject<{
|
|
4
|
+
text: z.ZodString;
|
|
5
|
+
subtle: z.ZodString;
|
|
6
|
+
border: z.ZodString;
|
|
7
|
+
outline: z.ZodString;
|
|
8
|
+
solid: z.ZodString;
|
|
9
|
+
solidHover: z.ZodString;
|
|
10
|
+
solidText: z.ZodString;
|
|
11
|
+
}, z.core.$loose>;
|
|
12
|
+
export declare const ToneInput: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
13
|
+
text: z.ZodString;
|
|
14
|
+
subtle: z.ZodString;
|
|
15
|
+
border: z.ZodString;
|
|
16
|
+
outline: z.ZodString;
|
|
17
|
+
solid: z.ZodString;
|
|
18
|
+
solidHover: z.ZodString;
|
|
19
|
+
solidText: z.ZodString;
|
|
20
|
+
dark: z.ZodOptional<z.ZodObject<{
|
|
21
|
+
text: z.ZodOptional<z.ZodString>;
|
|
22
|
+
subtle: z.ZodOptional<z.ZodString>;
|
|
23
|
+
border: z.ZodOptional<z.ZodString>;
|
|
24
|
+
outline: z.ZodOptional<z.ZodString>;
|
|
25
|
+
solid: z.ZodOptional<z.ZodString>;
|
|
26
|
+
solidHover: z.ZodOptional<z.ZodString>;
|
|
27
|
+
solidText: z.ZodOptional<z.ZodString>;
|
|
28
|
+
}, z.core.$loose>>;
|
|
29
|
+
}, z.core.$loose>]>;
|
|
30
|
+
export declare const ThemeFontFace: z.ZodObject<{
|
|
31
|
+
family: z.ZodString;
|
|
32
|
+
src: z.ZodString;
|
|
33
|
+
weight: z.ZodOptional<z.ZodString>;
|
|
34
|
+
style: z.ZodOptional<z.ZodString>;
|
|
35
|
+
display: z.ZodOptional<z.ZodEnum<{
|
|
36
|
+
optional: "optional";
|
|
37
|
+
auto: "auto";
|
|
38
|
+
block: "block";
|
|
39
|
+
swap: "swap";
|
|
40
|
+
fallback: "fallback";
|
|
41
|
+
}>>;
|
|
42
|
+
unicodeRange: z.ZodOptional<z.ZodString>;
|
|
43
|
+
}, z.core.$loose>;
|
|
44
|
+
export declare const ThemeFontStylesheet: z.ZodObject<{
|
|
45
|
+
stylesheet: z.ZodString;
|
|
46
|
+
}, z.core.$loose>;
|
|
47
|
+
export declare const ThemeFont: z.ZodUnion<readonly [z.ZodObject<{
|
|
48
|
+
family: z.ZodString;
|
|
49
|
+
src: z.ZodString;
|
|
50
|
+
weight: z.ZodOptional<z.ZodString>;
|
|
51
|
+
style: z.ZodOptional<z.ZodString>;
|
|
52
|
+
display: z.ZodOptional<z.ZodEnum<{
|
|
53
|
+
optional: "optional";
|
|
54
|
+
auto: "auto";
|
|
55
|
+
block: "block";
|
|
56
|
+
swap: "swap";
|
|
57
|
+
fallback: "fallback";
|
|
58
|
+
}>>;
|
|
59
|
+
unicodeRange: z.ZodOptional<z.ZodString>;
|
|
60
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
61
|
+
stylesheet: z.ZodString;
|
|
62
|
+
}, z.core.$loose>]>;
|
|
63
|
+
export declare const Theme: z.ZodObject<{
|
|
64
|
+
label: z.ZodOptional<z.ZodString>;
|
|
65
|
+
tokens: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
66
|
+
dark: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
67
|
+
palette: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
68
|
+
tones: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
69
|
+
text: z.ZodString;
|
|
70
|
+
subtle: z.ZodString;
|
|
71
|
+
border: z.ZodString;
|
|
72
|
+
outline: z.ZodString;
|
|
73
|
+
solid: z.ZodString;
|
|
74
|
+
solidHover: z.ZodString;
|
|
75
|
+
solidText: z.ZodString;
|
|
76
|
+
dark: z.ZodOptional<z.ZodObject<{
|
|
77
|
+
text: z.ZodOptional<z.ZodString>;
|
|
78
|
+
subtle: z.ZodOptional<z.ZodString>;
|
|
79
|
+
border: z.ZodOptional<z.ZodString>;
|
|
80
|
+
outline: z.ZodOptional<z.ZodString>;
|
|
81
|
+
solid: z.ZodOptional<z.ZodString>;
|
|
82
|
+
solidHover: z.ZodOptional<z.ZodString>;
|
|
83
|
+
solidText: z.ZodOptional<z.ZodString>;
|
|
84
|
+
}, z.core.$loose>>;
|
|
85
|
+
}, z.core.$loose>]>>>;
|
|
86
|
+
components: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
87
|
+
variants: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
88
|
+
}, z.core.$loose>>>;
|
|
89
|
+
densities: z.ZodOptional<z.ZodObject<{
|
|
90
|
+
compact: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
91
|
+
comfortable: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
92
|
+
touch: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
93
|
+
}, z.core.$loose>>;
|
|
94
|
+
fonts: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
95
|
+
family: z.ZodString;
|
|
96
|
+
src: z.ZodString;
|
|
97
|
+
weight: z.ZodOptional<z.ZodString>;
|
|
98
|
+
style: z.ZodOptional<z.ZodString>;
|
|
99
|
+
display: z.ZodOptional<z.ZodEnum<{
|
|
100
|
+
optional: "optional";
|
|
101
|
+
auto: "auto";
|
|
102
|
+
block: "block";
|
|
103
|
+
swap: "swap";
|
|
104
|
+
fallback: "fallback";
|
|
105
|
+
}>>;
|
|
106
|
+
unicodeRange: z.ZodOptional<z.ZodString>;
|
|
107
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
108
|
+
stylesheet: z.ZodString;
|
|
109
|
+
}, z.core.$loose>]>>>;
|
|
110
|
+
}, z.core.$loose>;
|
|
111
|
+
export declare const DefinitionTheme: z.ZodObject<{
|
|
112
|
+
tokens: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
113
|
+
colorScheme: z.ZodOptional<z.ZodEnum<{
|
|
114
|
+
dark: "dark";
|
|
115
|
+
auto: "auto";
|
|
116
|
+
light: "light";
|
|
117
|
+
}>>;
|
|
118
|
+
density: z.ZodOptional<z.ZodEnum<{
|
|
119
|
+
auto: "auto";
|
|
120
|
+
compact: "compact";
|
|
121
|
+
comfortable: "comfortable";
|
|
122
|
+
touch: "touch";
|
|
123
|
+
}>>;
|
|
124
|
+
extends: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
125
|
+
label: z.ZodOptional<z.ZodString>;
|
|
126
|
+
dark: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
127
|
+
palette: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
128
|
+
tones: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
129
|
+
text: z.ZodString;
|
|
130
|
+
subtle: z.ZodString;
|
|
131
|
+
border: z.ZodString;
|
|
132
|
+
outline: z.ZodString;
|
|
133
|
+
solid: z.ZodString;
|
|
134
|
+
solidHover: z.ZodString;
|
|
135
|
+
solidText: z.ZodString;
|
|
136
|
+
dark: z.ZodOptional<z.ZodObject<{
|
|
137
|
+
text: z.ZodOptional<z.ZodString>;
|
|
138
|
+
subtle: z.ZodOptional<z.ZodString>;
|
|
139
|
+
border: z.ZodOptional<z.ZodString>;
|
|
140
|
+
outline: z.ZodOptional<z.ZodString>;
|
|
141
|
+
solid: z.ZodOptional<z.ZodString>;
|
|
142
|
+
solidHover: z.ZodOptional<z.ZodString>;
|
|
143
|
+
solidText: z.ZodOptional<z.ZodString>;
|
|
144
|
+
}, z.core.$loose>>;
|
|
145
|
+
}, z.core.$loose>]>>>;
|
|
146
|
+
components: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
147
|
+
variants: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
148
|
+
}, z.core.$loose>>>;
|
|
149
|
+
densities: z.ZodOptional<z.ZodObject<{
|
|
150
|
+
compact: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
151
|
+
comfortable: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
152
|
+
touch: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
153
|
+
}, z.core.$loose>>;
|
|
154
|
+
fonts: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
155
|
+
family: z.ZodString;
|
|
156
|
+
src: z.ZodString;
|
|
157
|
+
weight: z.ZodOptional<z.ZodString>;
|
|
158
|
+
style: z.ZodOptional<z.ZodString>;
|
|
159
|
+
display: z.ZodOptional<z.ZodEnum<{
|
|
160
|
+
optional: "optional";
|
|
161
|
+
auto: "auto";
|
|
162
|
+
block: "block";
|
|
163
|
+
swap: "swap";
|
|
164
|
+
fallback: "fallback";
|
|
165
|
+
}>>;
|
|
166
|
+
unicodeRange: z.ZodOptional<z.ZodString>;
|
|
167
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
168
|
+
stylesheet: z.ZodString;
|
|
169
|
+
}, z.core.$loose>]>>>;
|
|
170
|
+
}, z.core.$loose>;
|
|
171
|
+
export type ThemeTokens = z.infer<typeof ThemeTokens>;
|
|
172
|
+
export type ToneValues = z.infer<typeof ToneValues>;
|
|
173
|
+
export type ToneInput = z.infer<typeof ToneInput>;
|
|
174
|
+
export type Theme = z.infer<typeof Theme>;
|
|
175
|
+
export type DefinitionTheme = z.infer<typeof DefinitionTheme>;
|
|
176
|
+
export type ThemeFontFace = z.infer<typeof ThemeFontFace>;
|
|
177
|
+
export type ThemeFontStylesheet = z.infer<typeof ThemeFontStylesheet>;
|
|
178
|
+
export type ThemeFont = z.infer<typeof ThemeFont>;
|
|
179
|
+
//# sourceMappingURL=theme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/schemas/theme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,WAAW,uCAKlB,CAAC;AAEP,eAAO,MAAM,UAAU;;;;;;;;iBAQrB,CAAC;AAEH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;mBAKqE,CAAC;AAE5F,eAAO,MAAM,aAAa;;;;;;;;;;;;;iBAuBiD,CAAC;AAE5E,eAAO,MAAM,mBAAmB;;iBAE2C,CAAC;AAE5E,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;mBAAgD,CAAC;AA0CvE,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAEoE,CAAC;AAEvF,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAc8D,CAAC;AAE3F,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AACtD,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AACpD,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAC;AAClD,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,KAAK,CAAC,CAAC;AAC1C,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAC9D,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAC1D,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AACtE,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAC"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
//#region src/schemas/theme.ts
|
|
3
|
+
/** Names of tones, palette colors, components and variants: they become CSS class names. */
|
|
4
|
+
var Name = z.string().regex(/^[a-z0-9-]+$/);
|
|
5
|
+
var ThemeTokens = z.record(z.string().regex(/^[a-zA-Z0-9_-]+$/), z.string().regex(/^[^{};<]*$/)).meta({ description: "CSS variables without the leading `--`, and their values: `{ \"panneau-color-accent\": \"#05f\" }`. Values cannot contain `{`, `}`, `;` or `<`." });
|
|
6
|
+
var ToneValues = z.looseObject({
|
|
7
|
+
text: z.string().meta({ description: "Text and icons on surfaces." }),
|
|
8
|
+
subtle: z.string().meta({ description: "Background of the subtle appearance." }),
|
|
9
|
+
border: z.string().meta({ description: "Border of the subtle appearance." }),
|
|
10
|
+
outline: z.string().meta({ description: "Border of the outline appearance." }),
|
|
11
|
+
solid: z.string().meta({ description: "Background of the solid appearance." }),
|
|
12
|
+
solidHover: z.string().meta({ description: "Background of the solid appearance on hover." }),
|
|
13
|
+
solidText: z.string().meta({ description: "Text on the solid appearance." })
|
|
14
|
+
});
|
|
15
|
+
var ToneInput = z.union([z.string().meta({ description: "One color, from which Panneau derives the others." }), ToneValues.extend({ dark: ToneValues.partial().optional() })]).meta({ description: "A tone: one color, or every value with dark scheme overrides." });
|
|
16
|
+
var ThemeFontFace = z.looseObject({
|
|
17
|
+
family: z.string().regex(/^[^{}<;"\\]+$/),
|
|
18
|
+
src: z.string().regex(/^[^{}<]+$/).meta({ description: "The `src` descriptor: `url(/fonts/geist.woff2) format('woff2')`." }),
|
|
19
|
+
weight: z.string().regex(/^[^{}<;]*$/).optional(),
|
|
20
|
+
style: z.string().regex(/^[^{}<;]*$/).optional(),
|
|
21
|
+
display: z.enum([
|
|
22
|
+
"auto",
|
|
23
|
+
"block",
|
|
24
|
+
"swap",
|
|
25
|
+
"fallback",
|
|
26
|
+
"optional"
|
|
27
|
+
]).optional(),
|
|
28
|
+
unicodeRange: z.string().regex(/^[^{}<;]*$/).optional()
|
|
29
|
+
}).meta({ description: "A font face, written as an `@font-face` rule." });
|
|
30
|
+
var ThemeFontStylesheet = z.looseObject({ stylesheet: z.string().min(1) }).meta({ description: "A hosted stylesheet that declares font faces." });
|
|
31
|
+
var ThemeFont = z.union([ThemeFontFace, ThemeFontStylesheet]);
|
|
32
|
+
var themeShape = {
|
|
33
|
+
label: z.string().optional(),
|
|
34
|
+
tokens: ThemeTokens.meta({ description: "Tokens of the light scheme, or of both schemes when `dark` does not set them." }),
|
|
35
|
+
dark: ThemeTokens.optional().meta({ description: "Tokens that change in the dark scheme." }),
|
|
36
|
+
palette: z.record(Name, z.string().regex(/^[^{};<]*$/)).optional().meta({ description: "Raw colors, written as `--panneau-palette-<name>`: tokens and tones use them with `var(--panneau-palette-<name>)`." }),
|
|
37
|
+
tones: z.record(Name, ToneInput).optional().meta({ description: "Tones added or redefined by the theme, applied by `panneau-tone-<name>`." }),
|
|
38
|
+
components: z.record(Name, z.looseObject({ variants: z.record(Name, ThemeTokens).optional() })).optional().meta({ description: "Named variants of components: tokens applied by `panneau-<component>-variant-<name>`." }),
|
|
39
|
+
densities: z.looseObject({
|
|
40
|
+
compact: ThemeTokens.optional(),
|
|
41
|
+
comfortable: ThemeTokens.optional(),
|
|
42
|
+
touch: ThemeTokens.optional()
|
|
43
|
+
}).optional().meta({ description: "Tokens of each density (`panneau-control-height`…), which change with the density of the root." }),
|
|
44
|
+
fonts: z.array(ThemeFont).optional().meta({ description: "Font faces and font stylesheets, added to the page once." })
|
|
45
|
+
};
|
|
46
|
+
var Theme = z.looseObject(themeShape).meta({ description: "A theme of `@panneau/ui`, as plain data (decision 0024)." });
|
|
47
|
+
var DefinitionTheme = z.looseObject({
|
|
48
|
+
...themeShape,
|
|
49
|
+
tokens: themeShape.tokens.optional(),
|
|
50
|
+
colorScheme: z.enum([
|
|
51
|
+
"light",
|
|
52
|
+
"dark",
|
|
53
|
+
"auto"
|
|
54
|
+
]).optional(),
|
|
55
|
+
density: z.enum([
|
|
56
|
+
"compact",
|
|
57
|
+
"comfortable",
|
|
58
|
+
"touch",
|
|
59
|
+
"auto"
|
|
60
|
+
]).optional(),
|
|
61
|
+
extends: z.union([z.string(), z.array(z.string())]).optional().meta({ description: "Themes registered by plugins, by id, that this theme builds on, in order: its own values override theirs." })
|
|
62
|
+
}).meta({ description: "The theme of the admin: a theme, built on themes of plugins." });
|
|
63
|
+
//#endregion
|
|
64
|
+
export { DefinitionTheme, Theme, ThemeFont, ThemeFontFace, ThemeFontStylesheet, ThemeTokens, ToneInput, ToneValues };
|
|
65
|
+
|
|
66
|
+
//# sourceMappingURL=theme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.js","names":[],"sources":["../../src/schemas/theme.ts"],"sourcesContent":["import { z } from 'zod';\n\n/** Names of tones, palette colors, components and variants: they become CSS class names. */\nconst Name = z.string().regex(/^[a-z0-9-]+$/);\n\nexport const ThemeTokens = z\n .record(z.string().regex(/^[a-zA-Z0-9_-]+$/), z.string().regex(/^[^{};<]*$/))\n .meta({\n description:\n 'CSS variables without the leading `--`, and their values: `{ \"panneau-color-accent\": \"#05f\" }`. Values cannot contain `{`, `}`, `;` or `<`.',\n });\n\nexport const ToneValues = z.looseObject({\n text: z.string().meta({ description: 'Text and icons on surfaces.' }),\n subtle: z.string().meta({ description: 'Background of the subtle appearance.' }),\n border: z.string().meta({ description: 'Border of the subtle appearance.' }),\n outline: z.string().meta({ description: 'Border of the outline appearance.' }),\n solid: z.string().meta({ description: 'Background of the solid appearance.' }),\n solidHover: z.string().meta({ description: 'Background of the solid appearance on hover.' }),\n solidText: z.string().meta({ description: 'Text on the solid appearance.' }),\n});\n\nexport const ToneInput = z\n .union([\n z.string().meta({ description: 'One color, from which Panneau derives the others.' }),\n ToneValues.extend({ dark: ToneValues.partial().optional() }),\n ])\n .meta({ description: 'A tone: one color, or every value with dark scheme overrides.' });\n\nexport const ThemeFontFace = z\n .looseObject({\n family: z.string().regex(/^[^{}<;\"\\\\]+$/),\n src: z\n .string()\n .regex(/^[^{}<]+$/)\n .meta({\n description: \"The `src` descriptor: `url(/fonts/geist.woff2) format('woff2')`.\",\n }),\n weight: z\n .string()\n .regex(/^[^{}<;]*$/)\n .optional(),\n style: z\n .string()\n .regex(/^[^{}<;]*$/)\n .optional(),\n display: z.enum(['auto', 'block', 'swap', 'fallback', 'optional']).optional(),\n unicodeRange: z\n .string()\n .regex(/^[^{}<;]*$/)\n .optional(),\n })\n .meta({ description: 'A font face, written as an `@font-face` rule.' });\n\nexport const ThemeFontStylesheet = z\n .looseObject({ stylesheet: z.string().min(1) })\n .meta({ description: 'A hosted stylesheet that declares font faces.' });\n\nexport const ThemeFont = z.union([ThemeFontFace, ThemeFontStylesheet]);\n\nconst themeShape = {\n label: z.string().optional(),\n tokens: ThemeTokens.meta({\n description:\n 'Tokens of the light scheme, or of both schemes when `dark` does not set them.',\n }),\n dark: ThemeTokens.optional().meta({ description: 'Tokens that change in the dark scheme.' }),\n palette: z\n .record(Name, z.string().regex(/^[^{};<]*$/))\n .optional()\n .meta({\n description:\n 'Raw colors, written as `--panneau-palette-<name>`: tokens and tones use them with `var(--panneau-palette-<name>)`.',\n }),\n tones: z.record(Name, ToneInput).optional().meta({\n description: 'Tones added or redefined by the theme, applied by `panneau-tone-<name>`.',\n }),\n components: z\n .record(Name, z.looseObject({ variants: z.record(Name, ThemeTokens).optional() }))\n .optional()\n .meta({\n description:\n 'Named variants of components: tokens applied by `panneau-<component>-variant-<name>`.',\n }),\n densities: z\n .looseObject({\n compact: ThemeTokens.optional(),\n comfortable: ThemeTokens.optional(),\n touch: ThemeTokens.optional(),\n })\n .optional()\n .meta({\n description:\n 'Tokens of each density (`panneau-control-height`…), which change with the density of the root.',\n }),\n fonts: z.array(ThemeFont).optional().meta({\n description: 'Font faces and font stylesheets, added to the page once.',\n }),\n};\n\nexport const Theme = z\n .looseObject(themeShape)\n .meta({ description: 'A theme of `@panneau/ui`, as plain data (decision 0024).' });\n\nexport const DefinitionTheme = z\n .looseObject({\n ...themeShape,\n tokens: themeShape.tokens.optional(),\n colorScheme: z.enum(['light', 'dark', 'auto']).optional(),\n density: z.enum(['compact', 'comfortable', 'touch', 'auto']).optional(),\n extends: z\n .union([z.string(), z.array(z.string())])\n .optional()\n .meta({\n description:\n 'Themes registered by plugins, by id, that this theme builds on, in order: its own values override theirs.',\n }),\n })\n .meta({ description: 'The theme of the admin: a theme, built on themes of plugins.' });\n\nexport type ThemeTokens = z.infer<typeof ThemeTokens>;\nexport type ToneValues = z.infer<typeof ToneValues>;\nexport type ToneInput = z.infer<typeof ToneInput>;\nexport type Theme = z.infer<typeof Theme>;\nexport type DefinitionTheme = z.infer<typeof DefinitionTheme>;\nexport type ThemeFontFace = z.infer<typeof ThemeFontFace>;\nexport type ThemeFontStylesheet = z.infer<typeof ThemeFontStylesheet>;\nexport type ThemeFont = z.infer<typeof ThemeFont>;\n"],"mappings":"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"}
|
package/dist/themes.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Theme } from './schemas/theme';
|
|
2
|
+
/** A theme to merge: `tokens` can be left out, as in the theme of a definition. */
|
|
3
|
+
export type PartialTheme = Partial<Theme>;
|
|
4
|
+
/**
|
|
5
|
+
* Merges themes, in order: each one overrides the tokens, palette colors, tones and variants of
|
|
6
|
+
* those before it. A token a theme sets in `tokens` but not in `dark` applies to both schemes, so it
|
|
7
|
+
* also replaces the dark value of earlier themes. Variants merge token by token; tones are replaced
|
|
8
|
+
* whole; densities merge token by token; fonts add up. The label is the last one set. `defineTheme()` of `@panneau/ui` merges the same way.
|
|
9
|
+
*/
|
|
10
|
+
export declare function mergeThemes(...themes: readonly PartialTheme[]): Theme;
|
|
11
|
+
//# sourceMappingURL=themes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"themes.d.ts","sourceRoot":"","sources":["../src/themes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAE7C,mFAAmF;AACnF,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;AAmE1C;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,GAAG,MAAM,EAAE,SAAS,YAAY,EAAE,GAAG,KAAK,CAgCrE"}
|