datocms-plugin-sdk 2.1.1 → 3.0.1-alpha.0

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/src/manifest.ts CHANGED
@@ -3340,13 +3340,37 @@ export const manifest: Manifest = {
3340
3340
  comment: {
3341
3341
  markdownText:
3342
3342
  'An object containing the theme colors for the current DatoCMS project.',
3343
+ deprecatedMarkdownText:
3344
+ 'Use `semanticColorTokensTheme` instead. This property is kept\nfor backward compatibility with third-party plugins.',
3343
3345
  },
3344
3346
  location: {
3345
3347
  filePath: 'src/ctx/base.ts',
3346
- lineNumber: 87,
3348
+ lineNumber: 92,
3347
3349
  },
3348
3350
  type: 'Theme',
3349
3351
  },
3352
+ semanticColorTokensTheme: {
3353
+ comment: {
3354
+ markdownText:
3355
+ 'Semantic color tokens for the current DatoCMS project, pre-computed by\nthe host. Only available on DatoCMS hosts that support the new token\nsystem.',
3356
+ },
3357
+ location: {
3358
+ filePath: 'src/ctx/base.ts',
3359
+ lineNumber: 99,
3360
+ },
3361
+ type: 'SemanticColorTokensTheme',
3362
+ },
3363
+ colorScheme: {
3364
+ comment: {
3365
+ markdownText:
3366
+ '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` as\n`data-theme="light"` / `data-theme="dark"` so plugin CSS can branch\nwith `[data-theme="dark"] { … }` selectors. For non-CSS decisions\n(choosing a logo asset, a syntax-highlighting preset, …) branch on\n`ctx.colorScheme` directly.',
3367
+ },
3368
+ location: {
3369
+ filePath: 'src/ctx/base.ts',
3370
+ lineNumber: 111,
3371
+ },
3372
+ type: "'light' | 'dark'",
3373
+ },
3350
3374
  },
3351
3375
  },
3352
3376
  {
@@ -3363,7 +3387,7 @@ export const manifest: Manifest = {
3363
3387
  },
3364
3388
  location: {
3365
3389
  filePath: 'src/ctx/base.ts',
3366
- lineNumber: 97,
3390
+ lineNumber: 121,
3367
3391
  },
3368
3392
  type: 'Partial<Record<string, ItemType>>',
3369
3393
  },
@@ -3374,7 +3398,7 @@ export const manifest: Manifest = {
3374
3398
  },
3375
3399
  location: {
3376
3400
  filePath: 'src/ctx/base.ts',
3377
- lineNumber: 104,
3401
+ lineNumber: 128,
3378
3402
  },
3379
3403
  type: 'Partial<Record<string, Field>>',
3380
3404
  },
@@ -3385,7 +3409,7 @@ export const manifest: Manifest = {
3385
3409
  },
3386
3410
  location: {
3387
3411
  filePath: 'src/ctx/base.ts',
3388
- lineNumber: 111,
3412
+ lineNumber: 135,
3389
3413
  },
3390
3414
  type: 'Partial<Record<string, Fieldset>>',
3391
3415
  },
@@ -3396,7 +3420,7 @@ export const manifest: Manifest = {
3396
3420
  },
3397
3421
  location: {
3398
3422
  filePath: 'src/ctx/base.ts',
3399
- lineNumber: 118,
3423
+ lineNumber: 142,
3400
3424
  },
3401
3425
  type: 'Partial<Record<string, User>>',
3402
3426
  },
@@ -3407,7 +3431,7 @@ export const manifest: Manifest = {
3407
3431
  },
3408
3432
  location: {
3409
3433
  filePath: 'src/ctx/base.ts',
3410
- lineNumber: 125,
3434
+ lineNumber: 149,
3411
3435
  },
3412
3436
  type: 'Partial<Record<string, SsoUser>>',
3413
3437
  },
@@ -3431,7 +3455,7 @@ export const manifest: Manifest = {
3431
3455
  },
3432
3456
  location: {
3433
3457
  filePath: 'src/ctx/base.ts',
3434
- lineNumber: 168,
3458
+ lineNumber: 353,
3435
3459
  },
3436
3460
  type: '(itemTypeId: string) => Promise<Field[]>',
3437
3461
  },
@@ -3444,7 +3468,7 @@ export const manifest: Manifest = {
3444
3468
  },
3445
3469
  location: {
3446
3470
  filePath: 'src/ctx/base.ts',
3447
- lineNumber: 187,
3471
+ lineNumber: 372,
3448
3472
  },
3449
3473
  type: '(itemTypeId: string) => Promise<Fieldset[]>',
3450
3474
  },
@@ -3457,7 +3481,7 @@ export const manifest: Manifest = {
3457
3481
  },
3458
3482
  location: {
3459
3483
  filePath: 'src/ctx/base.ts',
3460
- lineNumber: 204,
3484
+ lineNumber: 389,
3461
3485
  },
3462
3486
  type: '() => Promise<Field[]>',
3463
3487
  },
@@ -3470,7 +3494,7 @@ export const manifest: Manifest = {
3470
3494
  },
3471
3495
  location: {
3472
3496
  filePath: 'src/ctx/base.ts',
3473
- lineNumber: 217,
3497
+ lineNumber: 402,
3474
3498
  },
3475
3499
  type: '() => Promise<User[]>',
3476
3500
  },
@@ -3483,7 +3507,7 @@ export const manifest: Manifest = {
3483
3507
  },
3484
3508
  location: {
3485
3509
  filePath: 'src/ctx/base.ts',
3486
- lineNumber: 230,
3510
+ lineNumber: 415,
3487
3511
  },
