datocms-plugin-sdk 2.1.5 → 2.2.0-alpha.2
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/cjs/connect.js +19 -1
- package/dist/cjs/connect.js.map +1 -1
- package/dist/cjs/manifest.js +46 -25
- package/dist/cjs/manifest.js.map +1 -1
- package/dist/esm/connect.js +19 -1
- package/dist/esm/connect.js.map +1 -1
- package/dist/esm/ctx/base.d.ts +47 -2
- package/dist/esm/manifest.js +46 -25
- package/dist/esm/manifest.js.map +1 -1
- package/dist/types/ctx/base.d.ts +47 -2
- package/manifest.json +47 -26
- package/package.json +4 -3
- package/src/connect.ts +18 -1
- package/src/ctx/base.ts +50 -2
- package/src/manifest.ts +49 -25
package/src/manifest.ts
CHANGED
|
@@ -3362,13 +3362,37 @@ export const manifest: Manifest = {
|
|
|
3362
3362
|
comment: {
|
|
3363
3363
|
markdownText:
|
|
3364
3364
|
'An object containing the theme colors for the current DatoCMS project.',
|
|
3365
|
+
deprecatedMarkdownText:
|
|
3366
|
+
'Use `cssDesignTokens` instead. This property is kept\nfor backward compatibility with third-party plugins.',
|
|
3365
3367
|
},
|
|
3366
3368
|
location: {
|
|
3367
3369
|
filePath: 'src/ctx/base.ts',
|
|
3368
|
-
lineNumber:
|
|
3370
|
+
lineNumber: 111,
|
|
3369
3371
|
},
|
|
3370
3372
|
type: 'Theme',
|
|
3371
3373
|
},
|
|
3374
|
+
cssDesignTokens: {
|
|
3375
|
+
comment: {
|
|
3376
|
+
markdownText:
|
|
3377
|
+
'Semantic color tokens for the current DatoCMS project, pre-computed by\nthe host. A map of CSS custom property names (e.g.\n`--color--raised--surface`) to their resolved values for the current\ncolor scheme.',
|
|
3378
|
+
},
|
|
3379
|
+
location: {
|
|
3380
|
+
filePath: 'src/ctx/base.ts',
|
|
3381
|
+
lineNumber: 119,
|
|
3382
|
+
},
|
|
3383
|
+
type: 'cssDesignTokens',
|
|
3384
|
+
},
|
|
3385
|
+
colorScheme: {
|
|
3386
|
+
comment: {
|
|
3387
|
+
markdownText:
|
|
3388
|
+
'The appearance color scheme the host CMS is currently using. Resolved —\n`\'system\'` is already expanded to `\'light\'` or `\'dark\'` by the host.\n\nThe SDK runtime reflects this onto `document.documentElement` two ways:\nthe `data-color-scheme="light"` / `data-color-scheme="dark"` attribute,\nso plugin CSS can branch with `[data-color-scheme="dark"] { … }`\nselectors; and the actual `color-scheme` CSS property, so `light-dark()`\nresolves to the correct branch (and native form controls / scrollbars\nmatch) everywhere in the plugin frame. For non-CSS decisions (choosing a\nlogo asset, a syntax-highlighting preset, …) branch on `ctx.colorScheme`\ndirectly.',
|
|
3389
|
+
},
|
|
3390
|
+
location: {
|
|
3391
|
+
filePath: 'src/ctx/base.ts',
|
|
3392
|
+
lineNumber: 134,
|
|
3393
|
+
},
|
|
3394
|
+
type: "'light' | 'dark'",
|
|
3395
|
+
},
|
|
3372
3396
|
},
|
|
3373
3397
|
},
|
|
3374
3398
|
{
|
|
@@ -3385,7 +3409,7 @@ export const manifest: Manifest = {
|
|
|
3385
3409
|
},
|
|
3386
3410
|
location: {
|
|
3387
3411
|
filePath: 'src/ctx/base.ts',
|
|
3388
|
-
lineNumber:
|
|
3412
|
+
lineNumber: 144,
|
|
3389
3413
|
},
|
|
3390
3414
|
type: 'Partial<Record<string, ItemType>>',
|
|
3391
3415
|
},
|
|
@@ -3396,7 +3420,7 @@ export const manifest: Manifest = {
|
|
|
3396
3420
|
},
|
|
3397
3421
|
location: {
|
|
3398
3422
|
filePath: 'src/ctx/base.ts',
|
|
3399
|
-
lineNumber:
|
|
3423
|
+
lineNumber: 151,
|
|
3400
3424
|
},
|
|
3401
3425
|
type: 'Partial<Record<string, Field>>',
|
|
3402
3426
|
},
|
|
@@ -3407,7 +3431,7 @@ export const manifest: Manifest = {
|
|
|
3407
3431
|
},
|
|
3408
3432
|
location: {
|
|
3409
3433
|
filePath: 'src/ctx/base.ts',
|
|
3410
|
-
lineNumber:
|
|
3434
|
+
lineNumber: 158,
|
|
3411
3435
|
},
|
|
3412
3436
|
type: 'Partial<Record<string, Fieldset>>',
|
|
3413
3437
|
},
|
|
@@ -3418,7 +3442,7 @@ export const manifest: Manifest = {
|
|
|
3418
3442
|
},
|
|
3419
3443
|
location: {
|
|
3420
3444
|
filePath: 'src/ctx/base.ts',
|
|
3421
|
-
lineNumber:
|
|
3445
|
+
lineNumber: 165,
|
|
3422
3446
|
},
|
|
3423
3447
|
type: 'Partial<Record<string, User>>',
|
|
3424
3448
|
},
|
|
@@ -3429,7 +3453,7 @@ export const manifest: Manifest = {
|
|
|
3429
3453
|
},
|
|
3430
3454
|
location: {
|
|
3431
3455
|
filePath: 'src/ctx/base.ts',
|
|
3432
|
-
lineNumber:
|
|
3456
|
+
lineNumber: 172,
|
|
3433
3457
|
},
|
|
3434
3458
|
type: 'Partial<Record<string, SsoUser>>',
|
|
3435
3459
|
},
|
|
@@ -3453,7 +3477,7 @@ export const manifest: Manifest = {
|
|
|
3453
3477
|
},
|
|
3454
3478
|
location: {
|
|
3455
3479
|
filePath: 'src/ctx/base.ts',
|
|
3456
|
-
lineNumber:
|
|
3480
|
+
lineNumber: 235,
|
|
3457
3481
|
},
|
|
3458
3482
|
type: '(itemTypeId: string) => Promise<Field[]>',
|
|
3459
3483
|
},
|
|
@@ -3466,7 +3490,7 @@ export const manifest: Manifest = {
|
|
|
3466
3490
|
},
|
|
3467
3491
|
location: {
|
|
3468
3492
|
filePath: 'src/ctx/base.ts',
|
|
3469
|
-
lineNumber:
|
|
3493
|
+
lineNumber: 254,
|
|
3470
3494
|
},
|
|
3471
3495
|
type: '(itemTypeId: string) => Promise<Fieldset[]>',
|
|
3472
3496
|
},
|
|
@@ -3479,7 +3503,7 @@ export const manifest: Manifest = {
|
|
|
3479
3503
|
},
|
|
3480
3504
|
location: {
|
|
3481
3505
|
filePath: 'src/ctx/base.ts',
|
|
3482
|
-
lineNumber:
|
|
3506
|
+
lineNumber: 271,
|
|
3483
3507
|
},
|
|
3484
3508
|
type: '() => Promise<Field[]>',
|
|
3485
3509
|
},
|
|
@@ -3492,7 +3516,7 @@ export const manifest: Manifest = {
|
|
|
3492
3516
|
},
|
|
3493
3517
|
location: {
|
|
3494
3518
|
filePath: 'src/ctx/base.ts',
|
|
3495
|
-
lineNumber:
|
|
3519
|
+
lineNumber: 284,
|
|
3496
3520
|
},
|
|
3497
3521
|
type: '() => Promise<User[]>',
|
|
3498
3522
|
},
|
|
@@ -3505,7 +3529,7 @@ export const manifest: Manifest = {
|
|
|
3505
3529
|
},
|
|
3506
3530
|
location: {
|
|
3507
3531
|
filePath: 'src/ctx/base.ts',
|
|
3508
|
-
lineNumber:
|
|
3532
|
+
lineNumber: 297,
|
|
3509
3533
|
},
|
|
3510
3534
|
type: '() => Promise<SsoUser[]>',
|
|
3511
3535
|
},
|
|
@@ -3527,7 +3551,7 @@ export const manifest: Manifest = {
|
|
|
3527
3551
|
},
|
|
3528
3552
|
location: {
|
|
3529
3553
|
filePath: 'src/ctx/base.ts',
|
|
3530
|
-
lineNumber:
|
|
3554
|
+
lineNumber: 319,
|
|
3531
3555
|
},
|
|
3532
3556
|
type: '(params: Record<string, unknown>) => Promise<void>',
|
|
3533
3557
|
},
|
|
@@ -3540,7 +3564,7 @@ export const manifest: Manifest = {
|
|
|
3540
3564
|
},
|
|
3541
3565
|
location: {
|
|
3542
3566
|
filePath: 'src/ctx/base.ts',
|
|
3543
|
-
lineNumber:
|
|
3567
|
+
lineNumber: 370,
|
|
3544
3568
|
},
|
|
3545
3569
|
type: '(\n fieldId: string,\n changes: FieldAppearanceChange[],\n ) => Promise<void>',
|
|
3546
3570
|
},
|
|
@@ -3562,7 +3586,7 @@ export const manifest: Manifest = {
|
|
|
3562
3586
|
},
|
|
3563
3587
|
location: {
|
|
3564
3588
|
filePath: 'src/ctx/base.ts',
|
|
3565
|
-
lineNumber:
|
|
3589
|
+
lineNumber: 475,
|
|
3566
3590
|
},
|
|
3567
3591
|
type: '(message: string) => Promise<void>',
|
|
3568
3592
|
},
|
|
@@ -3575,7 +3599,7 @@ export const manifest: Manifest = {
|
|
|
3575
3599
|
},
|
|
3576
3600
|
location: {
|
|
3577
3601
|
filePath: 'src/ctx/base.ts',
|
|
3578
|
-
lineNumber:
|
|
3602
|
+
lineNumber: 490,
|
|
3579
3603
|
},
|
|
3580
3604
|
type: '(message: string) => Promise<void>',
|
|
3581
3605
|
},
|
|
@@ -3588,7 +3612,7 @@ export const manifest: Manifest = {
|
|
|
3588
3612
|
},
|
|
3589
3613
|
location: {
|
|
3590
3614
|
filePath: 'src/ctx/base.ts',
|
|
3591
|
-
lineNumber:
|
|
3615
|
+
lineNumber: 514,
|
|
3592
3616
|
},
|
|
3593
3617
|
type: '<CtaValue = unknown>(\n toast: Toast<CtaValue>,\n ) => Promise<CtaValue | null>',
|
|
3594
3618
|
},
|
|
@@ -3610,7 +3634,7 @@ export const manifest: Manifest = {
|
|
|
3610
3634
|
},
|
|
3611
3635
|
location: {
|
|
3612
3636
|
filePath: 'src/ctx/base.ts',
|
|
3613
|
-
lineNumber:
|
|
3637
|
+
lineNumber: 400,
|
|
3614
3638
|
},
|
|
3615
3639
|
type: '(itemTypeId: string) => Promise<Item | null>',
|
|
3616
3640
|
},
|
|
@@ -3623,7 +3647,7 @@ export const manifest: Manifest = {
|
|
|
3623
3647
|
},
|
|
3624
3648
|
location: {
|
|
3625
3649
|
filePath: 'src/ctx/base.ts',
|
|
3626
|
-
lineNumber:
|
|
3650
|
+
lineNumber: 421,
|
|
3627
3651
|
},
|
|
3628
3652
|
type: '{\n (\n itemTypeId: string,\n options: { multiple: true; initialLocationQuery?: ItemListLocationQuery },\n ): Promise<Item[] | null>;\n (\n itemTypeId: string,\n options?: {\n multiple: false;\n initialLocationQuery?: ItemListLocationQuery;\n },\n ): Promise<Item | null>;\n }',
|
|
3629
3653
|
},
|
|
@@ -3636,7 +3660,7 @@ export const manifest: Manifest = {
|
|
|
3636
3660
|
},
|
|
3637
3661
|
location: {
|
|
3638
3662
|
filePath: 'src/ctx/base.ts',
|
|
3639
|
-
lineNumber:
|
|
3663
|
+
lineNumber: 453,
|
|
3640
3664
|
},
|
|
3641
3665
|
type: '(itemId: string) => Promise<Item | null>',
|
|
3642
3666
|
},
|
|
@@ -3658,7 +3682,7 @@ export const manifest: Manifest = {
|
|
|
3658
3682
|
},
|
|
3659
3683
|
location: {
|
|
3660
3684
|
filePath: 'src/ctx/base.ts',
|
|
3661
|
-
lineNumber:
|
|
3685
|
+
lineNumber: 541,
|
|
3662
3686
|
},
|
|
3663
3687
|
type: '{\n (options: { multiple: true }): Promise<Upload[] | null>;\n (options?: { multiple: false }): Promise<Upload | null>;\n }',
|
|
3664
3688
|
},
|
|
@@ -3671,7 +3695,7 @@ export const manifest: Manifest = {
|
|
|
3671
3695
|
},
|
|
3672
3696
|
location: {
|
|
3673
3697
|
filePath: 'src/ctx/base.ts',
|
|
3674
|
-
lineNumber:
|
|
3698
|
+
lineNumber: 569,
|
|
3675
3699
|
},
|
|
3676
3700
|
type: '(\n uploadId: string,\n ) => Promise<(Upload & { deleted?: true }) | null>',
|
|
3677
3701
|
},
|
|
@@ -3684,7 +3708,7 @@ export const manifest: Manifest = {
|
|
|
3684
3708
|
},
|
|
3685
3709
|
location: {
|
|
3686
3710
|
filePath: 'src/ctx/base.ts',
|
|
3687
|
-
lineNumber:
|
|
3711
|
+
lineNumber: 597,
|
|
3688
3712
|
},
|
|
3689
3713
|
type: '(\n /** The "single asset" field structure */\n fileFieldValue: FileFieldValue,\n /** Shows metadata information for a specific locale */\n locale?: string,\n ) => Promise<FileFieldValue | null>',
|
|
3690
3714
|
},
|
|
@@ -3706,7 +3730,7 @@ export const manifest: Manifest = {
|
|
|
3706
3730
|
},
|
|
3707
3731
|
location: {
|
|
3708
3732
|
filePath: 'src/ctx/base.ts',
|
|
3709
|
-
lineNumber:
|
|
3733
|
+
lineNumber: 628,
|
|
3710
3734
|
},
|
|
3711
3735
|
type: '(modal: Modal) => Promise<unknown>',
|
|
3712
3736
|
},
|
|
@@ -3719,7 +3743,7 @@ export const manifest: Manifest = {
|
|
|
3719
3743
|
},
|
|
3720
3744
|
location: {
|
|
3721
3745
|
filePath: 'src/ctx/base.ts',
|
|
3722
|
-
lineNumber:
|
|
3746
|
+
lineNumber: 665,
|
|
3723
3747
|
},
|
|
3724
3748
|
type: '(options: ConfirmOptions) => Promise<unknown>',
|
|
3725
3749
|
},
|
|
@@ -3740,7 +3764,7 @@ export const manifest: Manifest = {
|
|
|
3740
3764
|
},
|
|
3741
3765
|
location: {
|
|
3742
3766
|
filePath: 'src/ctx/base.ts',
|
|
3743
|
-
lineNumber:
|
|
3767
|
+
lineNumber: 679,
|
|
3744
3768
|
},
|
|
3745
3769
|
type: '(path: string) => Promise<void>',
|
|
3746
3770
|
},
|