@quartzds/core 1.0.0-beta.124 → 1.0.0-beta.126
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/CHANGELOG.md +31 -0
- package/components/index.d.ts +2 -0
- package/components/index.js +2 -1
- package/components/index.js.map +1 -1
- package/components/{p-BPNu4xuI.js → p-B56IOBA3.js} +9 -9
- package/components/p-B56IOBA3.js.map +1 -0
- package/components/{p-DVXvtEPn.js → p-BFkKlQwu.js} +38 -18
- package/components/p-BFkKlQwu.js.map +1 -0
- package/components/{p-BGAgQ6J5.js → p-B_CYrw-t.js} +3 -3
- package/components/{p-BGAgQ6J5.js.map → p-B_CYrw-t.js.map} +1 -1
- package/components/{p-B6ToH-uM.js → p-Bn9o5Um2.js} +3 -3
- package/components/{p-B6ToH-uM.js.map → p-Bn9o5Um2.js.map} +1 -1
- package/components/{p-BceRDckL.js → p-Br32bYGr.js} +25 -21
- package/components/p-Br32bYGr.js.map +1 -0
- package/components/p-CaibVX_2.js +3539 -0
- package/components/p-CaibVX_2.js.map +1 -0
- package/components/{p-D5u-bDNf.js → p-Cb5Tgh-o.js} +5 -5
- package/components/{p-D5u-bDNf.js.map → p-Cb5Tgh-o.js.map} +1 -1
- package/components/{p-De7cAKF1.js → p-DFjYtqSI.js} +21 -12
- package/components/p-DFjYtqSI.js.map +1 -0
- package/components/{p-CsIsG3ra.js → p-GskDFwn4.js} +6 -6
- package/components/p-GskDFwn4.js.map +1 -0
- package/components/{p-BxrR19WD.js → p-LrIqfiOT.js} +5 -5
- package/components/{p-BxrR19WD.js.map → p-LrIqfiOT.js.map} +1 -1
- package/components/{p-Vtb6GsBy.js → p-b8LTn_fi.js} +6 -6
- package/components/{p-Vtb6GsBy.js.map → p-b8LTn_fi.js.map} +1 -1
- package/components/{p-EjoVBa5a.js → p-fKK7EmM2.js} +3 -3
- package/components/{p-EjoVBa5a.js.map → p-fKK7EmM2.js.map} +1 -1
- package/components/qds-action-item.js +3 -3
- package/components/qds-avatar-media.js +1 -1
- package/components/qds-avatar.d.ts +11 -0
- package/components/qds-avatar.js +120 -0
- package/components/qds-avatar.js.map +1 -0
- package/components/qds-breadcrumb-item.js +3 -3
- package/components/qds-button.js +9 -4
- package/components/qds-button.js.map +1 -1
- package/components/qds-checkbox.js +1 -1
- package/components/qds-chip.js +5 -5
- package/components/qds-chip.js.map +1 -1
- package/components/qds-dialog.js +5 -5
- package/components/qds-dialog.js.map +1 -1
- package/components/qds-divider.js +1 -1
- package/components/qds-dropdown.js +1 -1
- package/components/qds-form-message.js +1 -1
- package/components/qds-icon-button.js +1 -1
- package/components/qds-icon-tab.js +4 -4
- package/components/qds-icon.js +1 -1
- package/components/qds-inline-link.js +4 -4
- package/components/qds-input.js +3 -3
- package/components/qds-label.js +2 -2
- package/components/qds-list-item.js +9 -9
- package/components/qds-loader.js +2 -2
- package/components/qds-menu-item.js +9 -9
- package/components/qds-menu-item.js.map +1 -1
- package/components/qds-mini-button.js +1 -1
- package/components/qds-progress-bar.js +2 -2
- package/components/qds-radio.js +1 -1
- package/components/qds-select.js +12 -16
- package/components/qds-select.js.map +1 -1
- package/components/qds-standalone-link.js +4 -4
- package/components/qds-switch.js +6 -6
- package/components/qds-switch.js.map +1 -1
- package/components/qds-tab.js +7 -7
- package/components/qds-tabbar.js +10 -10
- package/components/qds-tabbar.js.map +1 -1
- package/components/qds-table-cell.js +2 -2
- package/components/qds-table-head-cell.js +2 -2
- package/components/qds-table-row.js +1 -1
- package/components/qds-table.js +1 -1
- package/components/qds-tag.js +1 -1
- package/components/qds-textarea.js +3 -3
- package/components/qds-title.js +1 -1
- package/components/qds-tooltip.js +1 -1
- package/dist/cjs/helpers-DjUgyTKn.js +3559 -0
- package/dist/cjs/helpers-DjUgyTKn.js.map +1 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/qds-action-item.cjs.entry.js +1 -1
- package/dist/cjs/qds-avatar-media.cjs.entry.js +105 -0
- package/dist/cjs/qds-avatar-media.entry.cjs.js.map +1 -0
- package/dist/cjs/qds-avatar.cjs.entry.js +70 -0
- package/dist/cjs/qds-avatar.entry.cjs.js.map +1 -0
- package/dist/cjs/qds-breadcrumb-item.cjs.entry.js +1 -1
- package/dist/cjs/qds-button.cjs.entry.js +7 -2
- package/dist/cjs/qds-button.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-checkbox.qds-radio.entry.cjs.js.map +1 -0
- package/dist/cjs/{qds-avatar-media_3.cjs.entry.js → qds-checkbox_2.cjs.entry.js} +7 -99
- package/dist/cjs/qds-chip.cjs.entry.js +2 -2
- package/dist/cjs/qds-chip.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-dialog.cjs.entry.js +2 -2
- package/dist/cjs/qds-dialog.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-divider.qds-icon-button.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-divider_2.cjs.entry.js +33 -14
- package/dist/cjs/qds-dropdown.cjs.entry.js +19 -10
- package/dist/cjs/qds-dropdown.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-icon-tab.cjs.entry.js +1 -1
- package/dist/cjs/qds-icon.cjs.entry.js +1 -1
- package/dist/cjs/qds-inline-link.cjs.entry.js +3 -3
- package/dist/cjs/qds-input.cjs.entry.js +1 -1
- package/dist/cjs/qds-label.cjs.entry.js +1 -1
- package/dist/cjs/qds-list-item.cjs.entry.js +1 -1
- package/dist/cjs/qds-loader.cjs.entry.js +1 -1
- package/dist/cjs/qds-menu-item.cjs.entry.js +5 -5
- package/dist/cjs/qds-menu-item.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-mini-button.cjs.entry.js +2 -2
- package/dist/cjs/qds-progress-bar.cjs.entry.js +2 -2
- package/dist/cjs/qds-select.cjs.entry.js +11 -15
- package/dist/cjs/qds-select.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-standalone-link.cjs.entry.js +3 -3
- package/dist/cjs/qds-switch.cjs.entry.js +5 -5
- package/dist/cjs/qds-switch.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-tab.cjs.entry.js +4 -4
- package/dist/cjs/qds-tabbar.cjs.entry.js +6 -6
- package/dist/cjs/qds-tabbar.entry.cjs.js.map +1 -1
- package/dist/cjs/qds-table-cell.cjs.entry.js +2 -2
- package/dist/cjs/qds-table-head-cell.cjs.entry.js +2 -2
- package/dist/cjs/qds-table-row.cjs.entry.js +1 -1
- package/dist/cjs/qds-table.cjs.entry.js +1 -1
- package/dist/cjs/qds-tag.cjs.entry.js +3 -3
- package/dist/cjs/qds-textarea.cjs.entry.js +3 -3
- package/dist/cjs/qds-title.cjs.entry.js +2 -2
- package/dist/cjs/qds-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/qds.cjs.js +1 -1
- package/dist/custom-elements.json +309 -14
- package/dist/docs.json +396 -7
- package/dist/esm/helpers-mPQzhx-O.js +3539 -0
- package/dist/esm/helpers-mPQzhx-O.js.map +1 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/qds-action-item.entry.js +1 -1
- package/dist/esm/qds-avatar-media.entry.js +103 -0
- package/dist/esm/qds-avatar-media.entry.js.map +1 -0
- package/dist/esm/qds-avatar.entry.js +68 -0
- package/dist/esm/qds-avatar.entry.js.map +1 -0
- package/dist/esm/qds-breadcrumb-item.entry.js +1 -1
- package/dist/esm/qds-button.entry.js +7 -2
- package/dist/esm/qds-button.entry.js.map +1 -1
- package/dist/esm/qds-checkbox.qds-radio.entry.js.map +1 -0
- package/dist/esm/{qds-avatar-media_3.entry.js → qds-checkbox_2.entry.js} +9 -100
- package/dist/esm/qds-chip.entry.js +2 -2
- package/dist/esm/qds-chip.entry.js.map +1 -1
- package/dist/esm/qds-dialog.entry.js +2 -2
- package/dist/esm/qds-dialog.entry.js.map +1 -1
- package/dist/esm/qds-divider.qds-icon-button.entry.js.map +1 -1
- package/dist/esm/qds-divider_2.entry.js +33 -14
- package/dist/esm/qds-dropdown.entry.js +19 -10
- package/dist/esm/qds-dropdown.entry.js.map +1 -1
- package/dist/esm/qds-icon-tab.entry.js +1 -1
- package/dist/esm/qds-icon.entry.js +1 -1
- package/dist/esm/qds-inline-link.entry.js +3 -3
- package/dist/esm/qds-input.entry.js +1 -1
- package/dist/esm/qds-label.entry.js +1 -1
- package/dist/esm/qds-list-item.entry.js +1 -1
- package/dist/esm/qds-loader.entry.js +1 -1
- package/dist/esm/qds-menu-item.entry.js +6 -6
- package/dist/esm/qds-menu-item.entry.js.map +1 -1
- package/dist/esm/qds-mini-button.entry.js +2 -2
- package/dist/esm/qds-progress-bar.entry.js +2 -2
- package/dist/esm/qds-select.entry.js +11 -15
- package/dist/esm/qds-select.entry.js.map +1 -1
- package/dist/esm/qds-standalone-link.entry.js +3 -3
- package/dist/esm/qds-switch.entry.js +5 -5
- package/dist/esm/qds-switch.entry.js.map +1 -1
- package/dist/esm/qds-tab.entry.js +4 -4
- package/dist/esm/qds-tabbar.entry.js +6 -6
- package/dist/esm/qds-tabbar.entry.js.map +1 -1
- package/dist/esm/qds-table-cell.entry.js +2 -2
- package/dist/esm/qds-table-head-cell.entry.js +2 -2
- package/dist/esm/qds-table-row.entry.js +1 -1
- package/dist/esm/qds-table.entry.js +1 -1
- package/dist/esm/qds-tag.entry.js +3 -3
- package/dist/esm/qds-textarea.entry.js +3 -3
- package/dist/esm/qds-title.entry.js +2 -2
- package/dist/esm/qds-tooltip.entry.js +1 -1
- package/dist/esm/qds.js +1 -1
- package/dist/types/components/avatar/avatar.d.ts +61 -0
- package/dist/types/components/avatar-media/avatar-media.d.ts +0 -1
- package/dist/types/components/icon-button/icon-button.d.ts +1 -0
- package/dist/types/components/select/select.d.ts +1 -1
- package/dist/types/components.d.ts +139 -6
- package/dist/vscode.html-custom-data.json +81 -0
- package/hydrate/index.js +3478 -114
- package/hydrate/index.mjs +3478 -114
- package/package.json +2 -1
- package/components/p-BPNu4xuI.js.map +0 -1
- package/components/p-BceRDckL.js.map +0 -1
- package/components/p-Bm_hrsjc.js +0 -294
- package/components/p-Bm_hrsjc.js.map +0 -1
- package/components/p-CsIsG3ra.js.map +0 -1
- package/components/p-DVXvtEPn.js.map +0 -1
- package/components/p-De7cAKF1.js.map +0 -1
- package/dist/cjs/helpers-CPSgo4Ef.js +0 -314
- package/dist/cjs/helpers-CPSgo4Ef.js.map +0 -1
- package/dist/cjs/qds-avatar-media.qds-checkbox.qds-radio.entry.cjs.js.map +0 -1
- package/dist/esm/helpers-JWnSavo8.js +0 -294
- package/dist/esm/helpers-JWnSavo8.js.map +0 -1
- package/dist/esm/qds-avatar-media.qds-checkbox.qds-radio.entry.js.map +0 -1
package/hydrate/index.mjs
CHANGED
|
@@ -3362,6 +3362,3221 @@ var setScopedSSR = (opts) => {
|
|
|
3362
3362
|
var needsScopedSSR = () => scopedSSR;
|
|
3363
3363
|
var scopedSSR = false;
|
|
3364
3364
|
|
|
3365
|
+
// Generated by scripts/generate-bidi-data.ts from scripts/unicode/DerivedBidiClass-17.0.0.txt.
|
|
3366
|
+
// Do not edit by hand. Regenerate with `bun run generate:bidi-data`.
|
|
3367
|
+
// Formatting and isolate controls are projected onto `BN` because the rich
|
|
3368
|
+
// bidi helper consumes a simplified class set and does not model UBA isolates.
|
|
3369
|
+
const latin1BidiTypes = [
|
|
3370
|
+
'BN',
|
|
3371
|
+
'BN',
|
|
3372
|
+
'BN',
|
|
3373
|
+
'BN',
|
|
3374
|
+
'BN',
|
|
3375
|
+
'BN',
|
|
3376
|
+
'BN',
|
|
3377
|
+
'BN',
|
|
3378
|
+
'BN',
|
|
3379
|
+
'S',
|
|
3380
|
+
'B',
|
|
3381
|
+
'S',
|
|
3382
|
+
'WS',
|
|
3383
|
+
'B',
|
|
3384
|
+
'BN',
|
|
3385
|
+
'BN',
|
|
3386
|
+
'BN',
|
|
3387
|
+
'BN',
|
|
3388
|
+
'BN',
|
|
3389
|
+
'BN',
|
|
3390
|
+
'BN',
|
|
3391
|
+
'BN',
|
|
3392
|
+
'BN',
|
|
3393
|
+
'BN',
|
|
3394
|
+
'BN',
|
|
3395
|
+
'BN',
|
|
3396
|
+
'BN',
|
|
3397
|
+
'BN',
|
|
3398
|
+
'B',
|
|
3399
|
+
'B',
|
|
3400
|
+
'B',
|
|
3401
|
+
'S',
|
|
3402
|
+
'WS',
|
|
3403
|
+
'ON',
|
|
3404
|
+
'ON',
|
|
3405
|
+
'ET',
|
|
3406
|
+
'ET',
|
|
3407
|
+
'ET',
|
|
3408
|
+
'ON',
|
|
3409
|
+
'ON',
|
|
3410
|
+
'ON',
|
|
3411
|
+
'ON',
|
|
3412
|
+
'ON',
|
|
3413
|
+
'ES',
|
|
3414
|
+
'CS',
|
|
3415
|
+
'ES',
|
|
3416
|
+
'CS',
|
|
3417
|
+
'CS',
|
|
3418
|
+
'EN',
|
|
3419
|
+
'EN',
|
|
3420
|
+
'EN',
|
|
3421
|
+
'EN',
|
|
3422
|
+
'EN',
|
|
3423
|
+
'EN',
|
|
3424
|
+
'EN',
|
|
3425
|
+
'EN',
|
|
3426
|
+
'EN',
|
|
3427
|
+
'EN',
|
|
3428
|
+
'CS',
|
|
3429
|
+
'ON',
|
|
3430
|
+
'ON',
|
|
3431
|
+
'ON',
|
|
3432
|
+
'ON',
|
|
3433
|
+
'ON',
|
|
3434
|
+
'ON',
|
|
3435
|
+
'L',
|
|
3436
|
+
'L',
|
|
3437
|
+
'L',
|
|
3438
|
+
'L',
|
|
3439
|
+
'L',
|
|
3440
|
+
'L',
|
|
3441
|
+
'L',
|
|
3442
|
+
'L',
|
|
3443
|
+
'L',
|
|
3444
|
+
'L',
|
|
3445
|
+
'L',
|
|
3446
|
+
'L',
|
|
3447
|
+
'L',
|
|
3448
|
+
'L',
|
|
3449
|
+
'L',
|
|
3450
|
+
'L',
|
|
3451
|
+
'L',
|
|
3452
|
+
'L',
|
|
3453
|
+
'L',
|
|
3454
|
+
'L',
|
|
3455
|
+
'L',
|
|
3456
|
+
'L',
|
|
3457
|
+
'L',
|
|
3458
|
+
'L',
|
|
3459
|
+
'L',
|
|
3460
|
+
'L',
|
|
3461
|
+
'ON',
|
|
3462
|
+
'ON',
|
|
3463
|
+
'ON',
|
|
3464
|
+
'ON',
|
|
3465
|
+
'ON',
|
|
3466
|
+
'ON',
|
|
3467
|
+
'L',
|
|
3468
|
+
'L',
|
|
3469
|
+
'L',
|
|
3470
|
+
'L',
|
|
3471
|
+
'L',
|
|
3472
|
+
'L',
|
|
3473
|
+
'L',
|
|
3474
|
+
'L',
|
|
3475
|
+
'L',
|
|
3476
|
+
'L',
|
|
3477
|
+
'L',
|
|
3478
|
+
'L',
|
|
3479
|
+
'L',
|
|
3480
|
+
'L',
|
|
3481
|
+
'L',
|
|
3482
|
+
'L',
|
|
3483
|
+
'L',
|
|
3484
|
+
'L',
|
|
3485
|
+
'L',
|
|
3486
|
+
'L',
|
|
3487
|
+
'L',
|
|
3488
|
+
'L',
|
|
3489
|
+
'L',
|
|
3490
|
+
'L',
|
|
3491
|
+
'L',
|
|
3492
|
+
'L',
|
|
3493
|
+
'ON',
|
|
3494
|
+
'ON',
|
|
3495
|
+
'ON',
|
|
3496
|
+
'ON',
|
|
3497
|
+
'BN',
|
|
3498
|
+
'BN',
|
|
3499
|
+
'BN',
|
|
3500
|
+
'BN',
|
|
3501
|
+
'BN',
|
|
3502
|
+
'BN',
|
|
3503
|
+
'B',
|
|
3504
|
+
'BN',
|
|
3505
|
+
'BN',
|
|
3506
|
+
'BN',
|
|
3507
|
+
'BN',
|
|
3508
|
+
'BN',
|
|
3509
|
+
'BN',
|
|
3510
|
+
'BN',
|
|
3511
|
+
'BN',
|
|
3512
|
+
'BN',
|
|
3513
|
+
'BN',
|
|
3514
|
+
'BN',
|
|
3515
|
+
'BN',
|
|
3516
|
+
'BN',
|
|
3517
|
+
'BN',
|
|
3518
|
+
'BN',
|
|
3519
|
+
'BN',
|
|
3520
|
+
'BN',
|
|
3521
|
+
'BN',
|
|
3522
|
+
'BN',
|
|
3523
|
+
'BN',
|
|
3524
|
+
'BN',
|
|
3525
|
+
'BN',
|
|
3526
|
+
'BN',
|
|
3527
|
+
'BN',
|
|
3528
|
+
'BN',
|
|
3529
|
+
'BN',
|
|
3530
|
+
'CS',
|
|
3531
|
+
'ON',
|
|
3532
|
+
'ET',
|
|
3533
|
+
'ET',
|
|
3534
|
+
'ET',
|
|
3535
|
+
'ET',
|
|
3536
|
+
'ON',
|
|
3537
|
+
'ON',
|
|
3538
|
+
'ON',
|
|
3539
|
+
'ON',
|
|
3540
|
+
'L',
|
|
3541
|
+
'ON',
|
|
3542
|
+
'ON',
|
|
3543
|
+
'BN',
|
|
3544
|
+
'ON',
|
|
3545
|
+
'ON',
|
|
3546
|
+
'ET',
|
|
3547
|
+
'ET',
|
|
3548
|
+
'EN',
|
|
3549
|
+
'EN',
|
|
3550
|
+
'ON',
|
|
3551
|
+
'L',
|
|
3552
|
+
'ON',
|
|
3553
|
+
'ON',
|
|
3554
|
+
'ON',
|
|
3555
|
+
'EN',
|
|
3556
|
+
'L',
|
|
3557
|
+
'ON',
|
|
3558
|
+
'ON',
|
|
3559
|
+
'ON',
|
|
3560
|
+
'ON',
|
|
3561
|
+
'ON',
|
|
3562
|
+
'L',
|
|
3563
|
+
'L',
|
|
3564
|
+
'L',
|
|
3565
|
+
'L',
|
|
3566
|
+
'L',
|
|
3567
|
+
'L',
|
|
3568
|
+
'L',
|
|
3569
|
+
'L',
|
|
3570
|
+
'L',
|
|
3571
|
+
'L',
|
|
3572
|
+
'L',
|
|
3573
|
+
'L',
|
|
3574
|
+
'L',
|
|
3575
|
+
'L',
|
|
3576
|
+
'L',
|
|
3577
|
+
'L',
|
|
3578
|
+
'L',
|
|
3579
|
+
'L',
|
|
3580
|
+
'L',
|
|
3581
|
+
'L',
|
|
3582
|
+
'L',
|
|
3583
|
+
'L',
|
|
3584
|
+
'L',
|
|
3585
|
+
'ON',
|
|
3586
|
+
'L',
|
|
3587
|
+
'L',
|
|
3588
|
+
'L',
|
|
3589
|
+
'L',
|
|
3590
|
+
'L',
|
|
3591
|
+
'L',
|
|
3592
|
+
'L',
|
|
3593
|
+
'L',
|
|
3594
|
+
'L',
|
|
3595
|
+
'L',
|
|
3596
|
+
'L',
|
|
3597
|
+
'L',
|
|
3598
|
+
'L',
|
|
3599
|
+
'L',
|
|
3600
|
+
'L',
|
|
3601
|
+
'L',
|
|
3602
|
+
'L',
|
|
3603
|
+
'L',
|
|
3604
|
+
'L',
|
|
3605
|
+
'L',
|
|
3606
|
+
'L',
|
|
3607
|
+
'L',
|
|
3608
|
+
'L',
|
|
3609
|
+
'L',
|
|
3610
|
+
'L',
|
|
3611
|
+
'L',
|
|
3612
|
+
'L',
|
|
3613
|
+
'L',
|
|
3614
|
+
'L',
|
|
3615
|
+
'L',
|
|
3616
|
+
'L',
|
|
3617
|
+
'ON',
|
|
3618
|
+
'L',
|
|
3619
|
+
'L',
|
|
3620
|
+
'L',
|
|
3621
|
+
'L',
|
|
3622
|
+
'L',
|
|
3623
|
+
'L',
|
|
3624
|
+
'L',
|
|
3625
|
+
'L',
|
|
3626
|
+
];
|
|
3627
|
+
const nonLatin1BidiRanges = [
|
|
3628
|
+
[0x2B9, 0x2BA, 'ON'],
|
|
3629
|
+
[0x2C2, 0x2CF, 'ON'],
|
|
3630
|
+
[0x2D2, 0x2DF, 'ON'],
|
|
3631
|
+
[0x2E5, 0x2ED, 'ON'],
|
|
3632
|
+
[0x2EF, 0x2FF, 'ON'],
|
|
3633
|
+
[0x300, 0x36F, 'NSM'],
|
|
3634
|
+
[0x374, 0x375, 'ON'],
|
|
3635
|
+
[0x37E, 0x37E, 'ON'],
|
|
3636
|
+
[0x384, 0x385, 'ON'],
|
|
3637
|
+
[0x387, 0x387, 'ON'],
|
|
3638
|
+
[0x3F6, 0x3F6, 'ON'],
|
|
3639
|
+
[0x483, 0x489, 'NSM'],
|
|
3640
|
+
[0x58A, 0x58A, 'ON'],
|
|
3641
|
+
[0x58D, 0x58E, 'ON'],
|
|
3642
|
+
[0x58F, 0x58F, 'ET'],
|
|
3643
|
+
[0x590, 0x590, 'R'],
|
|
3644
|
+
[0x591, 0x5BD, 'NSM'],
|
|
3645
|
+
[0x5BE, 0x5BE, 'R'],
|
|
3646
|
+
[0x5BF, 0x5BF, 'NSM'],
|
|
3647
|
+
[0x5C0, 0x5C0, 'R'],
|
|
3648
|
+
[0x5C1, 0x5C2, 'NSM'],
|
|
3649
|
+
[0x5C3, 0x5C3, 'R'],
|
|
3650
|
+
[0x5C4, 0x5C5, 'NSM'],
|
|
3651
|
+
[0x5C6, 0x5C6, 'R'],
|
|
3652
|
+
[0x5C7, 0x5C7, 'NSM'],
|
|
3653
|
+
[0x5C8, 0x5FF, 'R'],
|
|
3654
|
+
[0x600, 0x605, 'AN'],
|
|
3655
|
+
[0x606, 0x607, 'ON'],
|
|
3656
|
+
[0x608, 0x608, 'AL'],
|
|
3657
|
+
[0x609, 0x60A, 'ET'],
|
|
3658
|
+
[0x60B, 0x60B, 'AL'],
|
|
3659
|
+
[0x60C, 0x60C, 'CS'],
|
|
3660
|
+
[0x60D, 0x60D, 'AL'],
|
|
3661
|
+
[0x60E, 0x60F, 'ON'],
|
|
3662
|
+
[0x610, 0x61A, 'NSM'],
|
|
3663
|
+
[0x61B, 0x64A, 'AL'],
|
|
3664
|
+
[0x64B, 0x65F, 'NSM'],
|
|
3665
|
+
[0x660, 0x669, 'AN'],
|
|
3666
|
+
[0x66A, 0x66A, 'ET'],
|
|
3667
|
+
[0x66B, 0x66C, 'AN'],
|
|
3668
|
+
[0x66D, 0x66F, 'AL'],
|
|
3669
|
+
[0x670, 0x670, 'NSM'],
|
|
3670
|
+
[0x671, 0x6D5, 'AL'],
|
|
3671
|
+
[0x6D6, 0x6DC, 'NSM'],
|
|
3672
|
+
[0x6DD, 0x6DD, 'AN'],
|
|
3673
|
+
[0x6DE, 0x6DE, 'ON'],
|
|
3674
|
+
[0x6DF, 0x6E4, 'NSM'],
|
|
3675
|
+
[0x6E5, 0x6E6, 'AL'],
|
|
3676
|
+
[0x6E7, 0x6E8, 'NSM'],
|
|
3677
|
+
[0x6E9, 0x6E9, 'ON'],
|
|
3678
|
+
[0x6EA, 0x6ED, 'NSM'],
|
|
3679
|
+
[0x6EE, 0x6EF, 'AL'],
|
|
3680
|
+
[0x6F0, 0x6F9, 'EN'],
|
|
3681
|
+
[0x6FA, 0x710, 'AL'],
|
|
3682
|
+
[0x711, 0x711, 'NSM'],
|
|
3683
|
+
[0x712, 0x72F, 'AL'],
|
|
3684
|
+
[0x730, 0x74A, 'NSM'],
|
|
3685
|
+
[0x74B, 0x7A5, 'AL'],
|
|
3686
|
+
[0x7A6, 0x7B0, 'NSM'],
|
|
3687
|
+
[0x7B1, 0x7BF, 'AL'],
|
|
3688
|
+
[0x7C0, 0x7EA, 'R'],
|
|
3689
|
+
[0x7EB, 0x7F3, 'NSM'],
|
|
3690
|
+
[0x7F4, 0x7F5, 'R'],
|
|
3691
|
+
[0x7F6, 0x7F9, 'ON'],
|
|
3692
|
+
[0x7FA, 0x7FC, 'R'],
|
|
3693
|
+
[0x7FD, 0x7FD, 'NSM'],
|
|
3694
|
+
[0x7FE, 0x815, 'R'],
|
|
3695
|
+
[0x816, 0x819, 'NSM'],
|
|
3696
|
+
[0x81A, 0x81A, 'R'],
|
|
3697
|
+
[0x81B, 0x823, 'NSM'],
|
|
3698
|
+
[0x824, 0x824, 'R'],
|
|
3699
|
+
[0x825, 0x827, 'NSM'],
|
|
3700
|
+
[0x828, 0x828, 'R'],
|
|
3701
|
+
[0x829, 0x82D, 'NSM'],
|
|
3702
|
+
[0x82E, 0x858, 'R'],
|
|
3703
|
+
[0x859, 0x85B, 'NSM'],
|
|
3704
|
+
[0x85C, 0x85F, 'R'],
|
|
3705
|
+
[0x860, 0x88F, 'AL'],
|
|
3706
|
+
[0x890, 0x891, 'AN'],
|
|
3707
|
+
[0x892, 0x896, 'AL'],
|
|
3708
|
+
[0x897, 0x89F, 'NSM'],
|
|
3709
|
+
[0x8A0, 0x8C9, 'AL'],
|
|
3710
|
+
[0x8CA, 0x8E1, 'NSM'],
|
|
3711
|
+
[0x8E2, 0x8E2, 'AN'],
|
|
3712
|
+
[0x8E3, 0x902, 'NSM'],
|
|
3713
|
+
[0x93A, 0x93A, 'NSM'],
|
|
3714
|
+
[0x93C, 0x93C, 'NSM'],
|
|
3715
|
+
[0x941, 0x948, 'NSM'],
|
|
3716
|
+
[0x94D, 0x94D, 'NSM'],
|
|
3717
|
+
[0x951, 0x957, 'NSM'],
|
|
3718
|
+
[0x962, 0x963, 'NSM'],
|
|
3719
|
+
[0x981, 0x981, 'NSM'],
|
|
3720
|
+
[0x9BC, 0x9BC, 'NSM'],
|
|
3721
|
+
[0x9C1, 0x9C4, 'NSM'],
|
|
3722
|
+
[0x9CD, 0x9CD, 'NSM'],
|
|
3723
|
+
[0x9E2, 0x9E3, 'NSM'],
|
|
3724
|
+
[0x9F2, 0x9F3, 'ET'],
|
|
3725
|
+
[0x9FB, 0x9FB, 'ET'],
|
|
3726
|
+
[0x9FE, 0x9FE, 'NSM'],
|
|
3727
|
+
[0xA01, 0xA02, 'NSM'],
|
|
3728
|
+
[0xA3C, 0xA3C, 'NSM'],
|
|
3729
|
+
[0xA41, 0xA42, 'NSM'],
|
|
3730
|
+
[0xA47, 0xA48, 'NSM'],
|
|
3731
|
+
[0xA4B, 0xA4D, 'NSM'],
|
|
3732
|
+
[0xA51, 0xA51, 'NSM'],
|
|
3733
|
+
[0xA70, 0xA71, 'NSM'],
|
|
3734
|
+
[0xA75, 0xA75, 'NSM'],
|
|
3735
|
+
[0xA81, 0xA82, 'NSM'],
|
|
3736
|
+
[0xABC, 0xABC, 'NSM'],
|
|
3737
|
+
[0xAC1, 0xAC5, 'NSM'],
|
|
3738
|
+
[0xAC7, 0xAC8, 'NSM'],
|
|
3739
|
+
[0xACD, 0xACD, 'NSM'],
|
|
3740
|
+
[0xAE2, 0xAE3, 'NSM'],
|
|
3741
|
+
[0xAF1, 0xAF1, 'ET'],
|
|
3742
|
+
[0xAFA, 0xAFF, 'NSM'],
|
|
3743
|
+
[0xB01, 0xB01, 'NSM'],
|
|
3744
|
+
[0xB3C, 0xB3C, 'NSM'],
|
|
3745
|
+
[0xB3F, 0xB3F, 'NSM'],
|
|
3746
|
+
[0xB41, 0xB44, 'NSM'],
|
|
3747
|
+
[0xB4D, 0xB4D, 'NSM'],
|
|
3748
|
+
[0xB55, 0xB56, 'NSM'],
|
|
3749
|
+
[0xB62, 0xB63, 'NSM'],
|
|
3750
|
+
[0xB82, 0xB82, 'NSM'],
|
|
3751
|
+
[0xBC0, 0xBC0, 'NSM'],
|
|
3752
|
+
[0xBCD, 0xBCD, 'NSM'],
|
|
3753
|
+
[0xBF3, 0xBF8, 'ON'],
|
|
3754
|
+
[0xBF9, 0xBF9, 'ET'],
|
|
3755
|
+
[0xBFA, 0xBFA, 'ON'],
|
|
3756
|
+
[0xC00, 0xC00, 'NSM'],
|
|
3757
|
+
[0xC04, 0xC04, 'NSM'],
|
|
3758
|
+
[0xC3C, 0xC3C, 'NSM'],
|
|
3759
|
+
[0xC3E, 0xC40, 'NSM'],
|
|
3760
|
+
[0xC46, 0xC48, 'NSM'],
|
|
3761
|
+
[0xC4A, 0xC4D, 'NSM'],
|
|
3762
|
+
[0xC55, 0xC56, 'NSM'],
|
|
3763
|
+
[0xC62, 0xC63, 'NSM'],
|
|
3764
|
+
[0xC78, 0xC7E, 'ON'],
|
|
3765
|
+
[0xC81, 0xC81, 'NSM'],
|
|
3766
|
+
[0xCBC, 0xCBC, 'NSM'],
|
|
3767
|
+
[0xCCC, 0xCCD, 'NSM'],
|
|
3768
|
+
[0xCE2, 0xCE3, 'NSM'],
|
|
3769
|
+
[0xD00, 0xD01, 'NSM'],
|
|
3770
|
+
[0xD3B, 0xD3C, 'NSM'],
|
|
3771
|
+
[0xD41, 0xD44, 'NSM'],
|
|
3772
|
+
[0xD4D, 0xD4D, 'NSM'],
|
|
3773
|
+
[0xD62, 0xD63, 'NSM'],
|
|
3774
|
+
[0xD81, 0xD81, 'NSM'],
|
|
3775
|
+
[0xDCA, 0xDCA, 'NSM'],
|
|
3776
|
+
[0xDD2, 0xDD4, 'NSM'],
|
|
3777
|
+
[0xDD6, 0xDD6, 'NSM'],
|
|
3778
|
+
[0xE31, 0xE31, 'NSM'],
|
|
3779
|
+
[0xE34, 0xE3A, 'NSM'],
|
|
3780
|
+
[0xE3F, 0xE3F, 'ET'],
|
|
3781
|
+
[0xE47, 0xE4E, 'NSM'],
|
|
3782
|
+
[0xEB1, 0xEB1, 'NSM'],
|
|
3783
|
+
[0xEB4, 0xEBC, 'NSM'],
|
|
3784
|
+
[0xEC8, 0xECE, 'NSM'],
|
|
3785
|
+
[0xF18, 0xF19, 'NSM'],
|
|
3786
|
+
[0xF35, 0xF35, 'NSM'],
|
|
3787
|
+
[0xF37, 0xF37, 'NSM'],
|
|
3788
|
+
[0xF39, 0xF39, 'NSM'],
|
|
3789
|
+
[0xF3A, 0xF3D, 'ON'],
|
|
3790
|
+
[0xF71, 0xF7E, 'NSM'],
|
|
3791
|
+
[0xF80, 0xF84, 'NSM'],
|
|
3792
|
+
[0xF86, 0xF87, 'NSM'],
|
|
3793
|
+
[0xF8D, 0xF97, 'NSM'],
|
|
3794
|
+
[0xF99, 0xFBC, 'NSM'],
|
|
3795
|
+
[0xFC6, 0xFC6, 'NSM'],
|
|
3796
|
+
[0x102D, 0x1030, 'NSM'],
|
|
3797
|
+
[0x1032, 0x1037, 'NSM'],
|
|
3798
|
+
[0x1039, 0x103A, 'NSM'],
|
|
3799
|
+
[0x103D, 0x103E, 'NSM'],
|
|
3800
|
+
[0x1058, 0x1059, 'NSM'],
|
|
3801
|
+
[0x105E, 0x1060, 'NSM'],
|
|
3802
|
+
[0x1071, 0x1074, 'NSM'],
|
|
3803
|
+
[0x1082, 0x1082, 'NSM'],
|
|
3804
|
+
[0x1085, 0x1086, 'NSM'],
|
|
3805
|
+
[0x108D, 0x108D, 'NSM'],
|
|
3806
|
+
[0x109D, 0x109D, 'NSM'],
|
|
3807
|
+
[0x135D, 0x135F, 'NSM'],
|
|
3808
|
+
[0x1390, 0x1399, 'ON'],
|
|
3809
|
+
[0x1400, 0x1400, 'ON'],
|
|
3810
|
+
[0x1680, 0x1680, 'WS'],
|
|
3811
|
+
[0x169B, 0x169C, 'ON'],
|
|
3812
|
+
[0x1712, 0x1714, 'NSM'],
|
|
3813
|
+
[0x1732, 0x1733, 'NSM'],
|
|
3814
|
+
[0x1752, 0x1753, 'NSM'],
|
|
3815
|
+
[0x1772, 0x1773, 'NSM'],
|
|
3816
|
+
[0x17B4, 0x17B5, 'NSM'],
|
|
3817
|
+
[0x17B7, 0x17BD, 'NSM'],
|
|
3818
|
+
[0x17C6, 0x17C6, 'NSM'],
|
|
3819
|
+
[0x17C9, 0x17D3, 'NSM'],
|
|
3820
|
+
[0x17DB, 0x17DB, 'ET'],
|
|
3821
|
+
[0x17DD, 0x17DD, 'NSM'],
|
|
3822
|
+
[0x17F0, 0x17F9, 'ON'],
|
|
3823
|
+
[0x1800, 0x180A, 'ON'],
|
|
3824
|
+
[0x180B, 0x180D, 'NSM'],
|
|
3825
|
+
[0x180E, 0x180E, 'BN'],
|
|
3826
|
+
[0x180F, 0x180F, 'NSM'],
|
|
3827
|
+
[0x1885, 0x1886, 'NSM'],
|
|
3828
|
+
[0x18A9, 0x18A9, 'NSM'],
|
|
3829
|
+
[0x1920, 0x1922, 'NSM'],
|
|
3830
|
+
[0x1927, 0x1928, 'NSM'],
|
|
3831
|
+
[0x1932, 0x1932, 'NSM'],
|
|
3832
|
+
[0x1939, 0x193B, 'NSM'],
|
|
3833
|
+
[0x1940, 0x1940, 'ON'],
|
|
3834
|
+
[0x1944, 0x1945, 'ON'],
|
|
3835
|
+
[0x19DE, 0x19FF, 'ON'],
|
|
3836
|
+
[0x1A17, 0x1A18, 'NSM'],
|
|
3837
|
+
[0x1A1B, 0x1A1B, 'NSM'],
|
|
3838
|
+
[0x1A56, 0x1A56, 'NSM'],
|
|
3839
|
+
[0x1A58, 0x1A5E, 'NSM'],
|
|
3840
|
+
[0x1A60, 0x1A60, 'NSM'],
|
|
3841
|
+
[0x1A62, 0x1A62, 'NSM'],
|
|
3842
|
+
[0x1A65, 0x1A6C, 'NSM'],
|
|
3843
|
+
[0x1A73, 0x1A7C, 'NSM'],
|
|
3844
|
+
[0x1A7F, 0x1A7F, 'NSM'],
|
|
3845
|
+
[0x1AB0, 0x1ADD, 'NSM'],
|
|
3846
|
+
[0x1AE0, 0x1AEB, 'NSM'],
|
|
3847
|
+
[0x1B00, 0x1B03, 'NSM'],
|
|
3848
|
+
[0x1B34, 0x1B34, 'NSM'],
|
|
3849
|
+
[0x1B36, 0x1B3A, 'NSM'],
|
|
3850
|
+
[0x1B3C, 0x1B3C, 'NSM'],
|
|
3851
|
+
[0x1B42, 0x1B42, 'NSM'],
|
|
3852
|
+
[0x1B6B, 0x1B73, 'NSM'],
|
|
3853
|
+
[0x1B80, 0x1B81, 'NSM'],
|
|
3854
|
+
[0x1BA2, 0x1BA5, 'NSM'],
|
|
3855
|
+
[0x1BA8, 0x1BA9, 'NSM'],
|
|
3856
|
+
[0x1BAB, 0x1BAD, 'NSM'],
|
|
3857
|
+
[0x1BE6, 0x1BE6, 'NSM'],
|
|
3858
|
+
[0x1BE8, 0x1BE9, 'NSM'],
|
|
3859
|
+
[0x1BED, 0x1BED, 'NSM'],
|
|
3860
|
+
[0x1BEF, 0x1BF1, 'NSM'],
|
|
3861
|
+
[0x1C2C, 0x1C33, 'NSM'],
|
|
3862
|
+
[0x1C36, 0x1C37, 'NSM'],
|
|
3863
|
+
[0x1CD0, 0x1CD2, 'NSM'],
|
|
3864
|
+
[0x1CD4, 0x1CE0, 'NSM'],
|
|
3865
|
+
[0x1CE2, 0x1CE8, 'NSM'],
|
|
3866
|
+
[0x1CED, 0x1CED, 'NSM'],
|
|
3867
|
+
[0x1CF4, 0x1CF4, 'NSM'],
|
|
3868
|
+
[0x1CF8, 0x1CF9, 'NSM'],
|
|
3869
|
+
[0x1DC0, 0x1DFF, 'NSM'],
|
|
3870
|
+
[0x1FBD, 0x1FBD, 'ON'],
|
|
3871
|
+
[0x1FBF, 0x1FC1, 'ON'],
|
|
3872
|
+
[0x1FCD, 0x1FCF, 'ON'],
|
|
3873
|
+
[0x1FDD, 0x1FDF, 'ON'],
|
|
3874
|
+
[0x1FED, 0x1FEF, 'ON'],
|
|
3875
|
+
[0x1FFD, 0x1FFE, 'ON'],
|
|
3876
|
+
[0x2000, 0x200A, 'WS'],
|
|
3877
|
+
[0x200B, 0x200D, 'BN'],
|
|
3878
|
+
[0x200F, 0x200F, 'R'],
|
|
3879
|
+
[0x2010, 0x2027, 'ON'],
|
|
3880
|
+
[0x2028, 0x2028, 'WS'],
|
|
3881
|
+
[0x2029, 0x2029, 'B'],
|
|
3882
|
+
[0x202A, 0x202E, 'BN'],
|
|
3883
|
+
[0x202F, 0x202F, 'CS'],
|
|
3884
|
+
[0x2030, 0x2034, 'ET'],
|
|
3885
|
+
[0x2035, 0x2043, 'ON'],
|
|
3886
|
+
[0x2044, 0x2044, 'CS'],
|
|
3887
|
+
[0x2045, 0x205E, 'ON'],
|
|
3888
|
+
[0x205F, 0x205F, 'WS'],
|
|
3889
|
+
[0x2060, 0x206F, 'BN'],
|
|
3890
|
+
[0x2070, 0x2070, 'EN'],
|
|
3891
|
+
[0x2074, 0x2079, 'EN'],
|
|
3892
|
+
[0x207A, 0x207B, 'ES'],
|
|
3893
|
+
[0x207C, 0x207E, 'ON'],
|
|
3894
|
+
[0x2080, 0x2089, 'EN'],
|
|
3895
|
+
[0x208A, 0x208B, 'ES'],
|
|
3896
|
+
[0x208C, 0x208E, 'ON'],
|
|
3897
|
+
[0x20A0, 0x20CF, 'ET'],
|
|
3898
|
+
[0x20D0, 0x20F0, 'NSM'],
|
|
3899
|
+
[0x2100, 0x2101, 'ON'],
|
|
3900
|
+
[0x2103, 0x2106, 'ON'],
|
|
3901
|
+
[0x2108, 0x2109, 'ON'],
|
|
3902
|
+
[0x2114, 0x2114, 'ON'],
|
|
3903
|
+
[0x2116, 0x2118, 'ON'],
|
|
3904
|
+
[0x211E, 0x2123, 'ON'],
|
|
3905
|
+
[0x2125, 0x2125, 'ON'],
|
|
3906
|
+
[0x2127, 0x2127, 'ON'],
|
|
3907
|
+
[0x2129, 0x2129, 'ON'],
|
|
3908
|
+
[0x212E, 0x212E, 'ET'],
|
|
3909
|
+
[0x213A, 0x213B, 'ON'],
|
|
3910
|
+
[0x2140, 0x2144, 'ON'],
|
|
3911
|
+
[0x214A, 0x214D, 'ON'],
|
|
3912
|
+
[0x2150, 0x215F, 'ON'],
|
|
3913
|
+
[0x2189, 0x218B, 'ON'],
|
|
3914
|
+
[0x2190, 0x2211, 'ON'],
|
|
3915
|
+
[0x2212, 0x2212, 'ES'],
|
|
3916
|
+
[0x2213, 0x2213, 'ET'],
|
|
3917
|
+
[0x2214, 0x2335, 'ON'],
|
|
3918
|
+
[0x237B, 0x2394, 'ON'],
|
|
3919
|
+
[0x2396, 0x2429, 'ON'],
|
|
3920
|
+
[0x2440, 0x244A, 'ON'],
|
|
3921
|
+
[0x2460, 0x2487, 'ON'],
|
|
3922
|
+
[0x2488, 0x249B, 'EN'],
|
|
3923
|
+
[0x24EA, 0x26AB, 'ON'],
|
|
3924
|
+
[0x26AD, 0x27FF, 'ON'],
|
|
3925
|
+
[0x2900, 0x2B73, 'ON'],
|
|
3926
|
+
[0x2B76, 0x2BFF, 'ON'],
|
|
3927
|
+
[0x2CE5, 0x2CEA, 'ON'],
|
|
3928
|
+
[0x2CEF, 0x2CF1, 'NSM'],
|
|
3929
|
+
[0x2CF9, 0x2CFF, 'ON'],
|
|
3930
|
+
[0x2D7F, 0x2D7F, 'NSM'],
|
|
3931
|
+
[0x2DE0, 0x2DFF, 'NSM'],
|
|
3932
|
+
[0x2E00, 0x2E5D, 'ON'],
|
|
3933
|
+
[0x2E80, 0x2E99, 'ON'],
|
|
3934
|
+
[0x2E9B, 0x2EF3, 'ON'],
|
|
3935
|
+
[0x2F00, 0x2FD5, 'ON'],
|
|
3936
|
+
[0x2FF0, 0x2FFF, 'ON'],
|
|
3937
|
+
[0x3000, 0x3000, 'WS'],
|
|
3938
|
+
[0x3001, 0x3004, 'ON'],
|
|
3939
|
+
[0x3008, 0x3020, 'ON'],
|
|
3940
|
+
[0x302A, 0x302D, 'NSM'],
|
|
3941
|
+
[0x3030, 0x3030, 'ON'],
|
|
3942
|
+
[0x3036, 0x3037, 'ON'],
|
|
3943
|
+
[0x303D, 0x303F, 'ON'],
|
|
3944
|
+
[0x3099, 0x309A, 'NSM'],
|
|
3945
|
+
[0x309B, 0x309C, 'ON'],
|
|
3946
|
+
[0x30A0, 0x30A0, 'ON'],
|
|
3947
|
+
[0x30FB, 0x30FB, 'ON'],
|
|
3948
|
+
[0x31C0, 0x31E5, 'ON'],
|
|
3949
|
+
[0x31EF, 0x31EF, 'ON'],
|
|
3950
|
+
[0x321D, 0x321E, 'ON'],
|
|
3951
|
+
[0x3250, 0x325F, 'ON'],
|
|
3952
|
+
[0x327C, 0x327E, 'ON'],
|
|
3953
|
+
[0x32B1, 0x32BF, 'ON'],
|
|
3954
|
+
[0x32CC, 0x32CF, 'ON'],
|
|
3955
|
+
[0x3377, 0x337A, 'ON'],
|
|
3956
|
+
[0x33DE, 0x33DF, 'ON'],
|
|
3957
|
+
[0x33FF, 0x33FF, 'ON'],
|
|
3958
|
+
[0x4DC0, 0x4DFF, 'ON'],
|
|
3959
|
+
[0xA490, 0xA4C6, 'ON'],
|
|
3960
|
+
[0xA60D, 0xA60F, 'ON'],
|
|
3961
|
+
[0xA66F, 0xA672, 'NSM'],
|
|
3962
|
+
[0xA673, 0xA673, 'ON'],
|
|
3963
|
+
[0xA674, 0xA67D, 'NSM'],
|
|
3964
|
+
[0xA67E, 0xA67F, 'ON'],
|
|
3965
|
+
[0xA69E, 0xA69F, 'NSM'],
|
|
3966
|
+
[0xA6F0, 0xA6F1, 'NSM'],
|
|
3967
|
+
[0xA700, 0xA721, 'ON'],
|
|
3968
|
+
[0xA788, 0xA788, 'ON'],
|
|
3969
|
+
[0xA802, 0xA802, 'NSM'],
|
|
3970
|
+
[0xA806, 0xA806, 'NSM'],
|
|
3971
|
+
[0xA80B, 0xA80B, 'NSM'],
|
|
3972
|
+
[0xA825, 0xA826, 'NSM'],
|
|
3973
|
+
[0xA828, 0xA82B, 'ON'],
|
|
3974
|
+
[0xA82C, 0xA82C, 'NSM'],
|
|
3975
|
+
[0xA838, 0xA839, 'ET'],
|
|
3976
|
+
[0xA874, 0xA877, 'ON'],
|
|
3977
|
+
[0xA8C4, 0xA8C5, 'NSM'],
|
|
3978
|
+
[0xA8E0, 0xA8F1, 'NSM'],
|
|
3979
|
+
[0xA8FF, 0xA8FF, 'NSM'],
|
|
3980
|
+
[0xA926, 0xA92D, 'NSM'],
|
|
3981
|
+
[0xA947, 0xA951, 'NSM'],
|
|
3982
|
+
[0xA980, 0xA982, 'NSM'],
|
|
3983
|
+
[0xA9B3, 0xA9B3, 'NSM'],
|
|
3984
|
+
[0xA9B6, 0xA9B9, 'NSM'],
|
|
3985
|
+
[0xA9BC, 0xA9BD, 'NSM'],
|
|
3986
|
+
[0xA9E5, 0xA9E5, 'NSM'],
|
|
3987
|
+
[0xAA29, 0xAA2E, 'NSM'],
|
|
3988
|
+
[0xAA31, 0xAA32, 'NSM'],
|
|
3989
|
+
[0xAA35, 0xAA36, 'NSM'],
|
|
3990
|
+
[0xAA43, 0xAA43, 'NSM'],
|
|
3991
|
+
[0xAA4C, 0xAA4C, 'NSM'],
|
|
3992
|
+
[0xAA7C, 0xAA7C, 'NSM'],
|
|
3993
|
+
[0xAAB0, 0xAAB0, 'NSM'],
|
|
3994
|
+
[0xAAB2, 0xAAB4, 'NSM'],
|
|
3995
|
+
[0xAAB7, 0xAAB8, 'NSM'],
|
|
3996
|
+
[0xAABE, 0xAABF, 'NSM'],
|
|
3997
|
+
[0xAAC1, 0xAAC1, 'NSM'],
|
|
3998
|
+
[0xAAEC, 0xAAED, 'NSM'],
|
|
3999
|
+
[0xAAF6, 0xAAF6, 'NSM'],
|
|
4000
|
+
[0xAB6A, 0xAB6B, 'ON'],
|
|
4001
|
+
[0xABE5, 0xABE5, 'NSM'],
|
|
4002
|
+
[0xABE8, 0xABE8, 'NSM'],
|
|
4003
|
+
[0xABED, 0xABED, 'NSM'],
|
|
4004
|
+
[0xFB1D, 0xFB1D, 'R'],
|
|
4005
|
+
[0xFB1E, 0xFB1E, 'NSM'],
|
|
4006
|
+
[0xFB1F, 0xFB28, 'R'],
|
|
4007
|
+
[0xFB29, 0xFB29, 'ES'],
|
|
4008
|
+
[0xFB2A, 0xFB4F, 'R'],
|
|
4009
|
+
[0xFB50, 0xFBC2, 'AL'],
|
|
4010
|
+
[0xFBC3, 0xFBD2, 'ON'],
|
|
4011
|
+
[0xFBD3, 0xFD3D, 'AL'],
|
|
4012
|
+
[0xFD3E, 0xFD4F, 'ON'],
|
|
4013
|
+
[0xFD50, 0xFD8F, 'AL'],
|
|
4014
|
+
[0xFD90, 0xFD91, 'ON'],
|
|
4015
|
+
[0xFD92, 0xFDC7, 'AL'],
|
|
4016
|
+
[0xFDC8, 0xFDCF, 'ON'],
|
|
4017
|
+
[0xFDD0, 0xFDEF, 'BN'],
|
|
4018
|
+
[0xFDF0, 0xFDFC, 'AL'],
|
|
4019
|
+
[0xFDFD, 0xFDFF, 'ON'],
|
|
4020
|
+
[0xFE00, 0xFE0F, 'NSM'],
|
|
4021
|
+
[0xFE10, 0xFE19, 'ON'],
|
|
4022
|
+
[0xFE20, 0xFE2F, 'NSM'],
|
|
4023
|
+
[0xFE30, 0xFE4F, 'ON'],
|
|
4024
|
+
[0xFE50, 0xFE50, 'CS'],
|
|
4025
|
+
[0xFE51, 0xFE51, 'ON'],
|
|
4026
|
+
[0xFE52, 0xFE52, 'CS'],
|
|
4027
|
+
[0xFE54, 0xFE54, 'ON'],
|
|
4028
|
+
[0xFE55, 0xFE55, 'CS'],
|
|
4029
|
+
[0xFE56, 0xFE5E, 'ON'],
|
|
4030
|
+
[0xFE5F, 0xFE5F, 'ET'],
|
|
4031
|
+
[0xFE60, 0xFE61, 'ON'],
|
|
4032
|
+
[0xFE62, 0xFE63, 'ES'],
|
|
4033
|
+
[0xFE64, 0xFE66, 'ON'],
|
|
4034
|
+
[0xFE68, 0xFE68, 'ON'],
|
|
4035
|
+
[0xFE69, 0xFE6A, 'ET'],
|
|
4036
|
+
[0xFE6B, 0xFE6B, 'ON'],
|
|
4037
|
+
[0xFE70, 0xFEFE, 'AL'],
|
|
4038
|
+
[0xFEFF, 0xFEFF, 'BN'],
|
|
4039
|
+
[0xFF01, 0xFF02, 'ON'],
|
|
4040
|
+
[0xFF03, 0xFF05, 'ET'],
|
|
4041
|
+
[0xFF06, 0xFF0A, 'ON'],
|
|
4042
|
+
[0xFF0B, 0xFF0B, 'ES'],
|
|
4043
|
+
[0xFF0C, 0xFF0C, 'CS'],
|
|
4044
|
+
[0xFF0D, 0xFF0D, 'ES'],
|
|
4045
|
+
[0xFF0E, 0xFF0F, 'CS'],
|
|
4046
|
+
[0xFF10, 0xFF19, 'EN'],
|
|
4047
|
+
[0xFF1A, 0xFF1A, 'CS'],
|
|
4048
|
+
[0xFF1B, 0xFF20, 'ON'],
|
|
4049
|
+
[0xFF3B, 0xFF40, 'ON'],
|
|
4050
|
+
[0xFF5B, 0xFF65, 'ON'],
|
|
4051
|
+
[0xFFE0, 0xFFE1, 'ET'],
|
|
4052
|
+
[0xFFE2, 0xFFE4, 'ON'],
|
|
4053
|
+
[0xFFE5, 0xFFE6, 'ET'],
|
|
4054
|
+
[0xFFE8, 0xFFEE, 'ON'],
|
|
4055
|
+
[0xFFF0, 0xFFF8, 'BN'],
|
|
4056
|
+
[0xFFF9, 0xFFFD, 'ON'],
|
|
4057
|
+
[0xFFFE, 0xFFFF, 'BN'],
|
|
4058
|
+
[0x10101, 0x10101, 'ON'],
|
|
4059
|
+
[0x10140, 0x1018C, 'ON'],
|
|
4060
|
+
[0x10190, 0x1019C, 'ON'],
|
|
4061
|
+
[0x101A0, 0x101A0, 'ON'],
|
|
4062
|
+
[0x101FD, 0x101FD, 'NSM'],
|
|
4063
|
+
[0x102E0, 0x102E0, 'NSM'],
|
|
4064
|
+
[0x102E1, 0x102FB, 'EN'],
|
|
4065
|
+
[0x10376, 0x1037A, 'NSM'],
|
|
4066
|
+
[0x10800, 0x1091E, 'R'],
|
|
4067
|
+
[0x1091F, 0x1091F, 'ON'],
|
|
4068
|
+
[0x10920, 0x10A00, 'R'],
|
|
4069
|
+
[0x10A01, 0x10A03, 'NSM'],
|
|
4070
|
+
[0x10A04, 0x10A04, 'R'],
|
|
4071
|
+
[0x10A05, 0x10A06, 'NSM'],
|
|
4072
|
+
[0x10A07, 0x10A0B, 'R'],
|
|
4073
|
+
[0x10A0C, 0x10A0F, 'NSM'],
|
|
4074
|
+
[0x10A10, 0x10A37, 'R'],
|
|
4075
|
+
[0x10A38, 0x10A3A, 'NSM'],
|
|
4076
|
+
[0x10A3B, 0x10A3E, 'R'],
|
|
4077
|
+
[0x10A3F, 0x10A3F, 'NSM'],
|
|
4078
|
+
[0x10A40, 0x10AE4, 'R'],
|
|
4079
|
+
[0x10AE5, 0x10AE6, 'NSM'],
|
|
4080
|
+
[0x10AE7, 0x10B38, 'R'],
|
|
4081
|
+
[0x10B39, 0x10B3F, 'ON'],
|
|
4082
|
+
[0x10B40, 0x10CFF, 'R'],
|
|
4083
|
+
[0x10D00, 0x10D23, 'AL'],
|
|
4084
|
+
[0x10D24, 0x10D27, 'NSM'],
|
|
4085
|
+
[0x10D28, 0x10D2F, 'AL'],
|
|
4086
|
+
[0x10D30, 0x10D39, 'AN'],
|
|
4087
|
+
[0x10D3A, 0x10D3F, 'AL'],
|
|
4088
|
+
[0x10D40, 0x10D49, 'AN'],
|
|
4089
|
+
[0x10D4A, 0x10D68, 'R'],
|
|
4090
|
+
[0x10D69, 0x10D6D, 'NSM'],
|
|
4091
|
+
[0x10D6E, 0x10D6E, 'ON'],
|
|
4092
|
+
[0x10D6F, 0x10E5F, 'R'],
|
|
4093
|
+
[0x10E60, 0x10E7E, 'AN'],
|
|
4094
|
+
[0x10E7F, 0x10EAA, 'R'],
|
|
4095
|
+
[0x10EAB, 0x10EAC, 'NSM'],
|
|
4096
|
+
[0x10EAD, 0x10EBF, 'R'],
|
|
4097
|
+
[0x10EC0, 0x10ECF, 'AL'],
|
|
4098
|
+
[0x10ED0, 0x10ED8, 'ON'],
|
|
4099
|
+
[0x10ED9, 0x10EF9, 'AL'],
|
|
4100
|
+
[0x10EFA, 0x10EFF, 'NSM'],
|
|
4101
|
+
[0x10F00, 0x10F2F, 'R'],
|
|
4102
|
+
[0x10F30, 0x10F45, 'AL'],
|
|
4103
|
+
[0x10F46, 0x10F50, 'NSM'],
|
|
4104
|
+
[0x10F51, 0x10F6F, 'AL'],
|
|
4105
|
+
[0x10F70, 0x10F81, 'R'],
|
|
4106
|
+
[0x10F82, 0x10F85, 'NSM'],
|
|
4107
|
+
[0x10F86, 0x10FFF, 'R'],
|
|
4108
|
+
[0x11001, 0x11001, 'NSM'],
|
|
4109
|
+
[0x11038, 0x11046, 'NSM'],
|
|
4110
|
+
[0x11052, 0x11065, 'ON'],
|
|
4111
|
+
[0x11070, 0x11070, 'NSM'],
|
|
4112
|
+
[0x11073, 0x11074, 'NSM'],
|
|
4113
|
+
[0x1107F, 0x11081, 'NSM'],
|
|
4114
|
+
[0x110B3, 0x110B6, 'NSM'],
|
|
4115
|
+
[0x110B9, 0x110BA, 'NSM'],
|
|
4116
|
+
[0x110C2, 0x110C2, 'NSM'],
|
|
4117
|
+
[0x11100, 0x11102, 'NSM'],
|
|
4118
|
+
[0x11127, 0x1112B, 'NSM'],
|
|
4119
|
+
[0x1112D, 0x11134, 'NSM'],
|
|
4120
|
+
[0x11173, 0x11173, 'NSM'],
|
|
4121
|
+
[0x11180, 0x11181, 'NSM'],
|
|
4122
|
+
[0x111B6, 0x111BE, 'NSM'],
|
|
4123
|
+
[0x111C9, 0x111CC, 'NSM'],
|
|
4124
|
+
[0x111CF, 0x111CF, 'NSM'],
|
|
4125
|
+
[0x1122F, 0x11231, 'NSM'],
|
|
4126
|
+
[0x11234, 0x11234, 'NSM'],
|
|
4127
|
+
[0x11236, 0x11237, 'NSM'],
|
|
4128
|
+
[0x1123E, 0x1123E, 'NSM'],
|
|
4129
|
+
[0x11241, 0x11241, 'NSM'],
|
|
4130
|
+
[0x112DF, 0x112DF, 'NSM'],
|
|
4131
|
+
[0x112E3, 0x112EA, 'NSM'],
|
|
4132
|
+
[0x11300, 0x11301, 'NSM'],
|
|
4133
|
+
[0x1133B, 0x1133C, 'NSM'],
|
|
4134
|
+
[0x11340, 0x11340, 'NSM'],
|
|
4135
|
+
[0x11366, 0x1136C, 'NSM'],
|
|
4136
|
+
[0x11370, 0x11374, 'NSM'],
|
|
4137
|
+
[0x113BB, 0x113C0, 'NSM'],
|
|
4138
|
+
[0x113CE, 0x113CE, 'NSM'],
|
|
4139
|
+
[0x113D0, 0x113D0, 'NSM'],
|
|
4140
|
+
[0x113D2, 0x113D2, 'NSM'],
|
|
4141
|
+
[0x113E1, 0x113E2, 'NSM'],
|
|
4142
|
+
[0x11438, 0x1143F, 'NSM'],
|
|
4143
|
+
[0x11442, 0x11444, 'NSM'],
|
|
4144
|
+
[0x11446, 0x11446, 'NSM'],
|
|
4145
|
+
[0x1145E, 0x1145E, 'NSM'],
|
|
4146
|
+
[0x114B3, 0x114B8, 'NSM'],
|
|
4147
|
+
[0x114BA, 0x114BA, 'NSM'],
|
|
4148
|
+
[0x114BF, 0x114C0, 'NSM'],
|
|
4149
|
+
[0x114C2, 0x114C3, 'NSM'],
|
|
4150
|
+
[0x115B2, 0x115B5, 'NSM'],
|
|
4151
|
+
[0x115BC, 0x115BD, 'NSM'],
|
|
4152
|
+
[0x115BF, 0x115C0, 'NSM'],
|
|
4153
|
+
[0x115DC, 0x115DD, 'NSM'],
|
|
4154
|
+
[0x11633, 0x1163A, 'NSM'],
|
|
4155
|
+
[0x1163D, 0x1163D, 'NSM'],
|
|
4156
|
+
[0x1163F, 0x11640, 'NSM'],
|
|
4157
|
+
[0x11660, 0x1166C, 'ON'],
|
|
4158
|
+
[0x116AB, 0x116AB, 'NSM'],
|
|
4159
|
+
[0x116AD, 0x116AD, 'NSM'],
|
|
4160
|
+
[0x116B0, 0x116B5, 'NSM'],
|
|
4161
|
+
[0x116B7, 0x116B7, 'NSM'],
|
|
4162
|
+
[0x1171D, 0x1171D, 'NSM'],
|
|
4163
|
+
[0x1171F, 0x1171F, 'NSM'],
|
|
4164
|
+
[0x11722, 0x11725, 'NSM'],
|
|
4165
|
+
[0x11727, 0x1172B, 'NSM'],
|
|
4166
|
+
[0x1182F, 0x11837, 'NSM'],
|
|
4167
|
+
[0x11839, 0x1183A, 'NSM'],
|
|
4168
|
+
[0x1193B, 0x1193C, 'NSM'],
|
|
4169
|
+
[0x1193E, 0x1193E, 'NSM'],
|
|
4170
|
+
[0x11943, 0x11943, 'NSM'],
|
|
4171
|
+
[0x119D4, 0x119D7, 'NSM'],
|
|
4172
|
+
[0x119DA, 0x119DB, 'NSM'],
|
|
4173
|
+
[0x119E0, 0x119E0, 'NSM'],
|
|
4174
|
+
[0x11A01, 0x11A06, 'NSM'],
|
|
4175
|
+
[0x11A09, 0x11A0A, 'NSM'],
|
|
4176
|
+
[0x11A33, 0x11A38, 'NSM'],
|
|
4177
|
+
[0x11A3B, 0x11A3E, 'NSM'],
|
|
4178
|
+
[0x11A47, 0x11A47, 'NSM'],
|
|
4179
|
+
[0x11A51, 0x11A56, 'NSM'],
|
|
4180
|
+
[0x11A59, 0x11A5B, 'NSM'],
|
|
4181
|
+
[0x11A8A, 0x11A96, 'NSM'],
|
|
4182
|
+
[0x11A98, 0x11A99, 'NSM'],
|
|
4183
|
+
[0x11B60, 0x11B60, 'NSM'],
|
|
4184
|
+
[0x11B62, 0x11B64, 'NSM'],
|
|
4185
|
+
[0x11B66, 0x11B66, 'NSM'],
|
|
4186
|
+
[0x11C30, 0x11C36, 'NSM'],
|
|
4187
|
+
[0x11C38, 0x11C3D, 'NSM'],
|
|
4188
|
+
[0x11C92, 0x11CA7, 'NSM'],
|
|
4189
|
+
[0x11CAA, 0x11CB0, 'NSM'],
|
|
4190
|
+
[0x11CB2, 0x11CB3, 'NSM'],
|
|
4191
|
+
[0x11CB5, 0x11CB6, 'NSM'],
|
|
4192
|
+
[0x11D31, 0x11D36, 'NSM'],
|
|
4193
|
+
[0x11D3A, 0x11D3A, 'NSM'],
|
|
4194
|
+
[0x11D3C, 0x11D3D, 'NSM'],
|
|
4195
|
+
[0x11D3F, 0x11D45, 'NSM'],
|
|
4196
|
+
[0x11D47, 0x11D47, 'NSM'],
|
|
4197
|
+
[0x11D90, 0x11D91, 'NSM'],
|
|
4198
|
+
[0x11D95, 0x11D95, 'NSM'],
|
|
4199
|
+
[0x11D97, 0x11D97, 'NSM'],
|
|
4200
|
+
[0x11EF3, 0x11EF4, 'NSM'],
|
|
4201
|
+
[0x11F00, 0x11F01, 'NSM'],
|
|
4202
|
+
[0x11F36, 0x11F3A, 'NSM'],
|
|
4203
|
+
[0x11F40, 0x11F40, 'NSM'],
|
|
4204
|
+
[0x11F42, 0x11F42, 'NSM'],
|
|
4205
|
+
[0x11F5A, 0x11F5A, 'NSM'],
|
|
4206
|
+
[0x11FD5, 0x11FDC, 'ON'],
|
|
4207
|
+
[0x11FDD, 0x11FE0, 'ET'],
|
|
4208
|
+
[0x11FE1, 0x11FF1, 'ON'],
|
|
4209
|
+
[0x13440, 0x13440, 'NSM'],
|
|
4210
|
+
[0x13447, 0x13455, 'NSM'],
|
|
4211
|
+
[0x1611E, 0x16129, 'NSM'],
|
|
4212
|
+
[0x1612D, 0x1612F, 'NSM'],
|
|
4213
|
+
[0x16AF0, 0x16AF4, 'NSM'],
|
|
4214
|
+
[0x16B30, 0x16B36, 'NSM'],
|
|
4215
|
+
[0x16F4F, 0x16F4F, 'NSM'],
|
|
4216
|
+
[0x16F8F, 0x16F92, 'NSM'],
|
|
4217
|
+
[0x16FE2, 0x16FE2, 'ON'],
|
|
4218
|
+
[0x16FE4, 0x16FE4, 'NSM'],
|
|
4219
|
+
[0x1BC9D, 0x1BC9E, 'NSM'],
|
|
4220
|
+
[0x1BCA0, 0x1BCA3, 'BN'],
|
|
4221
|
+
[0x1CC00, 0x1CCD5, 'ON'],
|
|
4222
|
+
[0x1CCF0, 0x1CCF9, 'EN'],
|
|
4223
|
+
[0x1CCFA, 0x1CCFC, 'ON'],
|
|
4224
|
+
[0x1CD00, 0x1CEB3, 'ON'],
|
|
4225
|
+
[0x1CEBA, 0x1CED0, 'ON'],
|
|
4226
|
+
[0x1CEE0, 0x1CEF0, 'ON'],
|
|
4227
|
+
[0x1CF00, 0x1CF2D, 'NSM'],
|
|
4228
|
+
[0x1CF30, 0x1CF46, 'NSM'],
|
|
4229
|
+
[0x1D167, 0x1D169, 'NSM'],
|
|
4230
|
+
[0x1D173, 0x1D17A, 'BN'],
|
|
4231
|
+
[0x1D17B, 0x1D182, 'NSM'],
|
|
4232
|
+
[0x1D185, 0x1D18B, 'NSM'],
|
|
4233
|
+
[0x1D1AA, 0x1D1AD, 'NSM'],
|
|
4234
|
+
[0x1D1E9, 0x1D1EA, 'ON'],
|
|
4235
|
+
[0x1D200, 0x1D241, 'ON'],
|
|
4236
|
+
[0x1D242, 0x1D244, 'NSM'],
|
|
4237
|
+
[0x1D245, 0x1D245, 'ON'],
|
|
4238
|
+
[0x1D300, 0x1D356, 'ON'],
|
|
4239
|
+
[0x1D6C1, 0x1D6C1, 'ON'],
|
|
4240
|
+
[0x1D6DB, 0x1D6DB, 'ON'],
|
|
4241
|
+
[0x1D6FB, 0x1D6FB, 'ON'],
|
|
4242
|
+
[0x1D715, 0x1D715, 'ON'],
|
|
4243
|
+
[0x1D735, 0x1D735, 'ON'],
|
|
4244
|
+
[0x1D74F, 0x1D74F, 'ON'],
|
|
4245
|
+
[0x1D76F, 0x1D76F, 'ON'],
|
|
4246
|
+
[0x1D789, 0x1D789, 'ON'],
|
|
4247
|
+
[0x1D7A9, 0x1D7A9, 'ON'],
|
|
4248
|
+
[0x1D7C3, 0x1D7C3, 'ON'],
|
|
4249
|
+
[0x1D7CE, 0x1D7FF, 'EN'],
|
|
4250
|
+
[0x1DA00, 0x1DA36, 'NSM'],
|
|
4251
|
+
[0x1DA3B, 0x1DA6C, 'NSM'],
|
|
4252
|
+
[0x1DA75, 0x1DA75, 'NSM'],
|
|
4253
|
+
[0x1DA84, 0x1DA84, 'NSM'],
|
|
4254
|
+
[0x1DA9B, 0x1DA9F, 'NSM'],
|
|
4255
|
+
[0x1DAA1, 0x1DAAF, 'NSM'],
|
|
4256
|
+
[0x1E000, 0x1E006, 'NSM'],
|
|
4257
|
+
[0x1E008, 0x1E018, 'NSM'],
|
|
4258
|
+
[0x1E01B, 0x1E021, 'NSM'],
|
|
4259
|
+
[0x1E023, 0x1E024, 'NSM'],
|
|
4260
|
+
[0x1E026, 0x1E02A, 'NSM'],
|
|
4261
|
+
[0x1E08F, 0x1E08F, 'NSM'],
|
|
4262
|
+
[0x1E130, 0x1E136, 'NSM'],
|
|
4263
|
+
[0x1E2AE, 0x1E2AE, 'NSM'],
|
|
4264
|
+
[0x1E2EC, 0x1E2EF, 'NSM'],
|
|
4265
|
+
[0x1E2FF, 0x1E2FF, 'ET'],
|
|
4266
|
+
[0x1E4EC, 0x1E4EF, 'NSM'],
|
|
4267
|
+
[0x1E5EE, 0x1E5EF, 'NSM'],
|
|
4268
|
+
[0x1E6E3, 0x1E6E3, 'NSM'],
|
|
4269
|
+
[0x1E6E6, 0x1E6E6, 'NSM'],
|
|
4270
|
+
[0x1E6EE, 0x1E6EF, 'NSM'],
|
|
4271
|
+
[0x1E6F5, 0x1E6F5, 'NSM'],
|
|
4272
|
+
[0x1E800, 0x1E8CF, 'R'],
|
|
4273
|
+
[0x1E8D0, 0x1E8D6, 'NSM'],
|
|
4274
|
+
[0x1E8D7, 0x1E943, 'R'],
|
|
4275
|
+
[0x1E944, 0x1E94A, 'NSM'],
|
|
4276
|
+
[0x1E94B, 0x1EC6F, 'R'],
|
|
4277
|
+
[0x1EC70, 0x1ECBF, 'AL'],
|
|
4278
|
+
[0x1ECC0, 0x1ECFF, 'R'],
|
|
4279
|
+
[0x1ED00, 0x1ED4F, 'AL'],
|
|
4280
|
+
[0x1ED50, 0x1EDFF, 'R'],
|
|
4281
|
+
[0x1EE00, 0x1EEEF, 'AL'],
|
|
4282
|
+
[0x1EEF0, 0x1EEF1, 'ON'],
|
|
4283
|
+
[0x1EEF2, 0x1EEFF, 'AL'],
|
|
4284
|
+
[0x1EF00, 0x1EFFF, 'R'],
|
|
4285
|
+
[0x1F000, 0x1F02B, 'ON'],
|
|
4286
|
+
[0x1F030, 0x1F093, 'ON'],
|
|
4287
|
+
[0x1F0A0, 0x1F0AE, 'ON'],
|
|
4288
|
+
[0x1F0B1, 0x1F0BF, 'ON'],
|
|
4289
|
+
[0x1F0C1, 0x1F0CF, 'ON'],
|
|
4290
|
+
[0x1F0D1, 0x1F0F5, 'ON'],
|
|
4291
|
+
[0x1F100, 0x1F10A, 'EN'],
|
|
4292
|
+
[0x1F10B, 0x1F10F, 'ON'],
|
|
4293
|
+
[0x1F12F, 0x1F12F, 'ON'],
|
|
4294
|
+
[0x1F16A, 0x1F16F, 'ON'],
|
|
4295
|
+
[0x1F1AD, 0x1F1AD, 'ON'],
|
|
4296
|
+
[0x1F260, 0x1F265, 'ON'],
|
|
4297
|
+
[0x1F300, 0x1F6D8, 'ON'],
|
|
4298
|
+
[0x1F6DC, 0x1F6EC, 'ON'],
|
|
4299
|
+
[0x1F6F0, 0x1F6FC, 'ON'],
|
|
4300
|
+
[0x1F700, 0x1F7D9, 'ON'],
|
|
4301
|
+
[0x1F7E0, 0x1F7EB, 'ON'],
|
|
4302
|
+
[0x1F7F0, 0x1F7F0, 'ON'],
|
|
4303
|
+
[0x1F800, 0x1F80B, 'ON'],
|
|
4304
|
+
[0x1F810, 0x1F847, 'ON'],
|
|
4305
|
+
[0x1F850, 0x1F859, 'ON'],
|
|
4306
|
+
[0x1F860, 0x1F887, 'ON'],
|
|
4307
|
+
[0x1F890, 0x1F8AD, 'ON'],
|
|
4308
|
+
[0x1F8B0, 0x1F8BB, 'ON'],
|
|
4309
|
+
[0x1F8C0, 0x1F8C1, 'ON'],
|
|
4310
|
+
[0x1F8D0, 0x1F8D8, 'ON'],
|
|
4311
|
+
[0x1F900, 0x1FA57, 'ON'],
|
|
4312
|
+
[0x1FA60, 0x1FA6D, 'ON'],
|
|
4313
|
+
[0x1FA70, 0x1FA7C, 'ON'],
|
|
4314
|
+
[0x1FA80, 0x1FA8A, 'ON'],
|
|
4315
|
+
[0x1FA8E, 0x1FAC6, 'ON'],
|
|
4316
|
+
[0x1FAC8, 0x1FAC8, 'ON'],
|
|
4317
|
+
[0x1FACD, 0x1FADC, 'ON'],
|
|
4318
|
+
[0x1FADF, 0x1FAEA, 'ON'],
|
|
4319
|
+
[0x1FAEF, 0x1FAF8, 'ON'],
|
|
4320
|
+
[0x1FB00, 0x1FB92, 'ON'],
|
|
4321
|
+
[0x1FB94, 0x1FBEF, 'ON'],
|
|
4322
|
+
[0x1FBF0, 0x1FBF9, 'EN'],
|
|
4323
|
+
[0x1FBFA, 0x1FBFA, 'ON'],
|
|
4324
|
+
[0x1FFFE, 0x1FFFF, 'BN'],
|
|
4325
|
+
[0x2FFFE, 0x2FFFF, 'BN'],
|
|
4326
|
+
[0x3FFFE, 0x3FFFF, 'BN'],
|
|
4327
|
+
[0x4FFFE, 0x4FFFF, 'BN'],
|
|
4328
|
+
[0x5FFFE, 0x5FFFF, 'BN'],
|
|
4329
|
+
[0x6FFFE, 0x6FFFF, 'BN'],
|
|
4330
|
+
[0x7FFFE, 0x7FFFF, 'BN'],
|
|
4331
|
+
[0x8FFFE, 0x8FFFF, 'BN'],
|
|
4332
|
+
[0x9FFFE, 0x9FFFF, 'BN'],
|
|
4333
|
+
[0xAFFFE, 0xAFFFF, 'BN'],
|
|
4334
|
+
[0xBFFFE, 0xBFFFF, 'BN'],
|
|
4335
|
+
[0xCFFFE, 0xCFFFF, 'BN'],
|
|
4336
|
+
[0xDFFFE, 0xE00FF, 'BN'],
|
|
4337
|
+
[0xE0100, 0xE01EF, 'NSM'],
|
|
4338
|
+
[0xE01F0, 0xE0FFF, 'BN'],
|
|
4339
|
+
[0xEFFFE, 0xEFFFF, 'BN'],
|
|
4340
|
+
[0xFFFFE, 0xFFFFF, 'BN'],
|
|
4341
|
+
[0x10FFFE, 0x10FFFF, 'BN'],
|
|
4342
|
+
];
|
|
4343
|
+
|
|
4344
|
+
// Simplified bidi metadata helper for the rich prepareWithSegments() path,
|
|
4345
|
+
// forked from pdf.js via Sebastian's text-layout. It classifies characters
|
|
4346
|
+
// into bidi types, computes embedding levels, and maps them onto prepared
|
|
4347
|
+
// segments for custom rendering. The line-breaking engine does not consume
|
|
4348
|
+
// these levels.
|
|
4349
|
+
function classifyCodePoint(codePoint) {
|
|
4350
|
+
if (codePoint <= 0x00FF)
|
|
4351
|
+
return latin1BidiTypes[codePoint];
|
|
4352
|
+
let lo = 0;
|
|
4353
|
+
let hi = nonLatin1BidiRanges.length - 1;
|
|
4354
|
+
while (lo <= hi) {
|
|
4355
|
+
const mid = (lo + hi) >> 1;
|
|
4356
|
+
const range = nonLatin1BidiRanges[mid];
|
|
4357
|
+
if (codePoint < range[0]) {
|
|
4358
|
+
hi = mid - 1;
|
|
4359
|
+
continue;
|
|
4360
|
+
}
|
|
4361
|
+
if (codePoint > range[1]) {
|
|
4362
|
+
lo = mid + 1;
|
|
4363
|
+
continue;
|
|
4364
|
+
}
|
|
4365
|
+
return range[2];
|
|
4366
|
+
}
|
|
4367
|
+
return 'L';
|
|
4368
|
+
}
|
|
4369
|
+
function computeBidiLevels(str) {
|
|
4370
|
+
const len = str.length;
|
|
4371
|
+
if (len === 0)
|
|
4372
|
+
return null;
|
|
4373
|
+
// eslint-disable-next-line unicorn/no-new-array
|
|
4374
|
+
const types = new Array(len);
|
|
4375
|
+
let sawBidi = false;
|
|
4376
|
+
// Keep the resolved bidi classes aligned to UTF-16 code-unit offsets,
|
|
4377
|
+
// because the rich prepared segments index back into the normalized string
|
|
4378
|
+
// with JavaScript string offsets.
|
|
4379
|
+
for (let i = 0; i < len;) {
|
|
4380
|
+
const first = str.charCodeAt(i);
|
|
4381
|
+
let codePoint = first;
|
|
4382
|
+
let codeUnitLength = 1;
|
|
4383
|
+
if (first >= 0xD800 && first <= 0xDBFF && i + 1 < len) {
|
|
4384
|
+
const second = str.charCodeAt(i + 1);
|
|
4385
|
+
if (second >= 0xDC00 && second <= 0xDFFF) {
|
|
4386
|
+
codePoint = ((first - 0xD800) << 10) + (second - 0xDC00) + 0x10000;
|
|
4387
|
+
codeUnitLength = 2;
|
|
4388
|
+
}
|
|
4389
|
+
}
|
|
4390
|
+
const t = classifyCodePoint(codePoint);
|
|
4391
|
+
if (t === 'R' || t === 'AL' || t === 'AN')
|
|
4392
|
+
sawBidi = true;
|
|
4393
|
+
for (let j = 0; j < codeUnitLength; j++) {
|
|
4394
|
+
types[i + j] = t;
|
|
4395
|
+
}
|
|
4396
|
+
i += codeUnitLength;
|
|
4397
|
+
}
|
|
4398
|
+
if (!sawBidi)
|
|
4399
|
+
return null;
|
|
4400
|
+
// Use the first strong character to pick the paragraph base direction.
|
|
4401
|
+
// Rich-path bidi metadata is only an approximation, but this keeps mixed
|
|
4402
|
+
// LTR/RTL text aligned with the common UBA paragraph rule.
|
|
4403
|
+
let startLevel = 0;
|
|
4404
|
+
for (let i = 0; i < len; i++) {
|
|
4405
|
+
const t = types[i];
|
|
4406
|
+
if (t === 'L') {
|
|
4407
|
+
startLevel = 0;
|
|
4408
|
+
break;
|
|
4409
|
+
}
|
|
4410
|
+
if (t === 'R' || t === 'AL') {
|
|
4411
|
+
startLevel = 1;
|
|
4412
|
+
break;
|
|
4413
|
+
}
|
|
4414
|
+
}
|
|
4415
|
+
const levels = new Int8Array(len);
|
|
4416
|
+
for (let i = 0; i < len; i++)
|
|
4417
|
+
levels[i] = startLevel;
|
|
4418
|
+
const e = (startLevel & 1) ? 'R' : 'L';
|
|
4419
|
+
const sor = e;
|
|
4420
|
+
// W1-W7
|
|
4421
|
+
let lastType = sor;
|
|
4422
|
+
for (let i = 0; i < len; i++) {
|
|
4423
|
+
if (types[i] === 'NSM')
|
|
4424
|
+
types[i] = lastType;
|
|
4425
|
+
else
|
|
4426
|
+
lastType = types[i];
|
|
4427
|
+
}
|
|
4428
|
+
lastType = sor;
|
|
4429
|
+
for (let i = 0; i < len; i++) {
|
|
4430
|
+
const t = types[i];
|
|
4431
|
+
if (t === 'EN')
|
|
4432
|
+
types[i] = lastType === 'AL' ? 'AN' : 'EN';
|
|
4433
|
+
else if (t === 'R' || t === 'L' || t === 'AL')
|
|
4434
|
+
lastType = t;
|
|
4435
|
+
}
|
|
4436
|
+
for (let i = 0; i < len; i++) {
|
|
4437
|
+
if (types[i] === 'AL')
|
|
4438
|
+
types[i] = 'R';
|
|
4439
|
+
}
|
|
4440
|
+
for (let i = 1; i < len - 1; i++) {
|
|
4441
|
+
if (types[i] === 'ES' && types[i - 1] === 'EN' && types[i + 1] === 'EN') {
|
|
4442
|
+
types[i] = 'EN';
|
|
4443
|
+
}
|
|
4444
|
+
if (types[i] === 'CS' &&
|
|
4445
|
+
(types[i - 1] === 'EN' || types[i - 1] === 'AN') &&
|
|
4446
|
+
types[i + 1] === types[i - 1]) {
|
|
4447
|
+
types[i] = types[i - 1];
|
|
4448
|
+
}
|
|
4449
|
+
}
|
|
4450
|
+
for (let i = 0; i < len; i++) {
|
|
4451
|
+
if (types[i] !== 'EN')
|
|
4452
|
+
continue;
|
|
4453
|
+
let j;
|
|
4454
|
+
for (j = i - 1; j >= 0 && types[j] === 'ET'; j--)
|
|
4455
|
+
types[j] = 'EN';
|
|
4456
|
+
for (j = i + 1; j < len && types[j] === 'ET'; j++)
|
|
4457
|
+
types[j] = 'EN';
|
|
4458
|
+
}
|
|
4459
|
+
for (let i = 0; i < len; i++) {
|
|
4460
|
+
const t = types[i];
|
|
4461
|
+
if (t === 'WS' || t === 'ES' || t === 'ET' || t === 'CS')
|
|
4462
|
+
types[i] = 'ON';
|
|
4463
|
+
}
|
|
4464
|
+
lastType = sor;
|
|
4465
|
+
for (let i = 0; i < len; i++) {
|
|
4466
|
+
const t = types[i];
|
|
4467
|
+
if (t === 'EN')
|
|
4468
|
+
types[i] = lastType === 'L' ? 'L' : 'EN';
|
|
4469
|
+
else if (t === 'R' || t === 'L')
|
|
4470
|
+
lastType = t;
|
|
4471
|
+
}
|
|
4472
|
+
// N1-N2
|
|
4473
|
+
for (let i = 0; i < len; i++) {
|
|
4474
|
+
if (types[i] !== 'ON')
|
|
4475
|
+
continue;
|
|
4476
|
+
let end = i + 1;
|
|
4477
|
+
while (end < len && types[end] === 'ON')
|
|
4478
|
+
end++;
|
|
4479
|
+
const before = i > 0 ? types[i - 1] : sor;
|
|
4480
|
+
const after = end < len ? types[end] : sor;
|
|
4481
|
+
const bDir = before !== 'L' ? 'R' : 'L';
|
|
4482
|
+
const aDir = after !== 'L' ? 'R' : 'L';
|
|
4483
|
+
if (bDir === aDir) {
|
|
4484
|
+
for (let j = i; j < end; j++)
|
|
4485
|
+
types[j] = bDir;
|
|
4486
|
+
}
|
|
4487
|
+
i = end - 1;
|
|
4488
|
+
}
|
|
4489
|
+
for (let i = 0; i < len; i++) {
|
|
4490
|
+
if (types[i] === 'ON')
|
|
4491
|
+
types[i] = e;
|
|
4492
|
+
}
|
|
4493
|
+
// I1-I2
|
|
4494
|
+
for (let i = 0; i < len; i++) {
|
|
4495
|
+
const t = types[i];
|
|
4496
|
+
if ((levels[i] & 1) === 0) {
|
|
4497
|
+
if (t === 'R')
|
|
4498
|
+
levels[i]++;
|
|
4499
|
+
else if (t === 'AN' || t === 'EN')
|
|
4500
|
+
levels[i] += 2;
|
|
4501
|
+
}
|
|
4502
|
+
else if (t === 'L' || t === 'AN' || t === 'EN') {
|
|
4503
|
+
levels[i]++;
|
|
4504
|
+
}
|
|
4505
|
+
}
|
|
4506
|
+
return levels;
|
|
4507
|
+
}
|
|
4508
|
+
function computeSegmentLevels(normalized, segStarts) {
|
|
4509
|
+
const bidiLevels = computeBidiLevels(normalized);
|
|
4510
|
+
if (bidiLevels === null)
|
|
4511
|
+
return null;
|
|
4512
|
+
const segLevels = new Int8Array(segStarts.length);
|
|
4513
|
+
for (let i = 0; i < segStarts.length; i++) {
|
|
4514
|
+
segLevels[i] = bidiLevels[segStarts[i]];
|
|
4515
|
+
}
|
|
4516
|
+
return segLevels;
|
|
4517
|
+
}
|
|
4518
|
+
|
|
4519
|
+
const collapsibleWhitespaceRunRe = /[ \t\n\r\f]+/g;
|
|
4520
|
+
const needsWhitespaceNormalizationRe = /[\t\n\r\f]| {2,}|^ | $/;
|
|
4521
|
+
function getWhiteSpaceProfile(whiteSpace) {
|
|
4522
|
+
const mode = whiteSpace ?? 'normal';
|
|
4523
|
+
return mode === 'pre-wrap'
|
|
4524
|
+
? { mode, preserveOrdinarySpaces: true, preserveHardBreaks: true }
|
|
4525
|
+
: { mode, preserveOrdinarySpaces: false, preserveHardBreaks: false };
|
|
4526
|
+
}
|
|
4527
|
+
function normalizeWhitespaceNormal(text) {
|
|
4528
|
+
if (!needsWhitespaceNormalizationRe.test(text))
|
|
4529
|
+
return text;
|
|
4530
|
+
let normalized = text.replace(collapsibleWhitespaceRunRe, ' ');
|
|
4531
|
+
if (normalized.charCodeAt(0) === 0x20) {
|
|
4532
|
+
normalized = normalized.slice(1);
|
|
4533
|
+
}
|
|
4534
|
+
if (normalized.length > 0 && normalized.charCodeAt(normalized.length - 1) === 0x20) {
|
|
4535
|
+
normalized = normalized.slice(0, -1);
|
|
4536
|
+
}
|
|
4537
|
+
return normalized;
|
|
4538
|
+
}
|
|
4539
|
+
function normalizeWhitespacePreWrap(text) {
|
|
4540
|
+
if (!/[\r\f]/.test(text))
|
|
4541
|
+
return text;
|
|
4542
|
+
return text
|
|
4543
|
+
.replace(/\r\n/g, '\n')
|
|
4544
|
+
.replace(/[\r\f]/g, '\n');
|
|
4545
|
+
}
|
|
4546
|
+
let sharedWordSegmenter = null;
|
|
4547
|
+
let segmenterLocale;
|
|
4548
|
+
function getSharedWordSegmenter() {
|
|
4549
|
+
if (sharedWordSegmenter === null) {
|
|
4550
|
+
sharedWordSegmenter = new Intl.Segmenter(segmenterLocale, { granularity: 'word' });
|
|
4551
|
+
}
|
|
4552
|
+
return sharedWordSegmenter;
|
|
4553
|
+
}
|
|
4554
|
+
const arabicScriptRe = /\p{Script=Arabic}/u;
|
|
4555
|
+
const combiningMarkRe = /\p{M}/u;
|
|
4556
|
+
const decimalDigitRe = /\p{Nd}/u;
|
|
4557
|
+
function containsArabicScript(text) {
|
|
4558
|
+
return arabicScriptRe.test(text);
|
|
4559
|
+
}
|
|
4560
|
+
function isCJKCodePoint(codePoint) {
|
|
4561
|
+
return ((codePoint >= 0x4E00 && codePoint <= 0x9FFF) ||
|
|
4562
|
+
(codePoint >= 0x3400 && codePoint <= 0x4DBF) ||
|
|
4563
|
+
(codePoint >= 0x20000 && codePoint <= 0x2A6DF) ||
|
|
4564
|
+
(codePoint >= 0x2A700 && codePoint <= 0x2B73F) ||
|
|
4565
|
+
(codePoint >= 0x2B740 && codePoint <= 0x2B81F) ||
|
|
4566
|
+
(codePoint >= 0x2B820 && codePoint <= 0x2CEAF) ||
|
|
4567
|
+
(codePoint >= 0x2CEB0 && codePoint <= 0x2EBEF) ||
|
|
4568
|
+
(codePoint >= 0x2EBF0 && codePoint <= 0x2EE5D) ||
|
|
4569
|
+
(codePoint >= 0x2F800 && codePoint <= 0x2FA1F) ||
|
|
4570
|
+
(codePoint >= 0x30000 && codePoint <= 0x3134F) ||
|
|
4571
|
+
(codePoint >= 0x31350 && codePoint <= 0x323AF) ||
|
|
4572
|
+
(codePoint >= 0x323B0 && codePoint <= 0x33479) ||
|
|
4573
|
+
(codePoint >= 0xF900 && codePoint <= 0xFAFF) ||
|
|
4574
|
+
(codePoint >= 0x3000 && codePoint <= 0x303F) ||
|
|
4575
|
+
(codePoint >= 0x3040 && codePoint <= 0x309F) ||
|
|
4576
|
+
(codePoint >= 0x30A0 && codePoint <= 0x30FF) ||
|
|
4577
|
+
(codePoint >= 0x3130 && codePoint <= 0x318F) ||
|
|
4578
|
+
(codePoint >= 0xAC00 && codePoint <= 0xD7AF) ||
|
|
4579
|
+
(codePoint >= 0xFF00 && codePoint <= 0xFFEF));
|
|
4580
|
+
}
|
|
4581
|
+
function isCJK(s) {
|
|
4582
|
+
for (let i = 0; i < s.length; i++) {
|
|
4583
|
+
const first = s.charCodeAt(i);
|
|
4584
|
+
if (first < 0x3000)
|
|
4585
|
+
continue;
|
|
4586
|
+
if (first >= 0xD800 && first <= 0xDBFF && i + 1 < s.length) {
|
|
4587
|
+
const second = s.charCodeAt(i + 1);
|
|
4588
|
+
if (second >= 0xDC00 && second <= 0xDFFF) {
|
|
4589
|
+
const codePoint = ((first - 0xD800) << 10) + (second - 0xDC00) + 0x10000;
|
|
4590
|
+
if (isCJKCodePoint(codePoint))
|
|
4591
|
+
return true;
|
|
4592
|
+
i++;
|
|
4593
|
+
continue;
|
|
4594
|
+
}
|
|
4595
|
+
}
|
|
4596
|
+
if (isCJKCodePoint(first))
|
|
4597
|
+
return true;
|
|
4598
|
+
}
|
|
4599
|
+
return false;
|
|
4600
|
+
}
|
|
4601
|
+
function endsWithLineStartProhibitedText(text) {
|
|
4602
|
+
const last = getLastCodePoint(text);
|
|
4603
|
+
return last !== null && (kinsokuStart.has(last) || leftStickyPunctuation.has(last));
|
|
4604
|
+
}
|
|
4605
|
+
const keepAllGlueChars = new Set([
|
|
4606
|
+
'\u00A0',
|
|
4607
|
+
'\u202F',
|
|
4608
|
+
'\u2060',
|
|
4609
|
+
'\uFEFF',
|
|
4610
|
+
]);
|
|
4611
|
+
function containsCJKText(text) {
|
|
4612
|
+
return isCJK(text);
|
|
4613
|
+
}
|
|
4614
|
+
function endsWithKeepAllGlueText(text) {
|
|
4615
|
+
const last = getLastCodePoint(text);
|
|
4616
|
+
return last !== null && keepAllGlueChars.has(last);
|
|
4617
|
+
}
|
|
4618
|
+
function canContinueKeepAllTextRun(previousText) {
|
|
4619
|
+
return (!endsWithLineStartProhibitedText(previousText) &&
|
|
4620
|
+
!endsWithKeepAllGlueText(previousText));
|
|
4621
|
+
}
|
|
4622
|
+
const kinsokuStart = new Set([
|
|
4623
|
+
'\uFF0C',
|
|
4624
|
+
'\uFF0E',
|
|
4625
|
+
'\uFF01',
|
|
4626
|
+
'\uFF1A',
|
|
4627
|
+
'\uFF1B',
|
|
4628
|
+
'\uFF1F',
|
|
4629
|
+
'\u3001',
|
|
4630
|
+
'\u3002',
|
|
4631
|
+
'\u30FB',
|
|
4632
|
+
'\uFF09',
|
|
4633
|
+
'\u3015',
|
|
4634
|
+
'\u3009',
|
|
4635
|
+
'\u300B',
|
|
4636
|
+
'\u300D',
|
|
4637
|
+
'\u300F',
|
|
4638
|
+
'\u3011',
|
|
4639
|
+
'\u3017',
|
|
4640
|
+
'\u3019',
|
|
4641
|
+
'\u301B',
|
|
4642
|
+
'\u30FC',
|
|
4643
|
+
'\u3005',
|
|
4644
|
+
'\u303B',
|
|
4645
|
+
'\u309D',
|
|
4646
|
+
'\u309E',
|
|
4647
|
+
'\u30FD',
|
|
4648
|
+
'\u30FE',
|
|
4649
|
+
]);
|
|
4650
|
+
const kinsokuEnd = new Set([
|
|
4651
|
+
'"',
|
|
4652
|
+
'(', '[', '{',
|
|
4653
|
+
'“', '‘', '«', '‹',
|
|
4654
|
+
'\uFF08',
|
|
4655
|
+
'\u3014',
|
|
4656
|
+
'\u3008',
|
|
4657
|
+
'\u300A',
|
|
4658
|
+
'\u300C',
|
|
4659
|
+
'\u300E',
|
|
4660
|
+
'\u3010',
|
|
4661
|
+
'\u3016',
|
|
4662
|
+
'\u3018',
|
|
4663
|
+
'\u301A',
|
|
4664
|
+
]);
|
|
4665
|
+
const forwardStickyGlue = new Set([
|
|
4666
|
+
"'", '’',
|
|
4667
|
+
]);
|
|
4668
|
+
const leftStickyPunctuation = new Set([
|
|
4669
|
+
'.', ',', '!', '?', ':', ';',
|
|
4670
|
+
'\u060C',
|
|
4671
|
+
'\u061B',
|
|
4672
|
+
'\u061F',
|
|
4673
|
+
'\u0964',
|
|
4674
|
+
'\u0965',
|
|
4675
|
+
'\u104A',
|
|
4676
|
+
'\u104B',
|
|
4677
|
+
'\u104C',
|
|
4678
|
+
'\u104D',
|
|
4679
|
+
'\u104F',
|
|
4680
|
+
')', ']', '}',
|
|
4681
|
+
'%',
|
|
4682
|
+
'"',
|
|
4683
|
+
'”', '’', '»', '›',
|
|
4684
|
+
'…',
|
|
4685
|
+
]);
|
|
4686
|
+
const arabicNoSpaceTrailingPunctuation = new Set([
|
|
4687
|
+
':',
|
|
4688
|
+
'.',
|
|
4689
|
+
'\u060C',
|
|
4690
|
+
'\u061B',
|
|
4691
|
+
]);
|
|
4692
|
+
const myanmarMedialGlue = new Set([
|
|
4693
|
+
'\u104F',
|
|
4694
|
+
]);
|
|
4695
|
+
const closingQuoteChars = new Set([
|
|
4696
|
+
'”', '’', '»', '›',
|
|
4697
|
+
'\u300D',
|
|
4698
|
+
'\u300F',
|
|
4699
|
+
'\u3011',
|
|
4700
|
+
'\u300B',
|
|
4701
|
+
'\u3009',
|
|
4702
|
+
'\u3015',
|
|
4703
|
+
'\uFF09',
|
|
4704
|
+
]);
|
|
4705
|
+
function isLeftStickyPunctuationSegment(segment) {
|
|
4706
|
+
if (isEscapedQuoteClusterSegment(segment))
|
|
4707
|
+
return true;
|
|
4708
|
+
let sawPunctuation = false;
|
|
4709
|
+
for (const ch of segment) {
|
|
4710
|
+
if (leftStickyPunctuation.has(ch)) {
|
|
4711
|
+
sawPunctuation = true;
|
|
4712
|
+
continue;
|
|
4713
|
+
}
|
|
4714
|
+
if (sawPunctuation && combiningMarkRe.test(ch))
|
|
4715
|
+
continue;
|
|
4716
|
+
return false;
|
|
4717
|
+
}
|
|
4718
|
+
return sawPunctuation;
|
|
4719
|
+
}
|
|
4720
|
+
function isCJKLineStartProhibitedSegment(segment) {
|
|
4721
|
+
for (const ch of segment) {
|
|
4722
|
+
if (!kinsokuStart.has(ch) && !leftStickyPunctuation.has(ch))
|
|
4723
|
+
return false;
|
|
4724
|
+
}
|
|
4725
|
+
return segment.length > 0;
|
|
4726
|
+
}
|
|
4727
|
+
function isForwardStickyClusterSegment(segment) {
|
|
4728
|
+
if (isEscapedQuoteClusterSegment(segment))
|
|
4729
|
+
return true;
|
|
4730
|
+
for (const ch of segment) {
|
|
4731
|
+
if (!kinsokuEnd.has(ch) && !forwardStickyGlue.has(ch) && !combiningMarkRe.test(ch))
|
|
4732
|
+
return false;
|
|
4733
|
+
}
|
|
4734
|
+
return segment.length > 0;
|
|
4735
|
+
}
|
|
4736
|
+
function isEscapedQuoteClusterSegment(segment) {
|
|
4737
|
+
let sawQuote = false;
|
|
4738
|
+
for (const ch of segment) {
|
|
4739
|
+
if (ch === '\\' || combiningMarkRe.test(ch))
|
|
4740
|
+
continue;
|
|
4741
|
+
if (kinsokuEnd.has(ch) || leftStickyPunctuation.has(ch) || forwardStickyGlue.has(ch)) {
|
|
4742
|
+
sawQuote = true;
|
|
4743
|
+
continue;
|
|
4744
|
+
}
|
|
4745
|
+
return false;
|
|
4746
|
+
}
|
|
4747
|
+
return sawQuote;
|
|
4748
|
+
}
|
|
4749
|
+
function previousCodePointStart(text, end) {
|
|
4750
|
+
const last = end - 1;
|
|
4751
|
+
if (last <= 0)
|
|
4752
|
+
return Math.max(last, 0);
|
|
4753
|
+
const lastCodeUnit = text.charCodeAt(last);
|
|
4754
|
+
if (lastCodeUnit < 0xDC00 || lastCodeUnit > 0xDFFF)
|
|
4755
|
+
return last;
|
|
4756
|
+
const maybeHigh = last - 1;
|
|
4757
|
+
if (maybeHigh < 0)
|
|
4758
|
+
return last;
|
|
4759
|
+
const highCodeUnit = text.charCodeAt(maybeHigh);
|
|
4760
|
+
return highCodeUnit >= 0xD800 && highCodeUnit <= 0xDBFF ? maybeHigh : last;
|
|
4761
|
+
}
|
|
4762
|
+
function getLastCodePoint(text) {
|
|
4763
|
+
if (text.length === 0)
|
|
4764
|
+
return null;
|
|
4765
|
+
const start = previousCodePointStart(text, text.length);
|
|
4766
|
+
return text.slice(start);
|
|
4767
|
+
}
|
|
4768
|
+
function splitTrailingForwardStickyCluster(text) {
|
|
4769
|
+
const chars = Array.from(text);
|
|
4770
|
+
let splitIndex = chars.length;
|
|
4771
|
+
while (splitIndex > 0) {
|
|
4772
|
+
const ch = chars[splitIndex - 1];
|
|
4773
|
+
if (combiningMarkRe.test(ch)) {
|
|
4774
|
+
splitIndex--;
|
|
4775
|
+
continue;
|
|
4776
|
+
}
|
|
4777
|
+
if (kinsokuEnd.has(ch) || forwardStickyGlue.has(ch)) {
|
|
4778
|
+
splitIndex--;
|
|
4779
|
+
continue;
|
|
4780
|
+
}
|
|
4781
|
+
break;
|
|
4782
|
+
}
|
|
4783
|
+
if (splitIndex <= 0 || splitIndex === chars.length)
|
|
4784
|
+
return null;
|
|
4785
|
+
return {
|
|
4786
|
+
head: chars.slice(0, splitIndex).join(''),
|
|
4787
|
+
tail: chars.slice(splitIndex).join(''),
|
|
4788
|
+
};
|
|
4789
|
+
}
|
|
4790
|
+
function getRepeatableSingleCharRunChar(text, isWordLike, kind) {
|
|
4791
|
+
return kind === 'text' && !isWordLike && text.length === 1 && text !== '-' && text !== '—'
|
|
4792
|
+
? text
|
|
4793
|
+
: null;
|
|
4794
|
+
}
|
|
4795
|
+
function materializeDeferredSingleCharRun(texts, chars, lengths, index) {
|
|
4796
|
+
const ch = chars[index];
|
|
4797
|
+
const text = texts[index];
|
|
4798
|
+
if (ch == null)
|
|
4799
|
+
return text;
|
|
4800
|
+
const length = lengths[index];
|
|
4801
|
+
if (text.length === length)
|
|
4802
|
+
return text;
|
|
4803
|
+
const materialized = ch.repeat(length);
|
|
4804
|
+
texts[index] = materialized;
|
|
4805
|
+
return materialized;
|
|
4806
|
+
}
|
|
4807
|
+
function hasArabicNoSpacePunctuation(containsArabic, lastCodePoint) {
|
|
4808
|
+
return containsArabic && lastCodePoint !== null && arabicNoSpaceTrailingPunctuation.has(lastCodePoint);
|
|
4809
|
+
}
|
|
4810
|
+
function endsWithMyanmarMedialGlue(segment) {
|
|
4811
|
+
const lastCodePoint = getLastCodePoint(segment);
|
|
4812
|
+
return lastCodePoint !== null && myanmarMedialGlue.has(lastCodePoint);
|
|
4813
|
+
}
|
|
4814
|
+
function splitLeadingSpaceAndMarks(segment) {
|
|
4815
|
+
if (segment.length < 2 || segment[0] !== ' ')
|
|
4816
|
+
return null;
|
|
4817
|
+
const marks = segment.slice(1);
|
|
4818
|
+
if (/^\p{M}+$/u.test(marks)) {
|
|
4819
|
+
return { space: ' ', marks };
|
|
4820
|
+
}
|
|
4821
|
+
return null;
|
|
4822
|
+
}
|
|
4823
|
+
function endsWithClosingQuote(text) {
|
|
4824
|
+
let end = text.length;
|
|
4825
|
+
while (end > 0) {
|
|
4826
|
+
const start = previousCodePointStart(text, end);
|
|
4827
|
+
const ch = text.slice(start, end);
|
|
4828
|
+
if (closingQuoteChars.has(ch))
|
|
4829
|
+
return true;
|
|
4830
|
+
if (!leftStickyPunctuation.has(ch))
|
|
4831
|
+
return false;
|
|
4832
|
+
end = start;
|
|
4833
|
+
}
|
|
4834
|
+
return false;
|
|
4835
|
+
}
|
|
4836
|
+
function classifySegmentBreakChar(ch, whiteSpaceProfile) {
|
|
4837
|
+
if (whiteSpaceProfile.preserveOrdinarySpaces || whiteSpaceProfile.preserveHardBreaks) {
|
|
4838
|
+
if (ch === ' ')
|
|
4839
|
+
return 'preserved-space';
|
|
4840
|
+
if (ch === '\t')
|
|
4841
|
+
return 'tab';
|
|
4842
|
+
if (whiteSpaceProfile.preserveHardBreaks && ch === '\n')
|
|
4843
|
+
return 'hard-break';
|
|
4844
|
+
}
|
|
4845
|
+
if (ch === ' ')
|
|
4846
|
+
return 'space';
|
|
4847
|
+
if (ch === '\u00A0' || ch === '\u202F' || ch === '\u2060' || ch === '\uFEFF') {
|
|
4848
|
+
return 'glue';
|
|
4849
|
+
}
|
|
4850
|
+
if (ch === '\u200B')
|
|
4851
|
+
return 'zero-width-break';
|
|
4852
|
+
if (ch === '\u00AD')
|
|
4853
|
+
return 'soft-hyphen';
|
|
4854
|
+
return 'text';
|
|
4855
|
+
}
|
|
4856
|
+
// All characters that classifySegmentBreakChar maps to a non-'text' kind.
|
|
4857
|
+
const breakCharRe = /[\x20\t\n\xA0\xAD\u200B\u202F\u2060\uFEFF]/;
|
|
4858
|
+
function joinTextParts(parts) {
|
|
4859
|
+
return parts.length === 1 ? parts[0] : parts.join('');
|
|
4860
|
+
}
|
|
4861
|
+
function joinReversedPrefixParts(prefixParts, tail) {
|
|
4862
|
+
const parts = [];
|
|
4863
|
+
for (let i = prefixParts.length - 1; i >= 0; i--) {
|
|
4864
|
+
parts.push(prefixParts[i]);
|
|
4865
|
+
}
|
|
4866
|
+
parts.push(tail);
|
|
4867
|
+
return joinTextParts(parts);
|
|
4868
|
+
}
|
|
4869
|
+
function splitSegmentByBreakKind(segment, isWordLike, start, whiteSpaceProfile) {
|
|
4870
|
+
if (!breakCharRe.test(segment)) {
|
|
4871
|
+
return [{ text: segment, isWordLike, kind: 'text', start }];
|
|
4872
|
+
}
|
|
4873
|
+
const pieces = [];
|
|
4874
|
+
let currentKind = null;
|
|
4875
|
+
let currentTextParts = [];
|
|
4876
|
+
let currentStart = start;
|
|
4877
|
+
let currentWordLike = false;
|
|
4878
|
+
let offset = 0;
|
|
4879
|
+
for (const ch of segment) {
|
|
4880
|
+
const kind = classifySegmentBreakChar(ch, whiteSpaceProfile);
|
|
4881
|
+
const wordLike = kind === 'text' && isWordLike;
|
|
4882
|
+
if (currentKind !== null && kind === currentKind && wordLike === currentWordLike) {
|
|
4883
|
+
currentTextParts.push(ch);
|
|
4884
|
+
offset += ch.length;
|
|
4885
|
+
continue;
|
|
4886
|
+
}
|
|
4887
|
+
if (currentKind !== null) {
|
|
4888
|
+
pieces.push({
|
|
4889
|
+
text: joinTextParts(currentTextParts),
|
|
4890
|
+
isWordLike: currentWordLike,
|
|
4891
|
+
kind: currentKind,
|
|
4892
|
+
start: currentStart,
|
|
4893
|
+
});
|
|
4894
|
+
}
|
|
4895
|
+
currentKind = kind;
|
|
4896
|
+
currentTextParts = [ch];
|
|
4897
|
+
currentStart = start + offset;
|
|
4898
|
+
currentWordLike = wordLike;
|
|
4899
|
+
offset += ch.length;
|
|
4900
|
+
}
|
|
4901
|
+
if (currentKind !== null) {
|
|
4902
|
+
pieces.push({
|
|
4903
|
+
text: joinTextParts(currentTextParts),
|
|
4904
|
+
isWordLike: currentWordLike,
|
|
4905
|
+
kind: currentKind,
|
|
4906
|
+
start: currentStart,
|
|
4907
|
+
});
|
|
4908
|
+
}
|
|
4909
|
+
return pieces;
|
|
4910
|
+
}
|
|
4911
|
+
function isTextRunBoundary(kind) {
|
|
4912
|
+
return (kind === 'space' ||
|
|
4913
|
+
kind === 'preserved-space' ||
|
|
4914
|
+
kind === 'zero-width-break' ||
|
|
4915
|
+
kind === 'hard-break');
|
|
4916
|
+
}
|
|
4917
|
+
const urlSchemeSegmentRe = /^[A-Za-z][A-Za-z0-9+.-]*:$/;
|
|
4918
|
+
function isUrlLikeRunStart(segmentation, index) {
|
|
4919
|
+
const text = segmentation.texts[index];
|
|
4920
|
+
if (text.startsWith('www.'))
|
|
4921
|
+
return true;
|
|
4922
|
+
return (urlSchemeSegmentRe.test(text) &&
|
|
4923
|
+
index + 1 < segmentation.len &&
|
|
4924
|
+
segmentation.kinds[index + 1] === 'text' &&
|
|
4925
|
+
segmentation.texts[index + 1] === '//');
|
|
4926
|
+
}
|
|
4927
|
+
function isUrlQueryBoundarySegment(text) {
|
|
4928
|
+
return text.includes('?') && (text.includes('://') || text.startsWith('www.'));
|
|
4929
|
+
}
|
|
4930
|
+
function mergeUrlLikeRuns(segmentation) {
|
|
4931
|
+
const texts = segmentation.texts.slice();
|
|
4932
|
+
const isWordLike = segmentation.isWordLike.slice();
|
|
4933
|
+
const kinds = segmentation.kinds.slice();
|
|
4934
|
+
const starts = segmentation.starts.slice();
|
|
4935
|
+
for (let i = 0; i < segmentation.len; i++) {
|
|
4936
|
+
if (kinds[i] !== 'text' || !isUrlLikeRunStart(segmentation, i))
|
|
4937
|
+
continue;
|
|
4938
|
+
const mergedParts = [texts[i]];
|
|
4939
|
+
let j = i + 1;
|
|
4940
|
+
while (j < segmentation.len && !isTextRunBoundary(kinds[j])) {
|
|
4941
|
+
mergedParts.push(texts[j]);
|
|
4942
|
+
isWordLike[i] = true;
|
|
4943
|
+
const endsQueryPrefix = texts[j].includes('?');
|
|
4944
|
+
kinds[j] = 'text';
|
|
4945
|
+
texts[j] = '';
|
|
4946
|
+
j++;
|
|
4947
|
+
if (endsQueryPrefix)
|
|
4948
|
+
break;
|
|
4949
|
+
}
|
|
4950
|
+
texts[i] = joinTextParts(mergedParts);
|
|
4951
|
+
}
|
|
4952
|
+
let compactLen = 0;
|
|
4953
|
+
for (let read = 0; read < texts.length; read++) {
|
|
4954
|
+
const text = texts[read];
|
|
4955
|
+
if (text.length === 0)
|
|
4956
|
+
continue;
|
|
4957
|
+
if (compactLen !== read) {
|
|
4958
|
+
texts[compactLen] = text;
|
|
4959
|
+
isWordLike[compactLen] = isWordLike[read];
|
|
4960
|
+
kinds[compactLen] = kinds[read];
|
|
4961
|
+
starts[compactLen] = starts[read];
|
|
4962
|
+
}
|
|
4963
|
+
compactLen++;
|
|
4964
|
+
}
|
|
4965
|
+
texts.length = compactLen;
|
|
4966
|
+
isWordLike.length = compactLen;
|
|
4967
|
+
kinds.length = compactLen;
|
|
4968
|
+
starts.length = compactLen;
|
|
4969
|
+
return {
|
|
4970
|
+
len: compactLen,
|
|
4971
|
+
texts,
|
|
4972
|
+
isWordLike,
|
|
4973
|
+
kinds,
|
|
4974
|
+
starts,
|
|
4975
|
+
};
|
|
4976
|
+
}
|
|
4977
|
+
function mergeUrlQueryRuns(segmentation) {
|
|
4978
|
+
const texts = [];
|
|
4979
|
+
const isWordLike = [];
|
|
4980
|
+
const kinds = [];
|
|
4981
|
+
const starts = [];
|
|
4982
|
+
for (let i = 0; i < segmentation.len; i++) {
|
|
4983
|
+
const text = segmentation.texts[i];
|
|
4984
|
+
texts.push(text);
|
|
4985
|
+
isWordLike.push(segmentation.isWordLike[i]);
|
|
4986
|
+
kinds.push(segmentation.kinds[i]);
|
|
4987
|
+
starts.push(segmentation.starts[i]);
|
|
4988
|
+
if (!isUrlQueryBoundarySegment(text))
|
|
4989
|
+
continue;
|
|
4990
|
+
const nextIndex = i + 1;
|
|
4991
|
+
if (nextIndex >= segmentation.len ||
|
|
4992
|
+
isTextRunBoundary(segmentation.kinds[nextIndex])) {
|
|
4993
|
+
continue;
|
|
4994
|
+
}
|
|
4995
|
+
const queryParts = [];
|
|
4996
|
+
const queryStart = segmentation.starts[nextIndex];
|
|
4997
|
+
let j = nextIndex;
|
|
4998
|
+
while (j < segmentation.len && !isTextRunBoundary(segmentation.kinds[j])) {
|
|
4999
|
+
queryParts.push(segmentation.texts[j]);
|
|
5000
|
+
j++;
|
|
5001
|
+
}
|
|
5002
|
+
if (queryParts.length > 0) {
|
|
5003
|
+
texts.push(joinTextParts(queryParts));
|
|
5004
|
+
isWordLike.push(true);
|
|
5005
|
+
kinds.push('text');
|
|
5006
|
+
starts.push(queryStart);
|
|
5007
|
+
i = j - 1;
|
|
5008
|
+
}
|
|
5009
|
+
}
|
|
5010
|
+
return {
|
|
5011
|
+
len: texts.length,
|
|
5012
|
+
texts,
|
|
5013
|
+
isWordLike,
|
|
5014
|
+
kinds,
|
|
5015
|
+
starts,
|
|
5016
|
+
};
|
|
5017
|
+
}
|
|
5018
|
+
const numericJoinerChars = new Set([
|
|
5019
|
+
':', '-', '/', '×', ',', '.', '+',
|
|
5020
|
+
'\u2013',
|
|
5021
|
+
'\u2014',
|
|
5022
|
+
]);
|
|
5023
|
+
const asciiPunctuationChainSegmentRe = /^[A-Za-z0-9_]+[,:;]*$/;
|
|
5024
|
+
const asciiPunctuationChainTrailingJoinersRe = /[,:;]+$/;
|
|
5025
|
+
function segmentContainsDecimalDigit(text) {
|
|
5026
|
+
for (const ch of text) {
|
|
5027
|
+
if (decimalDigitRe.test(ch))
|
|
5028
|
+
return true;
|
|
5029
|
+
}
|
|
5030
|
+
return false;
|
|
5031
|
+
}
|
|
5032
|
+
function isNumericRunSegment(text) {
|
|
5033
|
+
if (text.length === 0)
|
|
5034
|
+
return false;
|
|
5035
|
+
for (const ch of text) {
|
|
5036
|
+
if (decimalDigitRe.test(ch) || numericJoinerChars.has(ch))
|
|
5037
|
+
continue;
|
|
5038
|
+
return false;
|
|
5039
|
+
}
|
|
5040
|
+
return true;
|
|
5041
|
+
}
|
|
5042
|
+
function mergeNumericRuns(segmentation) {
|
|
5043
|
+
const texts = [];
|
|
5044
|
+
const isWordLike = [];
|
|
5045
|
+
const kinds = [];
|
|
5046
|
+
const starts = [];
|
|
5047
|
+
for (let i = 0; i < segmentation.len; i++) {
|
|
5048
|
+
const text = segmentation.texts[i];
|
|
5049
|
+
const kind = segmentation.kinds[i];
|
|
5050
|
+
if (kind === 'text' && isNumericRunSegment(text) && segmentContainsDecimalDigit(text)) {
|
|
5051
|
+
const mergedParts = [text];
|
|
5052
|
+
let j = i + 1;
|
|
5053
|
+
while (j < segmentation.len &&
|
|
5054
|
+
segmentation.kinds[j] === 'text' &&
|
|
5055
|
+
isNumericRunSegment(segmentation.texts[j])) {
|
|
5056
|
+
mergedParts.push(segmentation.texts[j]);
|
|
5057
|
+
j++;
|
|
5058
|
+
}
|
|
5059
|
+
texts.push(joinTextParts(mergedParts));
|
|
5060
|
+
isWordLike.push(true);
|
|
5061
|
+
kinds.push('text');
|
|
5062
|
+
starts.push(segmentation.starts[i]);
|
|
5063
|
+
i = j - 1;
|
|
5064
|
+
continue;
|
|
5065
|
+
}
|
|
5066
|
+
texts.push(text);
|
|
5067
|
+
isWordLike.push(segmentation.isWordLike[i]);
|
|
5068
|
+
kinds.push(kind);
|
|
5069
|
+
starts.push(segmentation.starts[i]);
|
|
5070
|
+
}
|
|
5071
|
+
return {
|
|
5072
|
+
len: texts.length,
|
|
5073
|
+
texts,
|
|
5074
|
+
isWordLike,
|
|
5075
|
+
kinds,
|
|
5076
|
+
starts,
|
|
5077
|
+
};
|
|
5078
|
+
}
|
|
5079
|
+
function mergeAsciiPunctuationChains(segmentation) {
|
|
5080
|
+
const texts = [];
|
|
5081
|
+
const isWordLike = [];
|
|
5082
|
+
const kinds = [];
|
|
5083
|
+
const starts = [];
|
|
5084
|
+
for (let i = 0; i < segmentation.len; i++) {
|
|
5085
|
+
const text = segmentation.texts[i];
|
|
5086
|
+
const kind = segmentation.kinds[i];
|
|
5087
|
+
const wordLike = segmentation.isWordLike[i];
|
|
5088
|
+
if (kind === 'text' && wordLike && asciiPunctuationChainSegmentRe.test(text)) {
|
|
5089
|
+
const mergedParts = [text];
|
|
5090
|
+
let endsWithJoiners = asciiPunctuationChainTrailingJoinersRe.test(text);
|
|
5091
|
+
let j = i + 1;
|
|
5092
|
+
while (endsWithJoiners &&
|
|
5093
|
+
j < segmentation.len &&
|
|
5094
|
+
segmentation.kinds[j] === 'text' &&
|
|
5095
|
+
segmentation.isWordLike[j] &&
|
|
5096
|
+
asciiPunctuationChainSegmentRe.test(segmentation.texts[j])) {
|
|
5097
|
+
const nextText = segmentation.texts[j];
|
|
5098
|
+
mergedParts.push(nextText);
|
|
5099
|
+
endsWithJoiners = asciiPunctuationChainTrailingJoinersRe.test(nextText);
|
|
5100
|
+
j++;
|
|
5101
|
+
}
|
|
5102
|
+
texts.push(joinTextParts(mergedParts));
|
|
5103
|
+
isWordLike.push(true);
|
|
5104
|
+
kinds.push('text');
|
|
5105
|
+
starts.push(segmentation.starts[i]);
|
|
5106
|
+
i = j - 1;
|
|
5107
|
+
continue;
|
|
5108
|
+
}
|
|
5109
|
+
texts.push(text);
|
|
5110
|
+
isWordLike.push(wordLike);
|
|
5111
|
+
kinds.push(kind);
|
|
5112
|
+
starts.push(segmentation.starts[i]);
|
|
5113
|
+
}
|
|
5114
|
+
return {
|
|
5115
|
+
len: texts.length,
|
|
5116
|
+
texts,
|
|
5117
|
+
isWordLike,
|
|
5118
|
+
kinds,
|
|
5119
|
+
starts,
|
|
5120
|
+
};
|
|
5121
|
+
}
|
|
5122
|
+
function splitHyphenatedNumericRuns(segmentation) {
|
|
5123
|
+
const texts = [];
|
|
5124
|
+
const isWordLike = [];
|
|
5125
|
+
const kinds = [];
|
|
5126
|
+
const starts = [];
|
|
5127
|
+
for (let i = 0; i < segmentation.len; i++) {
|
|
5128
|
+
const text = segmentation.texts[i];
|
|
5129
|
+
if (segmentation.kinds[i] === 'text' && text.includes('-')) {
|
|
5130
|
+
const parts = text.split('-');
|
|
5131
|
+
let shouldSplit = parts.length > 1;
|
|
5132
|
+
for (let j = 0; j < parts.length; j++) {
|
|
5133
|
+
const part = parts[j];
|
|
5134
|
+
if (!shouldSplit)
|
|
5135
|
+
break;
|
|
5136
|
+
if (part.length === 0 ||
|
|
5137
|
+
!segmentContainsDecimalDigit(part) ||
|
|
5138
|
+
!isNumericRunSegment(part)) {
|
|
5139
|
+
shouldSplit = false;
|
|
5140
|
+
}
|
|
5141
|
+
}
|
|
5142
|
+
if (shouldSplit) {
|
|
5143
|
+
let offset = 0;
|
|
5144
|
+
for (let j = 0; j < parts.length; j++) {
|
|
5145
|
+
const part = parts[j];
|
|
5146
|
+
const splitText = j < parts.length - 1 ? `${part}-` : part;
|
|
5147
|
+
texts.push(splitText);
|
|
5148
|
+
isWordLike.push(true);
|
|
5149
|
+
kinds.push('text');
|
|
5150
|
+
starts.push(segmentation.starts[i] + offset);
|
|
5151
|
+
offset += splitText.length;
|
|
5152
|
+
}
|
|
5153
|
+
continue;
|
|
5154
|
+
}
|
|
5155
|
+
}
|
|
5156
|
+
texts.push(text);
|
|
5157
|
+
isWordLike.push(segmentation.isWordLike[i]);
|
|
5158
|
+
kinds.push(segmentation.kinds[i]);
|
|
5159
|
+
starts.push(segmentation.starts[i]);
|
|
5160
|
+
}
|
|
5161
|
+
return {
|
|
5162
|
+
len: texts.length,
|
|
5163
|
+
texts,
|
|
5164
|
+
isWordLike,
|
|
5165
|
+
kinds,
|
|
5166
|
+
starts,
|
|
5167
|
+
};
|
|
5168
|
+
}
|
|
5169
|
+
function mergeGlueConnectedTextRuns(segmentation) {
|
|
5170
|
+
const texts = [];
|
|
5171
|
+
const isWordLike = [];
|
|
5172
|
+
const kinds = [];
|
|
5173
|
+
const starts = [];
|
|
5174
|
+
let read = 0;
|
|
5175
|
+
while (read < segmentation.len) {
|
|
5176
|
+
const textParts = [segmentation.texts[read]];
|
|
5177
|
+
let wordLike = segmentation.isWordLike[read];
|
|
5178
|
+
let kind = segmentation.kinds[read];
|
|
5179
|
+
let start = segmentation.starts[read];
|
|
5180
|
+
if (kind === 'glue') {
|
|
5181
|
+
const glueParts = [textParts[0]];
|
|
5182
|
+
const glueStart = start;
|
|
5183
|
+
read++;
|
|
5184
|
+
while (read < segmentation.len && segmentation.kinds[read] === 'glue') {
|
|
5185
|
+
glueParts.push(segmentation.texts[read]);
|
|
5186
|
+
read++;
|
|
5187
|
+
}
|
|
5188
|
+
const glueText = joinTextParts(glueParts);
|
|
5189
|
+
if (read < segmentation.len && segmentation.kinds[read] === 'text') {
|
|
5190
|
+
textParts[0] = glueText;
|
|
5191
|
+
textParts.push(segmentation.texts[read]);
|
|
5192
|
+
wordLike = segmentation.isWordLike[read];
|
|
5193
|
+
kind = 'text';
|
|
5194
|
+
start = glueStart;
|
|
5195
|
+
read++;
|
|
5196
|
+
}
|
|
5197
|
+
else {
|
|
5198
|
+
texts.push(glueText);
|
|
5199
|
+
isWordLike.push(false);
|
|
5200
|
+
kinds.push('glue');
|
|
5201
|
+
starts.push(glueStart);
|
|
5202
|
+
continue;
|
|
5203
|
+
}
|
|
5204
|
+
}
|
|
5205
|
+
else {
|
|
5206
|
+
read++;
|
|
5207
|
+
}
|
|
5208
|
+
if (kind === 'text') {
|
|
5209
|
+
while (read < segmentation.len && segmentation.kinds[read] === 'glue') {
|
|
5210
|
+
const glueParts = [];
|
|
5211
|
+
while (read < segmentation.len && segmentation.kinds[read] === 'glue') {
|
|
5212
|
+
glueParts.push(segmentation.texts[read]);
|
|
5213
|
+
read++;
|
|
5214
|
+
}
|
|
5215
|
+
const glueText = joinTextParts(glueParts);
|
|
5216
|
+
if (read < segmentation.len && segmentation.kinds[read] === 'text') {
|
|
5217
|
+
textParts.push(glueText, segmentation.texts[read]);
|
|
5218
|
+
wordLike = wordLike || segmentation.isWordLike[read];
|
|
5219
|
+
read++;
|
|
5220
|
+
continue;
|
|
5221
|
+
}
|
|
5222
|
+
textParts.push(glueText);
|
|
5223
|
+
}
|
|
5224
|
+
}
|
|
5225
|
+
texts.push(joinTextParts(textParts));
|
|
5226
|
+
isWordLike.push(wordLike);
|
|
5227
|
+
kinds.push(kind);
|
|
5228
|
+
starts.push(start);
|
|
5229
|
+
}
|
|
5230
|
+
return {
|
|
5231
|
+
len: texts.length,
|
|
5232
|
+
texts,
|
|
5233
|
+
isWordLike,
|
|
5234
|
+
kinds,
|
|
5235
|
+
starts,
|
|
5236
|
+
};
|
|
5237
|
+
}
|
|
5238
|
+
function carryTrailingForwardStickyAcrossCJKBoundary(segmentation) {
|
|
5239
|
+
const texts = segmentation.texts.slice();
|
|
5240
|
+
const isWordLike = segmentation.isWordLike.slice();
|
|
5241
|
+
const kinds = segmentation.kinds.slice();
|
|
5242
|
+
const starts = segmentation.starts.slice();
|
|
5243
|
+
for (let i = 0; i < texts.length - 1; i++) {
|
|
5244
|
+
if (kinds[i] !== 'text' || kinds[i + 1] !== 'text')
|
|
5245
|
+
continue;
|
|
5246
|
+
if (!isCJK(texts[i]) || !isCJK(texts[i + 1]))
|
|
5247
|
+
continue;
|
|
5248
|
+
const split = splitTrailingForwardStickyCluster(texts[i]);
|
|
5249
|
+
if (split === null)
|
|
5250
|
+
continue;
|
|
5251
|
+
texts[i] = split.head;
|
|
5252
|
+
texts[i + 1] = split.tail + texts[i + 1];
|
|
5253
|
+
starts[i + 1] = starts[i] + split.head.length;
|
|
5254
|
+
}
|
|
5255
|
+
return {
|
|
5256
|
+
len: texts.length,
|
|
5257
|
+
texts,
|
|
5258
|
+
isWordLike,
|
|
5259
|
+
kinds,
|
|
5260
|
+
starts,
|
|
5261
|
+
};
|
|
5262
|
+
}
|
|
5263
|
+
function buildMergedSegmentation(normalized, profile, whiteSpaceProfile) {
|
|
5264
|
+
const wordSegmenter = getSharedWordSegmenter();
|
|
5265
|
+
let mergedLen = 0;
|
|
5266
|
+
const mergedTexts = [];
|
|
5267
|
+
const mergedTextParts = [];
|
|
5268
|
+
const mergedWordLike = [];
|
|
5269
|
+
const mergedKinds = [];
|
|
5270
|
+
const mergedStarts = [];
|
|
5271
|
+
// Track repeatable single-char punctuation runs structurally so identical
|
|
5272
|
+
// merges stay O(1) instead of re-scanning the accumulated segment each time.
|
|
5273
|
+
const mergedSingleCharRunChars = [];
|
|
5274
|
+
const mergedSingleCharRunLengths = [];
|
|
5275
|
+
const mergedContainsCJK = [];
|
|
5276
|
+
const mergedContainsArabicScript = [];
|
|
5277
|
+
const mergedEndsWithClosingQuote = [];
|
|
5278
|
+
const mergedEndsWithMyanmarMedialGlue = [];
|
|
5279
|
+
const mergedHasArabicNoSpacePunctuation = [];
|
|
5280
|
+
for (const s of wordSegmenter.segment(normalized)) {
|
|
5281
|
+
for (const piece of splitSegmentByBreakKind(s.segment, s.isWordLike ?? false, s.index, whiteSpaceProfile)) {
|
|
5282
|
+
const isText = piece.kind === 'text';
|
|
5283
|
+
const repeatableSingleCharRunChar = getRepeatableSingleCharRunChar(piece.text, piece.isWordLike, piece.kind);
|
|
5284
|
+
const pieceContainsCJK = isCJK(piece.text);
|
|
5285
|
+
const pieceContainsArabicScript = containsArabicScript(piece.text);
|
|
5286
|
+
const pieceLastCodePoint = getLastCodePoint(piece.text);
|
|
5287
|
+
const pieceEndsWithClosingQuote = endsWithClosingQuote(piece.text);
|
|
5288
|
+
const pieceEndsWithMyanmarMedialGlue = endsWithMyanmarMedialGlue(piece.text);
|
|
5289
|
+
const prevIndex = mergedLen - 1;
|
|
5290
|
+
function appendPieceToPrevious() {
|
|
5291
|
+
if (mergedSingleCharRunChars[prevIndex] !== null) {
|
|
5292
|
+
mergedTextParts[prevIndex] = [
|
|
5293
|
+
materializeDeferredSingleCharRun(mergedTexts, mergedSingleCharRunChars, mergedSingleCharRunLengths, prevIndex),
|
|
5294
|
+
];
|
|
5295
|
+
mergedSingleCharRunChars[prevIndex] = null;
|
|
5296
|
+
}
|
|
5297
|
+
mergedTextParts[prevIndex].push(piece.text);
|
|
5298
|
+
mergedWordLike[prevIndex] = mergedWordLike[prevIndex] || piece.isWordLike;
|
|
5299
|
+
mergedContainsCJK[prevIndex] = mergedContainsCJK[prevIndex] || pieceContainsCJK;
|
|
5300
|
+
mergedContainsArabicScript[prevIndex] =
|
|
5301
|
+
mergedContainsArabicScript[prevIndex] || pieceContainsArabicScript;
|
|
5302
|
+
mergedEndsWithClosingQuote[prevIndex] = pieceEndsWithClosingQuote;
|
|
5303
|
+
mergedEndsWithMyanmarMedialGlue[prevIndex] = pieceEndsWithMyanmarMedialGlue;
|
|
5304
|
+
mergedHasArabicNoSpacePunctuation[prevIndex] = hasArabicNoSpacePunctuation(mergedContainsArabicScript[prevIndex], pieceLastCodePoint);
|
|
5305
|
+
}
|
|
5306
|
+
// First-pass keeps: no-space script-specific joins and punctuation glue
|
|
5307
|
+
// that depend on the immediately preceding text run.
|
|
5308
|
+
if (profile.carryCJKAfterClosingQuote &&
|
|
5309
|
+
isText &&
|
|
5310
|
+
mergedLen > 0 &&
|
|
5311
|
+
mergedKinds[prevIndex] === 'text' &&
|
|
5312
|
+
pieceContainsCJK &&
|
|
5313
|
+
mergedContainsCJK[prevIndex] &&
|
|
5314
|
+
mergedEndsWithClosingQuote[prevIndex]) {
|
|
5315
|
+
appendPieceToPrevious();
|
|
5316
|
+
}
|
|
5317
|
+
else if (isText &&
|
|
5318
|
+
mergedLen > 0 &&
|
|
5319
|
+
mergedKinds[prevIndex] === 'text' &&
|
|
5320
|
+
isCJKLineStartProhibitedSegment(piece.text) &&
|
|
5321
|
+
mergedContainsCJK[prevIndex]) {
|
|
5322
|
+
appendPieceToPrevious();
|
|
5323
|
+
}
|
|
5324
|
+
else if (isText &&
|
|
5325
|
+
mergedLen > 0 &&
|
|
5326
|
+
mergedKinds[prevIndex] === 'text' &&
|
|
5327
|
+
mergedEndsWithMyanmarMedialGlue[prevIndex]) {
|
|
5328
|
+
appendPieceToPrevious();
|
|
5329
|
+
}
|
|
5330
|
+
else if (isText &&
|
|
5331
|
+
mergedLen > 0 &&
|
|
5332
|
+
mergedKinds[prevIndex] === 'text' &&
|
|
5333
|
+
piece.isWordLike &&
|
|
5334
|
+
pieceContainsArabicScript &&
|
|
5335
|
+
mergedHasArabicNoSpacePunctuation[prevIndex]) {
|
|
5336
|
+
appendPieceToPrevious();
|
|
5337
|
+
mergedWordLike[prevIndex] = true;
|
|
5338
|
+
}
|
|
5339
|
+
else if (repeatableSingleCharRunChar !== null &&
|
|
5340
|
+
mergedLen > 0 &&
|
|
5341
|
+
mergedKinds[prevIndex] === 'text' &&
|
|
5342
|
+
mergedSingleCharRunChars[prevIndex] === repeatableSingleCharRunChar) {
|
|
5343
|
+
mergedSingleCharRunLengths[prevIndex] = (mergedSingleCharRunLengths[prevIndex] ?? 1) + 1;
|
|
5344
|
+
}
|
|
5345
|
+
else if (isText &&
|
|
5346
|
+
!piece.isWordLike &&
|
|
5347
|
+
mergedLen > 0 &&
|
|
5348
|
+
mergedKinds[prevIndex] === 'text' &&
|
|
5349
|
+
!mergedContainsCJK[prevIndex] &&
|
|
5350
|
+
(isLeftStickyPunctuationSegment(piece.text) ||
|
|
5351
|
+
(piece.text === '-' && mergedWordLike[prevIndex]))) {
|
|
5352
|
+
appendPieceToPrevious();
|
|
5353
|
+
}
|
|
5354
|
+
else {
|
|
5355
|
+
mergedTexts[mergedLen] = piece.text;
|
|
5356
|
+
mergedTextParts[mergedLen] = [piece.text];
|
|
5357
|
+
mergedWordLike[mergedLen] = piece.isWordLike;
|
|
5358
|
+
mergedKinds[mergedLen] = piece.kind;
|
|
5359
|
+
mergedStarts[mergedLen] = piece.start;
|
|
5360
|
+
mergedSingleCharRunChars[mergedLen] = repeatableSingleCharRunChar;
|
|
5361
|
+
mergedSingleCharRunLengths[mergedLen] = repeatableSingleCharRunChar === null ? 0 : 1;
|
|
5362
|
+
mergedContainsCJK[mergedLen] = pieceContainsCJK;
|
|
5363
|
+
mergedContainsArabicScript[mergedLen] = pieceContainsArabicScript;
|
|
5364
|
+
mergedEndsWithClosingQuote[mergedLen] = pieceEndsWithClosingQuote;
|
|
5365
|
+
mergedEndsWithMyanmarMedialGlue[mergedLen] = pieceEndsWithMyanmarMedialGlue;
|
|
5366
|
+
mergedHasArabicNoSpacePunctuation[mergedLen] = hasArabicNoSpacePunctuation(pieceContainsArabicScript, pieceLastCodePoint);
|
|
5367
|
+
mergedLen++;
|
|
5368
|
+
}
|
|
5369
|
+
}
|
|
5370
|
+
}
|
|
5371
|
+
for (let i = 0; i < mergedLen; i++) {
|
|
5372
|
+
if (mergedSingleCharRunChars[i] !== null) {
|
|
5373
|
+
mergedTexts[i] = materializeDeferredSingleCharRun(mergedTexts, mergedSingleCharRunChars, mergedSingleCharRunLengths, i);
|
|
5374
|
+
continue;
|
|
5375
|
+
}
|
|
5376
|
+
mergedTexts[i] = joinTextParts(mergedTextParts[i]);
|
|
5377
|
+
}
|
|
5378
|
+
// Later passes operate on the merged text stream itself: contextual escaped
|
|
5379
|
+
// quote glue, forward-sticky carry, compaction, then the broader URL/numeric
|
|
5380
|
+
// and Arabic-leading-mark fixes.
|
|
5381
|
+
for (let i = 1; i < mergedLen; i++) {
|
|
5382
|
+
if (mergedKinds[i] === 'text' &&
|
|
5383
|
+
!mergedWordLike[i] &&
|
|
5384
|
+
isEscapedQuoteClusterSegment(mergedTexts[i]) &&
|
|
5385
|
+
mergedKinds[i - 1] === 'text' &&
|
|
5386
|
+
!mergedContainsCJK[i - 1]) {
|
|
5387
|
+
mergedTexts[i - 1] += mergedTexts[i];
|
|
5388
|
+
mergedWordLike[i - 1] = mergedWordLike[i - 1] || mergedWordLike[i];
|
|
5389
|
+
mergedTexts[i] = '';
|
|
5390
|
+
}
|
|
5391
|
+
}
|
|
5392
|
+
const forwardStickyPrefixParts = Array.from({ length: mergedLen }, () => null);
|
|
5393
|
+
let nextLiveIndex = -1;
|
|
5394
|
+
for (let i = mergedLen - 1; i >= 0; i--) {
|
|
5395
|
+
const text = mergedTexts[i];
|
|
5396
|
+
if (text.length === 0)
|
|
5397
|
+
continue;
|
|
5398
|
+
if (mergedKinds[i] === 'text' &&
|
|
5399
|
+
!mergedWordLike[i] &&
|
|
5400
|
+
isForwardStickyClusterSegment(text) &&
|
|
5401
|
+
nextLiveIndex >= 0 &&
|
|
5402
|
+
mergedKinds[nextLiveIndex] === 'text') {
|
|
5403
|
+
const prefixParts = forwardStickyPrefixParts[nextLiveIndex] ?? [];
|
|
5404
|
+
prefixParts.push(text);
|
|
5405
|
+
forwardStickyPrefixParts[nextLiveIndex] = prefixParts;
|
|
5406
|
+
mergedStarts[nextLiveIndex] = mergedStarts[i];
|
|
5407
|
+
mergedTexts[i] = '';
|
|
5408
|
+
continue;
|
|
5409
|
+
}
|
|
5410
|
+
nextLiveIndex = i;
|
|
5411
|
+
}
|
|
5412
|
+
for (let i = 0; i < mergedLen; i++) {
|
|
5413
|
+
const prefixParts = forwardStickyPrefixParts[i];
|
|
5414
|
+
if (prefixParts == null)
|
|
5415
|
+
continue;
|
|
5416
|
+
mergedTexts[i] = joinReversedPrefixParts(prefixParts, mergedTexts[i]);
|
|
5417
|
+
}
|
|
5418
|
+
let compactLen = 0;
|
|
5419
|
+
for (let read = 0; read < mergedLen; read++) {
|
|
5420
|
+
const text = mergedTexts[read];
|
|
5421
|
+
if (text.length === 0)
|
|
5422
|
+
continue;
|
|
5423
|
+
if (compactLen !== read) {
|
|
5424
|
+
mergedTexts[compactLen] = text;
|
|
5425
|
+
mergedWordLike[compactLen] = mergedWordLike[read];
|
|
5426
|
+
mergedKinds[compactLen] = mergedKinds[read];
|
|
5427
|
+
mergedStarts[compactLen] = mergedStarts[read];
|
|
5428
|
+
}
|
|
5429
|
+
compactLen++;
|
|
5430
|
+
}
|
|
5431
|
+
mergedTexts.length = compactLen;
|
|
5432
|
+
mergedWordLike.length = compactLen;
|
|
5433
|
+
mergedKinds.length = compactLen;
|
|
5434
|
+
mergedStarts.length = compactLen;
|
|
5435
|
+
const compacted = mergeGlueConnectedTextRuns({
|
|
5436
|
+
len: compactLen,
|
|
5437
|
+
texts: mergedTexts,
|
|
5438
|
+
isWordLike: mergedWordLike,
|
|
5439
|
+
kinds: mergedKinds,
|
|
5440
|
+
starts: mergedStarts,
|
|
5441
|
+
});
|
|
5442
|
+
const withMergedUrls = carryTrailingForwardStickyAcrossCJKBoundary(mergeAsciiPunctuationChains(splitHyphenatedNumericRuns(mergeNumericRuns(mergeUrlQueryRuns(mergeUrlLikeRuns(compacted))))));
|
|
5443
|
+
for (let i = 0; i < withMergedUrls.len - 1; i++) {
|
|
5444
|
+
const split = splitLeadingSpaceAndMarks(withMergedUrls.texts[i]);
|
|
5445
|
+
if (split === null)
|
|
5446
|
+
continue;
|
|
5447
|
+
if ((withMergedUrls.kinds[i] !== 'space' && withMergedUrls.kinds[i] !== 'preserved-space') ||
|
|
5448
|
+
withMergedUrls.kinds[i + 1] !== 'text' ||
|
|
5449
|
+
!containsArabicScript(withMergedUrls.texts[i + 1])) {
|
|
5450
|
+
continue;
|
|
5451
|
+
}
|
|
5452
|
+
withMergedUrls.texts[i] = split.space;
|
|
5453
|
+
withMergedUrls.isWordLike[i] = false;
|
|
5454
|
+
withMergedUrls.kinds[i] = withMergedUrls.kinds[i] === 'preserved-space' ? 'preserved-space' : 'space';
|
|
5455
|
+
withMergedUrls.texts[i + 1] = split.marks + withMergedUrls.texts[i + 1];
|
|
5456
|
+
withMergedUrls.starts[i + 1] = withMergedUrls.starts[i] + split.space.length;
|
|
5457
|
+
}
|
|
5458
|
+
return withMergedUrls;
|
|
5459
|
+
}
|
|
5460
|
+
function compileAnalysisChunks(segmentation, whiteSpaceProfile) {
|
|
5461
|
+
if (segmentation.len === 0)
|
|
5462
|
+
return [];
|
|
5463
|
+
if (!whiteSpaceProfile.preserveHardBreaks) {
|
|
5464
|
+
return [{
|
|
5465
|
+
startSegmentIndex: 0,
|
|
5466
|
+
endSegmentIndex: segmentation.len,
|
|
5467
|
+
consumedEndSegmentIndex: segmentation.len,
|
|
5468
|
+
}];
|
|
5469
|
+
}
|
|
5470
|
+
const chunks = [];
|
|
5471
|
+
let startSegmentIndex = 0;
|
|
5472
|
+
for (let i = 0; i < segmentation.len; i++) {
|
|
5473
|
+
if (segmentation.kinds[i] !== 'hard-break')
|
|
5474
|
+
continue;
|
|
5475
|
+
chunks.push({
|
|
5476
|
+
startSegmentIndex,
|
|
5477
|
+
endSegmentIndex: i,
|
|
5478
|
+
consumedEndSegmentIndex: i + 1,
|
|
5479
|
+
});
|
|
5480
|
+
startSegmentIndex = i + 1;
|
|
5481
|
+
}
|
|
5482
|
+
if (startSegmentIndex < segmentation.len) {
|
|
5483
|
+
chunks.push({
|
|
5484
|
+
startSegmentIndex,
|
|
5485
|
+
endSegmentIndex: segmentation.len,
|
|
5486
|
+
consumedEndSegmentIndex: segmentation.len,
|
|
5487
|
+
});
|
|
5488
|
+
}
|
|
5489
|
+
return chunks;
|
|
5490
|
+
}
|
|
5491
|
+
function mergeKeepAllTextSegments(segmentation) {
|
|
5492
|
+
if (segmentation.len <= 1)
|
|
5493
|
+
return segmentation;
|
|
5494
|
+
const texts = [];
|
|
5495
|
+
const isWordLike = [];
|
|
5496
|
+
const kinds = [];
|
|
5497
|
+
const starts = [];
|
|
5498
|
+
let pendingTextParts = null;
|
|
5499
|
+
let pendingWordLike = false;
|
|
5500
|
+
let pendingStart = 0;
|
|
5501
|
+
let pendingContainsCJK = false;
|
|
5502
|
+
let pendingCanContinue = false;
|
|
5503
|
+
function flushPendingText() {
|
|
5504
|
+
if (pendingTextParts === null)
|
|
5505
|
+
return;
|
|
5506
|
+
texts.push(joinTextParts(pendingTextParts));
|
|
5507
|
+
isWordLike.push(pendingWordLike);
|
|
5508
|
+
kinds.push('text');
|
|
5509
|
+
starts.push(pendingStart);
|
|
5510
|
+
pendingTextParts = null;
|
|
5511
|
+
}
|
|
5512
|
+
for (let i = 0; i < segmentation.len; i++) {
|
|
5513
|
+
const text = segmentation.texts[i];
|
|
5514
|
+
const kind = segmentation.kinds[i];
|
|
5515
|
+
const wordLike = segmentation.isWordLike[i];
|
|
5516
|
+
const start = segmentation.starts[i];
|
|
5517
|
+
if (kind === 'text') {
|
|
5518
|
+
const textContainsCJK = containsCJKText(text);
|
|
5519
|
+
const textCanContinue = canContinueKeepAllTextRun(text);
|
|
5520
|
+
if (pendingTextParts !== null && pendingContainsCJK && pendingCanContinue) {
|
|
5521
|
+
pendingTextParts.push(text);
|
|
5522
|
+
pendingWordLike = pendingWordLike || wordLike;
|
|
5523
|
+
pendingContainsCJK = pendingContainsCJK || textContainsCJK;
|
|
5524
|
+
pendingCanContinue = textCanContinue;
|
|
5525
|
+
continue;
|
|
5526
|
+
}
|
|
5527
|
+
flushPendingText();
|
|
5528
|
+
pendingTextParts = [text];
|
|
5529
|
+
pendingWordLike = wordLike;
|
|
5530
|
+
pendingStart = start;
|
|
5531
|
+
pendingContainsCJK = textContainsCJK;
|
|
5532
|
+
pendingCanContinue = textCanContinue;
|
|
5533
|
+
continue;
|
|
5534
|
+
}
|
|
5535
|
+
flushPendingText();
|
|
5536
|
+
texts.push(text);
|
|
5537
|
+
isWordLike.push(wordLike);
|
|
5538
|
+
kinds.push(kind);
|
|
5539
|
+
starts.push(start);
|
|
5540
|
+
}
|
|
5541
|
+
flushPendingText();
|
|
5542
|
+
return {
|
|
5543
|
+
len: texts.length,
|
|
5544
|
+
texts,
|
|
5545
|
+
isWordLike,
|
|
5546
|
+
kinds,
|
|
5547
|
+
starts,
|
|
5548
|
+
};
|
|
5549
|
+
}
|
|
5550
|
+
function analyzeText(text, profile, whiteSpace = 'normal', wordBreak = 'normal') {
|
|
5551
|
+
const whiteSpaceProfile = getWhiteSpaceProfile(whiteSpace);
|
|
5552
|
+
const normalized = whiteSpaceProfile.mode === 'pre-wrap'
|
|
5553
|
+
? normalizeWhitespacePreWrap(text)
|
|
5554
|
+
: normalizeWhitespaceNormal(text);
|
|
5555
|
+
if (normalized.length === 0) {
|
|
5556
|
+
return {
|
|
5557
|
+
normalized,
|
|
5558
|
+
chunks: [],
|
|
5559
|
+
len: 0,
|
|
5560
|
+
texts: [],
|
|
5561
|
+
isWordLike: [],
|
|
5562
|
+
kinds: [],
|
|
5563
|
+
starts: [],
|
|
5564
|
+
};
|
|
5565
|
+
}
|
|
5566
|
+
const segmentation = wordBreak === 'keep-all'
|
|
5567
|
+
? mergeKeepAllTextSegments(buildMergedSegmentation(normalized, profile, whiteSpaceProfile))
|
|
5568
|
+
: buildMergedSegmentation(normalized, profile, whiteSpaceProfile);
|
|
5569
|
+
return {
|
|
5570
|
+
normalized,
|
|
5571
|
+
chunks: compileAnalysisChunks(segmentation, whiteSpaceProfile),
|
|
5572
|
+
...segmentation,
|
|
5573
|
+
};
|
|
5574
|
+
}
|
|
5575
|
+
|
|
5576
|
+
let measureContext = null;
|
|
5577
|
+
const segmentMetricCaches = new Map();
|
|
5578
|
+
let cachedEngineProfile = null;
|
|
5579
|
+
// Safari's prefix-fit policy is useful for ordinary word-sized runs, but letting
|
|
5580
|
+
// it measure every growing prefix of a giant segment recreates a pathological
|
|
5581
|
+
// superlinear prepare-time path. Past this size, switch to the cheaper
|
|
5582
|
+
// pair-context model and keep the public behavior linear.
|
|
5583
|
+
const MAX_PREFIX_FIT_GRAPHEMES = 96;
|
|
5584
|
+
const emojiPresentationRe = /\p{Emoji_Presentation}/u;
|
|
5585
|
+
const maybeEmojiRe = /[\p{Emoji_Presentation}\p{Extended_Pictographic}\p{Regional_Indicator}\uFE0F\u20E3]/u;
|
|
5586
|
+
let sharedGraphemeSegmenter$1 = null;
|
|
5587
|
+
const emojiCorrectionCache = new Map();
|
|
5588
|
+
function getMeasureContext() {
|
|
5589
|
+
if (measureContext !== null)
|
|
5590
|
+
return measureContext;
|
|
5591
|
+
if (typeof OffscreenCanvas !== 'undefined') {
|
|
5592
|
+
measureContext = new OffscreenCanvas(1, 1).getContext('2d');
|
|
5593
|
+
return measureContext;
|
|
5594
|
+
}
|
|
5595
|
+
if (typeof document !== 'undefined') {
|
|
5596
|
+
measureContext = document.createElement('canvas').getContext('2d');
|
|
5597
|
+
return measureContext;
|
|
5598
|
+
}
|
|
5599
|
+
throw new Error('Text measurement requires OffscreenCanvas or a DOM canvas context.');
|
|
5600
|
+
}
|
|
5601
|
+
function getSegmentMetricCache(font) {
|
|
5602
|
+
let cache = segmentMetricCaches.get(font);
|
|
5603
|
+
if (!cache) {
|
|
5604
|
+
cache = new Map();
|
|
5605
|
+
segmentMetricCaches.set(font, cache);
|
|
5606
|
+
}
|
|
5607
|
+
return cache;
|
|
5608
|
+
}
|
|
5609
|
+
function getSegmentMetrics(seg, cache) {
|
|
5610
|
+
let metrics = cache.get(seg);
|
|
5611
|
+
if (metrics === undefined) {
|
|
5612
|
+
const ctx = getMeasureContext();
|
|
5613
|
+
metrics = {
|
|
5614
|
+
width: ctx.measureText(seg).width,
|
|
5615
|
+
containsCJK: isCJK(seg),
|
|
5616
|
+
};
|
|
5617
|
+
cache.set(seg, metrics);
|
|
5618
|
+
}
|
|
5619
|
+
return metrics;
|
|
5620
|
+
}
|
|
5621
|
+
function getEngineProfile() {
|
|
5622
|
+
if (cachedEngineProfile !== null)
|
|
5623
|
+
return cachedEngineProfile;
|
|
5624
|
+
if (typeof navigator === 'undefined') {
|
|
5625
|
+
cachedEngineProfile = {
|
|
5626
|
+
lineFitEpsilon: 0.005,
|
|
5627
|
+
carryCJKAfterClosingQuote: false,
|
|
5628
|
+
preferPrefixWidthsForBreakableRuns: false,
|
|
5629
|
+
preferEarlySoftHyphenBreak: false,
|
|
5630
|
+
};
|
|
5631
|
+
return cachedEngineProfile;
|
|
5632
|
+
}
|
|
5633
|
+
const ua = navigator.userAgent;
|
|
5634
|
+
const vendor = navigator.vendor;
|
|
5635
|
+
const isSafari = vendor === 'Apple Computer, Inc.' &&
|
|
5636
|
+
ua.includes('Safari/') &&
|
|
5637
|
+
!ua.includes('Chrome/') &&
|
|
5638
|
+
!ua.includes('Chromium/') &&
|
|
5639
|
+
!ua.includes('CriOS/') &&
|
|
5640
|
+
!ua.includes('FxiOS/') &&
|
|
5641
|
+
!ua.includes('EdgiOS/');
|
|
5642
|
+
const isChromium = ua.includes('Chrome/') ||
|
|
5643
|
+
ua.includes('Chromium/') ||
|
|
5644
|
+
ua.includes('CriOS/') ||
|
|
5645
|
+
ua.includes('Edg/');
|
|
5646
|
+
cachedEngineProfile = {
|
|
5647
|
+
lineFitEpsilon: isSafari ? 1 / 64 : 0.005,
|
|
5648
|
+
carryCJKAfterClosingQuote: isChromium,
|
|
5649
|
+
preferPrefixWidthsForBreakableRuns: isSafari,
|
|
5650
|
+
preferEarlySoftHyphenBreak: isSafari,
|
|
5651
|
+
};
|
|
5652
|
+
return cachedEngineProfile;
|
|
5653
|
+
}
|
|
5654
|
+
function parseFontSize(font) {
|
|
5655
|
+
const m = font.match(/(\d+(?:\.\d+)?)\s*px/);
|
|
5656
|
+
return m ? parseFloat(m[1]) : 16;
|
|
5657
|
+
}
|
|
5658
|
+
function getSharedGraphemeSegmenter$1() {
|
|
5659
|
+
if (sharedGraphemeSegmenter$1 === null) {
|
|
5660
|
+
sharedGraphemeSegmenter$1 = new Intl.Segmenter(undefined, { granularity: 'grapheme' });
|
|
5661
|
+
}
|
|
5662
|
+
return sharedGraphemeSegmenter$1;
|
|
5663
|
+
}
|
|
5664
|
+
function isEmojiGrapheme(g) {
|
|
5665
|
+
return emojiPresentationRe.test(g) || g.includes('\uFE0F');
|
|
5666
|
+
}
|
|
5667
|
+
function textMayContainEmoji(text) {
|
|
5668
|
+
return maybeEmojiRe.test(text);
|
|
5669
|
+
}
|
|
5670
|
+
function getEmojiCorrection(font, fontSize) {
|
|
5671
|
+
let correction = emojiCorrectionCache.get(font);
|
|
5672
|
+
if (correction !== undefined)
|
|
5673
|
+
return correction;
|
|
5674
|
+
const ctx = getMeasureContext();
|
|
5675
|
+
ctx.font = font;
|
|
5676
|
+
const canvasW = ctx.measureText('\u{1F600}').width;
|
|
5677
|
+
correction = 0;
|
|
5678
|
+
if (canvasW > fontSize + 0.5 &&
|
|
5679
|
+
typeof document !== 'undefined' &&
|
|
5680
|
+
document.body !== null) {
|
|
5681
|
+
const span = document.createElement('span');
|
|
5682
|
+
span.style.font = font;
|
|
5683
|
+
span.style.display = 'inline-block';
|
|
5684
|
+
span.style.visibility = 'hidden';
|
|
5685
|
+
span.style.position = 'absolute';
|
|
5686
|
+
span.textContent = '\u{1F600}';
|
|
5687
|
+
document.body.appendChild(span);
|
|
5688
|
+
const domW = span.getBoundingClientRect().width;
|
|
5689
|
+
document.body.removeChild(span);
|
|
5690
|
+
if (canvasW - domW > 0.5) {
|
|
5691
|
+
correction = canvasW - domW;
|
|
5692
|
+
}
|
|
5693
|
+
}
|
|
5694
|
+
emojiCorrectionCache.set(font, correction);
|
|
5695
|
+
return correction;
|
|
5696
|
+
}
|
|
5697
|
+
function countEmojiGraphemes(text) {
|
|
5698
|
+
let count = 0;
|
|
5699
|
+
const graphemeSegmenter = getSharedGraphemeSegmenter$1();
|
|
5700
|
+
for (const g of graphemeSegmenter.segment(text)) {
|
|
5701
|
+
if (isEmojiGrapheme(g.segment))
|
|
5702
|
+
count++;
|
|
5703
|
+
}
|
|
5704
|
+
return count;
|
|
5705
|
+
}
|
|
5706
|
+
function getEmojiCount(seg, metrics) {
|
|
5707
|
+
if (metrics.emojiCount === undefined) {
|
|
5708
|
+
metrics.emojiCount = countEmojiGraphemes(seg);
|
|
5709
|
+
}
|
|
5710
|
+
return metrics.emojiCount;
|
|
5711
|
+
}
|
|
5712
|
+
function getCorrectedSegmentWidth(seg, metrics, emojiCorrection) {
|
|
5713
|
+
if (emojiCorrection === 0)
|
|
5714
|
+
return metrics.width;
|
|
5715
|
+
return metrics.width - getEmojiCount(seg, metrics) * emojiCorrection;
|
|
5716
|
+
}
|
|
5717
|
+
function getSegmentBreakableFitAdvances(seg, metrics, cache, emojiCorrection, mode) {
|
|
5718
|
+
if (metrics.breakableFitAdvances !== undefined && metrics.breakableFitMode === mode) {
|
|
5719
|
+
return metrics.breakableFitAdvances;
|
|
5720
|
+
}
|
|
5721
|
+
metrics.breakableFitMode = mode;
|
|
5722
|
+
const graphemeSegmenter = getSharedGraphemeSegmenter$1();
|
|
5723
|
+
const graphemes = [];
|
|
5724
|
+
for (const gs of graphemeSegmenter.segment(seg)) {
|
|
5725
|
+
graphemes.push(gs.segment);
|
|
5726
|
+
}
|
|
5727
|
+
if (graphemes.length <= 1) {
|
|
5728
|
+
metrics.breakableFitAdvances = null;
|
|
5729
|
+
return metrics.breakableFitAdvances;
|
|
5730
|
+
}
|
|
5731
|
+
if (mode === 'sum-graphemes') {
|
|
5732
|
+
const advances = [];
|
|
5733
|
+
for (const grapheme of graphemes) {
|
|
5734
|
+
const graphemeMetrics = getSegmentMetrics(grapheme, cache);
|
|
5735
|
+
advances.push(getCorrectedSegmentWidth(grapheme, graphemeMetrics, emojiCorrection));
|
|
5736
|
+
}
|
|
5737
|
+
metrics.breakableFitAdvances = advances;
|
|
5738
|
+
return metrics.breakableFitAdvances;
|
|
5739
|
+
}
|
|
5740
|
+
if (mode === 'pair-context' || graphemes.length > MAX_PREFIX_FIT_GRAPHEMES) {
|
|
5741
|
+
const advances = [];
|
|
5742
|
+
let previousGrapheme = null;
|
|
5743
|
+
let previousWidth = 0;
|
|
5744
|
+
for (const grapheme of graphemes) {
|
|
5745
|
+
const graphemeMetrics = getSegmentMetrics(grapheme, cache);
|
|
5746
|
+
const currentWidth = getCorrectedSegmentWidth(grapheme, graphemeMetrics, emojiCorrection);
|
|
5747
|
+
if (previousGrapheme === null) {
|
|
5748
|
+
advances.push(currentWidth);
|
|
5749
|
+
}
|
|
5750
|
+
else {
|
|
5751
|
+
const pair = previousGrapheme + grapheme;
|
|
5752
|
+
const pairMetrics = getSegmentMetrics(pair, cache);
|
|
5753
|
+
advances.push(getCorrectedSegmentWidth(pair, pairMetrics, emojiCorrection) - previousWidth);
|
|
5754
|
+
}
|
|
5755
|
+
previousGrapheme = grapheme;
|
|
5756
|
+
previousWidth = currentWidth;
|
|
5757
|
+
}
|
|
5758
|
+
metrics.breakableFitAdvances = advances;
|
|
5759
|
+
return metrics.breakableFitAdvances;
|
|
5760
|
+
}
|
|
5761
|
+
const advances = [];
|
|
5762
|
+
let prefix = '';
|
|
5763
|
+
let prefixWidth = 0;
|
|
5764
|
+
for (const grapheme of graphemes) {
|
|
5765
|
+
prefix += grapheme;
|
|
5766
|
+
const prefixMetrics = getSegmentMetrics(prefix, cache);
|
|
5767
|
+
const nextPrefixWidth = getCorrectedSegmentWidth(prefix, prefixMetrics, emojiCorrection);
|
|
5768
|
+
advances.push(nextPrefixWidth - prefixWidth);
|
|
5769
|
+
prefixWidth = nextPrefixWidth;
|
|
5770
|
+
}
|
|
5771
|
+
metrics.breakableFitAdvances = advances;
|
|
5772
|
+
return metrics.breakableFitAdvances;
|
|
5773
|
+
}
|
|
5774
|
+
function getFontMeasurementState(font, needsEmojiCorrection) {
|
|
5775
|
+
const ctx = getMeasureContext();
|
|
5776
|
+
ctx.font = font;
|
|
5777
|
+
const cache = getSegmentMetricCache(font);
|
|
5778
|
+
const fontSize = parseFontSize(font);
|
|
5779
|
+
const emojiCorrection = needsEmojiCorrection ? getEmojiCorrection(font, fontSize) : 0;
|
|
5780
|
+
return { cache, fontSize, emojiCorrection };
|
|
5781
|
+
}
|
|
5782
|
+
|
|
5783
|
+
function consumesAtLineStart(kind) {
|
|
5784
|
+
return kind === 'space' || kind === 'zero-width-break' || kind === 'soft-hyphen';
|
|
5785
|
+
}
|
|
5786
|
+
function breaksAfter(kind) {
|
|
5787
|
+
return (kind === 'space' ||
|
|
5788
|
+
kind === 'preserved-space' ||
|
|
5789
|
+
kind === 'tab' ||
|
|
5790
|
+
kind === 'zero-width-break' ||
|
|
5791
|
+
kind === 'soft-hyphen');
|
|
5792
|
+
}
|
|
5793
|
+
function normalizeLineStartSegmentIndex(prepared, segmentIndex, endSegmentIndex = prepared.widths.length) {
|
|
5794
|
+
while (segmentIndex < endSegmentIndex) {
|
|
5795
|
+
const kind = prepared.kinds[segmentIndex];
|
|
5796
|
+
if (!consumesAtLineStart(kind))
|
|
5797
|
+
break;
|
|
5798
|
+
segmentIndex++;
|
|
5799
|
+
}
|
|
5800
|
+
return segmentIndex;
|
|
5801
|
+
}
|
|
5802
|
+
function getTabAdvance(lineWidth, tabStopAdvance) {
|
|
5803
|
+
if (tabStopAdvance <= 0)
|
|
5804
|
+
return 0;
|
|
5805
|
+
const remainder = lineWidth % tabStopAdvance;
|
|
5806
|
+
if (Math.abs(remainder) <= 1e-6)
|
|
5807
|
+
return tabStopAdvance;
|
|
5808
|
+
return tabStopAdvance - remainder;
|
|
5809
|
+
}
|
|
5810
|
+
function getLeadingLetterSpacing(prepared, hasContent, segmentIndex) {
|
|
5811
|
+
return (prepared.letterSpacing !== 0 &&
|
|
5812
|
+
hasContent &&
|
|
5813
|
+
prepared.spacingGraphemeCounts[segmentIndex] > 0)
|
|
5814
|
+
? prepared.letterSpacing
|
|
5815
|
+
: 0;
|
|
5816
|
+
}
|
|
5817
|
+
function getLineEndContribution(leadingSpacing, segmentContribution) {
|
|
5818
|
+
return segmentContribution === 0 ? 0 : leadingSpacing + segmentContribution;
|
|
5819
|
+
}
|
|
5820
|
+
function getTabTrailingLetterSpacing(prepared, segmentIndex) {
|
|
5821
|
+
return (prepared.letterSpacing !== 0 &&
|
|
5822
|
+
prepared.spacingGraphemeCounts[segmentIndex] > 0)
|
|
5823
|
+
? prepared.letterSpacing
|
|
5824
|
+
: 0;
|
|
5825
|
+
}
|
|
5826
|
+
function getWholeSegmentFitContribution(prepared, kind, segmentIndex, leadingSpacing, segmentWidth) {
|
|
5827
|
+
const segmentContribution = kind === 'tab'
|
|
5828
|
+
? segmentWidth + getTabTrailingLetterSpacing(prepared, segmentIndex)
|
|
5829
|
+
: prepared.lineEndFitAdvances[segmentIndex];
|
|
5830
|
+
return getLineEndContribution(leadingSpacing, segmentContribution);
|
|
5831
|
+
}
|
|
5832
|
+
function getBreakOpportunityFitContribution(prepared, kind, segmentIndex, leadingSpacing) {
|
|
5833
|
+
const segmentContribution = kind === 'tab' ? 0 : prepared.lineEndFitAdvances[segmentIndex];
|
|
5834
|
+
return getLineEndContribution(leadingSpacing, segmentContribution);
|
|
5835
|
+
}
|
|
5836
|
+
function getLineEndPaintContribution(prepared, kind, segmentIndex, leadingSpacing, segmentWidth) {
|
|
5837
|
+
const segmentContribution = kind === 'tab' ? segmentWidth : prepared.lineEndPaintAdvances[segmentIndex];
|
|
5838
|
+
return getLineEndContribution(leadingSpacing, segmentContribution);
|
|
5839
|
+
}
|
|
5840
|
+
function getBreakableGraphemeAdvance(prepared, hasContent, baseAdvance) {
|
|
5841
|
+
return prepared.letterSpacing !== 0 && hasContent
|
|
5842
|
+
? baseAdvance + prepared.letterSpacing
|
|
5843
|
+
: baseAdvance;
|
|
5844
|
+
}
|
|
5845
|
+
function getBreakableCandidateFitWidth(prepared, candidatePaintWidth) {
|
|
5846
|
+
return prepared.letterSpacing === 0
|
|
5847
|
+
? candidatePaintWidth
|
|
5848
|
+
: candidatePaintWidth + prepared.letterSpacing;
|
|
5849
|
+
}
|
|
5850
|
+
function fitSoftHyphenBreak(graphemeFitAdvances, initialWidth, maxWidth, lineFitEpsilon, discretionaryHyphenWidth, letterSpacing) {
|
|
5851
|
+
let fitCount = 0;
|
|
5852
|
+
let fittedWidth = initialWidth;
|
|
5853
|
+
while (fitCount < graphemeFitAdvances.length) {
|
|
5854
|
+
const nextWidth = fittedWidth + graphemeFitAdvances[fitCount] + letterSpacing;
|
|
5855
|
+
const nextLineWidth = fitCount + 1 < graphemeFitAdvances.length
|
|
5856
|
+
? nextWidth + discretionaryHyphenWidth
|
|
5857
|
+
: nextWidth;
|
|
5858
|
+
if (nextLineWidth > maxWidth + lineFitEpsilon)
|
|
5859
|
+
break;
|
|
5860
|
+
fittedWidth = nextWidth;
|
|
5861
|
+
fitCount++;
|
|
5862
|
+
}
|
|
5863
|
+
return { fitCount, fittedWidth };
|
|
5864
|
+
}
|
|
5865
|
+
function countPreparedLines(prepared, maxWidth) {
|
|
5866
|
+
return walkPreparedLinesRaw(prepared, maxWidth);
|
|
5867
|
+
}
|
|
5868
|
+
function walkPreparedLinesSimple(prepared, maxWidth, onLine) {
|
|
5869
|
+
const { widths, kinds, breakableFitAdvances } = prepared;
|
|
5870
|
+
if (widths.length === 0)
|
|
5871
|
+
return 0;
|
|
5872
|
+
const engineProfile = getEngineProfile();
|
|
5873
|
+
const lineFitEpsilon = engineProfile.lineFitEpsilon;
|
|
5874
|
+
const fitLimit = maxWidth + lineFitEpsilon;
|
|
5875
|
+
let lineCount = 0;
|
|
5876
|
+
let lineW = 0;
|
|
5877
|
+
let hasContent = false;
|
|
5878
|
+
let lineEndSegmentIndex = 0;
|
|
5879
|
+
let lineEndGraphemeIndex = 0;
|
|
5880
|
+
let pendingBreakSegmentIndex = -1;
|
|
5881
|
+
let pendingBreakPaintWidth = 0;
|
|
5882
|
+
function clearPendingBreak() {
|
|
5883
|
+
pendingBreakSegmentIndex = -1;
|
|
5884
|
+
pendingBreakPaintWidth = 0;
|
|
5885
|
+
}
|
|
5886
|
+
function emitCurrentLine(endSegmentIndex = lineEndSegmentIndex, endGraphemeIndex = lineEndGraphemeIndex, width = lineW) {
|
|
5887
|
+
lineCount++;
|
|
5888
|
+
lineW = 0;
|
|
5889
|
+
hasContent = false;
|
|
5890
|
+
clearPendingBreak();
|
|
5891
|
+
}
|
|
5892
|
+
function startLineAtSegment(segmentIndex, width) {
|
|
5893
|
+
hasContent = true;
|
|
5894
|
+
lineEndSegmentIndex = segmentIndex + 1;
|
|
5895
|
+
lineEndGraphemeIndex = 0;
|
|
5896
|
+
lineW = width;
|
|
5897
|
+
}
|
|
5898
|
+
function startLineAtGrapheme(segmentIndex, graphemeIndex, width) {
|
|
5899
|
+
hasContent = true;
|
|
5900
|
+
lineEndSegmentIndex = segmentIndex;
|
|
5901
|
+
lineEndGraphemeIndex = graphemeIndex + 1;
|
|
5902
|
+
lineW = width;
|
|
5903
|
+
}
|
|
5904
|
+
function appendWholeSegment(segmentIndex, width) {
|
|
5905
|
+
if (!hasContent) {
|
|
5906
|
+
startLineAtSegment(segmentIndex, width);
|
|
5907
|
+
return;
|
|
5908
|
+
}
|
|
5909
|
+
lineW += width;
|
|
5910
|
+
lineEndSegmentIndex = segmentIndex + 1;
|
|
5911
|
+
lineEndGraphemeIndex = 0;
|
|
5912
|
+
}
|
|
5913
|
+
function appendBreakableSegmentFrom(segmentIndex, startGraphemeIndex) {
|
|
5914
|
+
const fitAdvances = breakableFitAdvances[segmentIndex];
|
|
5915
|
+
for (let g = startGraphemeIndex; g < fitAdvances.length; g++) {
|
|
5916
|
+
const gw = fitAdvances[g];
|
|
5917
|
+
if (!hasContent) {
|
|
5918
|
+
startLineAtGrapheme(segmentIndex, g, gw);
|
|
5919
|
+
}
|
|
5920
|
+
else if (lineW + gw > fitLimit) {
|
|
5921
|
+
emitCurrentLine();
|
|
5922
|
+
startLineAtGrapheme(segmentIndex, g, gw);
|
|
5923
|
+
}
|
|
5924
|
+
else {
|
|
5925
|
+
lineW += gw;
|
|
5926
|
+
lineEndSegmentIndex = segmentIndex;
|
|
5927
|
+
lineEndGraphemeIndex = g + 1;
|
|
5928
|
+
}
|
|
5929
|
+
}
|
|
5930
|
+
if (hasContent && lineEndSegmentIndex === segmentIndex && lineEndGraphemeIndex === fitAdvances.length) {
|
|
5931
|
+
lineEndSegmentIndex = segmentIndex + 1;
|
|
5932
|
+
lineEndGraphemeIndex = 0;
|
|
5933
|
+
}
|
|
5934
|
+
}
|
|
5935
|
+
let i = 0;
|
|
5936
|
+
while (i < widths.length) {
|
|
5937
|
+
if (!hasContent) {
|
|
5938
|
+
i = normalizeLineStartSegmentIndex(prepared, i);
|
|
5939
|
+
if (i >= widths.length)
|
|
5940
|
+
break;
|
|
5941
|
+
}
|
|
5942
|
+
const w = widths[i];
|
|
5943
|
+
const kind = kinds[i];
|
|
5944
|
+
const breakAfter = breaksAfter(kind);
|
|
5945
|
+
if (!hasContent) {
|
|
5946
|
+
if (w > fitLimit && breakableFitAdvances[i] !== null) {
|
|
5947
|
+
appendBreakableSegmentFrom(i, 0);
|
|
5948
|
+
}
|
|
5949
|
+
else {
|
|
5950
|
+
startLineAtSegment(i, w);
|
|
5951
|
+
}
|
|
5952
|
+
if (breakAfter) {
|
|
5953
|
+
pendingBreakSegmentIndex = i + 1;
|
|
5954
|
+
pendingBreakPaintWidth = lineW - w;
|
|
5955
|
+
}
|
|
5956
|
+
i++;
|
|
5957
|
+
continue;
|
|
5958
|
+
}
|
|
5959
|
+
const newW = lineW + w;
|
|
5960
|
+
if (newW > fitLimit) {
|
|
5961
|
+
if (breakAfter) {
|
|
5962
|
+
appendWholeSegment(i, w);
|
|
5963
|
+
emitCurrentLine(i + 1, 0, lineW - w);
|
|
5964
|
+
i++;
|
|
5965
|
+
continue;
|
|
5966
|
+
}
|
|
5967
|
+
if (pendingBreakSegmentIndex >= 0) {
|
|
5968
|
+
if (lineEndSegmentIndex > pendingBreakSegmentIndex ||
|
|
5969
|
+
(lineEndSegmentIndex === pendingBreakSegmentIndex && lineEndGraphemeIndex > 0)) {
|
|
5970
|
+
emitCurrentLine();
|
|
5971
|
+
continue;
|
|
5972
|
+
}
|
|
5973
|
+
emitCurrentLine(pendingBreakSegmentIndex, 0, pendingBreakPaintWidth);
|
|
5974
|
+
continue;
|
|
5975
|
+
}
|
|
5976
|
+
if (w > fitLimit && breakableFitAdvances[i] !== null) {
|
|
5977
|
+
emitCurrentLine();
|
|
5978
|
+
appendBreakableSegmentFrom(i, 0);
|
|
5979
|
+
i++;
|
|
5980
|
+
continue;
|
|
5981
|
+
}
|
|
5982
|
+
emitCurrentLine();
|
|
5983
|
+
continue;
|
|
5984
|
+
}
|
|
5985
|
+
appendWholeSegment(i, w);
|
|
5986
|
+
if (breakAfter) {
|
|
5987
|
+
pendingBreakSegmentIndex = i + 1;
|
|
5988
|
+
pendingBreakPaintWidth = lineW - w;
|
|
5989
|
+
}
|
|
5990
|
+
i++;
|
|
5991
|
+
}
|
|
5992
|
+
if (hasContent)
|
|
5993
|
+
emitCurrentLine();
|
|
5994
|
+
return lineCount;
|
|
5995
|
+
}
|
|
5996
|
+
function walkPreparedLinesRaw(prepared, maxWidth, onLine) {
|
|
5997
|
+
if (prepared.simpleLineWalkFastPath) {
|
|
5998
|
+
return walkPreparedLinesSimple(prepared, maxWidth);
|
|
5999
|
+
}
|
|
6000
|
+
const { widths, kinds, breakableFitAdvances, discretionaryHyphenWidth, chunks, } = prepared;
|
|
6001
|
+
if (widths.length === 0 || chunks.length === 0)
|
|
6002
|
+
return 0;
|
|
6003
|
+
const engineProfile = getEngineProfile();
|
|
6004
|
+
const lineFitEpsilon = engineProfile.lineFitEpsilon;
|
|
6005
|
+
const fitLimit = maxWidth + lineFitEpsilon;
|
|
6006
|
+
let lineCount = 0;
|
|
6007
|
+
let lineW = 0;
|
|
6008
|
+
let hasContent = false;
|
|
6009
|
+
let lineEndSegmentIndex = 0;
|
|
6010
|
+
let lineEndGraphemeIndex = 0;
|
|
6011
|
+
let pendingBreakSegmentIndex = -1;
|
|
6012
|
+
let pendingBreakFitWidth = 0;
|
|
6013
|
+
let pendingBreakPaintWidth = 0;
|
|
6014
|
+
let pendingBreakKind = null;
|
|
6015
|
+
function clearPendingBreak() {
|
|
6016
|
+
pendingBreakSegmentIndex = -1;
|
|
6017
|
+
pendingBreakFitWidth = 0;
|
|
6018
|
+
pendingBreakPaintWidth = 0;
|
|
6019
|
+
pendingBreakKind = null;
|
|
6020
|
+
}
|
|
6021
|
+
function emitCurrentLine(endSegmentIndex = lineEndSegmentIndex, endGraphemeIndex = lineEndGraphemeIndex, width = lineW) {
|
|
6022
|
+
lineCount++;
|
|
6023
|
+
lineW = 0;
|
|
6024
|
+
hasContent = false;
|
|
6025
|
+
clearPendingBreak();
|
|
6026
|
+
}
|
|
6027
|
+
function startLineAtSegment(segmentIndex, width) {
|
|
6028
|
+
hasContent = true;
|
|
6029
|
+
lineEndSegmentIndex = segmentIndex + 1;
|
|
6030
|
+
lineEndGraphemeIndex = 0;
|
|
6031
|
+
lineW = width;
|
|
6032
|
+
}
|
|
6033
|
+
function startLineAtGrapheme(segmentIndex, graphemeIndex, width) {
|
|
6034
|
+
hasContent = true;
|
|
6035
|
+
lineEndSegmentIndex = segmentIndex;
|
|
6036
|
+
lineEndGraphemeIndex = graphemeIndex + 1;
|
|
6037
|
+
lineW = width;
|
|
6038
|
+
}
|
|
6039
|
+
function appendWholeSegment(segmentIndex, advance) {
|
|
6040
|
+
if (!hasContent) {
|
|
6041
|
+
startLineAtSegment(segmentIndex, advance);
|
|
6042
|
+
return;
|
|
6043
|
+
}
|
|
6044
|
+
lineW += advance;
|
|
6045
|
+
lineEndSegmentIndex = segmentIndex + 1;
|
|
6046
|
+
lineEndGraphemeIndex = 0;
|
|
6047
|
+
}
|
|
6048
|
+
function updatePendingBreakForWholeSegment(kind, breakAfter, segmentIndex, segmentWidth, leadingSpacing, advance) {
|
|
6049
|
+
if (!breakAfter)
|
|
6050
|
+
return;
|
|
6051
|
+
const fitAdvance = getBreakOpportunityFitContribution(prepared, kind, segmentIndex, leadingSpacing);
|
|
6052
|
+
const paintAdvance = getLineEndPaintContribution(prepared, kind, segmentIndex, leadingSpacing, segmentWidth);
|
|
6053
|
+
pendingBreakSegmentIndex = segmentIndex + 1;
|
|
6054
|
+
pendingBreakFitWidth = lineW - advance + fitAdvance;
|
|
6055
|
+
pendingBreakPaintWidth = lineW - advance + paintAdvance;
|
|
6056
|
+
pendingBreakKind = kind;
|
|
6057
|
+
}
|
|
6058
|
+
function appendBreakableSegmentFrom(segmentIndex, startGraphemeIndex) {
|
|
6059
|
+
const fitAdvances = breakableFitAdvances[segmentIndex];
|
|
6060
|
+
for (let g = startGraphemeIndex; g < fitAdvances.length; g++) {
|
|
6061
|
+
const baseGw = fitAdvances[g];
|
|
6062
|
+
if (!hasContent) {
|
|
6063
|
+
startLineAtGrapheme(segmentIndex, g, baseGw);
|
|
6064
|
+
}
|
|
6065
|
+
else {
|
|
6066
|
+
const gw = getBreakableGraphemeAdvance(prepared, true, baseGw);
|
|
6067
|
+
const candidatePaintWidth = lineW + gw;
|
|
6068
|
+
if (getBreakableCandidateFitWidth(prepared, candidatePaintWidth) > fitLimit) {
|
|
6069
|
+
emitCurrentLine();
|
|
6070
|
+
startLineAtGrapheme(segmentIndex, g, baseGw);
|
|
6071
|
+
}
|
|
6072
|
+
else {
|
|
6073
|
+
lineW = candidatePaintWidth;
|
|
6074
|
+
lineEndSegmentIndex = segmentIndex;
|
|
6075
|
+
lineEndGraphemeIndex = g + 1;
|
|
6076
|
+
}
|
|
6077
|
+
}
|
|
6078
|
+
}
|
|
6079
|
+
if (hasContent && lineEndSegmentIndex === segmentIndex && lineEndGraphemeIndex === fitAdvances.length) {
|
|
6080
|
+
lineEndSegmentIndex = segmentIndex + 1;
|
|
6081
|
+
lineEndGraphemeIndex = 0;
|
|
6082
|
+
}
|
|
6083
|
+
}
|
|
6084
|
+
function continueSoftHyphenBreakableSegment(segmentIndex) {
|
|
6085
|
+
if (pendingBreakKind !== 'soft-hyphen')
|
|
6086
|
+
return false;
|
|
6087
|
+
const fitWidths = breakableFitAdvances[segmentIndex];
|
|
6088
|
+
if (fitWidths == null)
|
|
6089
|
+
return false;
|
|
6090
|
+
const { fitCount, fittedWidth } = fitSoftHyphenBreak(fitWidths, lineW, maxWidth, lineFitEpsilon, discretionaryHyphenWidth, prepared.letterSpacing);
|
|
6091
|
+
if (fitCount === 0)
|
|
6092
|
+
return false;
|
|
6093
|
+
lineW = fittedWidth;
|
|
6094
|
+
lineEndSegmentIndex = segmentIndex;
|
|
6095
|
+
lineEndGraphemeIndex = fitCount;
|
|
6096
|
+
clearPendingBreak();
|
|
6097
|
+
if (fitCount === fitWidths.length) {
|
|
6098
|
+
lineEndSegmentIndex = segmentIndex + 1;
|
|
6099
|
+
lineEndGraphemeIndex = 0;
|
|
6100
|
+
return true;
|
|
6101
|
+
}
|
|
6102
|
+
emitCurrentLine(segmentIndex, fitCount, fittedWidth + discretionaryHyphenWidth);
|
|
6103
|
+
appendBreakableSegmentFrom(segmentIndex, fitCount);
|
|
6104
|
+
return true;
|
|
6105
|
+
}
|
|
6106
|
+
function emitEmptyChunk(chunk) {
|
|
6107
|
+
lineCount++;
|
|
6108
|
+
clearPendingBreak();
|
|
6109
|
+
}
|
|
6110
|
+
for (let chunkIndex = 0; chunkIndex < chunks.length; chunkIndex++) {
|
|
6111
|
+
const chunk = chunks[chunkIndex];
|
|
6112
|
+
if (chunk.startSegmentIndex === chunk.endSegmentIndex) {
|
|
6113
|
+
emitEmptyChunk();
|
|
6114
|
+
continue;
|
|
6115
|
+
}
|
|
6116
|
+
hasContent = false;
|
|
6117
|
+
lineW = 0;
|
|
6118
|
+
lineEndSegmentIndex = chunk.startSegmentIndex;
|
|
6119
|
+
lineEndGraphemeIndex = 0;
|
|
6120
|
+
clearPendingBreak();
|
|
6121
|
+
let i = chunk.startSegmentIndex;
|
|
6122
|
+
while (i < chunk.endSegmentIndex) {
|
|
6123
|
+
if (!hasContent) {
|
|
6124
|
+
i = normalizeLineStartSegmentIndex(prepared, i, chunk.endSegmentIndex);
|
|
6125
|
+
if (i >= chunk.endSegmentIndex)
|
|
6126
|
+
break;
|
|
6127
|
+
}
|
|
6128
|
+
const kind = kinds[i];
|
|
6129
|
+
const breakAfter = breaksAfter(kind);
|
|
6130
|
+
const leadingSpacing = getLeadingLetterSpacing(prepared, hasContent, i);
|
|
6131
|
+
const w = kind === 'tab'
|
|
6132
|
+
? getTabAdvance(lineW + leadingSpacing, prepared.tabStopAdvance)
|
|
6133
|
+
: widths[i];
|
|
6134
|
+
const advance = leadingSpacing + w;
|
|
6135
|
+
const fitAdvance = getWholeSegmentFitContribution(prepared, kind, i, leadingSpacing, w);
|
|
6136
|
+
if (kind === 'soft-hyphen') {
|
|
6137
|
+
if (hasContent) {
|
|
6138
|
+
lineEndSegmentIndex = i + 1;
|
|
6139
|
+
lineEndGraphemeIndex = 0;
|
|
6140
|
+
pendingBreakSegmentIndex = i + 1;
|
|
6141
|
+
pendingBreakFitWidth = lineW + discretionaryHyphenWidth;
|
|
6142
|
+
pendingBreakPaintWidth = lineW + discretionaryHyphenWidth;
|
|
6143
|
+
pendingBreakKind = kind;
|
|
6144
|
+
}
|
|
6145
|
+
i++;
|
|
6146
|
+
continue;
|
|
6147
|
+
}
|
|
6148
|
+
if (!hasContent) {
|
|
6149
|
+
if (fitAdvance > fitLimit && breakableFitAdvances[i] !== null) {
|
|
6150
|
+
appendBreakableSegmentFrom(i, 0);
|
|
6151
|
+
}
|
|
6152
|
+
else {
|
|
6153
|
+
startLineAtSegment(i, w);
|
|
6154
|
+
}
|
|
6155
|
+
updatePendingBreakForWholeSegment(kind, breakAfter, i, w, leadingSpacing, advance);
|
|
6156
|
+
i++;
|
|
6157
|
+
continue;
|
|
6158
|
+
}
|
|
6159
|
+
const newFitW = lineW + fitAdvance;
|
|
6160
|
+
if (newFitW > fitLimit) {
|
|
6161
|
+
const currentBreakFitWidth = lineW + getBreakOpportunityFitContribution(prepared, kind, i, leadingSpacing);
|
|
6162
|
+
const currentBreakPaintWidth = lineW + getLineEndPaintContribution(prepared, kind, i, leadingSpacing, w);
|
|
6163
|
+
if (pendingBreakKind === 'soft-hyphen' &&
|
|
6164
|
+
engineProfile.preferEarlySoftHyphenBreak &&
|
|
6165
|
+
pendingBreakFitWidth <= fitLimit) {
|
|
6166
|
+
emitCurrentLine(pendingBreakSegmentIndex, 0, pendingBreakPaintWidth);
|
|
6167
|
+
continue;
|
|
6168
|
+
}
|
|
6169
|
+
if (pendingBreakKind === 'soft-hyphen' && continueSoftHyphenBreakableSegment(i)) {
|
|
6170
|
+
i++;
|
|
6171
|
+
continue;
|
|
6172
|
+
}
|
|
6173
|
+
if (breakAfter && currentBreakFitWidth <= fitLimit) {
|
|
6174
|
+
appendWholeSegment(i, advance);
|
|
6175
|
+
emitCurrentLine(i + 1, 0, currentBreakPaintWidth);
|
|
6176
|
+
i++;
|
|
6177
|
+
continue;
|
|
6178
|
+
}
|
|
6179
|
+
if (pendingBreakSegmentIndex >= 0 && pendingBreakFitWidth <= fitLimit) {
|
|
6180
|
+
if (lineEndSegmentIndex > pendingBreakSegmentIndex ||
|
|
6181
|
+
(lineEndSegmentIndex === pendingBreakSegmentIndex && lineEndGraphemeIndex > 0)) {
|
|
6182
|
+
emitCurrentLine();
|
|
6183
|
+
continue;
|
|
6184
|
+
}
|
|
6185
|
+
const nextSegmentIndex = pendingBreakSegmentIndex;
|
|
6186
|
+
emitCurrentLine(nextSegmentIndex, 0, pendingBreakPaintWidth);
|
|
6187
|
+
i = nextSegmentIndex;
|
|
6188
|
+
continue;
|
|
6189
|
+
}
|
|
6190
|
+
if (fitAdvance > fitLimit && breakableFitAdvances[i] !== null) {
|
|
6191
|
+
emitCurrentLine();
|
|
6192
|
+
appendBreakableSegmentFrom(i, 0);
|
|
6193
|
+
i++;
|
|
6194
|
+
continue;
|
|
6195
|
+
}
|
|
6196
|
+
emitCurrentLine();
|
|
6197
|
+
continue;
|
|
6198
|
+
}
|
|
6199
|
+
appendWholeSegment(i, advance);
|
|
6200
|
+
updatePendingBreakForWholeSegment(kind, breakAfter, i, w, leadingSpacing, advance);
|
|
6201
|
+
i++;
|
|
6202
|
+
}
|
|
6203
|
+
if (hasContent) {
|
|
6204
|
+
const finalPaintWidth = pendingBreakSegmentIndex === chunk.consumedEndSegmentIndex
|
|
6205
|
+
? pendingBreakPaintWidth
|
|
6206
|
+
: lineW;
|
|
6207
|
+
emitCurrentLine(chunk.consumedEndSegmentIndex, 0, finalPaintWidth);
|
|
6208
|
+
}
|
|
6209
|
+
}
|
|
6210
|
+
return lineCount;
|
|
6211
|
+
}
|
|
6212
|
+
|
|
6213
|
+
// Text measurement for browser environments using canvas measureText.
|
|
6214
|
+
//
|
|
6215
|
+
// Problem: DOM-based text measurement (getBoundingClientRect, offsetHeight)
|
|
6216
|
+
// forces synchronous layout reflow. When components independently measure text,
|
|
6217
|
+
// each measurement triggers a reflow of the entire document. This creates
|
|
6218
|
+
// read/write interleaving that can cost 30ms+ per frame for 500 text blocks.
|
|
6219
|
+
//
|
|
6220
|
+
// Solution: two-phase measurement centered around canvas measureText.
|
|
6221
|
+
// prepare(text, font) — segments text via Intl.Segmenter, measures each word
|
|
6222
|
+
// via canvas, caches widths, and does one cached DOM calibration read per
|
|
6223
|
+
// font when emoji correction is needed. Call once when text first appears.
|
|
6224
|
+
// layout(prepared, maxWidth, lineHeight) — walks cached word widths with pure
|
|
6225
|
+
// arithmetic to count lines and compute height. Call on every resize.
|
|
6226
|
+
// ~0.0002ms per text.
|
|
6227
|
+
//
|
|
6228
|
+
// i18n: Intl.Segmenter handles CJK (per-character breaking), Thai, Arabic, etc.
|
|
6229
|
+
// Bidi: simplified rich-path metadata for mixed LTR/RTL custom rendering.
|
|
6230
|
+
// Punctuation merging: "better." measured as one unit (matches CSS behavior).
|
|
6231
|
+
// Trailing whitespace: hangs past line edge without triggering breaks (CSS behavior).
|
|
6232
|
+
// overflow-wrap: pre-measured grapheme widths enable character-level word breaking.
|
|
6233
|
+
//
|
|
6234
|
+
// Emoji correction: Chrome/Firefox canvas measures emoji wider than DOM at font
|
|
6235
|
+
// sizes <24px on macOS (Apple Color Emoji). The inflation is constant per emoji
|
|
6236
|
+
// grapheme at a given size, font-independent. Auto-detected by comparing canvas
|
|
6237
|
+
// vs actual DOM emoji width (one cached DOM read per font). Safari canvas and
|
|
6238
|
+
// DOM agree (both wider than fontSize), so correction = 0 there.
|
|
6239
|
+
//
|
|
6240
|
+
// Limitations:
|
|
6241
|
+
// - system-ui font: canvas resolves to different optical variants than DOM on macOS.
|
|
6242
|
+
// Use named fonts (Helvetica, Inter, etc.) for guaranteed accuracy.
|
|
6243
|
+
// See RESEARCH.md "Discovery: system-ui font resolution mismatch".
|
|
6244
|
+
//
|
|
6245
|
+
// Based on Sebastian Markbage's text-layout research (github.com/chenglou/text-layout).
|
|
6246
|
+
let sharedGraphemeSegmenter = null;
|
|
6247
|
+
function getSharedGraphemeSegmenter() {
|
|
6248
|
+
if (sharedGraphemeSegmenter === null) {
|
|
6249
|
+
sharedGraphemeSegmenter = new Intl.Segmenter(undefined, { granularity: 'grapheme' });
|
|
6250
|
+
}
|
|
6251
|
+
return sharedGraphemeSegmenter;
|
|
6252
|
+
}
|
|
6253
|
+
// --- Public API ---
|
|
6254
|
+
function createEmptyPrepared(includeSegments) {
|
|
6255
|
+
return {
|
|
6256
|
+
widths: [],
|
|
6257
|
+
lineEndFitAdvances: [],
|
|
6258
|
+
lineEndPaintAdvances: [],
|
|
6259
|
+
kinds: [],
|
|
6260
|
+
simpleLineWalkFastPath: true,
|
|
6261
|
+
segLevels: null,
|
|
6262
|
+
breakableFitAdvances: [],
|
|
6263
|
+
letterSpacing: 0,
|
|
6264
|
+
spacingGraphemeCounts: [],
|
|
6265
|
+
discretionaryHyphenWidth: 0,
|
|
6266
|
+
tabStopAdvance: 0,
|
|
6267
|
+
chunks: [],
|
|
6268
|
+
};
|
|
6269
|
+
}
|
|
6270
|
+
function buildBaseCjkUnits(segText, engineProfile) {
|
|
6271
|
+
const units = [];
|
|
6272
|
+
let unitParts = [];
|
|
6273
|
+
let unitStart = 0;
|
|
6274
|
+
let unitContainsCJK = false;
|
|
6275
|
+
let unitEndsWithClosingQuote = false;
|
|
6276
|
+
let unitIsSingleKinsokuEnd = false;
|
|
6277
|
+
function pushUnit() {
|
|
6278
|
+
if (unitParts.length === 0)
|
|
6279
|
+
return;
|
|
6280
|
+
units.push({
|
|
6281
|
+
text: unitParts.length === 1 ? unitParts[0] : unitParts.join(''),
|
|
6282
|
+
start: unitStart,
|
|
6283
|
+
});
|
|
6284
|
+
unitParts = [];
|
|
6285
|
+
unitContainsCJK = false;
|
|
6286
|
+
unitEndsWithClosingQuote = false;
|
|
6287
|
+
unitIsSingleKinsokuEnd = false;
|
|
6288
|
+
}
|
|
6289
|
+
function startUnit(grapheme, start, graphemeContainsCJK) {
|
|
6290
|
+
unitParts = [grapheme];
|
|
6291
|
+
unitStart = start;
|
|
6292
|
+
unitContainsCJK = graphemeContainsCJK;
|
|
6293
|
+
unitEndsWithClosingQuote = endsWithClosingQuote(grapheme);
|
|
6294
|
+
unitIsSingleKinsokuEnd = kinsokuEnd.has(grapheme);
|
|
6295
|
+
}
|
|
6296
|
+
function appendToUnit(grapheme, graphemeContainsCJK) {
|
|
6297
|
+
unitParts.push(grapheme);
|
|
6298
|
+
unitContainsCJK = unitContainsCJK || graphemeContainsCJK;
|
|
6299
|
+
const graphemeEndsWithClosingQuote = endsWithClosingQuote(grapheme);
|
|
6300
|
+
if (grapheme.length === 1 && leftStickyPunctuation.has(grapheme)) {
|
|
6301
|
+
unitEndsWithClosingQuote = unitEndsWithClosingQuote || graphemeEndsWithClosingQuote;
|
|
6302
|
+
}
|
|
6303
|
+
else {
|
|
6304
|
+
unitEndsWithClosingQuote = graphemeEndsWithClosingQuote;
|
|
6305
|
+
}
|
|
6306
|
+
unitIsSingleKinsokuEnd = false;
|
|
6307
|
+
}
|
|
6308
|
+
for (const gs of getSharedGraphemeSegmenter().segment(segText)) {
|
|
6309
|
+
const grapheme = gs.segment;
|
|
6310
|
+
const graphemeContainsCJK = isCJK(grapheme);
|
|
6311
|
+
if (unitParts.length === 0) {
|
|
6312
|
+
startUnit(grapheme, gs.index, graphemeContainsCJK);
|
|
6313
|
+
continue;
|
|
6314
|
+
}
|
|
6315
|
+
if (unitIsSingleKinsokuEnd ||
|
|
6316
|
+
kinsokuStart.has(grapheme) ||
|
|
6317
|
+
leftStickyPunctuation.has(grapheme) ||
|
|
6318
|
+
(engineProfile.carryCJKAfterClosingQuote &&
|
|
6319
|
+
graphemeContainsCJK &&
|
|
6320
|
+
unitEndsWithClosingQuote)) {
|
|
6321
|
+
appendToUnit(grapheme, graphemeContainsCJK);
|
|
6322
|
+
continue;
|
|
6323
|
+
}
|
|
6324
|
+
if (!unitContainsCJK && !graphemeContainsCJK) {
|
|
6325
|
+
appendToUnit(grapheme, graphemeContainsCJK);
|
|
6326
|
+
continue;
|
|
6327
|
+
}
|
|
6328
|
+
pushUnit();
|
|
6329
|
+
startUnit(grapheme, gs.index, graphemeContainsCJK);
|
|
6330
|
+
}
|
|
6331
|
+
pushUnit();
|
|
6332
|
+
return units;
|
|
6333
|
+
}
|
|
6334
|
+
function mergeKeepAllTextUnits(units) {
|
|
6335
|
+
if (units.length <= 1)
|
|
6336
|
+
return units;
|
|
6337
|
+
const merged = [];
|
|
6338
|
+
let currentTextParts = [units[0].text];
|
|
6339
|
+
let currentStart = units[0].start;
|
|
6340
|
+
let currentContainsCJK = isCJK(units[0].text);
|
|
6341
|
+
let currentCanContinue = canContinueKeepAllTextRun(units[0].text);
|
|
6342
|
+
function flushCurrent() {
|
|
6343
|
+
merged.push({
|
|
6344
|
+
text: currentTextParts.length === 1 ? currentTextParts[0] : currentTextParts.join(''),
|
|
6345
|
+
start: currentStart,
|
|
6346
|
+
});
|
|
6347
|
+
}
|
|
6348
|
+
for (let i = 1; i < units.length; i++) {
|
|
6349
|
+
const next = units[i];
|
|
6350
|
+
const nextContainsCJK = isCJK(next.text);
|
|
6351
|
+
const nextCanContinue = canContinueKeepAllTextRun(next.text);
|
|
6352
|
+
if (currentContainsCJK && currentCanContinue) {
|
|
6353
|
+
currentTextParts.push(next.text);
|
|
6354
|
+
currentContainsCJK = currentContainsCJK || nextContainsCJK;
|
|
6355
|
+
currentCanContinue = nextCanContinue;
|
|
6356
|
+
continue;
|
|
6357
|
+
}
|
|
6358
|
+
flushCurrent();
|
|
6359
|
+
currentTextParts = [next.text];
|
|
6360
|
+
currentStart = next.start;
|
|
6361
|
+
currentContainsCJK = nextContainsCJK;
|
|
6362
|
+
currentCanContinue = nextCanContinue;
|
|
6363
|
+
}
|
|
6364
|
+
flushCurrent();
|
|
6365
|
+
return merged;
|
|
6366
|
+
}
|
|
6367
|
+
function countRenderedSpacingGraphemes(text, kind) {
|
|
6368
|
+
if (kind === 'zero-width-break' ||
|
|
6369
|
+
kind === 'soft-hyphen' ||
|
|
6370
|
+
kind === 'hard-break') {
|
|
6371
|
+
return 0;
|
|
6372
|
+
}
|
|
6373
|
+
if (kind === 'tab')
|
|
6374
|
+
return 1;
|
|
6375
|
+
let count = 0;
|
|
6376
|
+
const graphemeSegmenter = getSharedGraphemeSegmenter();
|
|
6377
|
+
for (const _ of graphemeSegmenter.segment(text))
|
|
6378
|
+
count++;
|
|
6379
|
+
return count;
|
|
6380
|
+
}
|
|
6381
|
+
function addInternalLetterSpacing(width, graphemeCount, letterSpacing) {
|
|
6382
|
+
return graphemeCount > 1 ? width + (graphemeCount - 1) * letterSpacing : width;
|
|
6383
|
+
}
|
|
6384
|
+
function measureAnalysis(analysis, font, includeSegments, wordBreak, letterSpacing) {
|
|
6385
|
+
const engineProfile = getEngineProfile();
|
|
6386
|
+
const { cache, emojiCorrection } = getFontMeasurementState(font, textMayContainEmoji(analysis.normalized));
|
|
6387
|
+
const discretionaryHyphenWidth = getCorrectedSegmentWidth('-', getSegmentMetrics('-', cache), emojiCorrection) +
|
|
6388
|
+
(letterSpacing === 0 ? 0 : letterSpacing);
|
|
6389
|
+
const spaceWidth = getCorrectedSegmentWidth(' ', getSegmentMetrics(' ', cache), emojiCorrection);
|
|
6390
|
+
const tabStopAdvance = spaceWidth * 8;
|
|
6391
|
+
const hasLetterSpacing = letterSpacing !== 0;
|
|
6392
|
+
if (analysis.len === 0)
|
|
6393
|
+
return createEmptyPrepared();
|
|
6394
|
+
const widths = [];
|
|
6395
|
+
const lineEndFitAdvances = [];
|
|
6396
|
+
const lineEndPaintAdvances = [];
|
|
6397
|
+
const kinds = [];
|
|
6398
|
+
let simpleLineWalkFastPath = analysis.chunks.length <= 1 && !hasLetterSpacing;
|
|
6399
|
+
const segStarts = null;
|
|
6400
|
+
const breakableFitAdvances = [];
|
|
6401
|
+
const spacingGraphemeCounts = [];
|
|
6402
|
+
const segments = includeSegments ? [] : null;
|
|
6403
|
+
const preparedStartByAnalysisIndex = Array.from({ length: analysis.len });
|
|
6404
|
+
function pushMeasuredSegment(text, width, lineEndFitAdvance, lineEndPaintAdvance, kind, start, breakableFitAdvance, spacingGraphemeCount) {
|
|
6405
|
+
if (kind !== 'text' && kind !== 'space' && kind !== 'zero-width-break') {
|
|
6406
|
+
simpleLineWalkFastPath = false;
|
|
6407
|
+
}
|
|
6408
|
+
widths.push(width);
|
|
6409
|
+
lineEndFitAdvances.push(lineEndFitAdvance);
|
|
6410
|
+
lineEndPaintAdvances.push(lineEndPaintAdvance);
|
|
6411
|
+
kinds.push(kind);
|
|
6412
|
+
breakableFitAdvances.push(breakableFitAdvance);
|
|
6413
|
+
if (hasLetterSpacing)
|
|
6414
|
+
spacingGraphemeCounts.push(spacingGraphemeCount);
|
|
6415
|
+
if (segments !== null)
|
|
6416
|
+
segments.push(text);
|
|
6417
|
+
}
|
|
6418
|
+
function pushMeasuredTextSegment(text, kind, start, wordLike, allowOverflowBreaks) {
|
|
6419
|
+
const textMetrics = getSegmentMetrics(text, cache);
|
|
6420
|
+
const spacingGraphemeCount = hasLetterSpacing
|
|
6421
|
+
? countRenderedSpacingGraphemes(text, kind)
|
|
6422
|
+
: 0;
|
|
6423
|
+
const width = addInternalLetterSpacing(getCorrectedSegmentWidth(text, textMetrics, emojiCorrection), spacingGraphemeCount, letterSpacing);
|
|
6424
|
+
const baseLineEndFitAdvance = kind === 'space' || kind === 'preserved-space' || kind === 'zero-width-break'
|
|
6425
|
+
? 0
|
|
6426
|
+
: width;
|
|
6427
|
+
const lineEndFitAdvance = baseLineEndFitAdvance === 0
|
|
6428
|
+
? 0
|
|
6429
|
+
: baseLineEndFitAdvance + (spacingGraphemeCount > 0 ? letterSpacing : 0);
|
|
6430
|
+
const lineEndPaintAdvance = kind === 'space' || kind === 'zero-width-break'
|
|
6431
|
+
? 0
|
|
6432
|
+
: width;
|
|
6433
|
+
if (allowOverflowBreaks && wordLike && text.length > 1) {
|
|
6434
|
+
let fitMode = 'sum-graphemes';
|
|
6435
|
+
if (letterSpacing !== 0) {
|
|
6436
|
+
fitMode = 'segment-prefixes';
|
|
6437
|
+
}
|
|
6438
|
+
else if (isNumericRunSegment(text)) {
|
|
6439
|
+
fitMode = 'pair-context';
|
|
6440
|
+
}
|
|
6441
|
+
else if (engineProfile.preferPrefixWidthsForBreakableRuns) {
|
|
6442
|
+
fitMode = 'segment-prefixes';
|
|
6443
|
+
}
|
|
6444
|
+
const fitAdvances = getSegmentBreakableFitAdvances(text, textMetrics, cache, emojiCorrection, fitMode);
|
|
6445
|
+
pushMeasuredSegment(text, width, lineEndFitAdvance, lineEndPaintAdvance, kind, start, fitAdvances, spacingGraphemeCount);
|
|
6446
|
+
return;
|
|
6447
|
+
}
|
|
6448
|
+
pushMeasuredSegment(text, width, lineEndFitAdvance, lineEndPaintAdvance, kind, start, null, spacingGraphemeCount);
|
|
6449
|
+
}
|
|
6450
|
+
for (let mi = 0; mi < analysis.len; mi++) {
|
|
6451
|
+
preparedStartByAnalysisIndex[mi] = widths.length;
|
|
6452
|
+
const segText = analysis.texts[mi];
|
|
6453
|
+
const segWordLike = analysis.isWordLike[mi];
|
|
6454
|
+
const segKind = analysis.kinds[mi];
|
|
6455
|
+
const segStart = analysis.starts[mi];
|
|
6456
|
+
if (segKind === 'soft-hyphen') {
|
|
6457
|
+
pushMeasuredSegment(segText, 0, discretionaryHyphenWidth, discretionaryHyphenWidth, segKind, segStart, null, 0);
|
|
6458
|
+
continue;
|
|
6459
|
+
}
|
|
6460
|
+
if (segKind === 'hard-break') {
|
|
6461
|
+
pushMeasuredSegment(segText, 0, 0, 0, segKind, segStart, null, 0);
|
|
6462
|
+
continue;
|
|
6463
|
+
}
|
|
6464
|
+
if (segKind === 'tab') {
|
|
6465
|
+
pushMeasuredSegment(segText, 0, 0, 0, segKind, segStart, null, hasLetterSpacing ? countRenderedSpacingGraphemes(segText, segKind) : 0);
|
|
6466
|
+
continue;
|
|
6467
|
+
}
|
|
6468
|
+
const segMetrics = getSegmentMetrics(segText, cache);
|
|
6469
|
+
if (segKind === 'text' && segMetrics.containsCJK) {
|
|
6470
|
+
const baseUnits = buildBaseCjkUnits(segText, engineProfile);
|
|
6471
|
+
const measuredUnits = wordBreak === 'keep-all'
|
|
6472
|
+
? mergeKeepAllTextUnits(baseUnits)
|
|
6473
|
+
: baseUnits;
|
|
6474
|
+
for (let i = 0; i < measuredUnits.length; i++) {
|
|
6475
|
+
const unit = measuredUnits[i];
|
|
6476
|
+
pushMeasuredTextSegment(unit.text, 'text', segStart + unit.start, segWordLike, wordBreak === 'keep-all' || !isCJK(unit.text));
|
|
6477
|
+
}
|
|
6478
|
+
continue;
|
|
6479
|
+
}
|
|
6480
|
+
pushMeasuredTextSegment(segText, segKind, segStart, segWordLike, true);
|
|
6481
|
+
}
|
|
6482
|
+
const chunks = mapAnalysisChunksToPreparedChunks(analysis.chunks, preparedStartByAnalysisIndex, widths.length);
|
|
6483
|
+
const segLevels = segStarts === null ? null : computeSegmentLevels(analysis.normalized, segStarts);
|
|
6484
|
+
if (segments !== null) {
|
|
6485
|
+
return {
|
|
6486
|
+
widths,
|
|
6487
|
+
lineEndFitAdvances,
|
|
6488
|
+
lineEndPaintAdvances,
|
|
6489
|
+
kinds,
|
|
6490
|
+
simpleLineWalkFastPath,
|
|
6491
|
+
segLevels,
|
|
6492
|
+
breakableFitAdvances,
|
|
6493
|
+
letterSpacing,
|
|
6494
|
+
spacingGraphemeCounts,
|
|
6495
|
+
discretionaryHyphenWidth,
|
|
6496
|
+
tabStopAdvance,
|
|
6497
|
+
chunks,
|
|
6498
|
+
segments,
|
|
6499
|
+
};
|
|
6500
|
+
}
|
|
6501
|
+
return {
|
|
6502
|
+
widths,
|
|
6503
|
+
lineEndFitAdvances,
|
|
6504
|
+
lineEndPaintAdvances,
|
|
6505
|
+
kinds,
|
|
6506
|
+
simpleLineWalkFastPath,
|
|
6507
|
+
segLevels,
|
|
6508
|
+
breakableFitAdvances,
|
|
6509
|
+
letterSpacing,
|
|
6510
|
+
spacingGraphemeCounts,
|
|
6511
|
+
discretionaryHyphenWidth,
|
|
6512
|
+
tabStopAdvance,
|
|
6513
|
+
chunks,
|
|
6514
|
+
};
|
|
6515
|
+
}
|
|
6516
|
+
function mapAnalysisChunksToPreparedChunks(chunks, preparedStartByAnalysisIndex, preparedEndSegmentIndex) {
|
|
6517
|
+
const preparedChunks = [];
|
|
6518
|
+
for (let i = 0; i < chunks.length; i++) {
|
|
6519
|
+
const chunk = chunks[i];
|
|
6520
|
+
const startSegmentIndex = chunk.startSegmentIndex < preparedStartByAnalysisIndex.length
|
|
6521
|
+
? preparedStartByAnalysisIndex[chunk.startSegmentIndex]
|
|
6522
|
+
: preparedEndSegmentIndex;
|
|
6523
|
+
const endSegmentIndex = chunk.endSegmentIndex < preparedStartByAnalysisIndex.length
|
|
6524
|
+
? preparedStartByAnalysisIndex[chunk.endSegmentIndex]
|
|
6525
|
+
: preparedEndSegmentIndex;
|
|
6526
|
+
const consumedEndSegmentIndex = chunk.consumedEndSegmentIndex < preparedStartByAnalysisIndex.length
|
|
6527
|
+
? preparedStartByAnalysisIndex[chunk.consumedEndSegmentIndex]
|
|
6528
|
+
: preparedEndSegmentIndex;
|
|
6529
|
+
preparedChunks.push({
|
|
6530
|
+
startSegmentIndex,
|
|
6531
|
+
endSegmentIndex,
|
|
6532
|
+
consumedEndSegmentIndex,
|
|
6533
|
+
});
|
|
6534
|
+
}
|
|
6535
|
+
return preparedChunks;
|
|
6536
|
+
}
|
|
6537
|
+
function prepareInternal(text, font, includeSegments, options) {
|
|
6538
|
+
const wordBreak = options?.wordBreak ?? 'normal';
|
|
6539
|
+
const letterSpacing = options?.letterSpacing ?? 0;
|
|
6540
|
+
const analysis = analyzeText(text, getEngineProfile(), options?.whiteSpace, wordBreak);
|
|
6541
|
+
return measureAnalysis(analysis, font, includeSegments, wordBreak, letterSpacing);
|
|
6542
|
+
}
|
|
6543
|
+
// Prepare text for layout. Segments the text, measures each segment via canvas,
|
|
6544
|
+
// and stores the widths for fast relayout at any width. Call once per text block
|
|
6545
|
+
// (e.g. when a comment first appears). The result is width-independent — the
|
|
6546
|
+
// same PreparedText can be laid out at any maxWidth and lineHeight via layout().
|
|
6547
|
+
//
|
|
6548
|
+
// Steps:
|
|
6549
|
+
// 1. Normalize collapsible whitespace (CSS white-space: normal behavior)
|
|
6550
|
+
// 2. Segment via Intl.Segmenter (handles CJK, Thai, etc.)
|
|
6551
|
+
// 3. Merge punctuation into preceding word ("better." as one unit)
|
|
6552
|
+
// 4. Split CJK words into individual graphemes (per-character line breaks)
|
|
6553
|
+
// 5. Measure each segment via canvas measureText, cache by (segment, font)
|
|
6554
|
+
// 6. Pre-measure graphemes of long words (for overflow-wrap: break-word)
|
|
6555
|
+
// 7. Correct emoji canvas inflation (auto-detected per font size)
|
|
6556
|
+
// 8. Optionally compute rich-path bidi metadata for custom renderers
|
|
6557
|
+
function prepare(text, font, options) {
|
|
6558
|
+
return prepareInternal(text, font, false, options);
|
|
6559
|
+
}
|
|
6560
|
+
function getInternalPrepared(prepared) {
|
|
6561
|
+
return prepared;
|
|
6562
|
+
}
|
|
6563
|
+
// Layout prepared text at a given max width and caller-provided lineHeight.
|
|
6564
|
+
// Pure arithmetic on cached widths — no canvas calls, no DOM reads, no string
|
|
6565
|
+
// operations, no allocations.
|
|
6566
|
+
// ~0.0002ms per text block. Call on every resize.
|
|
6567
|
+
//
|
|
6568
|
+
// Line breaking rules (matching CSS white-space: normal + overflow-wrap: break-word):
|
|
6569
|
+
// - Break before any non-space segment that would overflow the line
|
|
6570
|
+
// - Trailing whitespace hangs past the line edge (doesn't trigger breaks)
|
|
6571
|
+
// - Segments wider than maxWidth are broken at grapheme boundaries
|
|
6572
|
+
function layout(prepared, maxWidth, lineHeight) {
|
|
6573
|
+
// Keep the resize hot path specialized. `layoutWithLines()` shares the same
|
|
6574
|
+
// break semantics but also tracks line ranges; the extra bookkeeping is too
|
|
6575
|
+
// expensive to pay on every hot-path `layout()` call.
|
|
6576
|
+
const lineCount = countPreparedLines(getInternalPrepared(prepared), maxWidth);
|
|
6577
|
+
return { lineCount, height: lineCount * lineHeight };
|
|
6578
|
+
}
|
|
6579
|
+
|
|
3365
6580
|
// SPDX-FileCopyrightText: © 2024 Schneider Electric
|
|
3366
6581
|
//
|
|
3367
6582
|
// SPDX-License-Identifier: Apache-2.0
|
|
@@ -3511,6 +6726,8 @@ const ignorePromise = (promise) => {
|
|
|
3511
6726
|
};
|
|
3512
6727
|
const isTouchDevice = () => 'ontouchstart' in globalThis ||
|
|
3513
6728
|
('maxTouchPoints' in globalThis && globalThis.navigator.maxTouchPoints > 0);
|
|
6729
|
+
const toPretextWhiteSpace = (value) => value === 'pre-wrap' ? 'pre-wrap' : 'normal';
|
|
6730
|
+
const toPretextWordBreak = (value) => value === 'keep-all' ? 'keep-all' : 'normal';
|
|
3514
6731
|
/**
|
|
3515
6732
|
* Checks if an element's ellipsis is active.
|
|
3516
6733
|
*
|
|
@@ -3518,20 +6735,48 @@ const isTouchDevice = () => 'ontouchstart' in globalThis ||
|
|
|
3518
6735
|
* @returns `true` if ellipsis is active, `false` otherwise.
|
|
3519
6736
|
*/
|
|
3520
6737
|
const isEllipsisActive = (element) => {
|
|
3521
|
-
const
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
|
|
3525
|
-
|
|
3526
|
-
|
|
3527
|
-
|
|
6738
|
+
const computedStyle = globalThis.getComputedStyle(element);
|
|
6739
|
+
const { webkitLineClamp, lineHeight, font, fontStyle, fontWeight, fontSize, fontFamily, paddingLeft, paddingRight, borderLeftWidth, borderRightWidth, whiteSpace, wordBreak, } = computedStyle;
|
|
6740
|
+
// `font` shorthand returns "" in Chromium/Firefox for shadow DOM elements
|
|
6741
|
+
// whose font was set via CSS custom properties. Build it from the individual
|
|
6742
|
+
// sub-properties which are always reliably populated.
|
|
6743
|
+
const resolvedFont = font === ''
|
|
6744
|
+
? `${fontStyle} ${fontWeight} ${fontSize} ${fontFamily}`.trim()
|
|
6745
|
+
: font;
|
|
3528
6746
|
const parsedLineClamp = Number.parseInt(webkitLineClamp, 10);
|
|
3529
|
-
if (Number.isNaN(parsedLineClamp))
|
|
6747
|
+
if (Number.isNaN(parsedLineClamp)) {
|
|
6748
|
+
return element.scrollWidth > element.clientWidth;
|
|
6749
|
+
}
|
|
6750
|
+
const parsedLineHeight = Number.parseFloat(lineHeight);
|
|
6751
|
+
if (Number.isNaN(parsedLineHeight)) {
|
|
6752
|
+
return element.scrollHeight > element.clientHeight;
|
|
6753
|
+
}
|
|
6754
|
+
const contentWidth = element.getBoundingClientRect().width -
|
|
6755
|
+
Number.parseFloat(paddingLeft) -
|
|
6756
|
+
Number.parseFloat(paddingRight) -
|
|
6757
|
+
Number.parseFloat(borderLeftWidth) -
|
|
6758
|
+
Number.parseFloat(borderRightWidth);
|
|
6759
|
+
if (contentWidth <= 0)
|
|
3530
6760
|
return false;
|
|
3531
|
-
const
|
|
3532
|
-
if (
|
|
6761
|
+
const text = element.textContent ?? '';
|
|
6762
|
+
if (text.trim() === '')
|
|
3533
6763
|
return false;
|
|
3534
|
-
|
|
6764
|
+
const parsedLetterSpacing = Number.parseFloat(computedStyle.letterSpacing);
|
|
6765
|
+
const letterSpacing = Number.isNaN(parsedLetterSpacing)
|
|
6766
|
+
? undefined
|
|
6767
|
+
: parsedLetterSpacing;
|
|
6768
|
+
try {
|
|
6769
|
+
const prepared = prepare(text, resolvedFont, {
|
|
6770
|
+
letterSpacing,
|
|
6771
|
+
whiteSpace: toPretextWhiteSpace(whiteSpace),
|
|
6772
|
+
wordBreak: toPretextWordBreak(wordBreak),
|
|
6773
|
+
});
|
|
6774
|
+
const { lineCount } = layout(prepared, contentWidth, parsedLineHeight);
|
|
6775
|
+
return lineCount > parsedLineClamp;
|
|
6776
|
+
}
|
|
6777
|
+
catch {
|
|
6778
|
+
return element.scrollHeight > parsedLineClamp * parsedLineHeight;
|
|
6779
|
+
}
|
|
3535
6780
|
};
|
|
3536
6781
|
const determineLinkIcon = (target,
|
|
3537
6782
|
// eslint-disable-next-line unicorn/prevent-abbreviations
|
|
@@ -3652,7 +6897,7 @@ const actionItemCss = ":host([hidden]){display:none!important}:host{display:bloc
|
|
|
3652
6897
|
// SPDX-FileCopyrightText: © 2025 Schneider Electric
|
|
3653
6898
|
//
|
|
3654
6899
|
// SPDX-License-Identifier: Apache-2.0
|
|
3655
|
-
var __classPrivateFieldGet$
|
|
6900
|
+
var __classPrivateFieldGet$y = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
3656
6901
|
if (kind === "a" && !f)
|
|
3657
6902
|
throw new TypeError("Private accessor was defined without a getter");
|
|
3658
6903
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
@@ -3717,7 +6962,7 @@ class ActionItem {
|
|
|
3717
6962
|
_ActionItem_tooltipRef.set(this, (tooltip) => {
|
|
3718
6963
|
if (tooltip)
|
|
3719
6964
|
// eslint-disable-next-line no-param-reassign
|
|
3720
|
-
tooltip.target = __classPrivateFieldGet$
|
|
6965
|
+
tooltip.target = __classPrivateFieldGet$y(this, _ActionItem_actionItem, "f");
|
|
3721
6966
|
});
|
|
3722
6967
|
}
|
|
3723
6968
|
disabledChanged() {
|
|
@@ -3730,7 +6975,7 @@ class ActionItem {
|
|
|
3730
6975
|
this.focusEmitter.emit(pickFocusEventAttributes(event));
|
|
3731
6976
|
}
|
|
3732
6977
|
onClick(event) {
|
|
3733
|
-
if (__classPrivateFieldGet$
|
|
6978
|
+
if (__classPrivateFieldGet$y(this, _ActionItem_instances, "a", _ActionItem_computedDisabled_get))
|
|
3734
6979
|
event.stopImmediatePropagation();
|
|
3735
6980
|
}
|
|
3736
6981
|
componentWillLoad() {
|
|
@@ -3738,21 +6983,21 @@ class ActionItem {
|
|
|
3738
6983
|
this.disabledChanged();
|
|
3739
6984
|
}
|
|
3740
6985
|
componentDidLoad() {
|
|
3741
|
-
invariant(__classPrivateFieldGet$
|
|
3742
|
-
const span = __classPrivateFieldGet$
|
|
6986
|
+
invariant(__classPrivateFieldGet$y(this, _ActionItem_span, "f"));
|
|
6987
|
+
const span = __classPrivateFieldGet$y(this, _ActionItem_span, "f");
|
|
3743
6988
|
readTask(() => {
|
|
3744
6989
|
this.tooltip = isEllipsisActive(span);
|
|
3745
6990
|
});
|
|
3746
6991
|
__classPrivateFieldSet$o(this, _ActionItem_ro, new ResizeObserver(([spanEntry]) => {
|
|
3747
6992
|
this.tooltip = isEllipsisActive(spanEntry.target);
|
|
3748
6993
|
}), "f");
|
|
3749
|
-
__classPrivateFieldGet$
|
|
6994
|
+
__classPrivateFieldGet$y(this, _ActionItem_ro, "f").observe(__classPrivateFieldGet$y(this, _ActionItem_span, "f"));
|
|
3750
6995
|
}
|
|
3751
6996
|
render() {
|
|
3752
6997
|
return (hAsync("div", { key: 'c5761b24a5de2f0784850e2c05a35a4ff0d50540', class: {
|
|
3753
6998
|
'qds-action-item': true,
|
|
3754
6999
|
'qds-disabled': this.disabled,
|
|
3755
|
-
}, ref: __classPrivateFieldGet$
|
|
7000
|
+
}, ref: __classPrivateFieldGet$y(this, _ActionItem_actionDivRef, "f"), "data-size": __classPrivateFieldGet$y(this, _ActionItem_instances, "a", _ActionItem_computedSize_get), "data-importance": __classPrivateFieldGet$y(this, _ActionItem_instances, "a", _ActionItem_computedImportance_get) }, this.iconName !== undefined && this.iconName !== '' && (hAsync("qds-icon", { key: 'd2409cac17173463348bf2264b68f012270b04ee', class: "qds-icon", "data-size": __classPrivateFieldGet$y(this, _ActionItem_instances, "a", _ActionItem_computedSize_get), library: this.iconLibrary, name: this.iconName })), hAsync("span", { key: '1bf65623a82dceaa776cb28429760cf7a1a1904f', class: "qds-text", "data-size": __classPrivateFieldGet$y(this, _ActionItem_instances, "a", _ActionItem_computedSize_get), ref: __classPrivateFieldGet$y(this, _ActionItem_spanRef, "f") }, this.text), this.action !== undefined && (hAsync("qds-icon", { key: '132eb8d186e9329eeb7b380aea4b3afbb0449731', class: "qds-icon", "data-size": __classPrivateFieldGet$y(this, _ActionItem_instances, "a", _ActionItem_computedSize_get), name: this.action, library: "core", "aria-label": this.actionDescription, role: "img" })), this.tooltip && (hAsync("qds-tooltip", { key: '77351beaf85712117a076f18adb25f4fc25b64a9', "aria-hidden": "true", ref: __classPrivateFieldGet$y(this, _ActionItem_tooltipRef, "f") }, this.text))));
|
|
3756
7001
|
}
|
|
3757
7002
|
static get watchers() { return {
|
|
3758
7003
|
"disabled": ["disabledChanged"]
|
|
@@ -3803,6 +7048,92 @@ _ActionItem_ro = new WeakMap(), _ActionItem_actionItem = new WeakMap(), _ActionI
|
|
|
3803
7048
|
return this.disabled;
|
|
3804
7049
|
};
|
|
3805
7050
|
|
|
7051
|
+
const avatarCss = ":host([hidden]){display:none!important}:host{display:block}.qds-avatar,.qds-label-container{display:inline-flex;position:relative}.qds-avatar-vertical,.qds-label-container{flex-direction:column}.qds-avatar-vertical,.qds-avatar-vertical .qds-label-container{align-items:center}.qds-avatar-media-wrapper{flex-shrink:0;position:relative}.qds-label{color:var(--qds-theme-title)}.qds-kicker{color:var(--qds-theme-kicker)}.qds-indicator{inset-block-start:0;inset-inline-end:0;position:absolute;transform:translate(50%,-50%)}.qds-avatar[data-size=large]{gap:var(--qds-list-item-large-gap-internal)}[data-size=large] .qds-avatar-media{height:var(--qds-display-avatar-large-size);width:var(--qds-display-avatar-large-size)}[data-size=large] .qds-label-container{gap:var(--qds-list-item-large-titles-gap)}[data-size=large] .qds-label{font:var(--qds-list-item-large-title)}[data-size=large] .qds-kicker{font:var(--qds-list-item-large-kicker)}.qds-avatar[data-size=standard]{gap:var(--qds-list-item-standard-gap-internal);height:var(--qds-control-standard-height)}[data-size=standard] .qds-avatar-media{height:var(--qds-display-avatar-standard-size);width:var(--qds-display-avatar-standard-size)}[data-size=standard] .qds-label-container{gap:var(--qds-list-item-standard-titles-gap)}[data-size=standard] .qds-label{font:var(--qds-list-item-standard-title)}[data-size=standard] .qds-kicker{font:var(--qds-list-item-standard-kicker)}.qds-avatar[data-size=small]{gap:var(--qds-list-item-small-gap-internal)}[data-size=small] .qds-avatar-media{height:var(--qds-display-avatar-small-size);width:var(--qds-display-avatar-small-size)}[data-size=small] .qds-label-container{gap:var(--qds-list-item-small-titles-gap)}[data-size=small] .qds-label{font:var(--qds-list-item-small-title)}[data-size=small] .qds-kicker{font:var(--qds-list-item-small-kicker)}";
|
|
7052
|
+
|
|
7053
|
+
// SPDX-FileCopyrightText: © 2026 Schneider Electric
|
|
7054
|
+
//
|
|
7055
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
7056
|
+
var __classPrivateFieldGet$x = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
7057
|
+
if (kind === "a" && !f)
|
|
7058
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
7059
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
7060
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
7061
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
7062
|
+
};
|
|
7063
|
+
var _Avatar_instances, _Avatar_computedSize_get;
|
|
7064
|
+
/**
|
|
7065
|
+
* The avatar component is a visual representation of a user or entity, typically through a profile picture, icon, or initials.
|
|
7066
|
+
* It is used to provide a consistent way to identify users across different parts of an interface,
|
|
7067
|
+
* such as messages, comments, or user profiles.
|
|
7068
|
+
*
|
|
7069
|
+
* @see https://quartz.se.com/build/components/avatar
|
|
7070
|
+
*/
|
|
7071
|
+
class Avatar {
|
|
7072
|
+
constructor(hostRef) {
|
|
7073
|
+
registerInstance(this, hostRef);
|
|
7074
|
+
_Avatar_instances.add(this);
|
|
7075
|
+
/**
|
|
7076
|
+
* The name of a registered icon library.
|
|
7077
|
+
*/
|
|
7078
|
+
this.iconLibrary = 'default';
|
|
7079
|
+
/**
|
|
7080
|
+
* The avatar's size.
|
|
7081
|
+
*/
|
|
7082
|
+
this.size = 'standard';
|
|
7083
|
+
/**
|
|
7084
|
+
* Display the avatar in a vertical direction.
|
|
7085
|
+
*/
|
|
7086
|
+
this.vertical = false;
|
|
7087
|
+
/**
|
|
7088
|
+
* Displays an indicator if `true`.
|
|
7089
|
+
*/
|
|
7090
|
+
this.badge = false;
|
|
7091
|
+
/**
|
|
7092
|
+
* The indicator's status.
|
|
7093
|
+
*/
|
|
7094
|
+
this.badgeIndicatorStatus = 'success';
|
|
7095
|
+
}
|
|
7096
|
+
render() {
|
|
7097
|
+
const hasLabel = this.label !== undefined && this.label !== '';
|
|
7098
|
+
const hasAlt = this.avatarAlt !== undefined && this.avatarAlt !== '';
|
|
7099
|
+
const hasKicker = this.kicker !== undefined && this.kicker !== '';
|
|
7100
|
+
return (hAsync("div", { key: 'df04ee473b689f1d0315b7346d77d93d66fb8abf', class: { 'qds-avatar': true, 'qds-avatar-vertical': this.vertical }, "data-size": __classPrivateFieldGet$x(this, _Avatar_instances, "a", _Avatar_computedSize_get) }, hAsync("div", { key: '77682dc8297bc75252f92db6907de27f40c3ed4f', class: "qds-avatar-media-wrapper" }, hAsync("qds-avatar-media", { key: 'e4062d40f2d91f958bac93de8a4d010c14dc6fc6', class: "qds-avatar-media", "aria-hidden": hasAlt ? undefined : 'true', src: this.avatarSrc, alt: this.avatarAlt, iconName: this.iconName, iconLibrary: this.iconLibrary, text: this.label }), (this.badge ?? false) && (hAsync("qds-badge-indicator", { key: 'b074d5844b847890ba3531eb34ae5b5447714871', class: "qds-indicator", status: this.badgeIndicatorStatus, description: this.badgeDescription, size: __classPrivateFieldGet$x(this, _Avatar_instances, "a", _Avatar_computedSize_get), strokeRing: true }))), (hasLabel || hasKicker) && (hAsync("div", { key: 'b00b1cbc34d71655bad3ba9290acead687469bce', class: "qds-label-container" }, hasLabel && hAsync("strong", { key: '2b7df27b74c8dd1bb5a77ec54ef46a1e4034edb9', class: "qds-label" }, this.label), hasKicker && hAsync("div", { key: '8a81525400061561e265ce5dfebc162a5ecbe04a', class: "qds-kicker" }, this.kicker)))));
|
|
7101
|
+
}
|
|
7102
|
+
static get style() { return avatarCss; }
|
|
7103
|
+
static get cmpMeta() { return {
|
|
7104
|
+
"$flags$": 265,
|
|
7105
|
+
"$tagName$": "qds-avatar",
|
|
7106
|
+
"$members$": {
|
|
7107
|
+
"avatarSrc": [1, "avatar-src"],
|
|
7108
|
+
"avatarAlt": [1, "avatar-alt"],
|
|
7109
|
+
"iconName": [1, "icon-name"],
|
|
7110
|
+
"iconLibrary": [1, "icon-library"],
|
|
7111
|
+
"kicker": [1],
|
|
7112
|
+
"label": [1],
|
|
7113
|
+
"size": [1],
|
|
7114
|
+
"vertical": [4],
|
|
7115
|
+
"badge": [4],
|
|
7116
|
+
"badgeDescription": [1, "badge-description"],
|
|
7117
|
+
"badgeIndicatorStatus": [1, "badge-indicator-status"]
|
|
7118
|
+
},
|
|
7119
|
+
"$listeners$": undefined,
|
|
7120
|
+
"$lazyBundleId$": "-",
|
|
7121
|
+
"$attrsToReflect$": []
|
|
7122
|
+
}; }
|
|
7123
|
+
}
|
|
7124
|
+
_Avatar_instances = new WeakSet(), _Avatar_computedSize_get = function _Avatar_computedSize_get() {
|
|
7125
|
+
switch (this.size) {
|
|
7126
|
+
case 'standard':
|
|
7127
|
+
case 'small':
|
|
7128
|
+
case 'large': {
|
|
7129
|
+
return this.size;
|
|
7130
|
+
}
|
|
7131
|
+
default: {
|
|
7132
|
+
return 'standard';
|
|
7133
|
+
}
|
|
7134
|
+
}
|
|
7135
|
+
};
|
|
7136
|
+
|
|
3806
7137
|
const avatarMediaCss = ":host([hidden]){display:none!important}:host{display:block}.qds-container{align-items:center;align-self:stretch;background:var(--qds-theme-display-background);border:var(--qds-display-border-width) solid var(--qds-theme-display-background-contrast);border-radius:var(--qds-display-rounded-border-radius);display:flex;height:inherit;justify-content:center;width:inherit}.qds-picture{border-radius:inherit;flex-shrink:0;height:100%;object-fit:cover;width:100%}.qds-icon,.qds-text{color:var(--qds-theme-display-background-contrast)}.qds-text{font:var(--qds-display-standard);text-align:center}.qds-sr-only{clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}";
|
|
3807
7138
|
|
|
3808
7139
|
// SPDX-FileCopyrightText: © 2025 Schneider Electric
|
|
@@ -3839,10 +7170,10 @@ class AvatarMedia {
|
|
|
3839
7170
|
_AvatarMedia_renderContent.set(this, () => {
|
|
3840
7171
|
if (this.src !== undefined && this.src !== '' && !this.hasImageError)
|
|
3841
7172
|
return (hAsync("img", { "aria-hidden": "true", class: "qds-picture", src: this.src, alt: this.alt, onError: __classPrivateFieldGet$w(this, _AvatarMedia_handleImageError, "f"), onLoad: __classPrivateFieldGet$w(this, _AvatarMedia_handleImageLoad, "f") }));
|
|
3842
|
-
if (this.text !== undefined && this.text !== '')
|
|
3843
|
-
return (hAsync(Fragment, null, hAsync("span", { "aria-hidden": "true", class: "qds-text" }, this.initials), hAsync("span", { class: "qds-sr-only" }, this.text)));
|
|
3844
7173
|
if (this.iconName !== undefined && this.iconName !== '')
|
|
3845
7174
|
return (hAsync("qds-icon", { class: "qds-icon", name: this.iconName, library: this.iconLibrary }));
|
|
7175
|
+
if (this.text !== undefined && this.text !== '')
|
|
7176
|
+
return (hAsync("span", { "aria-hidden": "true", class: "qds-text" }, this.initials));
|
|
3846
7177
|
return hAsync("qds-icon", { class: "qds-icon", name: "user", library: "core" });
|
|
3847
7178
|
});
|
|
3848
7179
|
_AvatarMedia_handleImageError.set(this, () => {
|
|
@@ -3865,33 +7196,36 @@ class AvatarMedia {
|
|
|
3865
7196
|
const [first = '', second = ''] = words.filter(Boolean);
|
|
3866
7197
|
this.initials = (first.charAt(0) + (second.charAt(0) || '')).toLocaleUpperCase();
|
|
3867
7198
|
}
|
|
3868
|
-
labelChanged() {
|
|
3869
|
-
this.internals.ariaLabel =
|
|
3870
|
-
this.alt !== undefined && this.alt !== ''
|
|
3871
|
-
? this.alt
|
|
3872
|
-
: // eslint-disable-next-line unicorn/no-null
|
|
3873
|
-
null;
|
|
3874
|
-
}
|
|
3875
7199
|
roleChanged() {
|
|
3876
|
-
|
|
7200
|
+
const hasSource = this.src !== undefined && this.src !== '' && !this.hasImageError;
|
|
7201
|
+
const hasIcon = this.iconName !== undefined && this.iconName !== '';
|
|
7202
|
+
const hasText = this.text !== undefined && this.text !== '';
|
|
7203
|
+
const hasFallbackIcon = !hasSource && !hasIcon && !hasText;
|
|
7204
|
+
const isImgMode = hasSource || hasIcon || hasFallbackIcon;
|
|
7205
|
+
if (isImgMode)
|
|
3877
7206
|
this.internals.role = 'img';
|
|
3878
|
-
else if (
|
|
7207
|
+
else if (hasText)
|
|
3879
7208
|
this.internals.role = 'generic';
|
|
3880
7209
|
else
|
|
3881
7210
|
this.internals.role = 'presentation';
|
|
7211
|
+
this.internals.ariaLabel =
|
|
7212
|
+
isImgMode && this.alt !== undefined && this.alt !== ''
|
|
7213
|
+
? this.alt
|
|
7214
|
+
: // eslint-disable-next-line unicorn/no-null
|
|
7215
|
+
null;
|
|
3882
7216
|
}
|
|
3883
7217
|
componentWillLoad() {
|
|
3884
7218
|
this.textChanged();
|
|
3885
|
-
this.labelChanged();
|
|
3886
7219
|
this.roleChanged();
|
|
3887
7220
|
}
|
|
3888
7221
|
render() {
|
|
3889
|
-
return hAsync("div", { key: '
|
|
7222
|
+
return hAsync("div", { key: 'ac301d086b8cc5fa51eda1f39a49ce7120af96df', class: "qds-container" }, __classPrivateFieldGet$w(this, _AvatarMedia_renderContent, "f").call(this));
|
|
3890
7223
|
}
|
|
3891
7224
|
static get watchers() { return {
|
|
3892
7225
|
"text": ["textChanged", "roleChanged"],
|
|
3893
|
-
"
|
|
3894
|
-
"
|
|
7226
|
+
"src": ["roleChanged"],
|
|
7227
|
+
"iconName": ["roleChanged"],
|
|
7228
|
+
"alt": ["roleChanged"]
|
|
3895
7229
|
}; }
|
|
3896
7230
|
static get style() { return avatarMediaCss; }
|
|
3897
7231
|
static get cmpMeta() { return {
|
|
@@ -4526,10 +7860,15 @@ _Button_savedTabIndex = new WeakMap(), _Button_button = new WeakMap(), _Button_s
|
|
|
4526
7860
|
}
|
|
4527
7861
|
}
|
|
4528
7862
|
}, _Button_updateAriaLabel = function _Button_updateAriaLabel() {
|
|
4529
|
-
|
|
7863
|
+
const hasBadge = this.badge !== undefined;
|
|
7864
|
+
if (hasBadge && this.badgeDescription !== undefined) {
|
|
4530
7865
|
this.internals.ariaLabel = `${this.text} ${isIndicator$3(this.badge) ? '' : this.badge} ${this.badgeDescription}`;
|
|
4531
7866
|
return;
|
|
4532
7867
|
}
|
|
7868
|
+
if (hasBadge && !isIndicator$3(this.badge)) {
|
|
7869
|
+
this.internals.ariaLabel = `${this.text} ${this.badge}`;
|
|
7870
|
+
return;
|
|
7871
|
+
}
|
|
4533
7872
|
if (this.target !== undefined &&
|
|
4534
7873
|
this.target === '_blank' &&
|
|
4535
7874
|
this.href !== undefined) {
|
|
@@ -4541,7 +7880,7 @@ _Button_savedTabIndex = new WeakMap(), _Button_button = new WeakMap(), _Button_s
|
|
|
4541
7880
|
Object.defineProperty(this.host, p, { enumerable: true, get });
|
|
4542
7881
|
};
|
|
4543
7882
|
|
|
4544
|
-
const checkboxCss = ":host([hidden]){display:none!important}:host{display:inline-block;line-height:0;outline:none}.qds-checkbox,.qds-icon{grid-area:b;place-self:center}.qds-icon{color:var(--qds-theme-signature-color-contrast);display:none;pointer-events:none}.qds-container{display:grid;grid-template-areas:\"b\"}.qds-label{align-items:flex-start;background-color:var(--qds-theme-interactive-background-default);border-radius:var(--qds-control-border-radius);box-sizing:border-box;cursor:pointer;display:inline-flex;justify-content:center;width:inherit}.qds-label:hover{background-color:var(--qds-theme-interactive-background-hover)}.qds-label:active{background-color:var(--qds-theme-interactive-background-pressed)}:host(:focus-visible) .qds-label{box-shadow:0 0 0 var(--qds-focus-heavy-border-width) var(--qds-theme-focus-border);outline:var(--qds-theme-focus-border-contrast) solid var(--qds-focus-light-border-width);outline-offset:0}.qds-label-inner{color:var(--qds-theme-control-text-standard);display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;width:100%}.qds-required{color:var(--qds-theme-feedback-field-required);-webkit-user-select:none;user-select:none}.qds-tooltip{line-height:normal}.qds-checkbox{-webkit-appearance:none;appearance:none;background-color:var(--qds-theme-interactive-background-default);border:var(--qds-control-border-width) solid var(--qds-theme-control-border);cursor:pointer;margin:0;-webkit-print-color-adjust:exact;print-color-adjust:exact}.qds-checkbox:focus-visible{outline:none}.qds-checkbox:checked~.qds-checked,.qds-checkbox:indeterminate~.qds-indeterminate{display:block}.qds-checkbox:checked,.qds-checkbox:indeterminate{background-color:var(--qds-theme-control-background-contrast);border-color:#0000}.qds-disabled{opacity:var(--qds-theme-disabled);pointer-events:none}.qds-checkbox[data-size=small]{border-radius:var(--qds-control-toggle-small-knob-border-radius);height:var(--qds-control-toggle-small-box-size);width:var(--qds-control-toggle-small-box-size)}.qds-icon[data-size=small]{font-size:var(--qds-control-toggle-small-box-size)}.qds-label[data-size=small]{gap:var(--qds-control-small-gap-siblings-related);min-height:var(--qds-control-toggle-small-height);min-width:var(--qds-control-toggle-small-width);padding-block:var(--qds-control-no-inline-small-padding-vertical)}.qds-label-inner[data-size=small]{font:var(--qds-control-small-text)}.qds-inline[data-size=small]{min-height:var(--qds-control-small-height);padding:var(--qds-control-small-padding-auto-height) var(--qds-control-toggle-small-padding-horizontal)}.qds-checkbox[data-size=standard]{border-radius:var(--qds-control-toggle-standard-knob-border-radius);height:var(--qds-control-toggle-standard-box-size);width:var(--qds-control-toggle-standard-box-size)}.qds-icon[data-size=standard]{font-size:var(--qds-control-toggle-standard-box-size)}.qds-label[data-size=standard]{gap:var(--qds-control-standard-gap-siblings-related);min-height:var(--qds-control-toggle-standard-height);min-width:var(--qds-control-toggle-standard-width);padding-block:var(--qds-control-no-inline-standard-padding-vertical)}.qds-label-inner[data-size=standard]{font:var(--qds-control-standard-text)}.qds-inline[data-size=standard]{min-height:var(--qds-control-standard-height);padding:var(--qds-control-standard-padding-auto-height) var(--qds-control-toggle-standard-padding-horizontal)}.qds-checkbox[data-size=large]{border-radius:var(--qds-control-toggle-large-knob-border-radius);height:var(--qds-control-toggle-large-box-size);width:var(--qds-control-toggle-large-box-size)}.qds-icon[data-size=large]{font-size:var(--qds-control-toggle-large-box-size)}.qds-label[data-size=large]{gap:var(--qds-control-large-gap-siblings-related);min-height:var(--qds-control-toggle-large-height);min-width:var(--qds-control-toggle-large-width);padding-block:var(--qds-control-no-inline-large-padding-vertical)}.qds-label-inner[data-size=large]{font:var(--qds-control-large-text)}.qds-inline[data-size=large]{min-height:var(--qds-control-large-height);padding:var(--qds-control-large-padding-auto-height) var(--qds-control-toggle-large-padding-horizontal)}";
|
|
7883
|
+
const checkboxCss = ":host([hidden]){display:none!important}:host{display:inline-block;line-height:0;outline:none}.qds-checkbox,.qds-icon{grid-area:b;place-self:center}.qds-icon{color:var(--qds-theme-signature-color-contrast);display:none;pointer-events:none}.qds-container{display:grid;grid-template-areas:\"b\"}.qds-label{align-items:flex-start;background-color:var(--qds-theme-interactive-background-default);border-radius:var(--qds-control-border-radius);box-sizing:border-box;cursor:pointer;display:inline-flex;justify-content:center;width:inherit}.qds-label:hover{background-color:var(--qds-theme-interactive-background-hover)}.qds-label:active{background-color:var(--qds-theme-interactive-background-pressed)}:host(:focus-visible) .qds-label{box-shadow:0 0 0 var(--qds-focus-heavy-border-width) var(--qds-theme-focus-border);outline:var(--qds-theme-focus-border-contrast) solid var(--qds-focus-light-border-width);outline-offset:0}.qds-label-inner{color:var(--qds-theme-control-text-standard);display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;width:100%}.qds-required{color:var(--qds-theme-feedback-field-required);-webkit-user-select:none;user-select:none}.qds-tooltip{line-height:normal}.qds-checkbox{-webkit-appearance:none;appearance:none;background-color:var(--qds-theme-interactive-background-default);border:var(--qds-control-border-width) solid var(--qds-theme-control-border);cursor:pointer;margin:0;-webkit-print-color-adjust:exact;print-color-adjust:exact}.qds-checkbox:focus-visible{outline:none}.qds-checkbox:checked~.qds-checked,.qds-checkbox:indeterminate~.qds-indeterminate{display:block}.qds-checkbox:checked,.qds-checkbox:indeterminate{background-color:var(--qds-theme-control-background-default-contrast);border-color:#0000}.qds-disabled{opacity:var(--qds-theme-disabled);pointer-events:none}.qds-checkbox[data-size=small]{border-radius:var(--qds-control-toggle-small-knob-border-radius);height:var(--qds-control-toggle-small-box-size);width:var(--qds-control-toggle-small-box-size)}.qds-icon[data-size=small]{font-size:var(--qds-control-toggle-small-box-size)}.qds-label[data-size=small]{gap:var(--qds-control-small-gap-siblings-related);min-height:var(--qds-control-toggle-small-height);min-width:var(--qds-control-toggle-small-width);padding-block:var(--qds-control-no-inline-small-padding-vertical)}.qds-label-inner[data-size=small]{font:var(--qds-control-small-text)}.qds-inline[data-size=small]{min-height:var(--qds-control-small-height);padding:var(--qds-control-small-padding-auto-height) var(--qds-control-toggle-small-padding-horizontal)}.qds-checkbox[data-size=standard]{border-radius:var(--qds-control-toggle-standard-knob-border-radius);height:var(--qds-control-toggle-standard-box-size);width:var(--qds-control-toggle-standard-box-size)}.qds-icon[data-size=standard]{font-size:var(--qds-control-toggle-standard-box-size)}.qds-label[data-size=standard]{gap:var(--qds-control-standard-gap-siblings-related);min-height:var(--qds-control-toggle-standard-height);min-width:var(--qds-control-toggle-standard-width);padding-block:var(--qds-control-no-inline-standard-padding-vertical)}.qds-label-inner[data-size=standard]{font:var(--qds-control-standard-text)}.qds-inline[data-size=standard]{min-height:var(--qds-control-standard-height);padding:var(--qds-control-standard-padding-auto-height) var(--qds-control-toggle-standard-padding-horizontal)}.qds-checkbox[data-size=large]{border-radius:var(--qds-control-toggle-large-knob-border-radius);height:var(--qds-control-toggle-large-box-size);width:var(--qds-control-toggle-large-box-size)}.qds-icon[data-size=large]{font-size:var(--qds-control-toggle-large-box-size)}.qds-label[data-size=large]{gap:var(--qds-control-large-gap-siblings-related);min-height:var(--qds-control-toggle-large-height);min-width:var(--qds-control-toggle-large-width);padding-block:var(--qds-control-no-inline-large-padding-vertical)}.qds-label-inner[data-size=large]{font:var(--qds-control-large-text)}.qds-inline[data-size=large]{min-height:var(--qds-control-large-height);padding:var(--qds-control-large-padding-auto-height) var(--qds-control-toggle-large-padding-horizontal)}";
|
|
4545
7884
|
|
|
4546
7885
|
// SPDX-FileCopyrightText: © 2024 Schneider Electric
|
|
4547
7886
|
//
|
|
@@ -4859,7 +8198,7 @@ _Checkbox_ro = new WeakMap(), _Checkbox_savedTabIndex = new WeakMap(), _Checkbox
|
|
|
4859
8198
|
Object.defineProperty(this.host, p, { enumerable: true, get });
|
|
4860
8199
|
};
|
|
4861
8200
|
|
|
4862
|
-
const chipCss = ":host([hidden]){display:none!important}:host{display:block}[aria-disabled=true]{opacity:var(--qds-theme-disabled);pointer-events:none}.qds-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.qds-label{display:flex}.qds-container{min-width:0}.qds-target{-webkit-appearance:none;appearance:none;background-color:initial;border:none;color:inherit;cursor:pointer;display:flex;outline:none;padding:0;pointer-events:auto}.qds-target:disabled{pointer-events:none}.qds-alignment{align-items:center;display:flex}.qds-cursor{cursor:pointer}.qds-icon{flex-shrink:0}.qds-closable-chip,.qds-container{align-items:center;-webkit-appearance:none;appearance:none;background-color:initial;border:var(--qds-control-border-width) solid var(--qds-theme-control-border);border-radius:var(--qds-control-rounded-border-radius);box-sizing:border-box;color:var(--qds-theme-control-text-standard);display:inline-flex;gap:var(--qds-control-chip-gap-internal);justify-content:center;padding-block:0;-webkit-user-select:none;user-select:none}.qds-checkbox:active~.qds-container,.qds-closable-chip:has(.qds-target:active),.qds-container.qds-pressed-state{background-color:var(--qds-theme-interactive-background-pressed)}.qds-container.qds-selected-state{background-color:var(--qds-theme-interactive-background-selected)}.qds-container.qds-selected-state:hover{background-color:var(--qds-theme-interactive-background-selected-hover)}.qds-container.qds-selected-state:active{background-color:var(--qds-theme-interactive-background-selected-pressed)}.qds-checkbox{clip-path:inset(50%);margin:0;position:absolute}.qds-checkbox:focus-visible~.qds-container{box-shadow:0 0 0 var(--qds-focus-heavy-border-width) var(--qds-theme-focus-border);outline:var(--qds-theme-focus-border-contrast) solid var(--qds-focus-light-border-width);outline-offset:0}.qds-closable-chip[data-size=small],.qds-container[data-size=small]{min-height:var(--qds-control-chip-small-height);padding-inline:var(--qds-control-chip-small-padding-horizontal)}.qds-closable-chip[data-size=small]{padding-inline-end:var(--qds-control-chip-closable-small-padding-end)}.qds-icon[data-size=small]{height:var(--qds-control-small-icon-size);width:var(--qds-control-small-icon-size)}.qds-text[data-size=small]{font:var(--qds-control-small-text);line-height:normal}.qds-closable-chip[data-size=standard],.qds-container[data-size=standard]{min-height:var(--qds-control-chip-standard-height);padding-inline:var(--qds-control-chip-standard-padding-horizontal)}.qds-closable-chip[data-size=standard]{padding-inline-end:var(--qds-control-chip-closable-standard-padding-end)}.qds-icon[data-size=standard]{height:var(--qds-control-standard-icon-size);width:var(--qds-control-standard-icon-size)}.qds-text[data-size=standard]{font:var(--qds-control-standard-text);line-height:normal}.qds-closable-chip[data-size=large],.qds-container[data-size=large]{min-height:var(--qds-control-chip-large-height);padding-inline:var(--qds-control-chip-large-padding-horizontal)}.qds-closable-chip[data-size=large]{padding-inline-end:var(--qds-control-chip-closable-large-padding-end)}.qds-icon[data-size=large]{height:var(--qds-control-large-icon-size);width:var(--qds-control-large-icon-size)}.qds-text[data-size=large]{font:var(--qds-control-large-text);line-height:normal}";
|
|
8201
|
+
const chipCss = ":host([hidden]){display:none!important}:host{display:block}[aria-disabled=true]{opacity:var(--qds-theme-disabled);pointer-events:none}.qds-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.qds-label{display:flex}.qds-container{min-width:0}.qds-container:not(.qds-closable-chip):hover{background-color:var(--qds-theme-interactive-background-hover)}.qds-container:not(.qds-closable-chip):active{background-color:var(--qds-theme-interactive-background-pressed)}.qds-target{-webkit-appearance:none;appearance:none;background-color:initial;border:none;color:inherit;cursor:pointer;display:flex;outline:none;padding:0;pointer-events:auto}.qds-target:disabled{pointer-events:none}.qds-alignment{align-items:center;display:flex}.qds-cursor{cursor:pointer}.qds-icon{flex-shrink:0}.qds-closable-chip,.qds-container{align-items:center;-webkit-appearance:none;appearance:none;background-color:initial;border:var(--qds-control-border-width) solid var(--qds-theme-control-border);border-radius:var(--qds-control-rounded-border-radius);box-sizing:border-box;color:var(--qds-theme-control-text-standard);display:inline-flex;gap:var(--qds-control-chip-gap-internal);justify-content:center;padding-block:0;-webkit-user-select:none;user-select:none}.qds-checkbox:active~.qds-container,.qds-closable-chip:has(.qds-target:active),.qds-container.qds-pressed-state{background-color:var(--qds-theme-interactive-background-pressed)}.qds-container.qds-selected-state{background-color:var(--qds-theme-interactive-background-selected)}.qds-container.qds-selected-state:hover{background-color:var(--qds-theme-interactive-background-selected-hover)}.qds-container.qds-selected-state:active{background-color:var(--qds-theme-interactive-background-selected-pressed)}.qds-checkbox{clip-path:inset(50%);margin:0;position:absolute}.qds-checkbox:focus-visible~.qds-container{box-shadow:0 0 0 var(--qds-focus-heavy-border-width) var(--qds-theme-focus-border);outline:var(--qds-theme-focus-border-contrast) solid var(--qds-focus-light-border-width);outline-offset:0}.qds-closable-chip[data-size=small],.qds-container[data-size=small]{min-height:var(--qds-control-chip-small-height);padding-inline:var(--qds-control-chip-small-padding-horizontal)}.qds-closable-chip[data-size=small]{padding-inline-end:var(--qds-control-chip-closable-small-padding-end)}.qds-icon[data-size=small]{height:var(--qds-control-small-icon-size);width:var(--qds-control-small-icon-size)}.qds-text[data-size=small]{font:var(--qds-control-small-text);line-height:normal}.qds-closable-chip[data-size=standard],.qds-container[data-size=standard]{min-height:var(--qds-control-chip-standard-height);padding-inline:var(--qds-control-chip-standard-padding-horizontal)}.qds-closable-chip[data-size=standard]{padding-inline-end:var(--qds-control-chip-closable-standard-padding-end)}.qds-icon[data-size=standard]{height:var(--qds-control-standard-icon-size);width:var(--qds-control-standard-icon-size)}.qds-text[data-size=standard]{font:var(--qds-control-standard-text);line-height:normal}.qds-closable-chip[data-size=large],.qds-container[data-size=large]{min-height:var(--qds-control-chip-large-height);padding-inline:var(--qds-control-chip-large-padding-horizontal)}.qds-closable-chip[data-size=large]{padding-inline-end:var(--qds-control-chip-closable-large-padding-end)}.qds-icon[data-size=large]{height:var(--qds-control-large-icon-size);width:var(--qds-control-large-icon-size)}.qds-text[data-size=large]{font:var(--qds-control-large-text);line-height:normal}";
|
|
4863
8202
|
|
|
4864
8203
|
// SPDX-FileCopyrightText: © 2024 Schneider Electric
|
|
4865
8204
|
//
|
|
@@ -5238,7 +8577,7 @@ class Dialog {
|
|
|
5238
8577
|
}
|
|
5239
8578
|
render() {
|
|
5240
8579
|
const hasHeading = this.hasTitleSlot || this.closable === true;
|
|
5241
|
-
return (hAsync(Host, { key: '
|
|
8580
|
+
return (hAsync(Host, { key: 'bf4674798e66be27eb0b35cc098774afb8591916' }, hAsync("dialog", { key: '3fcd5de1d60f22aa005744575d2226a527388385', class: "qds-dialog", ref: __classPrivateFieldGet$q(this, _Dialog_ref, "f"), onCancel: __classPrivateFieldGet$q(this, _Dialog_onCancel, "f"), onClose: __classPrivateFieldGet$q(this, _Dialog_onClose, "f"), onSubmit: __classPrivateFieldGet$q(this, _Dialog_onSubmit, "f"), ...__classPrivateFieldGet$q(this, _Dialog_inheritedAttributes, "f"), "aria-labelledby": this.hasTitleSlot ? __classPrivateFieldGet$q(this, _Dialog_titleId, "f") : undefined }, hasHeading && (hAsync("div", { key: 'c78ad5071e914a9270f08d2e14ff42d7288b7789', class: "qds-heading" }, this.hasTitleSlot && (hAsync("div", { key: '99d57b36bfc0dd20a1afc6d3ac62a5a7a2c6a83a', id: __classPrivateFieldGet$q(this, _Dialog_titleId, "f") }, hAsync("slot", { key: 'fc071c652158f1b556a60692fe8a10135be37cef', name: "title" }))), this.closable === true && (hAsync("qds-icon-button", { key: '301036e270f56a9bce5c35dda62452e5680c2434', "aria-label": "close dialog", class: "qds-close-button", importance: "subdued", iconName: "close", iconLibrary: "core", onClick: __classPrivateFieldGet$q(this, _Dialog_handleCloseClick, "f"), ref: __classPrivateFieldGet$q(this, _Dialog_closeButtonRef, "f") })))), hAsync("div", { key: '533874075c54678654210741e139d2d9186512f7', class: "qds-content" }, hAsync("slot", { key: '10c081a99bffd1fb40394bcb957a22329118b777' })), this.hasFooterSlot && (hAsync("div", { key: '927fc31c531dff7ddc4d22869db5789cf47d759d', class: "qds-footer" }, hAsync("slot", { key: '24764196502824137984f0838cb15fd4a1122566', name: "footer" })))), hAsync("div", { key: '4448e7a0d02cada97f8f3fa93ec2bd08caf7d599', class: "qds-backdrop", "aria-hidden": "true" })));
|
|
5242
8581
|
}
|
|
5243
8582
|
show() {
|
|
5244
8583
|
invariant(__classPrivateFieldGet$q(this, _Dialog_dialog, "f"));
|
|
@@ -5324,7 +8663,7 @@ class Divider {
|
|
|
5324
8663
|
this.verticalChanged();
|
|
5325
8664
|
}
|
|
5326
8665
|
render() {
|
|
5327
|
-
return (hAsync("hr", { key: '
|
|
8666
|
+
return (hAsync("hr", { key: 'a2920144cecf267a6639c9f6388367600df26660', class: {
|
|
5328
8667
|
'qds-divider': true,
|
|
5329
8668
|
'qds-vertical': this.vertical,
|
|
5330
8669
|
}, "aria-hidden": "true", "data-importance": __classPrivateFieldGet$p(this, _Divider_instances, "a", _Divider_computedImportance_get) }));
|
|
@@ -7062,7 +10401,7 @@ var __classPrivateFieldGet$o = (undefined && undefined.__classPrivateFieldGet) |
|
|
|
7062
10401
|
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
7063
10402
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
7064
10403
|
};
|
|
7065
|
-
var _Dropdown_instances, _Dropdown_cleanup, _Dropdown_Items, _Dropdown_gap, _Dropdown_middleware, _Dropdown_referenceElement, _Dropdown_open, _Dropdown_opened, _Dropdown_onFocusout, _Dropdown_focusOnTrigger, _Dropdown_onKeydown, _Dropdown_onReferenceClick, _Dropdown_focusFirstItem, _Dropdown_disconnectReferenceElement, _Dropdown_boundOnFocusout, _Dropdown_boundOnKeydown, _Dropdown_boundOnReferenceClick, _Dropdown_onSlotchange;
|
|
10404
|
+
var _Dropdown_instances, _Dropdown_cleanup, _Dropdown_Items, _Dropdown_gap, _Dropdown_middleware, _Dropdown_referenceElement, _Dropdown_open, _Dropdown_opened, _Dropdown_onFocusout, _Dropdown_focusOnTrigger, _Dropdown_onKeydown, _Dropdown_onReferenceClick, _Dropdown_focusFirstItem, _Dropdown_initializeFirstItem, _Dropdown_setFirstItemTabindex, _Dropdown_disconnectReferenceElement, _Dropdown_boundOnFocusout, _Dropdown_boundOnKeydown, _Dropdown_boundOnReferenceClick, _Dropdown_onSlotchange;
|
|
7066
10405
|
let autoIncrementingId$3 = 1;
|
|
7067
10406
|
const isQdsButton = (element) => element.tagName.toLowerCase() === 'qds-button';
|
|
7068
10407
|
const ALLOWED_TAGS = new Set([
|
|
@@ -7249,7 +10588,7 @@ class Dropdown {
|
|
|
7249
10588
|
return;
|
|
7250
10589
|
}
|
|
7251
10590
|
await this.show();
|
|
7252
|
-
__classPrivateFieldGet$o(this, _Dropdown_instances, "m",
|
|
10591
|
+
__classPrivateFieldGet$o(this, _Dropdown_instances, "m", _Dropdown_initializeFirstItem).call(this);
|
|
7253
10592
|
});
|
|
7254
10593
|
_Dropdown_boundOnFocusout.set(this, (event) => {
|
|
7255
10594
|
ignorePromise(__classPrivateFieldGet$o(this, _Dropdown_onFocusout, "f").call(this, event));
|
|
@@ -7406,7 +10745,7 @@ class Dropdown {
|
|
|
7406
10745
|
__classPrivateFieldGet$o(this, _Dropdown_instances, "m", _Dropdown_disconnectReferenceElement).call(this);
|
|
7407
10746
|
}
|
|
7408
10747
|
render() {
|
|
7409
|
-
return (hAsync(Host, { key: '
|
|
10748
|
+
return (hAsync(Host, { key: '09e4ef0e7d6c8cf0a101e79f5efa4495a3d13c75', onKeyDown: __classPrivateFieldGet$o(this, _Dropdown_onKeydown, "f"), onFocusout: __classPrivateFieldGet$o(this, _Dropdown_onFocusout, "f") }, hAsync("slot", { key: '3f48d5da5844a46102da02537282dbb879a662c5', onSlotchange: __classPrivateFieldGet$o(this, _Dropdown_onSlotchange, "f") })));
|
|
7410
10749
|
}
|
|
7411
10750
|
static get delegatesFocus() { return true; }
|
|
7412
10751
|
get host() { return getElement(this); }
|
|
@@ -7459,16 +10798,25 @@ _Dropdown_cleanup = new WeakMap(), _Dropdown_Items = new WeakMap(), _Dropdown_ga
|
|
|
7459
10798
|
target.focus();
|
|
7460
10799
|
}, _Dropdown_focusFirstItem = function _Dropdown_focusFirstItem() {
|
|
7461
10800
|
requestAnimationFrame(() => {
|
|
7462
|
-
const firstItem = __classPrivateFieldGet$o(this,
|
|
7463
|
-
isEnabledItem(item) &&
|
|
7464
|
-
closestElement('qds-dropdown', item) === this.host);
|
|
10801
|
+
const firstItem = __classPrivateFieldGet$o(this, _Dropdown_instances, "m", _Dropdown_setFirstItemTabindex).call(this);
|
|
7465
10802
|
if (!firstItem)
|
|
7466
10803
|
return;
|
|
7467
|
-
for (const item of __classPrivateFieldGet$o(this, _Dropdown_Items, "f"))
|
|
7468
|
-
item.setAttribute('tabindex', '-1');
|
|
7469
|
-
firstItem.setAttribute('tabindex', '0');
|
|
7470
10804
|
firstItem.focus();
|
|
7471
10805
|
});
|
|
10806
|
+
}, _Dropdown_initializeFirstItem = function _Dropdown_initializeFirstItem() {
|
|
10807
|
+
requestAnimationFrame(() => {
|
|
10808
|
+
__classPrivateFieldGet$o(this, _Dropdown_instances, "m", _Dropdown_setFirstItemTabindex).call(this);
|
|
10809
|
+
});
|
|
10810
|
+
}, _Dropdown_setFirstItemTabindex = function _Dropdown_setFirstItemTabindex() {
|
|
10811
|
+
const firstItem = __classPrivateFieldGet$o(this, _Dropdown_Items, "f").find((item) => item instanceof HTMLElement &&
|
|
10812
|
+
isEnabledItem(item) &&
|
|
10813
|
+
closestElement('qds-dropdown', item) === this.host);
|
|
10814
|
+
if (!firstItem)
|
|
10815
|
+
return undefined;
|
|
10816
|
+
for (const item of __classPrivateFieldGet$o(this, _Dropdown_Items, "f"))
|
|
10817
|
+
item.setAttribute('tabindex', '-1');
|
|
10818
|
+
firstItem.setAttribute('tabindex', '0');
|
|
10819
|
+
return firstItem;
|
|
7472
10820
|
}, _Dropdown_disconnectReferenceElement = function _Dropdown_disconnectReferenceElement() {
|
|
7473
10821
|
this.host.removeAttribute('aria-labelledby');
|
|
7474
10822
|
if (!(__classPrivateFieldGet$o(this, _Dropdown_referenceElement, "f") instanceof globalThis.Element))
|
|
@@ -7785,7 +11133,7 @@ class Icon {
|
|
|
7785
11133
|
await this.setIcon();
|
|
7786
11134
|
}
|
|
7787
11135
|
render() {
|
|
7788
|
-
return (hAsync("div", { key: '
|
|
11136
|
+
return (hAsync("div", { key: '679545e776f70c30bc7843c107e115d2dd3501a1', class: "qds-container", "aria-hidden": "true" }, hAsync("span", { key: 'dd410b390eca7c4db0dc258d635eeb32b9ed7639', class: "qds-icon-wrapper", innerHTML: this.svg })));
|
|
7789
11137
|
}
|
|
7790
11138
|
static get watchers() { return {
|
|
7791
11139
|
"name": ["setIcon"],
|
|
@@ -7827,7 +11175,7 @@ var __classPrivateFieldSet$i = (undefined && undefined.__classPrivateFieldSet) |
|
|
|
7827
11175
|
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
7828
11176
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
7829
11177
|
};
|
|
7830
|
-
var _IconButton_instances, _IconButton_savedTabIndex, _IconButton_button, _IconButton_tooltip, _IconButton_computedSize_get, _IconButton_computedImportance_get, _IconButton_computedDisabled_get, _IconButton_hasText_get, _IconButton_updateAriaLabel, _IconButton_ref, _IconButton_tooltipRef;
|
|
11178
|
+
var _IconButton_instances, _IconButton_savedTabIndex, _IconButton_button, _IconButton_tooltip, _IconButton_rawAriaLabel, _IconButton_computedSize_get, _IconButton_computedImportance_get, _IconButton_computedDisabled_get, _IconButton_hasText_get, _IconButton_updateAriaLabel, _IconButton_ref, _IconButton_tooltipRef;
|
|
7831
11179
|
const isCounter$2 = (value) => typeof value === 'string'
|
|
7832
11180
|
? !Number.isNaN(Number.parseFloat(value))
|
|
7833
11181
|
: typeof value === 'number';
|
|
@@ -7889,6 +11237,7 @@ class IconButton {
|
|
|
7889
11237
|
_IconButton_savedTabIndex.set(this, 0);
|
|
7890
11238
|
_IconButton_button.set(this, void 0);
|
|
7891
11239
|
_IconButton_tooltip.set(this, void 0);
|
|
11240
|
+
_IconButton_rawAriaLabel.set(this, void 0);
|
|
7892
11241
|
_IconButton_ref.set(this, (button) => {
|
|
7893
11242
|
__classPrivateFieldSet$i(this, _IconButton_button, button, "f");
|
|
7894
11243
|
});
|
|
@@ -7925,6 +11274,13 @@ class IconButton {
|
|
|
7925
11274
|
textChanged() {
|
|
7926
11275
|
__classPrivateFieldGet$m(this, _IconButton_instances, "m", _IconButton_updateAriaLabel).call(this);
|
|
7927
11276
|
}
|
|
11277
|
+
ariaLabelChanged(newValue) {
|
|
11278
|
+
if (newValue !== null) {
|
|
11279
|
+
__classPrivateFieldSet$i(this, _IconButton_rawAriaLabel, newValue, "f");
|
|
11280
|
+
this.host.removeAttribute('aria-label');
|
|
11281
|
+
__classPrivateFieldGet$m(this, _IconButton_instances, "m", _IconButton_updateAriaLabel).call(this);
|
|
11282
|
+
}
|
|
11283
|
+
}
|
|
7928
11284
|
onClick(event) {
|
|
7929
11285
|
if (__classPrivateFieldGet$m(this, _IconButton_instances, "a", _IconButton_computedDisabled_get))
|
|
7930
11286
|
event.stopImmediatePropagation();
|
|
@@ -7956,16 +11312,21 @@ class IconButton {
|
|
|
7956
11312
|
}
|
|
7957
11313
|
componentWillLoad() {
|
|
7958
11314
|
this.hrefChanged();
|
|
11315
|
+
const { ariaLabel } = this.host;
|
|
11316
|
+
if (ariaLabel !== null) {
|
|
11317
|
+
__classPrivateFieldSet$i(this, _IconButton_rawAriaLabel, ariaLabel, "f");
|
|
11318
|
+
this.host.removeAttribute('aria-label');
|
|
11319
|
+
}
|
|
7959
11320
|
this.textChanged();
|
|
7960
11321
|
this.tabindexChanged(this.host.getAttribute('tabindex') ?? '0');
|
|
7961
11322
|
this.disabledChanged();
|
|
7962
11323
|
}
|
|
7963
11324
|
render() {
|
|
7964
11325
|
const Tag = this.href === undefined ? 'button' : 'a';
|
|
7965
|
-
return (hAsync("div", { key: '
|
|
11326
|
+
return (hAsync("div", { key: 'd13c01f285f3a4b7b2d3c11c5e61368134c9d246', class: "qds-container", "aria-hidden": "true" }, hAsync(Tag, { key: '8426b9fc8f12555ee20f3443bd2d539ba47532e4', type: Tag === 'a' ? undefined : 'button', class: {
|
|
7966
11327
|
'qds-icon-button': true,
|
|
7967
11328
|
'qds-disabled': __classPrivateFieldGet$m(this, _IconButton_instances, "a", _IconButton_computedDisabled_get),
|
|
7968
|
-
}, href: Tag === 'a' ? this.href : undefined, target: Tag === 'a' ? this.target : undefined, rel: Tag === 'a' ? this.rel : undefined, ref: __classPrivateFieldGet$m(this, _IconButton_ref, "f"), disabled: Tag === 'a' ? undefined : __classPrivateFieldGet$m(this, _IconButton_instances, "a", _IconButton_computedDisabled_get), download: Tag === 'a' ? this.download : undefined, "data-size": __classPrivateFieldGet$m(this, _IconButton_instances, "a", _IconButton_computedSize_get), "data-importance": __classPrivateFieldGet$m(this, _IconButton_instances, "a", _IconButton_computedImportance_get), onKeyDown: preventDefault$1, onKeyUp: preventDefault$1, onKeyPress: preventDefault$1, tabIndex: -1 }, hAsync("qds-icon", { key: '
|
|
11329
|
+
}, href: Tag === 'a' ? this.href : undefined, target: Tag === 'a' ? this.target : undefined, rel: Tag === 'a' ? this.rel : undefined, ref: __classPrivateFieldGet$m(this, _IconButton_ref, "f"), disabled: Tag === 'a' ? undefined : __classPrivateFieldGet$m(this, _IconButton_instances, "a", _IconButton_computedDisabled_get), download: Tag === 'a' ? this.download : undefined, "data-size": __classPrivateFieldGet$m(this, _IconButton_instances, "a", _IconButton_computedSize_get), "data-importance": __classPrivateFieldGet$m(this, _IconButton_instances, "a", _IconButton_computedImportance_get), onKeyDown: preventDefault$1, onKeyUp: preventDefault$1, onKeyPress: preventDefault$1, tabIndex: -1 }, hAsync("qds-icon", { key: 'e713bcaae60c8dddf9fe5dc48707761a5b286c50', class: "qds-icon", "data-size": __classPrivateFieldGet$m(this, _IconButton_instances, "a", _IconButton_computedSize_get), library: this.iconLibrary, name: this.iconName }), isIndicator$2(this.badge) && (hAsync("qds-badge-indicator", { key: 'a54753162abaf198a39061cbdbb2d4564b3a306a', class: "qds-indicator", status: this.badgeIndicatorStatus, description: this.badgeDescription, size: __classPrivateFieldGet$m(this, _IconButton_instances, "a", _IconButton_computedSize_get), strokeRing: true })), isCounter$2(this.badge) && (hAsync("qds-badge-counter", { key: '27509189b8b4a17e3daf9651474193a2962771cb', class: "qds-counter", description: this.badgeDescription, importance: __classPrivateFieldGet$m(this, _IconButton_instances, "a", _IconButton_computedImportance_get), size: __classPrivateFieldGet$m(this, _IconButton_instances, "a", _IconButton_computedSize_get), strokeRing: true, value: this.badge }))), hAsync("div", { key: '8b559da978404ccc2338b96dbb0f3f06a13e1aec', class: "qds-focus-ring", "data-size": __classPrivateFieldGet$m(this, _IconButton_instances, "a", _IconButton_computedSize_get) }), __classPrivateFieldGet$m(this, _IconButton_instances, "a", _IconButton_hasText_get) && (hAsync("qds-tooltip", { key: 'd5726ac6d6138767392cd72374a76eadeb8d3a6d', ref: __classPrivateFieldGet$m(this, _IconButton_tooltipRef, "f") }, this.text))));
|
|
7969
11330
|
}
|
|
7970
11331
|
static get formAssociated() { return true; }
|
|
7971
11332
|
get host() { return getElement(this); }
|
|
@@ -7973,7 +11334,8 @@ class IconButton {
|
|
|
7973
11334
|
"disabled": ["disabledChanged"],
|
|
7974
11335
|
"href": ["hrefChanged"],
|
|
7975
11336
|
"tabindex": ["tabindexChanged"],
|
|
7976
|
-
"text": ["textChanged"]
|
|
11337
|
+
"text": ["textChanged"],
|
|
11338
|
+
"aria-label": ["ariaLabelChanged"]
|
|
7977
11339
|
}; }
|
|
7978
11340
|
static get style() { return iconButtonCss; }
|
|
7979
11341
|
static get cmpMeta() { return {
|
|
@@ -7999,7 +11361,7 @@ class IconButton {
|
|
|
7999
11361
|
"$attrsToReflect$": []
|
|
8000
11362
|
}; }
|
|
8001
11363
|
}
|
|
8002
|
-
_IconButton_savedTabIndex = new WeakMap(), _IconButton_button = new WeakMap(), _IconButton_tooltip = new WeakMap(), _IconButton_ref = new WeakMap(), _IconButton_tooltipRef = new WeakMap(), _IconButton_instances = new WeakSet(), _IconButton_computedSize_get = function _IconButton_computedSize_get() {
|
|
11364
|
+
_IconButton_savedTabIndex = new WeakMap(), _IconButton_button = new WeakMap(), _IconButton_tooltip = new WeakMap(), _IconButton_rawAriaLabel = new WeakMap(), _IconButton_ref = new WeakMap(), _IconButton_tooltipRef = new WeakMap(), _IconButton_instances = new WeakSet(), _IconButton_computedSize_get = function _IconButton_computedSize_get() {
|
|
8003
11365
|
switch (this.size) {
|
|
8004
11366
|
case 'small':
|
|
8005
11367
|
case 'large':
|
|
@@ -8027,17 +11389,22 @@ _IconButton_savedTabIndex = new WeakMap(), _IconButton_button = new WeakMap(), _
|
|
|
8027
11389
|
}, _IconButton_hasText_get = function _IconButton_hasText_get() {
|
|
8028
11390
|
return this.text !== undefined && this.text !== '';
|
|
8029
11391
|
}, _IconButton_updateAriaLabel = function _IconButton_updateAriaLabel() {
|
|
8030
|
-
|
|
8031
|
-
|
|
11392
|
+
const label = this.text ?? __classPrivateFieldGet$m(this, _IconButton_rawAriaLabel, "f") ?? '';
|
|
11393
|
+
const hasBadge = this.badge !== undefined;
|
|
11394
|
+
if (hasBadge && this.badgeDescription !== undefined) {
|
|
11395
|
+
this.internals.ariaLabel = isIndicator$2(this.badge)
|
|
11396
|
+
? `${label} ${this.badgeDescription}`
|
|
11397
|
+
: `${label} ${this.badge} ${this.badgeDescription}`;
|
|
8032
11398
|
return;
|
|
8033
11399
|
}
|
|
8034
|
-
if (this.
|
|
8035
|
-
this.
|
|
8036
|
-
this.href !== undefined) {
|
|
8037
|
-
this.internals.ariaLabel = `${this.text} Opens in a new tab`;
|
|
11400
|
+
if (hasBadge && !isIndicator$2(this.badge)) {
|
|
11401
|
+
this.internals.ariaLabel = `${label} ${this.badge}`;
|
|
8038
11402
|
return;
|
|
8039
11403
|
}
|
|
8040
|
-
this.internals.ariaLabel =
|
|
11404
|
+
this.internals.ariaLabel =
|
|
11405
|
+
this.target === '_blank' && this.href !== undefined
|
|
11406
|
+
? `${label} opens in a new tab`
|
|
11407
|
+
: label;
|
|
8041
11408
|
};
|
|
8042
11409
|
|
|
8043
11410
|
const iconTabCss = ":host([hidden]){display:none!important}:host{display:inline-block;line-height:0}[aria-disabled=true]{opacity:var(--qds-theme-disabled);pointer-events:none}:host(:focus-visible){border-radius:var(--qds-focus-border-radius);outline:var(--qds-theme-focus-border) solid var(--qds-focus-border-width);outline-offset:calc(var(--qds-focus-border-width)*-1 - var(--qds-focus-border-offset))}.qds-icon-container{align-items:center;display:flex;justify-content:center;position:relative}.qds-icon{flex-shrink:0}.qds-icon:hover{background-color:initial}.qds-selected:active{background-color:var(--qds-theme-interactive-background-selected-pressed)}.qds-icon,.qds-text{color:var(--qds-theme-title)}.qds-badge-indicator{inset-block-start:0;inset-inline-end:0;position:absolute}.qds-badge-counter{inset-block-start:-2px;inset-inline-end:-2px;position:absolute}.qds-icon-tab[data-size=small]{gap:var(--qds-nav-element-small-gap-internal);min-height:var(--qds-nav-element-small-height);min-width:var(--qds-nav-element-small-height)}[data-size=small] .qds-icon-container{height:var(--qds-control-small-height);width:var(--qds-control-small-height)}[data-size=small] .qds-icon-container>.qds-icon{height:var(--qds-nav-element-small-icon-size);width:var(--qds-nav-element-small-icon-size)}.qds-icon-tab[data-size=standard]{gap:var(--qds-nav-element-standard-gap-internal);min-height:var(--qds-nav-element-standard-height);min-width:var(--qds-nav-element-standard-height)}[data-size=standard] .qds-icon-container{height:var(--qds-control-standard-height);width:var(--qds-control-standard-height)}[data-size=standard] .qds-icon-container>.qds-icon{height:var(--qds-nav-element-standard-icon-size);width:var(--qds-nav-element-standard-icon-size)}.qds-icon-tab[data-size=large]{gap:var(--qds-nav-element-large-gap-internal);min-height:var(--qds-nav-element-large-height);min-width:var(--qds-nav-element-large-height)}[data-size=large] .qds-icon-container{height:var(--qds-control-large-height);width:var(--qds-control-large-height)}[data-size=large] .qds-icon-container>.qds-icon{height:var(--qds-nav-element-large-icon-size);width:var(--qds-nav-element-large-icon-size)}.qds-selected[data-importance=standard]:after,.qds-selected[data-importance=subdued]:after{border-radius:var(--qds-signature-line-connection-cap-radius);content:\"\";display:block;position:absolute}.qds-selected.qds-indicator-inline-end[data-importance=standard]:after,.qds-selected.qds-indicator-inline-end[data-importance=subdued]:after,.qds-selected.qds-indicator-inline-start[data-importance=standard]:after,.qds-selected.qds-indicator-inline-start[data-importance=subdued]:after{height:100%;width:var(--qds-signature-line-connection-width)}.qds-selected.qds-indicator-inline-end[data-importance=standard]:after,.qds-selected.qds-indicator-inline-end[data-importance=subdued]:after{inset-inline-end:0}.qds-selected.qds-indicator-inline-start[data-importance=standard]:after,.qds-selected.qds-indicator-inline-start[data-importance=subdued]:after{inset-inline-start:0}.qds-selected.qds-indicator-block-end[data-importance=standard]:after,.qds-selected.qds-indicator-block-end[data-importance=subdued]:after,.qds-selected.qds-indicator-block-start[data-importance=standard]:after,.qds-selected.qds-indicator-block-start[data-importance=subdued]:after{height:var(--qds-signature-line-connection-width);width:100%}.qds-selected.qds-indicator-block-end[data-importance=standard]:after,.qds-selected.qds-indicator-block-end[data-importance=subdued]:after{bottom:0}.qds-selected.qds-indicator-block-start[data-importance=standard]:after,.qds-selected.qds-indicator-block-start[data-importance=subdued]:after{top:0}[data-importance=standard]:hover:after{background-color:var(--qds-theme-signature-color-hover)}[data-importance=standard]:active:after{background-color:var(--qds-theme-signature-color-pressed)}.qds-selected[data-importance=standard]:after{background-color:var(--qds-theme-signature-color-default)}[data-importance=standard] .qds-selected .qds-icon{color:var(--qds-theme-title)}.qds-selected[data-importance=subdued]:after,[data-importance=subdued] :active:after{background-color:var(--qds-theme-link-subdued-pressed)}[data-importance=subdued]:hover:after{background-color:var(--qds-theme-link-subdued-hover)}.qds-selected[data-importance=subdued]:after{background-color:var(\n --qds-theme-nav-element-selection-indicator-background-subdued\n )}.qds-icon-tab{align-items:center;background-color:initial;border:none;cursor:pointer;display:flex;justify-content:center;position:relative;text-align:initial}.qds-icon-tab:any-link{-webkit-text-decoration:none;text-decoration:none}.qds-icon-tab:hover{background-color:var(--qds-theme-interactive-background-hover)}.qds-icon-tab:active{background-color:var(--qds-theme-interactive-background-pressed)}.qds-icon-tab:focus-visible{border-radius:var(--qds-focus-border-radius);outline:var(--qds-theme-focus-border) solid var(--qds-focus-border-width);outline-offset:calc(var(--qds-focus-border-width)*-1 - var(--qds-focus-border-offset))}.qds-hidden{display:none}";
|
|
@@ -8395,10 +11762,10 @@ class InlineLink {
|
|
|
8395
11762
|
__classPrivateFieldGet$k(this, _InlineLink_updateAriaLabelElements, "f").call(this);
|
|
8396
11763
|
}
|
|
8397
11764
|
render() {
|
|
8398
|
-
return (hAsync("a", { key: '
|
|
11765
|
+
return (hAsync("a", { key: '4d6e42864e8a486dd43e5d135235af25d056151c', "aria-hidden": "true", class: {
|
|
8399
11766
|
'qds-inline-link': true,
|
|
8400
11767
|
'qds-disabled': this.disabled,
|
|
8401
|
-
}, "data-importance": __classPrivateFieldGet$k(this, _InlineLink_instances, "a", _InlineLink_computedImportance_get), download: this.download, href: this.href?.toString(), hrefLang: this.hreflang, onBlur: __classPrivateFieldGet$k(this, _InlineLink_onBlur, "f"), onFocus: __classPrivateFieldGet$k(this, _InlineLink_onFocus, "f"), referrerPolicy: this.referrerPolicy, rel: this.rel, tabIndex: -1, target: this.target, ref: __classPrivateFieldGet$k(this, _InlineLink_linkRef, "f") }, this.iconName !== undefined && this.iconName !== '' && (hAsync("qds-icon", { key: '
|
|
11768
|
+
}, "data-importance": __classPrivateFieldGet$k(this, _InlineLink_instances, "a", _InlineLink_computedImportance_get), download: this.download, href: this.href?.toString(), hrefLang: this.hreflang, onBlur: __classPrivateFieldGet$k(this, _InlineLink_onBlur, "f"), onFocus: __classPrivateFieldGet$k(this, _InlineLink_onFocus, "f"), referrerPolicy: this.referrerPolicy, rel: this.rel, tabIndex: -1, target: this.target, ref: __classPrivateFieldGet$k(this, _InlineLink_linkRef, "f") }, this.iconName !== undefined && this.iconName !== '' && (hAsync("qds-icon", { key: '7fb6b02c0d0a84fa30084b03be1dc0a788f083d6', class: "qds-icon", library: this.iconLibrary, name: this.iconName })), hAsync("slot", { key: '46765b14f5cc8a8d63023799806a13cfa56e5594', onSlotchange: __classPrivateFieldGet$k(this, _InlineLink_onSlotchange, "f") }), this.linkIcon && (hAsync("qds-icon", { key: '66dccaf54ae9cbdd354d3d7d7cfced73aa0757ef', class: "qds-icon", library: "core", name: this.linkIcon }))));
|
|
8402
11769
|
}
|
|
8403
11770
|
get host() { return getElement(this); }
|
|
8404
11771
|
static get watchers() { return {
|
|
@@ -9452,7 +12819,7 @@ _ListItem_roText = new WeakMap(), _ListItem_roSubTitle = new WeakMap(), _ListIte
|
|
|
9452
12819
|
return this.hasSubmenuSlot;
|
|
9453
12820
|
};
|
|
9454
12821
|
|
|
9455
|
-
const loaderCss = ":host([hidden]){display:none!important}:host{display:inline-block}.qds-loader{border-radius:var(--qds-control-rounded-border-radius);box-sizing:border-box;color:var(--qds-theme-feedback-action-destructive-contrast)}[data-size=small]{height:var(--qds-feedback-loader-small-size);width:var(--qds-feedback-loader-small-size)}[data-size=small][data-status=loading]{padding:var(--qds-signature-circle-progress-small-border-width)}[data-size=standard]{height:var(--qds-feedback-loader-standard-size);width:var(--qds-feedback-loader-standard-size)}[data-size=standard][data-status=loading]{padding:var(--qds-signature-circle-progress-standard-border-width)}[data-size=large]{height:var(--qds-feedback-loader-large-size);width:var(--qds-feedback-loader-large-size)}[data-size=large][data-status=loading]{padding:var(--qds-signature-circle-progress-large-border-width)}[data-size=jumbo]{height:var(--qds-feedback-loader-jumbo-size);width:var(--qds-feedback-loader-jumbo-size)}[data-size=jumbo][data-status=loading]{padding:var(--qds-signature-circle-progress-jumbo-border-width)}[data-size=hero]{height:var(--qds-feedback-loader-hero-size);width:var(--qds-feedback-loader-hero-size)}[data-size=hero][data-status=loading]{padding:var(--qds-signature-circle-progress-hero-border-width)}[data-status=loading]{animation:
|
|
12822
|
+
const loaderCss = ":host([hidden]){display:none!important}:host{display:inline-block}.qds-loader{border-radius:var(--qds-control-rounded-border-radius);box-sizing:border-box;color:var(--qds-theme-feedback-action-destructive-contrast)}[data-size=small]{height:var(--qds-feedback-loader-small-size);width:var(--qds-feedback-loader-small-size)}[data-size=small][data-status=loading]{padding:var(--qds-signature-circle-progress-small-border-width)}[data-size=standard]{height:var(--qds-feedback-loader-standard-size);width:var(--qds-feedback-loader-standard-size)}[data-size=standard][data-status=loading]{padding:var(--qds-signature-circle-progress-standard-border-width)}[data-size=large]{height:var(--qds-feedback-loader-large-size);width:var(--qds-feedback-loader-large-size)}[data-size=large][data-status=loading]{padding:var(--qds-signature-circle-progress-large-border-width)}[data-size=jumbo]{height:var(--qds-feedback-loader-jumbo-size);width:var(--qds-feedback-loader-jumbo-size)}[data-size=jumbo][data-status=loading]{padding:var(--qds-signature-circle-progress-jumbo-border-width)}[data-size=hero]{height:var(--qds-feedback-loader-hero-size);width:var(--qds-feedback-loader-hero-size)}[data-size=hero][data-status=loading]{padding:var(--qds-signature-circle-progress-hero-border-width)}[data-status=loading]{animation:b 1s linear infinite;-webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);-webkit-mask-composite:xor;mask-composite:exclude}[data-status=loading][data-importance=standard]{background-image:var(--qds-theme-feedback-loader-standard-indeterminate)}[data-status=loading][data-importance=destructive]{background-image:var(\n --qds-theme-feedback-loader-destructive-indeterminate\n )}[data-status=loading][data-importance=informative]{background-image:var(\n --qds-theme-feedback-loader-informational-indeterminate\n )}[data-status=loading][data-importance=neutral-contrast]{background-image:var(\n --qds-theme-feedback-loader-neutral-contrast-indeterminate\n );border:var(--qds-theme-feedback-loader-neutral-contrast-indeterminate)}[data-status=loading][data-importance=neutral]{background-image:var(--qds-theme-feedback-loader-neutral-indeterminate);border:var(--qds-theme-feedback-loader-neutral-indeterminate)}@keyframes b{to{transform:rotate(1turn)}}[data-status=success]{color:var(--qds-theme-feedback-result-success)}[data-status=warning]{color:var(--qds-theme-feedback-result-partial-success)}[data-status=error]{color:var(--qds-theme-feedback-result-failure)}";
|
|
9456
12823
|
|
|
9457
12824
|
// SPDX-FileCopyrightText: © 2024 Schneider Electric
|
|
9458
12825
|
//
|
|
@@ -9722,13 +13089,13 @@ class MenuItem {
|
|
|
9722
13089
|
this.disabledChanged();
|
|
9723
13090
|
}
|
|
9724
13091
|
render() {
|
|
9725
|
-
return (hAsync("div", { key: '
|
|
13092
|
+
return (hAsync(Host, { key: '94fab787ba49682023cd431f7e950504326551f3' }, hAsync("div", { key: '5898e6dd09a737786cae1475075c7711b727e745', class: {
|
|
9726
13093
|
'qds-menu-item': true,
|
|
9727
13094
|
'qds-disabled': __classPrivateFieldGet$f(this, _MenuItem_instances, "a", _MenuItem_computedDisabled_get),
|
|
9728
|
-
'qds-has-submenu':
|
|
9729
|
-
}, ref: __classPrivateFieldGet$f(this, _MenuItem_menuitemDivRef, "f"), "data-size": __classPrivateFieldGet$f(this, _MenuItem_instances, "a", _MenuItem_computedSize_get), "aria-hidden": "true" }, hAsync("div", { key: '
|
|
13095
|
+
'qds-has-submenu': this.hasSubmenuSlot,
|
|
13096
|
+
}, ref: __classPrivateFieldGet$f(this, _MenuItem_menuitemDivRef, "f"), "data-size": __classPrivateFieldGet$f(this, _MenuItem_instances, "a", _MenuItem_computedSize_get), "aria-hidden": "true" }, hAsync("div", { key: 'bfde2e783fbadfbc7660cb9bc6669f6a10d01b9b', class: "qds-menu-item-container" }, __classPrivateFieldGet$f(this, _MenuItem_instances, "a", _MenuItem_computedCheckable_get) && !__classPrivateFieldGet$f(this, _MenuItem_instances, "a", _MenuItem_computedChecked_get) && (hAsync("span", { key: '47d50e7c467a85d38bf01a1a9e8df5d20ff199d3', class: "menu-item-checkable" })), __classPrivateFieldGet$f(this, _MenuItem_instances, "a", _MenuItem_computedChecked_get) && (hAsync("qds-icon", { key: '8587d0a41d9b28bff24a958867519614fca5b946', class: "qds-icon", library: "core", name: "checked" })), this.iconName !== undefined && this.iconName !== '' && (hAsync("qds-icon", { key: '868e2ee30ed621aabd5b74d82f3b5cb285c02f93', class: "qds-icon", library: this.iconLibrary, name: this.iconName })), hAsync("span", { key: '1b94825521d472ea868e13cfa0fcf6182a9ba429', class: "qds-text", ref: __classPrivateFieldGet$f(this, _MenuItem_spanRef, "f") }, this.text), this.shortcut !== undefined && this.shortcut !== '' && (hAsync("span", { key: '61814e224b5ff704e026ec71d567c1046efabb50', class: "qds-shortcut" }, this.shortcut)), __classPrivateFieldGet$f(this, _MenuItem_instances, "a", _MenuItem_hasSubmenu_get) && (hAsync("qds-icon", { key: '3e9e7339503e37d28aa985e69049ac43926e9c20', class: "qds-icon", library: "core", name: "navigation" })))), __classPrivateFieldGet$f(this, _MenuItem_instances, "a", _MenuItem_hasSubmenu_get) && (hAsync("qds-dropdown", { key: '8e405b850e32027ca6d34091d9c03004eba02239', class: "qds-accessory qds-related", target: __classPrivateFieldGet$f(this, _MenuItem_menuitemDivRef, "f"), ref: (element) => {
|
|
9730
13097
|
__classPrivateFieldSet$c(this, _MenuItem_submenuDropdown, element, "f");
|
|
9731
|
-
} }, hAsync("slot", { key: '
|
|
13098
|
+
} }, hAsync("slot", { key: 'f8b4ee3e548e644119221df8c25e359b506cb455' }))), this.tooltip && (hAsync("qds-tooltip", { key: '41606df09808260b8c738231beabe2ae085cd790', ref: __classPrivateFieldGet$f(this, _MenuItem_tooltipRef, "f") }, this.text))));
|
|
9732
13099
|
}
|
|
9733
13100
|
get host() { return getElement(this); }
|
|
9734
13101
|
static get watchers() { return {
|
|
@@ -9886,7 +13253,7 @@ class MiniButton {
|
|
|
9886
13253
|
}
|
|
9887
13254
|
render() {
|
|
9888
13255
|
const Tag = this.href === undefined ? 'button' : 'a';
|
|
9889
|
-
return (hAsync(Tag, { key: '
|
|
13256
|
+
return (hAsync(Tag, { key: '6e3160b5a060191493a8606ec52d707d2f3febbf', type: Tag === 'a' ? undefined : 'button', class: "qds-mini-button", href: Tag === 'a' ? this.href : undefined, rel: Tag === 'a' ? this.rel : undefined, disabled: __classPrivateFieldGet$e(this, _MiniButton_instances, "a", _MiniButton_computedDisabled_get), "aria-hidden": "true", onKeyDown: preventDefault, onKeyUp: preventDefault, onKeyPress: preventDefault, tabIndex: -1 }, hAsync("qds-icon", { key: '0955ab1d46f3b83a13e2e4aec20823bca8cf646a', class: "qds-icon", library: this.library, name: this.name })));
|
|
9890
13257
|
}
|
|
9891
13258
|
static get formAssociated() { return true; }
|
|
9892
13259
|
get host() { return getElement(this); }
|
|
@@ -9918,7 +13285,7 @@ _MiniButton_savedTabIndex = new WeakMap(), _MiniButton_instances = new WeakSet()
|
|
|
9918
13285
|
return this.disabled ?? false;
|
|
9919
13286
|
};
|
|
9920
13287
|
|
|
9921
|
-
const progressBarCss = ":host([hidden]){display:none!important}:host{display:block;width:100%}.qds-bar,.qds-track{overflow:hidden}.qds-track{background-color:var(--qds-theme-control-slider-track-background)}.qds-bar,.qds-track{border-radius:var(--qds-signature-line-progress-cap-radius)}.qds-bar{background-color:var(--qds-theme-signature-line-progress-determinate);transition:width .6s cubic-bezier(.83,0,.17,1)}@media (prefers-reduced-motion){.qds-bar{transition:none}}.qds-indeterminate{animation:
|
|
13288
|
+
const progressBarCss = ":host([hidden]){display:none!important}:host{display:block;width:100%}.qds-bar,.qds-track{overflow:hidden}.qds-track{background-color:var(--qds-theme-control-slider-track-background)}.qds-bar,.qds-track{border-radius:var(--qds-signature-line-progress-cap-radius)}.qds-bar{background-color:var(--qds-theme-signature-line-progress-determinate);transition:width .6s cubic-bezier(.83,0,.17,1)}@media (prefers-reduced-motion){.qds-bar{transition:none}}.qds-indeterminate{animation:a 2s linear infinite;background-color:initial;background-image:var(--qds-theme-signature-line-progress-indeterminate)}@keyframes a{0%{transform:translateX(-100%)}to{transform:translateX(200%)}}[data-size=small]{height:var(--qds-signature-line-progress-small-height)}[data-size=standard]{height:var(--qds-signature-line-progress-standard-height)}[data-size=large]{height:var(--qds-signature-line-progress-large-height)}";
|
|
9922
13289
|
|
|
9923
13290
|
// SPDX-FileCopyrightText: © 2024 Schneider Electric
|
|
9924
13291
|
//
|
|
@@ -10009,7 +13376,7 @@ class ProgressBar {
|
|
|
10009
13376
|
this.valueChanged();
|
|
10010
13377
|
}
|
|
10011
13378
|
render() {
|
|
10012
|
-
return (hAsync("div", { key: '
|
|
13379
|
+
return (hAsync("div", { key: 'd0a83e5f848c8fc01d53aaf37ecdac9775febc1e', "aria-hidden": "true", class: "qds-track", "data-size": __classPrivateFieldGet$d(this, _ProgressBar_instances, "a", _ProgressBar_computedSize_get) }, hAsync("div", { key: 'f4587958ddc5d5b4d74e84246f01ad0190701636', class: {
|
|
10013
13380
|
'qds-bar': true,
|
|
10014
13381
|
'qds-indeterminate': __classPrivateFieldGet$d(this, _ProgressBar_position, "f") === -1,
|
|
10015
13382
|
}, "data-size": __classPrivateFieldGet$d(this, _ProgressBar_instances, "a", _ProgressBar_computedSize_get), style: { width: this.width } })));
|
|
@@ -10209,7 +13576,7 @@ _QdsBreadcrumbItem_breadcrumbItem = new WeakMap(), _QdsBreadcrumbItem_ro = new W
|
|
|
10209
13576
|
return (hAsync("span", { class: "qds-overflow", ref: __classPrivateFieldGet$c(this, _QdsBreadcrumbItem_spanRef, "f") }, this.text));
|
|
10210
13577
|
};
|
|
10211
13578
|
|
|
10212
|
-
const radioCss = "[hidden].sc-qds-radio-h{display:none!important}.sc-qds-radio-h{display:inline-block;line-height:0}.qds-icon.sc-qds-radio,.qds-radio.sc-qds-radio{grid-area:
|
|
13579
|
+
const radioCss = "[hidden].sc-qds-radio-h{display:none!important}.sc-qds-radio-h{display:inline-block;line-height:0}.qds-icon.sc-qds-radio,.qds-radio.sc-qds-radio{grid-area:j;place-self:center}.qds-icon.sc-qds-radio{display:none;pointer-events:none}.qds-container.sc-qds-radio{display:grid;grid-template-areas:\"j\"}.qds-label.sc-qds-radio{align-items:flex-start;background-color:var(--qds-theme-interactive-background-default);border-radius:var(--qds-control-border-radius);box-sizing:border-box;cursor:pointer;display:inline-flex;justify-content:center;width:inherit}.qds-label.sc-qds-radio:hover{background-color:var(--qds-theme-interactive-background-hover)}.qds-label.sc-qds-radio:active{background-color:var(--qds-theme-interactive-background-pressed)}.qds-label.sc-qds-radio:has(.qds-radio:focus-visible){box-shadow:0 0 0 var(--qds-focus-heavy-border-width) var(--qds-theme-focus-border);outline:var(--qds-theme-focus-border-contrast) solid var(--qds-focus-light-border-width);outline-offset:0}.qds-label-inner.sc-qds-radio{color:var(--qds-theme-control-text-standard);display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;width:100%}.qds-required.sc-qds-radio{color:var(--qds-theme-feedback-field-required);-webkit-user-select:none;user-select:none}.qds-tooltip.sc-qds-radio{line-height:normal}.qds-radio.sc-qds-radio{-webkit-appearance:none;appearance:none;background-color:var(--qds-theme-interactive-background-default);border:var(--qds-control-border-width) solid var(--qds-theme-control-border);border-radius:var(--qds-control-rounded-border-radius);cursor:pointer;margin:0;padding:var(--qds-control-toggle-padding);-webkit-print-color-adjust:exact;print-color-adjust:exact}.qds-radio.sc-qds-radio:focus-visible{outline:none}.qds-radio.sc-qds-radio:checked~.qds-icon.sc-qds-radio{color:var(--qds-theme-control-background-default-contrast);display:block}[aria-disabled=true].sc-qds-radio{opacity:var(--qds-theme-disabled);pointer-events:none}.qds-radio[data-size=small].sc-qds-radio{height:var(--qds-control-toggle-small-box-size);width:var(--qds-control-toggle-small-box-size)}.qds-icon[data-size=small].sc-qds-radio{font-size:var(--qds-control-toggle-small-box-size)}.qds-label[data-size=small].sc-qds-radio{gap:var(--qds-control-small-gap-siblings-related);min-height:var(--qds-control-toggle-small-height);min-width:var(--qds-control-toggle-small-width);padding-block:var(--qds-control-no-inline-small-padding-vertical)}.qds-label-inner[data-size=small].sc-qds-radio{font:var(--qds-control-small-text)}.qds-inline[data-size=small].sc-qds-radio{min-height:var(--qds-control-small-height);padding:var(--qds-control-standard-padding-auto-height) var(--qds-control-toggle-standard-padding-horizontal)}.qds-radio[data-size=standard].sc-qds-radio{height:var(--qds-control-toggle-standard-box-size);width:var(--qds-control-toggle-standard-box-size)}.qds-icon[data-size=standard].sc-qds-radio{font-size:var(--qds-control-toggle-standard-box-size)}.qds-label[data-size=standard].sc-qds-radio{gap:var(--qds-control-standard-gap-siblings-related);min-height:var(--qds-control-toggle-standard-height);min-width:var(--qds-control-toggle-standard-width);padding-block:var(--qds-control-no-inline-standard-padding-vertical)}.qds-label-inner[data-size=standard].sc-qds-radio{font:var(--qds-control-standard-text)}.qds-inline[data-size=standard].sc-qds-radio{min-height:var(--qds-control-standard-height);padding:var(--qds-control-standard-padding-auto-height) var(--qds-control-toggle-standard-padding-horizontal)}.qds-radio[data-size=large].sc-qds-radio{height:var(--qds-control-toggle-large-box-size);width:var(--qds-control-toggle-large-box-size)}.qds-icon[data-size=large].sc-qds-radio{font-size:var(--qds-control-toggle-large-box-size)}.qds-label[data-size=large].sc-qds-radio{gap:var(--qds-control-large-gap-siblings-related);min-height:var(--qds-control-toggle-large-height);min-width:var(--qds-control-toggle-large-width);padding-block:var(--qds-control-no-inline-large-padding-vertical)}.qds-label-inner[data-size=large].sc-qds-radio{font:var(--qds-control-large-text)}.qds-inline[data-size=large].sc-qds-radio{min-height:var(--qds-control-large-height);padding:var(--qds-control-standard-padding-auto-height) var(--qds-control-toggle-standard-padding-horizontal)}";
|
|
10213
13580
|
|
|
10214
13581
|
// SPDX-FileCopyrightText: © 2024 Schneider Electric
|
|
10215
13582
|
//
|
|
@@ -10333,12 +13700,12 @@ class Radio {
|
|
|
10333
13700
|
render() {
|
|
10334
13701
|
return (
|
|
10335
13702
|
// eslint-disable-next-line jsx-a11y/label-has-associated-control
|
|
10336
|
-
hAsync("label", { key: '
|
|
13703
|
+
hAsync("label", { key: 'c6a4f7981a33ef3d05e0814b47108bc14504b452', "aria-disabled": __classPrivateFieldGet$b(this, _Radio_instances, "a", _Radio_computedDisabled_get) ? 'true' : undefined, class: {
|
|
10337
13704
|
'qds-inline': this.inline,
|
|
10338
13705
|
'qds-label': true,
|
|
10339
|
-
}, "data-size": __classPrivateFieldGet$b(this, _Radio_instances, "a", _Radio_computedSize_get) }, hAsync("div", { key: '
|
|
13706
|
+
}, "data-size": __classPrivateFieldGet$b(this, _Radio_instances, "a", _Radio_computedSize_get) }, hAsync("div", { key: '00e98edbdb99c910d08d97e6ee4d0ebcbb8160ef', class: "qds-container" }, hAsync("input", { key: '71cf4b4dfb8775d241cc34ed9ae8a16d52bbbb90',
|
|
10340
13707
|
// eslint-disable-next-line jsx-a11y/no-autofocus
|
|
10341
|
-
autoFocus: this.host.autofocus, checked: this.checked, class: "qds-radio", "data-size": __classPrivateFieldGet$b(this, _Radio_instances, "a", _Radio_computedSize_get), disabled: this.disabled, form: this.form, name: this.name, onBlur: __classPrivateFieldGet$b(this, _Radio_onBlur, "f"), onChange: __classPrivateFieldGet$b(this, _Radio_onChange, "f"), onFocus: __classPrivateFieldGet$b(this, _Radio_onFocus, "f"), ref: __classPrivateFieldGet$b(this, _Radio_ref, "f"), required: this.required, tabIndex: __classPrivateFieldGet$b(this, _Radio_instances, "a", _Radio_computedDisabled_get) ? undefined : this.tabIndex, type: "radio", value: this.value ?? undefined, ...__classPrivateFieldGet$b(this, _Radio_inheritedAttributes, "f") }), hAsync("qds-icon", { key: '
|
|
13708
|
+
autoFocus: this.host.autofocus, checked: this.checked, class: "qds-radio", "data-size": __classPrivateFieldGet$b(this, _Radio_instances, "a", _Radio_computedSize_get), disabled: this.disabled, form: this.form, name: this.name, onBlur: __classPrivateFieldGet$b(this, _Radio_onBlur, "f"), onChange: __classPrivateFieldGet$b(this, _Radio_onChange, "f"), onFocus: __classPrivateFieldGet$b(this, _Radio_onFocus, "f"), ref: __classPrivateFieldGet$b(this, _Radio_ref, "f"), required: this.required, tabIndex: __classPrivateFieldGet$b(this, _Radio_instances, "a", _Radio_computedDisabled_get) ? undefined : this.tabIndex, type: "radio", value: this.value ?? undefined, ...__classPrivateFieldGet$b(this, _Radio_inheritedAttributes, "f") }), hAsync("qds-icon", { key: 'd1bfbe88ec468691222dd8a55383a20e592e3be5', class: "qds-icon", "data-size": __classPrivateFieldGet$b(this, _Radio_instances, "a", _Radio_computedSize_get), library: "core", name: "checked-radio" })), __classPrivateFieldGet$b(this, _Radio_instances, "a", _Radio_hasText_get) && (hAsync("span", { key: '4d3e5c89fe9a0e644c2d9c969e25e9e0d4079b54', class: "qds-label-inner", "data-size": __classPrivateFieldGet$b(this, _Radio_instances, "a", _Radio_computedSize_get), ref: __classPrivateFieldGet$b(this, _Radio_spanRef, "f") }, this.required === true && hAsync("span", { key: '760e819e66465518f10564368ce35fabf6ce43f8', class: "qds-required" }, "*"), this.text)), this.tooltip && (hAsync("qds-tooltip", { key: 'cee7b2893f711d01b599348bf8e16178aefb3e0a', "aria-hidden": "true", class: "qds-tooltip", ref: __classPrivateFieldGet$b(this, _Radio_tooltipRef, "f") }, this.text))));
|
|
10342
13709
|
}
|
|
10343
13710
|
get host() { return getElement(this); }
|
|
10344
13711
|
static get watchers() { return {
|
|
@@ -10384,7 +13751,7 @@ _Radio_inheritedAttributes = new WeakMap(), _Radio_input = new WeakMap(), _Radio
|
|
|
10384
13751
|
return this.text !== undefined && this.text !== '';
|
|
10385
13752
|
};
|
|
10386
13753
|
|
|
10387
|
-
const selectCss = ":host([hidden]){display:none!important}:host{display:inline-block}slot{display:none}.qds-container{box-sizing:border-box;display:grid;grid-template-areas:\"
|
|
13754
|
+
const selectCss = ":host([hidden]){display:none!important}:host{display:inline-block}slot{display:none}.qds-container{box-sizing:border-box;display:grid;grid-template-areas:\"e\"}.qds-container,.qds-select{width:inherit}.qds-icon,.qds-select{color:var(--qds-theme-form-input-text-active);grid-area:e}.qds-icon{place-self:center end;pointer-events:none}.qds-select{-webkit-appearance:none;appearance:none;background-color:var(--qds-theme-form-input-background-default);border-color:var(--qds-theme-form-input-border-default);border-radius:var(\n --qds-form-input-border-radius-top-left,var(--qds-form-input-border-radius)\n ) var(\n --qds-form-input-border-radius-top-right,var(--qds-form-input-border-radius)\n ) var(\n --qds-form-input-border-radius-bottom-right,var(--qds-form-input-border-radius)\n ) var(\n --qds-form-input-border-radius-bottom-left,var(--qds-form-input-border-radius)\n );border-style:solid;border-width:var(--qds-form-input-border-width-default) var(\n --qds-form-input-border-width-inline-end,var(--qds-form-input-border-width-default)\n ) var(\n --qds-form-input-border-width-block-end,var(--qds-form-input-border-width-default)\n ) var(--qds-form-input-border-width-default);margin:0;outline:0;padding-block:0;text-overflow:ellipsis}.qds-select:enabled:hover{background-color:var(--qds-theme-form-input-background-hover);border-color:var(--qds-theme-form-input-border-hover)}.qds-select:enabled:active{background-color:var(--qds-theme-form-input-background-active);color:var(--qds-theme-form-input-text-active)}.qds-select:not(:focus):user-invalid{border-color:var(--qds-theme-feedback-result-failure)}.qds-select[data-status]{border-width:var(--qds-form-input-border-width-status) var(\n --qds-form-input-border-width-inline-end,var(--qds-form-input-border-width-status)\n ) var(\n --qds-form-input-border-width-block-end,var(--qds-form-input-border-width-status)\n ) var(--qds-form-input-border-width-status)}.qds-select[data-status=success]{border-color:var(--qds-theme-form-input-border-success)}.qds-select[data-status=warning]{border-color:var(--qds-theme-form-input-border-warning)}.qds-select :not(:focus):user-invalid,.qds-select[data-status=error]{border-color:var(--qds-theme-form-input-border-error)}.qds-select:disabled,.qds-select:disabled+.qds-icon{opacity:var(--qds-theme-disabled)}:is(::slotted(optgroup),::slotted(optgroup:not(:disabled)>option),::slotted(option)):disabled{opacity:var(--qds-theme-disabled)}::slotted(optgroup){font:var(--qds-accessory-section-title)}::slotted(optgroup>option),::slotted(option){font:var(--qds-list-item-label-main)}.qds-select[data-size=small]{font:var(--qds-form-small-text);padding-inline:var(--qds-form-input-small-padding-start) var(--qds-form-input-small-padding-end)}.qds-select[data-size=small]:not([multiple]){min-height:var(--qds-form-input-small-height);padding-inline-end:calc(var(--qds-control-small-icon-size) + var(--qds-form-input-small-gap-internal) + var(--qds-form-input-small-padding-end))}.qds-icon[data-size=small]{height:var(--qds-control-small-icon-size);margin-inline-end:calc(var(--qds-form-input-small-padding-end) + var(--qds-form-input-border-width-default));width:var(--qds-control-small-icon-size)}.qds-select[data-size=standard]{font:var(--qds-form-standard-text);padding-inline:var(--qds-form-input-standard-padding-start) var(--qds-form-input-standard-padding-end)}.qds-select[data-size=standard]:not([multiple]){min-height:var(--qds-form-input-standard-height);padding-inline-end:calc(var(--qds-control-standard-icon-size) + var(--qds-form-input-standard-gap-internal) + var(--qds-form-input-standard-padding-end))}.qds-icon[data-size=standard]{height:var(--qds-control-standard-icon-size);margin-inline-end:calc(var(--qds-form-input-standard-padding-end) + var(--qds-form-input-border-width-default));width:var(--qds-control-standard-icon-size)}.qds-select[data-size=large]{font:var(--qds-form-large-text);padding-inline:var(--qds-form-input-large-padding-start) var(--qds-form-input-large-padding-end)}.qds-select[data-size=large]:not([multiple]){min-height:var(--qds-form-input-large-height);padding-inline-end:calc(var(--qds-control-large-icon-size) + var(--qds-form-input-large-gap-internal) + var(--qds-form-input-large-padding-end))}.qds-icon[data-size=large]{height:var(--qds-control-large-icon-size);margin-inline-end:calc(var(--qds-form-input-large-padding-end) + var(--qds-form-input-border-width-default));width:var(--qds-control-large-icon-size)}.qds-focus-ring{border-radius:max(1px,var(\n --qds-form-input-border-radius-top-left,var(--qds-form-input-border-radius)\n )) max(1px,var(\n --qds-form-input-border-radius-top-right,var(--qds-form-input-border-radius)\n )) max(1px,var(\n --qds-form-input-border-radius-bottom-right,var(--qds-form-input-border-radius)\n )) max(1px,var(\n --qds-form-input-border-radius-bottom-left,var(--qds-form-input-border-radius)\n ));box-shadow:0 0 0 var(--qds-focus-heavy-border-width) var(--qds-theme-focus-border);grid-area:e;height:calc(100% + var(--qds-form-input-border-width-default) - var(\n --qds-form-input-border-width-block-end,\n var(--qds-form-input-border-width-default)\n ));isolation:isolate;outline:var(--qds-theme-focus-border-contrast) solid var(--qds-focus-light-border-width);outline-offset:0;pointer-events:none;visibility:hidden;width:calc(100% + var(--qds-form-input-border-width-default) - var(\n --qds-form-input-border-width-inline-end,\n var(--qds-form-input-border-width-default)\n ))}.qds-select:focus-visible~.qds-focus-ring{visibility:visible}";
|
|
10388
13755
|
|
|
10389
13756
|
// SPDX-FileCopyrightText: © 2024 Schneider Electric
|
|
10390
13757
|
//
|
|
@@ -10531,15 +13898,6 @@ class Select {
|
|
|
10531
13898
|
* @webnative
|
|
10532
13899
|
*/
|
|
10533
13900
|
this.validity = VALID_STATE;
|
|
10534
|
-
/**
|
|
10535
|
-
* The `value` property of the first selected [`<option>`][] element, or the
|
|
10536
|
-
* empty string if no options are selected.
|
|
10537
|
-
*
|
|
10538
|
-
* [`<option>`]: https://developer.mozilla.org/docs/Web/HTML/Element/option
|
|
10539
|
-
*
|
|
10540
|
-
* @webnative
|
|
10541
|
-
*/
|
|
10542
|
-
this.value = '';
|
|
10543
13901
|
/**
|
|
10544
13902
|
* True if `<qds-select>` will be validated when the form is submitted;
|
|
10545
13903
|
* false otherwise.
|
|
@@ -10598,6 +13956,7 @@ class Select {
|
|
|
10598
13956
|
const { currentTarget } = event;
|
|
10599
13957
|
invariant(currentTarget instanceof HTMLSlotElement);
|
|
10600
13958
|
__classPrivateFieldGet$a(this, _Select_select, "f").replaceChildren(...currentTarget.assignedNodes().map((node) => node.cloneNode(true)));
|
|
13959
|
+
this.validationChanged();
|
|
10601
13960
|
});
|
|
10602
13961
|
}
|
|
10603
13962
|
onClick(event) {
|
|
@@ -10622,8 +13981,12 @@ class Select {
|
|
|
10622
13981
|
}
|
|
10623
13982
|
validationChanged() {
|
|
10624
13983
|
invariant(__classPrivateFieldGet$a(this, _Select_select, "f"));
|
|
10625
|
-
|
|
13984
|
+
if (this.value !== undefined)
|
|
13985
|
+
__classPrivateFieldGet$a(this, _Select_select, "f").value = __classPrivateFieldGet$a(this, _Select_instances, "a", _Select_computedValue_get);
|
|
13986
|
+
this.value = __classPrivateFieldGet$a(this, _Select_select, "f").value;
|
|
13987
|
+
this.selectedIndex = __classPrivateFieldGet$a(this, _Select_select, "f").selectedIndex;
|
|
10626
13988
|
__classPrivateFieldGet$a(this, _Select_select, "f").required = this.required ?? false;
|
|
13989
|
+
this.disabledChanged();
|
|
10627
13990
|
const { valid } = __classPrivateFieldGet$a(this, _Select_select, "f").validity;
|
|
10628
13991
|
if (valid)
|
|
10629
13992
|
this.internals.setValidity(NO_ERROR_FLAGS, undefined, __classPrivateFieldGet$a(this, _Select_select, "f"));
|
|
@@ -10652,12 +14015,12 @@ class Select {
|
|
|
10652
14015
|
this.selectedIndex = __classPrivateFieldGet$a(this, _Select_select, "f").selectedIndex;
|
|
10653
14016
|
}
|
|
10654
14017
|
render() {
|
|
10655
|
-
return (hAsync("div", { key: '
|
|
14018
|
+
return (hAsync("div", { key: '7a9297b07a305a3d19c9cc79a712eef097e9b6bb', class: {
|
|
10656
14019
|
'qds-container': true,
|
|
10657
14020
|
'qds-multiple': this.multiple ?? false,
|
|
10658
|
-
}, "data-size": __classPrivateFieldGet$a(this, _Select_instances, "a", _Select_computedSize_get) }, hAsync("select", { key: '
|
|
14021
|
+
}, "data-size": __classPrivateFieldGet$a(this, _Select_instances, "a", _Select_computedSize_get) }, hAsync("select", { key: '25c1ae87c178869e8c9a3141882174a1d6569600', autoComplete: this.autoComplete,
|
|
10659
14022
|
// eslint-disable-next-line jsx-a11y/no-autofocus
|
|
10660
|
-
autoFocus: this.host.autofocus, class: "qds-select", "data-size": __classPrivateFieldGet$a(this, _Select_instances, "a", _Select_computedSize_get), "data-status": __classPrivateFieldGet$a(this, _Select_instances, "a", _Select_computedStatus_get), disabled: __classPrivateFieldGet$a(this, _Select_instances, "a", _Select_computedDisabled_get), multiple: this.multiple, name: this.name, onBlur: __classPrivateFieldGet$a(this, _Select_onBlur, "f"), onChange: __classPrivateFieldGet$a(this, _Select_onChange, "f"), onFocus: __classPrivateFieldGet$a(this, _Select_onFocus, "f"), onInput: __classPrivateFieldGet$a(this, _Select_onInput, "f"), ref: __classPrivateFieldGet$a(this, _Select_ref, "f"), required: this.required, tabIndex: __classPrivateFieldGet$a(this, _Select_instances, "a", _Select_computedDisabled_get) ? undefined : this.tabIndex, ...__classPrivateFieldGet$a(this, _Select_inheritedAttributes, "f") }), this.multiple !== true && (hAsync("qds-icon", { key: '
|
|
14023
|
+
autoFocus: this.host.autofocus, class: "qds-select", "data-size": __classPrivateFieldGet$a(this, _Select_instances, "a", _Select_computedSize_get), "data-status": __classPrivateFieldGet$a(this, _Select_instances, "a", _Select_computedStatus_get), disabled: __classPrivateFieldGet$a(this, _Select_instances, "a", _Select_computedDisabled_get), multiple: this.multiple, name: this.name, onBlur: __classPrivateFieldGet$a(this, _Select_onBlur, "f"), onChange: __classPrivateFieldGet$a(this, _Select_onChange, "f"), onFocus: __classPrivateFieldGet$a(this, _Select_onFocus, "f"), onInput: __classPrivateFieldGet$a(this, _Select_onInput, "f"), ref: __classPrivateFieldGet$a(this, _Select_ref, "f"), required: this.required, tabIndex: __classPrivateFieldGet$a(this, _Select_instances, "a", _Select_computedDisabled_get) ? undefined : this.tabIndex, ...__classPrivateFieldGet$a(this, _Select_inheritedAttributes, "f") }), this.multiple !== true && (hAsync("qds-icon", { key: '63769c2ba7f15e3c144ca5b0ed6e96f4b33fb625', class: "qds-icon", "data-size": __classPrivateFieldGet$a(this, _Select_instances, "a", _Select_computedSize_get), library: "core", name: "dropdown" })), hAsync("slot", { key: '40eaccc18cc5315c85f85339a487d19a756639f2', onSlotchange: __classPrivateFieldGet$a(this, _Select_onSlotchange, "f") }), hAsync("div", { key: '83928c2385e9833a8a809c897f94f9a1ecd97827', class: "qds-focus-ring" })));
|
|
10661
14024
|
}
|
|
10662
14025
|
static get delegatesFocus() { return true; }
|
|
10663
14026
|
static get formAssociated() { return true; }
|
|
@@ -10868,11 +14231,11 @@ class StandaloneLink {
|
|
|
10868
14231
|
__classPrivateFieldGet$9(this, _StandaloneLink_updateAriaLabelElements, "f").call(this);
|
|
10869
14232
|
}
|
|
10870
14233
|
render() {
|
|
10871
|
-
return (hAsync("a", { key: '
|
|
14234
|
+
return (hAsync("a", { key: 'c7361224863830eb76e9e4f3e6e22613ee03461f', "aria-hidden": "true", class: {
|
|
10872
14235
|
'qds-standalone-link': true,
|
|
10873
14236
|
'qds-disabled': this.disabled,
|
|
10874
14237
|
'qds-visitable': this.visitable,
|
|
10875
|
-
}, "data-importance": __classPrivateFieldGet$9(this, _StandaloneLink_instances, "a", _StandaloneLink_computedImportance_get), "data-size": __classPrivateFieldGet$9(this, _StandaloneLink_instances, "a", _StandaloneLink_computedSize_get), download: this.download, href: this.href?.toString(), hrefLang: this.hreflang, onBlur: __classPrivateFieldGet$9(this, _StandaloneLink_onBlur, "f"), onFocus: __classPrivateFieldGet$9(this, _StandaloneLink_onFocus, "f"), referrerPolicy: this.referrerPolicy, rel: this.rel, tabIndex: -1, target: this.target, ref: __classPrivateFieldGet$9(this, _StandaloneLink_linkRef, "f") }, this.iconName !== undefined && this.iconName !== '' && (hAsync("span", { key: '
|
|
14238
|
+
}, "data-importance": __classPrivateFieldGet$9(this, _StandaloneLink_instances, "a", _StandaloneLink_computedImportance_get), "data-size": __classPrivateFieldGet$9(this, _StandaloneLink_instances, "a", _StandaloneLink_computedSize_get), download: this.download, href: this.href?.toString(), hrefLang: this.hreflang, onBlur: __classPrivateFieldGet$9(this, _StandaloneLink_onBlur, "f"), onFocus: __classPrivateFieldGet$9(this, _StandaloneLink_onFocus, "f"), referrerPolicy: this.referrerPolicy, rel: this.rel, tabIndex: -1, target: this.target, ref: __classPrivateFieldGet$9(this, _StandaloneLink_linkRef, "f") }, this.iconName !== undefined && this.iconName !== '' && (hAsync("span", { key: '813d7a043dc50fb5b9c416018dfcf433eafeabee', class: "qds-icon-crop", "data-size": __classPrivateFieldGet$9(this, _StandaloneLink_instances, "a", _StandaloneLink_computedSize_get) }, hAsync("qds-icon", { key: '9b468450422ec629bf2451f9dd4d05b84d58acb7', class: "qds-icon", "data-size": __classPrivateFieldGet$9(this, _StandaloneLink_instances, "a", _StandaloneLink_computedSize_get), library: this.iconLibrary, name: this.iconName }))), hAsync("span", { key: '4520786089170db381684ece381f2b9a4a0c2dc8', class: "qds-text" }, hAsync("slot", { key: 'ba6ed52c1c2f31149d895c4abfc86f081335b948', onSlotchange: __classPrivateFieldGet$9(this, _StandaloneLink_onSlotchange, "f") })), this.linkIcon && (hAsync("span", { key: 'f650779cb6cc825a7ccaaf6abd80b6945fa3937b', class: "qds-icon-crop", "data-size": __classPrivateFieldGet$9(this, _StandaloneLink_instances, "a", _StandaloneLink_computedSize_get) }, hAsync("qds-icon", { key: '59eeff3ad01092077fd0e3530287925176f67652', class: "qds-icon", library: "core", "data-size": __classPrivateFieldGet$9(this, _StandaloneLink_instances, "a", _StandaloneLink_computedSize_get), name: this.linkIcon }))), this.importance === 'emphasized' && (hAsync("span", { key: '22cf2e18bde548254f9ecc57a173fbc50db17e1e', class: "qds-icon-crop", "data-size": __classPrivateFieldGet$9(this, _StandaloneLink_instances, "a", _StandaloneLink_computedSize_get) }, hAsync("qds-icon", { key: 'd303a2a3d96ea7e5090fae363428ff7c49d40a37', class: "qds-icon", "data-size": __classPrivateFieldGet$9(this, _StandaloneLink_instances, "a", _StandaloneLink_computedSize_get), library: "core", name: "next" })))));
|
|
10876
14239
|
}
|
|
10877
14240
|
get host() { return getElement(this); }
|
|
10878
14241
|
static get watchers() { return {
|
|
@@ -10930,7 +14293,7 @@ _StandaloneLink_savedTabIndex = new WeakMap(), _StandaloneLink_link = new WeakMa
|
|
|
10930
14293
|
return this.target === '_blank';
|
|
10931
14294
|
};
|
|
10932
14295
|
|
|
10933
|
-
const switchCss = ":host([hidden]){display:none!important}:host{display:inline-block;outline:none}.qds-knob,.qds-track{-webkit-print-color-adjust:exact;print-color-adjust:exact}.qds-track{align-items:center;background-color:var(--qds-theme-control-toggle-track-default);border-radius:var(--qds-control-rounded-border-radius);box-sizing:border-box;display:flex;flex-shrink:0;padding-inline:var(--qds-control-toggle-track-padding)}.qds-track:hover{background-color:var(--qds-theme-control-toggle-track-hover)}.qds-track:active{background-color:var(--qds-theme-control-toggle-track-pressed)}.qds-knob-container{align-items:center;align-self:stretch;display:flex;flex-direction:column;flex-shrink:0;justify-content:center;padding-block:var(--qds-control-toggle-track-padding)}.qds-knob{background-color:var(--qds-theme-control-background);border-radius:var(--qds-control-rounded-border-radius);box-sizing:border-box;height:100%;margin:0}.qds-indicator{color:var(--qds-theme-control-background);flex-grow:1;justify-content:center;padding-block:var(--qds-control-toggle-track-padding)}.qds-container,.qds-indicator{align-items:center;display:flex}.qds-container{box-sizing:border-box;cursor:pointer}.qds-switch{clip-path:inset(50%);height:1px;margin:0;position:absolute;white-space:nowrap;width:1px}.qds-switch:checked~.qds-track{background-color:var(--qds-theme-signature-color-default);justify-content:flex-end}.qds-switch:checked~.qds-track:hover{background-color:var(--qds-theme-signature-color-hover)}.qds-switch:checked~.qds-track:active{background-color:var(--qds-theme-signature-color-pressed)}:host(:focus-visible) .qds-switch~.qds-track{box-shadow:0 0 0 var(--qds-focus-heavy-border-width) var(--qds-theme-focus-border);outline:var(--qds-theme-focus-border-contrast) solid var(--qds-focus-light-border-width);outline-offset:0}.qds-disabled{opacity:var(--qds-theme-disabled);pointer-events:none}.qds-container[data-size=small]{min-height:var(--qds-control-toggle-small-height)}.qds-inline[data-size=small]{min-height:var(--qds-control-small-height);padding-block:var(--qds-control-small-padding-auto-height)}.qds-track[data-size=small]{height:var(--qds-control-toggle-small-track-height);width:var(--qds-control-toggle-small-track-width)}.qds-knob[data-size=small]{width:var(--qds-control-toggle-small-knob-width)}.qds-indicator[data-size=small]{height:var(--qds-control-small-icon-size);width:var(--qds-control-small-icon-size)}.qds-container[data-size=standard]{min-height:var(--qds-control-toggle-standard-height)}.qds-inline[data-size=standard]{min-height:var(--qds-control-standard-height);padding-block:var(--qds-control-standard-padding-auto-height)}.qds-track[data-size=standard]{height:var(--qds-control-toggle-standard-track-height);width:var(--qds-control-toggle-standard-track-width)}.qds-knob[data-size=standard]{width:var(--qds-control-toggle-standard-knob-width)}.qds-indicator[data-size=standard]{height:var(--qds-control-standard-icon-size);width:var(--qds-control-standard-icon-size)}.qds-container[data-size=large]{min-height:var(--qds-control-toggle-large-height)}.qds-inline[data-size=large]{min-height:var(--qds-control-large-height);padding-block:var(--qds-control-large-padding-auto-height)}.qds-track[data-size=large]{height:var(--qds-control-toggle-large-track-height);width:var(--qds-control-toggle-large-track-width)}.qds-knob[data-size=large]{width:var(--qds-control-toggle-large-knob-width)}.qds-indicator[data-size=large]{height:var(--qds-control-large-icon-size);width:var(--qds-control-large-icon-size)}";
|
|
14296
|
+
const switchCss = ":host([hidden]){display:none!important}:host{display:inline-block;outline:none}.qds-knob,.qds-track{-webkit-print-color-adjust:exact;print-color-adjust:exact}.qds-track{align-items:center;background-color:var(--qds-theme-control-toggle-track-default);border-radius:var(--qds-control-rounded-border-radius);box-sizing:border-box;display:flex;flex-shrink:0;padding-inline:var(--qds-control-toggle-track-padding)}.qds-track:hover{background-color:var(--qds-theme-control-toggle-track-hover)}.qds-track:active{background-color:var(--qds-theme-control-toggle-track-pressed)}.qds-knob-container{align-items:center;align-self:stretch;display:flex;flex-direction:column;flex-shrink:0;justify-content:center;padding-block:var(--qds-control-toggle-track-padding)}.qds-knob{background-color:var(--qds-theme-control-background-default);border-radius:var(--qds-control-rounded-border-radius);box-sizing:border-box;height:100%;margin:0}.qds-indicator{color:var(--qds-theme-control-background-default);flex-grow:1;justify-content:center;padding-block:var(--qds-control-toggle-track-padding)}.qds-container,.qds-indicator{align-items:center;display:flex}.qds-container{box-sizing:border-box;cursor:pointer}.qds-switch{clip-path:inset(50%);height:1px;margin:0;position:absolute;white-space:nowrap;width:1px}.qds-switch:checked~.qds-track{background-color:var(--qds-theme-signature-color-default);justify-content:flex-end}.qds-switch:checked~.qds-track:hover{background-color:var(--qds-theme-signature-color-hover)}.qds-switch:checked~.qds-track:active{background-color:var(--qds-theme-signature-color-pressed)}:host(:focus-visible) .qds-switch~.qds-track{box-shadow:0 0 0 var(--qds-focus-heavy-border-width) var(--qds-theme-focus-border);outline:var(--qds-theme-focus-border-contrast) solid var(--qds-focus-light-border-width);outline-offset:0}.qds-disabled{opacity:var(--qds-theme-disabled);pointer-events:none}.qds-container[data-size=small]{min-height:var(--qds-control-toggle-small-height)}.qds-inline[data-size=small]{min-height:var(--qds-control-small-height);padding-block:var(--qds-control-small-padding-auto-height)}.qds-track[data-size=small]{height:var(--qds-control-toggle-small-track-height);width:var(--qds-control-toggle-small-track-width)}.qds-knob[data-size=small]{width:var(--qds-control-toggle-small-knob-width)}.qds-indicator[data-size=small]{height:var(--qds-control-small-icon-size);width:var(--qds-control-small-icon-size)}.qds-container[data-size=standard]{min-height:var(--qds-control-toggle-standard-height)}.qds-inline[data-size=standard]{min-height:var(--qds-control-standard-height);padding-block:var(--qds-control-standard-padding-auto-height)}.qds-track[data-size=standard]{height:var(--qds-control-toggle-standard-track-height);width:var(--qds-control-toggle-standard-track-width)}.qds-knob[data-size=standard]{width:var(--qds-control-toggle-standard-knob-width)}.qds-indicator[data-size=standard]{height:var(--qds-control-standard-icon-size);width:var(--qds-control-standard-icon-size)}.qds-container[data-size=large]{min-height:var(--qds-control-toggle-large-height)}.qds-inline[data-size=large]{min-height:var(--qds-control-large-height);padding-block:var(--qds-control-large-padding-auto-height)}.qds-track[data-size=large]{height:var(--qds-control-toggle-large-track-height);width:var(--qds-control-toggle-large-track-width)}.qds-knob[data-size=large]{width:var(--qds-control-toggle-large-knob-width)}.qds-indicator[data-size=large]{height:var(--qds-control-large-icon-size);width:var(--qds-control-large-icon-size)}";
|
|
10934
14297
|
|
|
10935
14298
|
// SPDX-FileCopyrightText: © 2024 Schneider Electric
|
|
10936
14299
|
//
|
|
@@ -11107,13 +14470,13 @@ class Switch {
|
|
|
11107
14470
|
this.tabindexChanged(this.host.getAttribute('tabindex') ?? '0');
|
|
11108
14471
|
}
|
|
11109
14472
|
render() {
|
|
11110
|
-
return (hAsync("div", { key: '
|
|
14473
|
+
return (hAsync("div", { key: '69473383ea9bfae7b8eff0e596b1dae33f616d7e', class: {
|
|
11111
14474
|
'qds-container': true,
|
|
11112
14475
|
'qds-disabled': __classPrivateFieldGet$8(this, _Switch_instances, "a", _Switch_computedDisabled_get),
|
|
11113
14476
|
'qds-inline': this.inline,
|
|
11114
|
-
}, "data-size": __classPrivateFieldGet$8(this, _Switch_instances, "a", _Switch_computedSize_get), "aria-hidden": "true" }, hAsync("input", { key: '
|
|
14477
|
+
}, "data-size": __classPrivateFieldGet$8(this, _Switch_instances, "a", _Switch_computedSize_get), "aria-hidden": "true" }, hAsync("input", { key: '261347f73aabdfb8e242de71f06f0caaa2d77602', "aria-hidden": "true",
|
|
11115
14478
|
// eslint-disable-next-line jsx-a11y/no-autofocus
|
|
11116
|
-
autoFocus: this.host.autofocus, checked: this.checked, class: "qds-switch", disabled: this.disabled, type: "checkbox", value: this.value ?? undefined, tabIndex: -1 }), hAsync("div", { key: '
|
|
14479
|
+
autoFocus: this.host.autofocus, checked: this.checked, class: "qds-switch", disabled: this.disabled, type: "checkbox", value: this.value ?? undefined, tabIndex: -1 }), hAsync("div", { key: 'dcc61a99fe81c9955fe1181c8caccc926a64beed', class: "qds-track", "data-size": __classPrivateFieldGet$8(this, _Switch_instances, "a", _Switch_computedSize_get) }, !this.noIndicator && __classPrivateFieldGet$8(this, _Switch_instances, "a", _Switch_computedChecked_get) && (hAsync("div", { key: 'bb1eccc9cee7c5de4813b091af95042cedaff0e7', class: "qds-indicator", "data-size": __classPrivateFieldGet$8(this, _Switch_instances, "a", _Switch_computedSize_get) }, hAsync("qds-icon", { key: '908c9bcc4a7349e62e4a406f56324ef17c6c40a7', class: "qds-icon", name: "toggle-on", library: "core" }))), hAsync("div", { key: 'f43b2d2194a39d0938326f5692c58f18277d329f', class: "qds-knob-container" }, hAsync("div", { key: 'ae4d9084c244cfaa3e9ba64f9821e43eeff21454', class: "qds-knob", "data-size": __classPrivateFieldGet$8(this, _Switch_instances, "a", _Switch_computedSize_get) })), !this.noIndicator && !__classPrivateFieldGet$8(this, _Switch_instances, "a", _Switch_computedChecked_get) && (hAsync("div", { key: '2026916fd0830f64df366d158a18bea4981b1ee8', class: "qds-indicator", "data-size": __classPrivateFieldGet$8(this, _Switch_instances, "a", _Switch_computedSize_get) }, hAsync("qds-icon", { key: '741394f26ded7b4e41a8754d60afd64264336776', class: "qds-icon", name: "toggle-off", library: "core" }))))));
|
|
11117
14480
|
}
|
|
11118
14481
|
static get formAssociated() { return true; }
|
|
11119
14482
|
get host() { return getElement(this); }
|
|
@@ -11357,11 +14720,11 @@ class Tab {
|
|
|
11357
14720
|
: __classPrivateFieldGet$7(this, _Tab_instances, "a", _Tab_computedAction_get) === 'expandable'
|
|
11358
14721
|
? 'button'
|
|
11359
14722
|
: 'div';
|
|
11360
|
-
return (hAsync("div", { key: '
|
|
14723
|
+
return (hAsync("div", { key: 'dc2f96265bdb8f4531e83dda12ea32635d78b7da', "aria-disabled": __classPrivateFieldGet$7(this, _Tab_instances, "a", _Tab_computedDisabled_get) ? 'true' : undefined, class: {
|
|
11361
14724
|
'qds-closable-wrapper': __classPrivateFieldGet$7(this, _Tab_instances, "a", _Tab_computedAction_get) === 'closable',
|
|
11362
14725
|
'qds-selected': this.selected,
|
|
11363
14726
|
[`qds-indicator-${this.indicatorPosition}`]: __classPrivateFieldGet$7(this, _Tab_instances, "a", _Tab_computedAction_get) === 'closable',
|
|
11364
|
-
}, "data-size": __classPrivateFieldGet$7(this, _Tab_instances, "a", _Tab_computedSize_get), "data-importance": __classPrivateFieldGet$7(this, _Tab_instances, "a", _Tab_computedImportance_get) }, hAsync(Tag, { key: '
|
|
14727
|
+
}, "data-size": __classPrivateFieldGet$7(this, _Tab_instances, "a", _Tab_computedSize_get), "data-importance": __classPrivateFieldGet$7(this, _Tab_instances, "a", _Tab_computedImportance_get) }, hAsync(Tag, { key: '862cf7fdac2f09ff739b79d469c2c272b4bce487', ref: __classPrivateFieldGet$7(this, _Tab_tabRef, "f"), disabled: isLink ? undefined : this.disabled, onBlur: __classPrivateFieldGet$7(this, _Tab_onBlur, "f"), onFocus: __classPrivateFieldGet$7(this, _Tab_onFocus, "f"), class: {
|
|
11365
14728
|
'qds-tab': __classPrivateFieldGet$7(this, _Tab_instances, "a", _Tab_computedAction_get) !== 'closable',
|
|
11366
14729
|
'qds-closable-tab': __classPrivateFieldGet$7(this, _Tab_instances, "a", _Tab_computedAction_get) === 'closable',
|
|
11367
14730
|
'qds-selected': this.selected,
|
|
@@ -11371,7 +14734,7 @@ class Tab {
|
|
|
11371
14734
|
? 'true'
|
|
11372
14735
|
: 'false'
|
|
11373
14736
|
: undefined, "data-importance": __classPrivateFieldGet$7(this, _Tab_instances, "a", _Tab_computedImportance_get), "data-action": __classPrivateFieldGet$7(this, _Tab_instances, "a", _Tab_computedAction_get), "data-size": __classPrivateFieldGet$7(this, _Tab_instances, "a", _Tab_computedSize_get), href: isLink ? this.href : undefined }, ((this.tagText !== undefined && this.tagText !== '') ||
|
|
11374
|
-
(this.tagIconName !== undefined && this.tagIconName !== '')) && (hAsync("qds-tag", { key: '
|
|
14737
|
+
(this.tagIconName !== undefined && this.tagIconName !== '')) && (hAsync("qds-tag", { key: 'cb35e78661e2d0a86c8b4cadc6d17ec082d3b6d4', text: this.tagText, status: this.tagStatus, size: __classPrivateFieldGet$7(this, _Tab_instances, "a", _Tab_computedSize_get), importance: this.tagImportance, "icon-library": this.tagIconLibrary, "icon-name": this.tagIconName, "icon-description": this.tagIconDescription })), this.iconName !== undefined && this.iconName !== '' && (hAsync("qds-icon", { key: 'e8ef5d732efab173cf225bc69059c2486ab64fcf', "aria-hidden": "true", class: "qds-icon", library: this.iconLibrary, name: this.iconName })), this.text && __classPrivateFieldGet$7(this, _Tab_instances, "m", _Tab_renderText).call(this), isIndicator(this.badge) && (hAsync("qds-badge-indicator", { key: 'f9538c5dc0e627be47358e2ec039bb4064348d99', status: this.badgeIndicatorStatus, description: this.badgeDescription, size: __classPrivateFieldGet$7(this, _Tab_instances, "a", _Tab_computedSize_get), strokeRing: true })), isCounter(this.badge) && (hAsync("qds-badge-counter", { key: '28cbc076f2d57aa58b205f6088b3725c400cee12', description: this.badgeDescription, importance: this.badgeCounterImportance, size: __classPrivateFieldGet$7(this, _Tab_instances, "a", _Tab_computedSize_get), strokeRing: true, value: this.badge })), __classPrivateFieldGet$7(this, _Tab_instances, "a", _Tab_computedAction_get) === 'expandable' && (hAsync("qds-icon", { key: '6553d952074806ea3bb8e56b0f330fd04e36acd8', class: { 'qds-target-icon': true, 'qds-chevron': this.selected }, "data-size": __classPrivateFieldGet$7(this, _Tab_instances, "a", _Tab_computedSize_get), library: "core", name: "dropdown" }))), __classPrivateFieldGet$7(this, _Tab_instances, "a", _Tab_computedAction_get) === 'closable' && (hAsync("qds-mini-button", { key: '754c0d982f0e2a97a609bd7cb5b8c89e1a175dda', name: "close", library: "core", text: __classPrivateFieldGet$7(this, _Tab_instances, "a", _Tab_ariaLabel_get), "data-size": __classPrivateFieldGet$7(this, _Tab_instances, "a", _Tab_computedSize_get), disabled: __classPrivateFieldGet$7(this, _Tab_instances, "a", _Tab_computedDisabled_get), onClick: __classPrivateFieldGet$7(this, _Tab_onIconClick, "f"), tabIndex: __classPrivateFieldGet$7(this, _Tab_instances, "a", _Tab_computeCloseButtonTabIndex_get) }))));
|
|
11375
14738
|
}
|
|
11376
14739
|
get host() { return getElement(this); }
|
|
11377
14740
|
static get watchers() { return {
|
|
@@ -11754,14 +15117,14 @@ class Tabbar {
|
|
|
11754
15117
|
__classPrivateFieldGet$6(this, _Tabbar_ro, "f").disconnect();
|
|
11755
15118
|
}
|
|
11756
15119
|
render() {
|
|
11757
|
-
return (hAsync("div", { key: '
|
|
15120
|
+
return (hAsync("div", { key: '2c202280d06b8846a9be570fa15c92ff511bdf73', class: {
|
|
11758
15121
|
'qds-vertical-divider': this.orientation === 'vertical' || __classPrivateFieldGet$6(this, _Tabbar_isVerticalPlacement, "f").call(this),
|
|
11759
|
-
}, "data-layer": this.layer, "data-level": this.level, "data-importance": __classPrivateFieldGet$6(this, _Tabbar_instances, "a", _Tabbar_computedImportance_get) }, __classPrivateFieldGet$6(this, _Tabbar_instances, "a", _Tabbar_computeDividerVisible_get) && __classPrivateFieldGet$6(this, _Tabbar_isEndOrBottomPlacement, "f").call(this) && (hAsync("qds-divider", { key: '
|
|
15122
|
+
}, "data-layer": this.layer, "data-level": this.level, "data-importance": __classPrivateFieldGet$6(this, _Tabbar_instances, "a", _Tabbar_computedImportance_get) }, __classPrivateFieldGet$6(this, _Tabbar_instances, "a", _Tabbar_computeDividerVisible_get) && __classPrivateFieldGet$6(this, _Tabbar_isEndOrBottomPlacement, "f").call(this) && (hAsync("qds-divider", { key: '1651f3669e407097902bd82dab1f364f89a639fa', vertical: this.orientation === 'vertical' || __classPrivateFieldGet$6(this, _Tabbar_isVerticalPlacement, "f").call(this) })), hAsync("div", { key: '5d4b5c13b4b331932e97fd9a8e91edb1deb357d9', class: "qds-tabbar" }, hAsync("div", { key: 'cf1b0e0fb72c2e74a682923103d43189794e608d', class: {
|
|
11760
15123
|
'qds-align-center': true,
|
|
11761
15124
|
'qds-hidden': (this.disableEndArrow && this.disableStartArrow) ||
|
|
11762
15125
|
this.orientation === 'vertical' ||
|
|
11763
15126
|
__classPrivateFieldGet$6(this, _Tabbar_isVerticalPlacement, "f").call(this),
|
|
11764
|
-
} }, hAsync("qds-icon-button", { key: '
|
|
15127
|
+
} }, hAsync("qds-icon-button", { key: 'ac70d787c07cdce7a24f4f35178cf9e642a9f814', "aria-label": "show previous tab", importance: "subdued", iconName: "next", iconLibrary: "core", class: "qds-arrow-start", onClick: __classPrivateFieldGet$6(this, _Tabbar_scrollToStart, "f"), disabled: this.disableStartArrow })), hAsync("div", { key: '1887e538b523e089387462834c1b299fac60dda8', class: {
|
|
11765
15128
|
'qds-tabs': true,
|
|
11766
15129
|
'qds-vertical': this.orientation === 'vertical' || __classPrivateFieldGet$6(this, _Tabbar_isVerticalPlacement, "f").call(this),
|
|
11767
15130
|
'qds-centered': this.alignment === 'center' &&
|
|
@@ -11771,12 +15134,12 @@ class Tabbar {
|
|
|
11771
15134
|
this.disableStartArrow,
|
|
11772
15135
|
}, ref: (element) => {
|
|
11773
15136
|
__classPrivateFieldSet$3(this, _Tabbar_tabbar, element, "f");
|
|
11774
|
-
}, onClick: __classPrivateFieldGet$6(this, _Tabbar_onClick, "f"), onKeyDown: __classPrivateFieldGet$6(this, _Tabbar_onKeyDown, "f"), onMouseDown: __classPrivateFieldGet$6(this, _Tabbar_onMouseDown, "f"), onScroll: __classPrivateFieldGet$6(this, _Tabbar_onScroll, "f") }, hAsync("slot", { key: '
|
|
15137
|
+
}, onClick: __classPrivateFieldGet$6(this, _Tabbar_onClick, "f"), onKeyDown: __classPrivateFieldGet$6(this, _Tabbar_onKeyDown, "f"), onMouseDown: __classPrivateFieldGet$6(this, _Tabbar_onMouseDown, "f"), onScroll: __classPrivateFieldGet$6(this, _Tabbar_onScroll, "f") }, hAsync("slot", { key: 'a05ffe2e999473281d8049e6506ab3cfa75a1178', onSlotchange: __classPrivateFieldGet$6(this, _Tabbar_onSlotchange, "f") })), hAsync("div", { key: '9f16d7bc9edd9a60d32d34053d344f1ac2bcfeff', class: {
|
|
11775
15138
|
'qds-align-center': true,
|
|
11776
15139
|
'qds-hidden': (this.disableEndArrow && this.disableStartArrow) ||
|
|
11777
15140
|
this.orientation === 'vertical' ||
|
|
11778
15141
|
__classPrivateFieldGet$6(this, _Tabbar_isVerticalPlacement, "f").call(this),
|
|
11779
|
-
} }, hAsync("qds-icon-button", { key: '
|
|
15142
|
+
} }, hAsync("qds-icon-button", { key: 'ac7dc7ea0a62d251abefef826727546ef499421e', "aria-label": "show next tab", iconName: "next", iconLibrary: "core", importance: "subdued", onClick: __classPrivateFieldGet$6(this, _Tabbar_scrollToEnd, "f"), disabled: this.disableEndArrow }))), __classPrivateFieldGet$6(this, _Tabbar_instances, "a", _Tabbar_computeDividerVisible_get) && !__classPrivateFieldGet$6(this, _Tabbar_isEndOrBottomPlacement, "f").call(this) && (hAsync("qds-divider", { key: '788216fef1ff902b323620e1973c31fbd1d51ec1', vertical: this.orientation === 'vertical' || __classPrivateFieldGet$6(this, _Tabbar_isVerticalPlacement, "f").call(this) }))));
|
|
11780
15143
|
}
|
|
11781
15144
|
static get delegatesFocus() { return true; }
|
|
11782
15145
|
get host() { return getElement(this); }
|
|
@@ -11936,7 +15299,7 @@ class Table {
|
|
|
11936
15299
|
}
|
|
11937
15300
|
// eslint-disable-next-line @typescript-eslint/class-methods-use-this
|
|
11938
15301
|
render() {
|
|
11939
|
-
return hAsync("slot", { key: '
|
|
15302
|
+
return hAsync("slot", { key: '4411e9f247be226224d9b95f8d38d8314a7bad4a' });
|
|
11940
15303
|
}
|
|
11941
15304
|
static get style() { return tableCss; }
|
|
11942
15305
|
static get cmpMeta() { return {
|
|
@@ -12010,9 +15373,9 @@ class TableCell {
|
|
|
12010
15373
|
render() {
|
|
12011
15374
|
return (
|
|
12012
15375
|
// eslint-disable-next-line jsx-a11y/control-has-associated-label
|
|
12013
|
-
hAsync("td", { key: '
|
|
15376
|
+
hAsync("td", { key: '37d4bfd12e7fcdfe89a73ba5a3250ec56c380066', class: "qds-table-cell", "data-size": __classPrivateFieldGet$5(this, _TableCell_instances, "a", _TableCell_computedSize_get), colSpan: this.colSpan, rowSpan: this.rowSpan,
|
|
12014
15377
|
// eslint-disable-next-line jsx-a11y/no-interactive-element-to-noninteractive-role
|
|
12015
|
-
role: "none" }, hAsync("slot", { key: '
|
|
15378
|
+
role: "none" }, hAsync("slot", { key: 'fbbc89f293b0ba49afd24298549491e23abf6a22' })));
|
|
12016
15379
|
}
|
|
12017
15380
|
static get watchers() { return {
|
|
12018
15381
|
"colSpan": ["colSpanChanged"],
|
|
@@ -12109,9 +15472,9 @@ class TableHeadCell {
|
|
|
12109
15472
|
render() {
|
|
12110
15473
|
return (
|
|
12111
15474
|
// eslint-disable-next-line jsx-a11y/control-has-associated-label
|
|
12112
|
-
hAsync("th", { key: '
|
|
15475
|
+
hAsync("th", { key: '16fe39b4b5a08bc7ec90ec9d32930f9163e12b07', class: "qds-table-head-cell", "data-size": __classPrivateFieldGet$4(this, _TableHeadCell_instances, "a", _TableHeadCell_computedSize_get), colSpan: this.colSpan, rowSpan: this.rowSpan, scope: this.scope,
|
|
12113
15476
|
// eslint-disable-next-line jsx-a11y/no-interactive-element-to-noninteractive-role
|
|
12114
|
-
role: "none" }, hAsync("slot", { key: '
|
|
15477
|
+
role: "none" }, hAsync("slot", { key: '9830dc68cec377ecf68fe362f304b5a561a580d9' })));
|
|
12115
15478
|
}
|
|
12116
15479
|
static get watchers() { return {
|
|
12117
15480
|
"colSpan": ["colSpanChanged"],
|
|
@@ -12170,7 +15533,7 @@ class TableRow {
|
|
|
12170
15533
|
}
|
|
12171
15534
|
// eslint-disable-next-line @typescript-eslint/class-methods-use-this
|
|
12172
15535
|
render() {
|
|
12173
|
-
return (hAsync("tr", { key: '
|
|
15536
|
+
return (hAsync("tr", { key: '542bde42dd840b1a145ef8b6748674ef00d4a5df', class: "qds-table-row", role: "none" }, hAsync("slot", { key: 'ed6c95bea51d17fc397c4b1a99c058392e421890' })));
|
|
12174
15537
|
}
|
|
12175
15538
|
static get style() { return tableRowCss; }
|
|
12176
15539
|
static get cmpMeta() { return {
|
|
@@ -12241,11 +15604,11 @@ class Tag {
|
|
|
12241
15604
|
__classPrivateFieldSet$2(this, _Tag_inheritedAttributes, inheritAriaAttributes(this.host), "f");
|
|
12242
15605
|
}
|
|
12243
15606
|
render() {
|
|
12244
|
-
return (hAsync("span", { key: '
|
|
15607
|
+
return (hAsync("span", { key: '88bdc52e4729a80ef0dbf0e6b4e5c085a1d9acb8', class: {
|
|
12245
15608
|
'qds-tag': true,
|
|
12246
15609
|
'qds-padding': this.importance !== 'subdued',
|
|
12247
15610
|
}, "data-importance": __classPrivateFieldGet$3(this, _Tag_instances, "a", _Tag_computedImportance_get), "data-size": __classPrivateFieldGet$3(this, _Tag_instances, "a", _Tag_computedSize_get), "data-status": __classPrivateFieldGet$3(this, _Tag_instances, "a", _Tag_computedStatus_get), ...__classPrivateFieldGet$3(this, _Tag_inheritedAttributes, "f") }, this.iconName !== undefined && this.iconName !== '' ? (hAsync(Fragment, null, this.iconDescription !== undefined &&
|
|
12248
|
-
this.iconDescription !== '' && (hAsync("span", { class: "qds-sr-only" }, this.iconDescription)), hAsync("qds-icon", { class: "qds-icon", "data-size": __classPrivateFieldGet$3(this, _Tag_instances, "a", _Tag_computedSize_get), library: this.iconLibrary, name: this.iconName }))) : (__classPrivateFieldGet$3(this, _Tag_instances, "a", _Tag_hasBadge_get) && (hAsync("qds-badge-indicator", { status: __classPrivateFieldGet$3(this, _Tag_instances, "a", _Tag_computedStatus_get), description: this.badgeDescription, size: __classPrivateFieldGet$3(this, _Tag_instances, "a", _Tag_computedSize_get), strokeRing: true }))), hAsync("span", { key: '
|
|
15611
|
+
this.iconDescription !== '' && (hAsync("span", { class: "qds-sr-only" }, this.iconDescription)), hAsync("qds-icon", { class: "qds-icon", "data-size": __classPrivateFieldGet$3(this, _Tag_instances, "a", _Tag_computedSize_get), library: this.iconLibrary, name: this.iconName }))) : (__classPrivateFieldGet$3(this, _Tag_instances, "a", _Tag_hasBadge_get) && (hAsync("qds-badge-indicator", { status: __classPrivateFieldGet$3(this, _Tag_instances, "a", _Tag_computedStatus_get), description: this.badgeDescription, size: __classPrivateFieldGet$3(this, _Tag_instances, "a", _Tag_computedSize_get), strokeRing: true }))), hAsync("span", { key: 'c070ff3e5308ee34e42209ea1d5638b33ad9c16a', class: "qds-text" }, this.text)));
|
|
12249
15612
|
}
|
|
12250
15613
|
get host() { return getElement(this); }
|
|
12251
15614
|
static get style() { return tagCss; }
|
|
@@ -12571,9 +15934,9 @@ class TextArea {
|
|
|
12571
15934
|
this.valueChanged();
|
|
12572
15935
|
}
|
|
12573
15936
|
render() {
|
|
12574
|
-
return (hAsync(Host, { key: '
|
|
15937
|
+
return (hAsync(Host, { key: 'e4a8c71dc44612152518e44ea1dec9f2a60ddb80' }, hAsync("textarea", { key: '42d5da43e4a033e62d9438cba9319f5a1bf3e76c', autoCapitalize: this.host.autocapitalize, autoComplete: this.autoComplete,
|
|
12575
15938
|
// eslint-disable-next-line jsx-a11y/no-autofocus
|
|
12576
|
-
autoFocus: this.host.autofocus, class: "qds-textarea", cols: this.cols, "data-size": this.size ?? 'standard', "data-status": __classPrivateFieldGet$2(this, _TextArea_instances, "a", _TextArea_computedStatus_get), disabled: this.disabled, enterKeyHint: this.enterkeyhint, inputMode: this.inputmode, maxLength: this.maxLength, minLength: this.minLength, onBlur: __classPrivateFieldGet$2(this, _TextArea_onBlur, "f"), onChange: __classPrivateFieldGet$2(this, _TextArea_onChange, "f"), onFocus: __classPrivateFieldGet$2(this, _TextArea_onFocus, "f"), onInput: __classPrivateFieldGet$2(this, _TextArea_onInput, "f"), placeholder: this.placeholder, ref: __classPrivateFieldGet$2(this, _TextArea_ref, "f"), readOnly: this.readonly, rows: this.rows, spellcheck: this.host.spellcheck, tabIndex: __classPrivateFieldGet$2(this, _TextArea_instances, "a", _TextArea_computedDisabled_get) ? undefined : this.tabIndex, wrap: this.wrap, ...__classPrivateFieldGet$2(this, _TextArea_inheritedAttributes, "f") }), hAsync("slot", { key: '
|
|
15939
|
+
autoFocus: this.host.autofocus, class: "qds-textarea", cols: this.cols, "data-size": this.size ?? 'standard', "data-status": __classPrivateFieldGet$2(this, _TextArea_instances, "a", _TextArea_computedStatus_get), disabled: this.disabled, enterKeyHint: this.enterkeyhint, inputMode: this.inputmode, maxLength: this.maxLength, minLength: this.minLength, onBlur: __classPrivateFieldGet$2(this, _TextArea_onBlur, "f"), onChange: __classPrivateFieldGet$2(this, _TextArea_onChange, "f"), onFocus: __classPrivateFieldGet$2(this, _TextArea_onFocus, "f"), onInput: __classPrivateFieldGet$2(this, _TextArea_onInput, "f"), placeholder: this.placeholder, ref: __classPrivateFieldGet$2(this, _TextArea_ref, "f"), readOnly: this.readonly, rows: this.rows, spellcheck: this.host.spellcheck, tabIndex: __classPrivateFieldGet$2(this, _TextArea_instances, "a", _TextArea_computedDisabled_get) ? undefined : this.tabIndex, wrap: this.wrap, ...__classPrivateFieldGet$2(this, _TextArea_inheritedAttributes, "f") }), hAsync("slot", { key: '1f7a23defc50ec60b1d292306c205cf34ddef9ee', onSlotchange: __classPrivateFieldGet$2(this, _TextArea_onSlotchange, "f") })));
|
|
12577
15940
|
}
|
|
12578
15941
|
static get delegatesFocus() { return true; }
|
|
12579
15942
|
static get formAssociated() { return true; }
|
|
@@ -12700,14 +16063,14 @@ class Title {
|
|
|
12700
16063
|
const level = `qds-${this.level ?? 'section'}`;
|
|
12701
16064
|
const Tag = this.tag ?? 'h2';
|
|
12702
16065
|
const hasIcon = this.iconName !== undefined && this.iconName !== '';
|
|
12703
|
-
return (hAsync("hgroup", { key: '
|
|
16066
|
+
return (hAsync("hgroup", { key: '04bc659e139196f133a2952d31b4850e3c7db4d0', "data-alignment": this.alignment ?? 'start', "data-variant": this.variant, class: {
|
|
12704
16067
|
[layer]: true,
|
|
12705
16068
|
[level]: true,
|
|
12706
16069
|
'qds-titles': true,
|
|
12707
16070
|
'qds-has-icon': hasIcon,
|
|
12708
16071
|
'qds-has-kicker': __classPrivateFieldGet$1(this, _Title_instances, "a", _Title_hasKicker_get),
|
|
12709
16072
|
'qds-has-subtitle': __classPrivateFieldGet$1(this, _Title_instances, "a", _Title_hasSubtitle_get),
|
|
12710
|
-
}, role: "none" }, hAsync(Tag, { key: '
|
|
16073
|
+
}, role: "none" }, hAsync(Tag, { key: '6206cfad864ae1ccba4d752dccf89b32d08b1799', class: "qds-title", "data-variant": this.variant }, hAsync("slot", { key: 'bc064cbc02c3d6807d7dde00979df6aa1113979b' })), __classPrivateFieldGet$1(this, _Title_instances, "a", _Title_hasKicker_get) && hAsync("p", { key: '85137e1d9dd7c96dd8de7b4acbefbbd724b3e56f', class: "qds-kicker" }, this.kicker), __classPrivateFieldGet$1(this, _Title_instances, "a", _Title_hasSubtitle_get) && hAsync("p", { key: 'dd18c78be3d12ce99f56ae2e74a29574da7cca27', class: "qds-subtitle" }, this.subtitle), hasIcon && (hAsync("qds-icon", { key: 'e98cff56c6ca81cdee991b4b2c714402e88213ed', class: "qds-icon", name: this.iconName, library: this.iconLibrary }))));
|
|
12711
16074
|
}
|
|
12712
16075
|
static get style() { return titleCss; }
|
|
12713
16076
|
static get cmpMeta() { return {
|
|
@@ -13106,6 +16469,7 @@ _Tooltip_arrow = new WeakMap(), _Tooltip_arrowPadding = new WeakMap(), _Tooltip_
|
|
|
13106
16469
|
|
|
13107
16470
|
registerComponents([
|
|
13108
16471
|
ActionItem,
|
|
16472
|
+
Avatar,
|
|
13109
16473
|
AvatarMedia,
|
|
13110
16474
|
BadgeCounter,
|
|
13111
16475
|
BadgeIndicator,
|