3488
3512
  type: '() => Promise<SsoUser[]>',
3489
3513
  },
@@ -3505,7 +3529,7 @@ export const manifest: Manifest = {
3505
3529
  },
3506
3530
  location: {
3507
3531
  filePath: 'src/ctx/base.ts',
3508
- lineNumber: 252,
3532
+ lineNumber: 437,
3509
3533
  },
3510
3534
  type: '(params: Record<string, unknown>) => Promise<void>',
3511
3535
  },
@@ -3518,7 +3542,7 @@ export const manifest: Manifest = {
3518
3542
  },
3519
3543
  location: {
3520
3544
  filePath: 'src/ctx/base.ts',
3521
- lineNumber: 303,
3545
+ lineNumber: 488,
3522
3546
  },
3523
3547
  type: '(\n fieldId: string,\n changes: FieldAppearanceChange[],\n ) => Promise<void>',
3524
3548
  },
@@ -3540,7 +3564,7 @@ export const manifest: Manifest = {
3540
3564
  },
3541
3565
  location: {
3542
3566
  filePath: 'src/ctx/base.ts',
3543
- lineNumber: 408,
3567
+ lineNumber: 593,
3544
3568
  },
3545
3569
  type: '(message: string) => Promise<void>',
3546
3570
  },
@@ -3553,7 +3577,7 @@ export const manifest: Manifest = {
3553
3577
  },
3554
3578
  location: {
3555
3579
  filePath: 'src/ctx/base.ts',
3556
- lineNumber: 423,
3580
+ lineNumber: 608,
3557
3581
  },
3558
3582
  type: '(message: string) => Promise<void>',
3559
3583
  },
@@ -3566,7 +3590,7 @@ export const manifest: Manifest = {
3566
3590
  },
3567
3591
  location: {
3568
3592
  filePath: 'src/ctx/base.ts',
3569
- lineNumber: 447,
3593
+ lineNumber: 632,
3570
3594
  },
3571
3595
  type: '<CtaValue = unknown>(\n toast: Toast<CtaValue>,\n ) => Promise<CtaValue | null>',
3572
3596
  },
@@ -3588,7 +3612,7 @@ export const manifest: Manifest = {
3588
3612
  },
3589
3613
  location: {
3590
3614
  filePath: 'src/ctx/base.ts',
3591
- lineNumber: 333,
3615
+ lineNumber: 518,
3592
3616
  },
3593
3617
  type: '(itemTypeId: string) => Promise<Item | null>',
3594
3618
  },
@@ -3601,7 +3625,7 @@ export const manifest: Manifest = {
3601
3625
  },
3602
3626
  location: {
3603
3627
  filePath: 'src/ctx/base.ts',
3604
- lineNumber: 354,
3628
+ lineNumber: 539,
3605
3629
  },
3606
3630
  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 }',
3607
3631
  },
@@ -3614,7 +3638,7 @@ export const manifest: Manifest = {
3614
3638
  },
3615
3639
  location: {
3616
3640
  filePath: 'src/ctx/base.ts',
3617
- lineNumber: 386,
3641
+ lineNumber: 571,
3618
3642
  },
3619
3643
  type: '(itemId: string) => Promise<Item | null>',
3620
3644
  },
@@ -3636,7 +3660,7 @@ export const manifest: Manifest = {
3636
3660
  },
3637
3661
  location: {
3638
3662
  filePath: 'src/ctx/base.ts',
3639
- lineNumber: 474,
3663
+ lineNumber: 659,
3640
3664
  },
3641
3665
  type: '{\n (options: { multiple: true }): Promise<Upload[] | null>;\n (options?: { multiple: false }): Promise<Upload | null>;\n }',
3642
3666
  },
@@ -3649,7 +3673,7 @@ export const manifest: Manifest = {
3649
3673
  },
3650
3674
  location: {
3651
3675
  filePath: 'src/ctx/base.ts',
3652
- lineNumber: 502,
3676
+ lineNumber: 687,
3653
3677
  },
3654
3678
  type: '(\n uploadId: string,\n ) => Promise<(Upload & { deleted?: true }) | null>',
3655
3679
  },
@@ -3662,7 +3686,7 @@ export const manifest: Manifest = {
3662
3686
  },
3663
3687
  location: {
3664
3688
  filePath: 'src/ctx/base.ts',
3665
- lineNumber: 530,
3689
+ lineNumber: 715,
3666
3690
  },
3667
3691
  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>',
3668
3692
  },
@@ -3684,7 +3708,7 @@ export const manifest: Manifest = {
3684
3708
  },
3685
3709
  location: {
3686
3710
  filePath: 'src/ctx/base.ts',
3687
- lineNumber: 561,
3711
+ lineNumber: 746,
3688
3712
  },
3689
3713
  type: '(modal: Modal) => Promise<unknown>',
3690
3714
  },
@@ -3697,7 +3721,7 @@ export const manifest: Manifest = {
3697
3721
  },
3698
3722
  location: {
3699
3723
  filePath: 'src/ctx/base.ts',
3700
- lineNumber: 598,
3724
+ lineNumber: 783,
3701
3725
  },
3702
3726
  type: '(options: ConfirmOptions) => Promise<unknown>',
3703
3727
  },
@@ -3718,7 +3742,7 @@ export const manifest: Manifest = {
3718
3742
  },
3719
3743
  location: {
3720
3744
  filePath: 'src/ctx/base.ts',
3721
- lineNumber: 612,
3745
+ lineNumber: 797,
3722
3746
  },
3723
3747
  type: '(path: string) => Promise<void>',
3724
3748
  },