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