@mk-kit/mcp 0.56.0 → 0.57.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/data/api.json +463 -1
- package/data/llms-full.txt +355 -1
- package/data/llms.txt +2 -1
- package/package.json +1 -1
package/data/api.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"package": "@mk-kit/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.57.0",
|
|
4
4
|
"site": "https://mk-kit.dev",
|
|
5
5
|
"entries": [
|
|
6
6
|
{
|
|
@@ -1547,6 +1547,46 @@
|
|
|
1547
1547
|
"type": "string",
|
|
1548
1548
|
"description": ""
|
|
1549
1549
|
},
|
|
1550
|
+
{
|
|
1551
|
+
"name": "sessionExpiryTitle",
|
|
1552
|
+
"type": "string",
|
|
1553
|
+
"description": "Session-expiry dialog (`@mk-kit/ui/attention`)."
|
|
1554
|
+
},
|
|
1555
|
+
{
|
|
1556
|
+
"name": "sessionExpiryExtend",
|
|
1557
|
+
"type": "string",
|
|
1558
|
+
"description": ""
|
|
1559
|
+
},
|
|
1560
|
+
{
|
|
1561
|
+
"name": "sessionExpiryExtending",
|
|
1562
|
+
"type": "string",
|
|
1563
|
+
"description": ""
|
|
1564
|
+
},
|
|
1565
|
+
{
|
|
1566
|
+
"name": "sessionExpiryLogout",
|
|
1567
|
+
"type": "string",
|
|
1568
|
+
"description": ""
|
|
1569
|
+
},
|
|
1570
|
+
{
|
|
1571
|
+
"name": "sessionExpiryBody",
|
|
1572
|
+
"type": "(countdown: string) => string",
|
|
1573
|
+
"description": ""
|
|
1574
|
+
},
|
|
1575
|
+
{
|
|
1576
|
+
"name": "scannerTitle",
|
|
1577
|
+
"type": "string",
|
|
1578
|
+
"description": "Barcode scanner (`@mk-kit/ui/media/scanner`)."
|
|
1579
|
+
},
|
|
1580
|
+
{
|
|
1581
|
+
"name": "scannerHint",
|
|
1582
|
+
"type": "string",
|
|
1583
|
+
"description": ""
|
|
1584
|
+
},
|
|
1585
|
+
{
|
|
1586
|
+
"name": "scannerCameraError",
|
|
1587
|
+
"type": "string",
|
|
1588
|
+
"description": ""
|
|
1589
|
+
},
|
|
1550
1590
|
{
|
|
1551
1591
|
"name": "resultsCount",
|
|
1552
1592
|
"type": "(count: number) => string",
|
|
@@ -18562,6 +18602,314 @@
|
|
|
18562
18602
|
}
|
|
18563
18603
|
]
|
|
18564
18604
|
},
|
|
18605
|
+
{
|
|
18606
|
+
"name": "attention",
|
|
18607
|
+
"import": "@mk-kit/ui/attention",
|
|
18608
|
+
"exports": [
|
|
18609
|
+
{
|
|
18610
|
+
"name": "MkSessionExpiryDialog",
|
|
18611
|
+
"description": "Last call before a session ends: counts down and offers to extend.\nReaching zero ends the session, so doing nothing still produces a definite,\nvisible outcome. Opened by `MkSessionExpiry`; usable on its own.",
|
|
18612
|
+
"file": "projects/mk-kit/attention/session-expiry.ts",
|
|
18613
|
+
"kind": "component",
|
|
18614
|
+
"selector": "mk-session-expiry-dialog",
|
|
18615
|
+
"selectors": [
|
|
18616
|
+
"mk-session-expiry-dialog"
|
|
18617
|
+
],
|
|
18618
|
+
"inputs": [],
|
|
18619
|
+
"outputs": [],
|
|
18620
|
+
"methods": [],
|
|
18621
|
+
"properties": [],
|
|
18622
|
+
"queries": [],
|
|
18623
|
+
"docs": "/components/attention"
|
|
18624
|
+
},
|
|
18625
|
+
{
|
|
18626
|
+
"name": "MkNotificationSound",
|
|
18627
|
+
"description": "Alert sounds for incoming work (orders, messages, tickets) with the\nbrowser's autoplay rules handled: an `AudioContext` stays suspended until a\nuser gesture, so a sound fired by a WebSocket message would be silent. The\ncontext is unlocked when the user enables sound (a click) and lazily on the\nfirst interaction anywhere in the app. The default sound is synthesised\n(a short C–E–G chime) — nothing to ship, no CORS, lowest latency; file\npresets are fetched and decoded once and fall back to the chime when they\nfail. The on/off preference lives in localStorage under a configurable key.\n\n```ts\nprovideMkNotificationSound({ presets: [MK_CHIME_PRESET, { id: 'ding', label: 'Ding', url: '/assets/ding.wav' }] })\nsound.primeOnFirstInteraction(); // at app start\nsound.play(settings.newOrderSound); // on an event, honours the device mute\nsound.preview('ding'); // settings page test button\n```",
|
|
18628
|
+
"file": "projects/mk-kit/attention/notification-sound.ts",
|
|
18629
|
+
"kind": "service",
|
|
18630
|
+
"providedIn": "root",
|
|
18631
|
+
"methods": [
|
|
18632
|
+
{
|
|
18633
|
+
"name": "isEnabled",
|
|
18634
|
+
"signature": "(): boolean",
|
|
18635
|
+
"description": "Whether the device has sound on."
|
|
18636
|
+
},
|
|
18637
|
+
{
|
|
18638
|
+
"name": "hasBeenAsked",
|
|
18639
|
+
"signature": "(): boolean",
|
|
18640
|
+
"description": "Whether the user ever answered the \"enable sound?\" question on this device."
|
|
18641
|
+
},
|
|
18642
|
+
{
|
|
18643
|
+
"name": "setEnabled",
|
|
18644
|
+
"signature": "(enabled: boolean): void",
|
|
18645
|
+
"description": "Persist the preference; call from a click so audio unlocks at once."
|
|
18646
|
+
},
|
|
18647
|
+
{
|
|
18648
|
+
"name": "primeOnFirstInteraction",
|
|
18649
|
+
"signature": "(): void",
|
|
18650
|
+
"description": "Arm a one-time listener so the first pointer/key interaction unlocks audio."
|
|
18651
|
+
},
|
|
18652
|
+
{
|
|
18653
|
+
"name": "chime",
|
|
18654
|
+
"signature": "(): void",
|
|
18655
|
+
"description": "The default chime, if the device has sound on."
|
|
18656
|
+
},
|
|
18657
|
+
{
|
|
18658
|
+
"name": "play",
|
|
18659
|
+
"signature": "(soundId: string, customUrl?: string | null): void",
|
|
18660
|
+
"description": "Play the sound configured for an event: a preset id, `custom` (with\n`customUrl`) or `none` (silent). Unknown ids and failed loads fall back\nto the chime. Honours the device mute."
|
|
18661
|
+
},
|
|
18662
|
+
{
|
|
18663
|
+
"name": "preview",
|
|
18664
|
+
"signature": "(soundId: string, customUrl?: string | null): void",
|
|
18665
|
+
"description": "Same as `play()` but ignores the device mute — for settings test buttons."
|
|
18666
|
+
}
|
|
18667
|
+
],
|
|
18668
|
+
"properties": [
|
|
18669
|
+
{
|
|
18670
|
+
"name": "presets",
|
|
18671
|
+
"type": "MkSoundPreset[]",
|
|
18672
|
+
"description": "The selectable presets (always includes the chime).",
|
|
18673
|
+
"readonly": true
|
|
18674
|
+
}
|
|
18675
|
+
],
|
|
18676
|
+
"docs": "/components/attention"
|
|
18677
|
+
},
|
|
18678
|
+
{
|
|
18679
|
+
"name": "MkSessionExpiry",
|
|
18680
|
+
"description": "Watches `expiresAt()` and warns BEFORE the session lapses, so a session\nnever ends silently: the dialog offers to extend, or signs out at zero.\nRe-arms itself whenever `expiresAt()` changes (every token rotation),\nruns the timer outside the Angular zone and only in the browser. Started\nautomatically by `provideMkSessionExpiry`.",
|
|
18681
|
+
"file": "projects/mk-kit/attention/session-expiry.ts",
|
|
18682
|
+
"kind": "service",
|
|
18683
|
+
"providedIn": "root",
|
|
18684
|
+
"methods": [
|
|
18685
|
+
{
|
|
18686
|
+
"name": "start",
|
|
18687
|
+
"signature": "(): void",
|
|
18688
|
+
"description": "Begin watching. Idempotent; called by the provider's initializer."
|
|
18689
|
+
}
|
|
18690
|
+
],
|
|
18691
|
+
"properties": [
|
|
18692
|
+
{
|
|
18693
|
+
"name": "open",
|
|
18694
|
+
"type": "WritableSignal<boolean>",
|
|
18695
|
+
"description": "Whether the dialog is currently open.",
|
|
18696
|
+
"readonly": true
|
|
18697
|
+
}
|
|
18698
|
+
],
|
|
18699
|
+
"docs": "/components/attention"
|
|
18700
|
+
},
|
|
18701
|
+
{
|
|
18702
|
+
"name": "MkTabAttention",
|
|
18703
|
+
"description": "Messenger-style tab attention: while unhandled work exists the favicon\ncarries a red counter badge, and — only while the tab is hidden — the\ntitle alternates with \"(N) label\" so a pinned tab flashes in the tab strip.\nFocusing the tab stops the blinking (someone is looking) but keeps the\nbadge until the count reaches zero. SSR-safe: every entry point bails\nwithout a `document`; the blink timer runs outside the Angular zone.\n\n```ts\nprivate attention = inject(MkTabAttention);\neffect(() => this.attention.set(this.pending().length, 'new orders'));\n```",
|
|
18704
|
+
"file": "projects/mk-kit/attention/tab-attention.ts",
|
|
18705
|
+
"kind": "service",
|
|
18706
|
+
"providedIn": "root",
|
|
18707
|
+
"methods": [
|
|
18708
|
+
{
|
|
18709
|
+
"name": "set",
|
|
18710
|
+
"signature": "(count: number, label?: string): void",
|
|
18711
|
+
"description": "Update the pending count and the label used in the blinking title."
|
|
18712
|
+
},
|
|
18713
|
+
{
|
|
18714
|
+
"name": "clear",
|
|
18715
|
+
"signature": "(): void",
|
|
18716
|
+
"description": "Drop the badge and the blinking entirely and stop listening."
|
|
18717
|
+
}
|
|
18718
|
+
],
|
|
18719
|
+
"properties": [
|
|
18720
|
+
{
|
|
18721
|
+
"name": "count",
|
|
18722
|
+
"type": "WritableSignal<number>",
|
|
18723
|
+
"description": "The count currently shown (0 = nothing pending).",
|
|
18724
|
+
"readonly": true
|
|
18725
|
+
}
|
|
18726
|
+
],
|
|
18727
|
+
"docs": "/components/attention"
|
|
18728
|
+
},
|
|
18729
|
+
{
|
|
18730
|
+
"name": "provideMkNotificationSound",
|
|
18731
|
+
"description": "Register presets / storage key for `MkNotificationSound`. Optional.",
|
|
18732
|
+
"file": "projects/mk-kit/attention/notification-sound.ts",
|
|
18733
|
+
"kind": "function",
|
|
18734
|
+
"signatures": [
|
|
18735
|
+
"(config: MkNotificationSoundConfig): { provide: InjectionToken<MkNotificationSoundConfig>; useValue: MkNotificationSoundConfig; }"
|
|
18736
|
+
]
|
|
18737
|
+
},
|
|
18738
|
+
{
|
|
18739
|
+
"name": "provideMkSessionExpiry",
|
|
18740
|
+
"description": "Register the session-expiry watcher; it starts with the application.\n\n```ts\nprovideMkSessionExpiry({\n expiresAt: () => auth.tokenExpiresAt(),\n extend: () => firstValueFrom(auth.refresh()),\n onExpire: () => auth.logout(),\n warnBeforeMs: 2 * 60_000,\n})\n```",
|
|
18741
|
+
"file": "projects/mk-kit/attention/session-expiry.ts",
|
|
18742
|
+
"kind": "function",
|
|
18743
|
+
"signatures": [
|
|
18744
|
+
"(config: MkSessionExpiryConfig): EnvironmentProviders"
|
|
18745
|
+
]
|
|
18746
|
+
},
|
|
18747
|
+
{
|
|
18748
|
+
"name": "provideMkTabAttention",
|
|
18749
|
+
"description": "Register options for `MkTabAttention`. Optional — the defaults work.",
|
|
18750
|
+
"file": "projects/mk-kit/attention/tab-attention.ts",
|
|
18751
|
+
"kind": "function",
|
|
18752
|
+
"signatures": [
|
|
18753
|
+
"(config: MkTabAttentionConfig): { provide: InjectionToken<MkTabAttentionConfig>; useValue: MkTabAttentionConfig; }"
|
|
18754
|
+
]
|
|
18755
|
+
},
|
|
18756
|
+
{
|
|
18757
|
+
"name": "MK_NOTIFICATION_SOUND_CONFIG",
|
|
18758
|
+
"description": "",
|
|
18759
|
+
"file": "projects/mk-kit/attention/notification-sound.ts",
|
|
18760
|
+
"kind": "token",
|
|
18761
|
+
"type": "InjectionToken<MkNotificationSoundConfig>"
|
|
18762
|
+
},
|
|
18763
|
+
{
|
|
18764
|
+
"name": "MK_SESSION_EXPIRY_CONFIG",
|
|
18765
|
+
"description": "",
|
|
18766
|
+
"file": "projects/mk-kit/attention/session-expiry.ts",
|
|
18767
|
+
"kind": "token",
|
|
18768
|
+
"type": "InjectionToken<MkSessionExpiryConfig>"
|
|
18769
|
+
},
|
|
18770
|
+
{
|
|
18771
|
+
"name": "MK_TAB_ATTENTION_CONFIG",
|
|
18772
|
+
"description": "",
|
|
18773
|
+
"file": "projects/mk-kit/attention/tab-attention.ts",
|
|
18774
|
+
"kind": "token",
|
|
18775
|
+
"type": "InjectionToken<MkTabAttentionConfig>"
|
|
18776
|
+
},
|
|
18777
|
+
{
|
|
18778
|
+
"name": "MK_CHIME_PRESET",
|
|
18779
|
+
"description": "The always-available synthesised sound.",
|
|
18780
|
+
"file": "projects/mk-kit/attention/notification-sound.ts",
|
|
18781
|
+
"kind": "const",
|
|
18782
|
+
"type": "MkSoundPreset"
|
|
18783
|
+
},
|
|
18784
|
+
{
|
|
18785
|
+
"name": "MkNotificationSoundConfig",
|
|
18786
|
+
"description": "Options for `MkNotificationSound`.",
|
|
18787
|
+
"file": "projects/mk-kit/attention/notification-sound.ts",
|
|
18788
|
+
"kind": "interface",
|
|
18789
|
+
"members": [
|
|
18790
|
+
{
|
|
18791
|
+
"name": "presets",
|
|
18792
|
+
"type": "MkSoundPreset[] | undefined",
|
|
18793
|
+
"description": "Selectable sounds; the ids `custom` and `none` are reserved. Default: the chime only.",
|
|
18794
|
+
"optional": true
|
|
18795
|
+
},
|
|
18796
|
+
{
|
|
18797
|
+
"name": "storageKey",
|
|
18798
|
+
"type": "(() => string) | undefined",
|
|
18799
|
+
"description": "localStorage key for the on/off preference — a function so it can vary per tenant / user.",
|
|
18800
|
+
"optional": true
|
|
18801
|
+
},
|
|
18802
|
+
{
|
|
18803
|
+
"name": "volume",
|
|
18804
|
+
"type": "number | undefined",
|
|
18805
|
+
"description": "Output gain for file presets (0–1). Default `0.8`.",
|
|
18806
|
+
"optional": true
|
|
18807
|
+
}
|
|
18808
|
+
]
|
|
18809
|
+
},
|
|
18810
|
+
{
|
|
18811
|
+
"name": "MkSessionExpiryConfig",
|
|
18812
|
+
"description": "Options for `provideMkSessionExpiry`.",
|
|
18813
|
+
"file": "projects/mk-kit/attention/session-expiry.ts",
|
|
18814
|
+
"kind": "interface",
|
|
18815
|
+
"members": [
|
|
18816
|
+
{
|
|
18817
|
+
"name": "expiresAt",
|
|
18818
|
+
"type": "() => number | null",
|
|
18819
|
+
"description": "Epoch ms when the session lapses, or `null` when there is none. Read reactively."
|
|
18820
|
+
},
|
|
18821
|
+
{
|
|
18822
|
+
"name": "warnBeforeMs",
|
|
18823
|
+
"type": "number | undefined",
|
|
18824
|
+
"description": "How long before the lapse the dialog appears. Default 2 minutes.",
|
|
18825
|
+
"optional": true
|
|
18826
|
+
},
|
|
18827
|
+
{
|
|
18828
|
+
"name": "extend",
|
|
18829
|
+
"type": "() => Promise<unknown>",
|
|
18830
|
+
"description": "Extend the session (refresh the token). Resolve = extended, reject = nothing to extend."
|
|
18831
|
+
},
|
|
18832
|
+
{
|
|
18833
|
+
"name": "onExpire",
|
|
18834
|
+
"type": "() => void",
|
|
18835
|
+
"description": "End the session (sign out, navigate)."
|
|
18836
|
+
},
|
|
18837
|
+
{
|
|
18838
|
+
"name": "enabled",
|
|
18839
|
+
"type": "(() => boolean) | undefined",
|
|
18840
|
+
"description": "Read reactively; `false` suspends the watcher (a kiosk / PIN mode, say).",
|
|
18841
|
+
"optional": true
|
|
18842
|
+
}
|
|
18843
|
+
]
|
|
18844
|
+
},
|
|
18845
|
+
{
|
|
18846
|
+
"name": "MkSessionExpiryDialogData",
|
|
18847
|
+
"description": "Data handed to `MkSessionExpiryDialog`.",
|
|
18848
|
+
"file": "projects/mk-kit/attention/session-expiry.ts",
|
|
18849
|
+
"kind": "interface",
|
|
18850
|
+
"members": [
|
|
18851
|
+
{
|
|
18852
|
+
"name": "expiresAt",
|
|
18853
|
+
"type": "number",
|
|
18854
|
+
"description": ""
|
|
18855
|
+
},
|
|
18856
|
+
{
|
|
18857
|
+
"name": "extend",
|
|
18858
|
+
"type": "() => Promise<unknown>",
|
|
18859
|
+
"description": ""
|
|
18860
|
+
},
|
|
18861
|
+
{
|
|
18862
|
+
"name": "onExpire",
|
|
18863
|
+
"type": "() => void",
|
|
18864
|
+
"description": ""
|
|
18865
|
+
}
|
|
18866
|
+
]
|
|
18867
|
+
},
|
|
18868
|
+
{
|
|
18869
|
+
"name": "MkSoundPreset",
|
|
18870
|
+
"description": "One selectable alert sound. `url: null` = the synthesised chime.",
|
|
18871
|
+
"file": "projects/mk-kit/attention/notification-sound.ts",
|
|
18872
|
+
"kind": "interface",
|
|
18873
|
+
"members": [
|
|
18874
|
+
{
|
|
18875
|
+
"name": "id",
|
|
18876
|
+
"type": "string",
|
|
18877
|
+
"description": ""
|
|
18878
|
+
},
|
|
18879
|
+
{
|
|
18880
|
+
"name": "label",
|
|
18881
|
+
"type": "string",
|
|
18882
|
+
"description": ""
|
|
18883
|
+
},
|
|
18884
|
+
{
|
|
18885
|
+
"name": "url",
|
|
18886
|
+
"type": "string | null",
|
|
18887
|
+
"description": ""
|
|
18888
|
+
}
|
|
18889
|
+
]
|
|
18890
|
+
},
|
|
18891
|
+
{
|
|
18892
|
+
"name": "MkTabAttentionConfig",
|
|
18893
|
+
"description": "Options for `MkTabAttention`, set with `provideMkTabAttention`.",
|
|
18894
|
+
"file": "projects/mk-kit/attention/tab-attention.ts",
|
|
18895
|
+
"kind": "interface",
|
|
18896
|
+
"members": [
|
|
18897
|
+
{
|
|
18898
|
+
"name": "badgeColor",
|
|
18899
|
+
"type": "string | undefined",
|
|
18900
|
+
"description": "Badge fill colour (any CSS colour). Default `#e53935`.",
|
|
18901
|
+
"optional": true
|
|
18902
|
+
},
|
|
18903
|
+
{
|
|
18904
|
+
"name": "blinkMs",
|
|
18905
|
+
"type": "number | undefined",
|
|
18906
|
+
"description": "Title blink period in ms while the tab is hidden. Default `1200`.",
|
|
18907
|
+
"optional": true
|
|
18908
|
+
}
|
|
18909
|
+
]
|
|
18910
|
+
}
|
|
18911
|
+
]
|
|
18912
|
+
},
|
|
18565
18913
|
{
|
|
18566
18914
|
"name": "feedback",
|
|
18567
18915
|
"import": "@mk-kit/ui/feedback",
|
|
@@ -23852,6 +24200,120 @@
|
|
|
23852
24200
|
}
|
|
23853
24201
|
]
|
|
23854
24202
|
},
|
|
24203
|
+
{
|
|
24204
|
+
"name": "media/scanner",
|
|
24205
|
+
"import": "@mk-kit/ui/media/scanner",
|
|
24206
|
+
"exports": [
|
|
24207
|
+
{
|
|
24208
|
+
"name": "MkBarcodeScanner",
|
|
24209
|
+
"description": "Camera barcode / QR reader. Starts the rear camera when it appears, emits\n`scanned` once with the first decoded text and stops. The decoder\n(`html5-qrcode`, an optional peer dependency) is loaded on demand, so pages\nthat only *offer* scanning ship nothing extra until a scan starts. Use\ninline, or through `MkBarcodeScannerDialog`.\n\n```html\n<mk-barcode-scanner (scanned)=\"onCode($event)\" (failed)=\"show($event)\" />\n```",
|
|
24210
|
+
"file": "projects/mk-kit/media/scanner/barcode-scanner.ts",
|
|
24211
|
+
"kind": "component",
|
|
24212
|
+
"selector": "mk-barcode-scanner",
|
|
24213
|
+
"selectors": [
|
|
24214
|
+
"mk-barcode-scanner"
|
|
24215
|
+
],
|
|
24216
|
+
"inputs": [
|
|
24217
|
+
{
|
|
24218
|
+
"name": "formats",
|
|
24219
|
+
"type": "MkBarcodeFormat[]",
|
|
24220
|
+
"description": "Symbologies to decode. Default: QR + the retail 1-D codes.",
|
|
24221
|
+
"default": "MK_BARCODE_DEFAULT_FORMATS"
|
|
24222
|
+
},
|
|
24223
|
+
{
|
|
24224
|
+
"name": "fps",
|
|
24225
|
+
"type": "number",
|
|
24226
|
+
"description": "Frames per second offered to the decoder. Default 10.",
|
|
24227
|
+
"default": "10"
|
|
24228
|
+
},
|
|
24229
|
+
{
|
|
24230
|
+
"name": "hint",
|
|
24231
|
+
"type": "boolean",
|
|
24232
|
+
"description": "Show the built-in hint line above the viewfinder. Default `true`.",
|
|
24233
|
+
"default": "true"
|
|
24234
|
+
},
|
|
24235
|
+
{
|
|
24236
|
+
"name": "continuous",
|
|
24237
|
+
"type": "boolean",
|
|
24238
|
+
"description": "Keep scanning after a hit instead of stopping. Default `false`.",
|
|
24239
|
+
"default": "false"
|
|
24240
|
+
}
|
|
24241
|
+
],
|
|
24242
|
+
"outputs": [
|
|
24243
|
+
{
|
|
24244
|
+
"name": "scanned",
|
|
24245
|
+
"type": "string",
|
|
24246
|
+
"description": "Decoded text."
|
|
24247
|
+
},
|
|
24248
|
+
{
|
|
24249
|
+
"name": "failed",
|
|
24250
|
+
"type": "string",
|
|
24251
|
+
"description": "The camera could not start (permission, no device, insecure context)."
|
|
24252
|
+
}
|
|
24253
|
+
],
|
|
24254
|
+
"methods": [
|
|
24255
|
+
{
|
|
24256
|
+
"name": "stop",
|
|
24257
|
+
"signature": "(): Promise<void>",
|
|
24258
|
+
"description": "Stop the camera and release it. Safe to call twice."
|
|
24259
|
+
}
|
|
24260
|
+
],
|
|
24261
|
+
"properties": [],
|
|
24262
|
+
"queries": [],
|
|
24263
|
+
"docs": "/components/images"
|
|
24264
|
+
},
|
|
24265
|
+
{
|
|
24266
|
+
"name": "MkBarcodeScannerDialog",
|
|
24267
|
+
"description": "The scanner in a dialog: resolves with the decoded text, or `null` when\ncancelled. Open it with `MkDialogService`:\n\n```ts\nconst code = await dialog.open<MkBarcodeScannerDialog, string | null>(MkBarcodeScannerDialog, { size: 'sm' }).afterClosed;\nif (code) this.search.setValue(code);\n```",
|
|
24268
|
+
"file": "projects/mk-kit/media/scanner/barcode-scanner-dialog.ts",
|
|
24269
|
+
"kind": "component",
|
|
24270
|
+
"selector": "mk-barcode-scanner-dialog",
|
|
24271
|
+
"selectors": [
|
|
24272
|
+
"mk-barcode-scanner-dialog"
|
|
24273
|
+
],
|
|
24274
|
+
"inputs": [],
|
|
24275
|
+
"outputs": [],
|
|
24276
|
+
"methods": [],
|
|
24277
|
+
"properties": [],
|
|
24278
|
+
"queries": [],
|
|
24279
|
+
"docs": "/components/images"
|
|
24280
|
+
},
|
|
24281
|
+
{
|
|
24282
|
+
"name": "MK_BARCODE_DEFAULT_FORMATS",
|
|
24283
|
+
"description": "",
|
|
24284
|
+
"file": "projects/mk-kit/media/scanner/barcode-scanner.ts",
|
|
24285
|
+
"kind": "const",
|
|
24286
|
+
"type": "MkBarcodeFormat[]"
|
|
24287
|
+
},
|
|
24288
|
+
{
|
|
24289
|
+
"name": "MkBarcodeScannerDialogData",
|
|
24290
|
+
"description": "Optional data for `MkBarcodeScannerDialog`.",
|
|
24291
|
+
"file": "projects/mk-kit/media/scanner/barcode-scanner-dialog.ts",
|
|
24292
|
+
"kind": "interface",
|
|
24293
|
+
"members": [
|
|
24294
|
+
{
|
|
24295
|
+
"name": "title",
|
|
24296
|
+
"type": "string | undefined",
|
|
24297
|
+
"description": "",
|
|
24298
|
+
"optional": true
|
|
24299
|
+
},
|
|
24300
|
+
{
|
|
24301
|
+
"name": "formats",
|
|
24302
|
+
"type": "MkBarcodeFormat[] | undefined",
|
|
24303
|
+
"description": "",
|
|
24304
|
+
"optional": true
|
|
24305
|
+
}
|
|
24306
|
+
]
|
|
24307
|
+
},
|
|
24308
|
+
{
|
|
24309
|
+
"name": "MkBarcodeFormat",
|
|
24310
|
+
"description": "Symbologies the scanner reads; names follow `Html5QrcodeSupportedFormats`.",
|
|
24311
|
+
"file": "projects/mk-kit/media/scanner/barcode-scanner.ts",
|
|
24312
|
+
"kind": "type",
|
|
24313
|
+
"definition": "| 'QR_CODE' | 'EAN_13' | 'EAN_8' | 'CODE_128' | 'CODE_39' | 'UPC_A' | 'UPC_E' | 'DATA_MATRIX' | 'ITF' | 'CODABAR'"
|
|
24314
|
+
}
|
|
24315
|
+
]
|
|
24316
|
+
},
|
|
23855
24317
|
{
|
|
23856
24318
|
"name": "testing",
|
|
23857
24319
|
"import": "@mk-kit/ui/testing",
|
package/data/llms-full.txt
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @mk-kit/ui 0.
|
|
1
|
+
# @mk-kit/ui 0.57.0 — full API reference
|
|
2
2
|
|
|
3
3
|
Generated from the library sources. Browsable version: https://mk-kit.dev/api · JSON: https://mk-kit.dev/api.json · Guides: https://mk-kit.dev/llms.txt
|
|
4
4
|
|
|
@@ -911,6 +911,14 @@ Members:
|
|
|
911
911
|
| `translationEditorReset` | `string` | |
|
|
912
912
|
| `translationEditorExport` | `string` | |
|
|
913
913
|
| `translationEditorKeys` | `string` | |
|
|
914
|
+
| `sessionExpiryTitle` | `string` | Session-expiry dialog (`@mk-kit/ui/attention`). |
|
|
915
|
+
| `sessionExpiryExtend` | `string` | |
|
|
916
|
+
| `sessionExpiryExtending` | `string` | |
|
|
917
|
+
| `sessionExpiryLogout` | `string` | |
|
|
918
|
+
| `sessionExpiryBody` | `(countdown: string) => string` | |
|
|
919
|
+
| `scannerTitle` | `string` | Barcode scanner (`@mk-kit/ui/media/scanner`). |
|
|
920
|
+
| `scannerHint` | `string` | |
|
|
921
|
+
| `scannerCameraError` | `string` | |
|
|
914
922
|
| `resultsCount` | `(count: number) => string` | Announced when a filterable list updates (autocomplete, multi-select, command palette). |
|
|
915
923
|
| `previousPage` | `string` | Pagination: previous page control. |
|
|
916
924
|
| `nextPage` | `string` | Pagination: next page control. |
|
|
@@ -12327,6 +12335,261 @@ Values interpolated into `{{name}}` placeholders.
|
|
|
12327
12335
|
type MkTranslateParams = Record<string, unknown>;
|
|
12328
12336
|
```
|
|
12329
12337
|
|
|
12338
|
+
## @mk-kit/ui/attention
|
|
12339
|
+
|
|
12340
|
+
16 exports. `import { … } from '@mk-kit/ui/attention';`
|
|
12341
|
+
|
|
12342
|
+
### MkSessionExpiryDialog (component)
|
|
12343
|
+
|
|
12344
|
+
Selector: `mk-session-expiry-dialog`
|
|
12345
|
+
|
|
12346
|
+
Docs: https://mk-kit.dev/components/attention
|
|
12347
|
+
|
|
12348
|
+
Import: `import { MkSessionExpiryDialog } from '@mk-kit/ui/attention';`
|
|
12349
|
+
|
|
12350
|
+
Last call before a session ends: counts down and offers to extend.
|
|
12351
|
+
Reaching zero ends the session, so doing nothing still produces a definite,
|
|
12352
|
+
visible outcome. Opened by `MkSessionExpiry`; usable on its own.
|
|
12353
|
+
|
|
12354
|
+
### MkNotificationSound (service)
|
|
12355
|
+
|
|
12356
|
+
Docs: https://mk-kit.dev/components/attention
|
|
12357
|
+
|
|
12358
|
+
Import: `import { MkNotificationSound } from '@mk-kit/ui/attention';`
|
|
12359
|
+
|
|
12360
|
+
Alert sounds for incoming work (orders, messages, tickets) with the
|
|
12361
|
+
browser's autoplay rules handled: an `AudioContext` stays suspended until a
|
|
12362
|
+
user gesture, so a sound fired by a WebSocket message would be silent. The
|
|
12363
|
+
context is unlocked when the user enables sound (a click) and lazily on the
|
|
12364
|
+
first interaction anywhere in the app. The default sound is synthesised
|
|
12365
|
+
(a short C–E–G chime) — nothing to ship, no CORS, lowest latency; file
|
|
12366
|
+
presets are fetched and decoded once and fall back to the chime when they
|
|
12367
|
+
fail. The on/off preference lives in localStorage under a configurable key.
|
|
12368
|
+
|
|
12369
|
+
```ts
|
|
12370
|
+
provideMkNotificationSound({ presets: [MK_CHIME_PRESET, { id: 'ding', label: 'Ding', url: '/assets/ding.wav' }] })
|
|
12371
|
+
sound.primeOnFirstInteraction(); // at app start
|
|
12372
|
+
sound.play(settings.newOrderSound); // on an event, honours the device mute
|
|
12373
|
+
sound.preview('ding'); // settings page test button
|
|
12374
|
+
```
|
|
12375
|
+
|
|
12376
|
+
Methods:
|
|
12377
|
+
|
|
12378
|
+
| Signature | Description |
|
|
12379
|
+
| --- | --- |
|
|
12380
|
+
| `isEnabled(): boolean` | Whether the device has sound on. |
|
|
12381
|
+
| `hasBeenAsked(): boolean` | Whether the user ever answered the "enable sound?" question on this device. |
|
|
12382
|
+
| `setEnabled(enabled: boolean): void` | Persist the preference; call from a click so audio unlocks at once. |
|
|
12383
|
+
| `primeOnFirstInteraction(): void` | Arm a one-time listener so the first pointer/key interaction unlocks audio. |
|
|
12384
|
+
| `chime(): void` | The default chime, if the device has sound on. |
|
|
12385
|
+
| `play(soundId: string, customUrl?: string \| null): void` | Play the sound configured for an event: a preset id, `custom` (with `customUrl`) or `none` (silent). Unknown ids and failed loads fall back to the chime. Honours the device mute. |
|
|
12386
|
+
| `preview(soundId: string, customUrl?: string \| null): void` | Same as `play()` but ignores the device mute — for settings test buttons. |
|
|
12387
|
+
|
|
12388
|
+
Properties:
|
|
12389
|
+
|
|
12390
|
+
| Name | Type | Description |
|
|
12391
|
+
| --- | --- | --- |
|
|
12392
|
+
| `presets` | `MkSoundPreset[]` | The selectable presets (always includes the chime). |
|
|
12393
|
+
|
|
12394
|
+
### MkSessionExpiry (service)
|
|
12395
|
+
|
|
12396
|
+
Docs: https://mk-kit.dev/components/attention
|
|
12397
|
+
|
|
12398
|
+
Import: `import { MkSessionExpiry } from '@mk-kit/ui/attention';`
|
|
12399
|
+
|
|
12400
|
+
Watches `expiresAt()` and warns BEFORE the session lapses, so a session
|
|
12401
|
+
never ends silently: the dialog offers to extend, or signs out at zero.
|
|
12402
|
+
Re-arms itself whenever `expiresAt()` changes (every token rotation),
|
|
12403
|
+
runs the timer outside the Angular zone and only in the browser. Started
|
|
12404
|
+
automatically by `provideMkSessionExpiry`.
|
|
12405
|
+
|
|
12406
|
+
Methods:
|
|
12407
|
+
|
|
12408
|
+
| Signature | Description |
|
|
12409
|
+
| --- | --- |
|
|
12410
|
+
| `start(): void` | Begin watching. Idempotent; called by the provider's initializer. |
|
|
12411
|
+
|
|
12412
|
+
Properties:
|
|
12413
|
+
|
|
12414
|
+
| Name | Type | Description |
|
|
12415
|
+
| --- | --- | --- |
|
|
12416
|
+
| `open` | `WritableSignal<boolean>` | Whether the dialog is currently open. |
|
|
12417
|
+
|
|
12418
|
+
### MkTabAttention (service)
|
|
12419
|
+
|
|
12420
|
+
Docs: https://mk-kit.dev/components/attention
|
|
12421
|
+
|
|
12422
|
+
Import: `import { MkTabAttention } from '@mk-kit/ui/attention';`
|
|
12423
|
+
|
|
12424
|
+
Messenger-style tab attention: while unhandled work exists the favicon
|
|
12425
|
+
carries a red counter badge, and — only while the tab is hidden — the
|
|
12426
|
+
title alternates with "(N) label" so a pinned tab flashes in the tab strip.
|
|
12427
|
+
Focusing the tab stops the blinking (someone is looking) but keeps the
|
|
12428
|
+
badge until the count reaches zero. SSR-safe: every entry point bails
|
|
12429
|
+
without a `document`; the blink timer runs outside the Angular zone.
|
|
12430
|
+
|
|
12431
|
+
```ts
|
|
12432
|
+
private attention = inject(MkTabAttention);
|
|
12433
|
+
effect(() => this.attention.set(this.pending().length, 'new orders'));
|
|
12434
|
+
```
|
|
12435
|
+
|
|
12436
|
+
Methods:
|
|
12437
|
+
|
|
12438
|
+
| Signature | Description |
|
|
12439
|
+
| --- | --- |
|
|
12440
|
+
| `set(count: number, label?: string): void` | Update the pending count and the label used in the blinking title. |
|
|
12441
|
+
| `clear(): void` | Drop the badge and the blinking entirely and stop listening. |
|
|
12442
|
+
|
|
12443
|
+
Properties:
|
|
12444
|
+
|
|
12445
|
+
| Name | Type | Description |
|
|
12446
|
+
| --- | --- | --- |
|
|
12447
|
+
| `count` | `WritableSignal<number>` | The count currently shown (0 = nothing pending). |
|
|
12448
|
+
|
|
12449
|
+
### provideMkNotificationSound (function)
|
|
12450
|
+
|
|
12451
|
+
Import: `import { provideMkNotificationSound } from '@mk-kit/ui/attention';`
|
|
12452
|
+
|
|
12453
|
+
Register presets / storage key for `MkNotificationSound`. Optional.
|
|
12454
|
+
|
|
12455
|
+
```ts
|
|
12456
|
+
function provideMkNotificationSound(config: MkNotificationSoundConfig): { provide: InjectionToken<MkNotificationSoundConfig>; useValue: MkNotificationSoundConfig; }
|
|
12457
|
+
```
|
|
12458
|
+
|
|
12459
|
+
### provideMkSessionExpiry (function)
|
|
12460
|
+
|
|
12461
|
+
Import: `import { provideMkSessionExpiry } from '@mk-kit/ui/attention';`
|
|
12462
|
+
|
|
12463
|
+
Register the session-expiry watcher; it starts with the application.
|
|
12464
|
+
|
|
12465
|
+
```ts
|
|
12466
|
+
provideMkSessionExpiry({
|
|
12467
|
+
expiresAt: () => auth.tokenExpiresAt(),
|
|
12468
|
+
extend: () => firstValueFrom(auth.refresh()),
|
|
12469
|
+
onExpire: () => auth.logout(),
|
|
12470
|
+
warnBeforeMs: 2 * 60_000,
|
|
12471
|
+
})
|
|
12472
|
+
```
|
|
12473
|
+
|
|
12474
|
+
```ts
|
|
12475
|
+
function provideMkSessionExpiry(config: MkSessionExpiryConfig): EnvironmentProviders
|
|
12476
|
+
```
|
|
12477
|
+
|
|
12478
|
+
### provideMkTabAttention (function)
|
|
12479
|
+
|
|
12480
|
+
Import: `import { provideMkTabAttention } from '@mk-kit/ui/attention';`
|
|
12481
|
+
|
|
12482
|
+
Register options for `MkTabAttention`. Optional — the defaults work.
|
|
12483
|
+
|
|
12484
|
+
```ts
|
|
12485
|
+
function provideMkTabAttention(config: MkTabAttentionConfig): { provide: InjectionToken<MkTabAttentionConfig>; useValue: MkTabAttentionConfig; }
|
|
12486
|
+
```
|
|
12487
|
+
|
|
12488
|
+
### MK_NOTIFICATION_SOUND_CONFIG (token)
|
|
12489
|
+
|
|
12490
|
+
Import: `import { MK_NOTIFICATION_SOUND_CONFIG } from '@mk-kit/ui/attention';`
|
|
12491
|
+
|
|
12492
|
+
```ts
|
|
12493
|
+
const MK_NOTIFICATION_SOUND_CONFIG: InjectionToken<MkNotificationSoundConfig>;
|
|
12494
|
+
```
|
|
12495
|
+
|
|
12496
|
+
### MK_SESSION_EXPIRY_CONFIG (token)
|
|
12497
|
+
|
|
12498
|
+
Import: `import { MK_SESSION_EXPIRY_CONFIG } from '@mk-kit/ui/attention';`
|
|
12499
|
+
|
|
12500
|
+
```ts
|
|
12501
|
+
const MK_SESSION_EXPIRY_CONFIG: InjectionToken<MkSessionExpiryConfig>;
|
|
12502
|
+
```
|
|
12503
|
+
|
|
12504
|
+
### MK_TAB_ATTENTION_CONFIG (token)
|
|
12505
|
+
|
|
12506
|
+
Import: `import { MK_TAB_ATTENTION_CONFIG } from '@mk-kit/ui/attention';`
|
|
12507
|
+
|
|
12508
|
+
```ts
|
|
12509
|
+
const MK_TAB_ATTENTION_CONFIG: InjectionToken<MkTabAttentionConfig>;
|
|
12510
|
+
```
|
|
12511
|
+
|
|
12512
|
+
### MK_CHIME_PRESET (const)
|
|
12513
|
+
|
|
12514
|
+
Import: `import { MK_CHIME_PRESET } from '@mk-kit/ui/attention';`
|
|
12515
|
+
|
|
12516
|
+
The always-available synthesised sound.
|
|
12517
|
+
|
|
12518
|
+
```ts
|
|
12519
|
+
const MK_CHIME_PRESET: MkSoundPreset;
|
|
12520
|
+
```
|
|
12521
|
+
|
|
12522
|
+
### MkNotificationSoundConfig (interface)
|
|
12523
|
+
|
|
12524
|
+
Import: `import { MkNotificationSoundConfig } from '@mk-kit/ui/attention';`
|
|
12525
|
+
|
|
12526
|
+
Options for `MkNotificationSound`.
|
|
12527
|
+
|
|
12528
|
+
Members:
|
|
12529
|
+
|
|
12530
|
+
| Name | Type | Description |
|
|
12531
|
+
| --- | --- | --- |
|
|
12532
|
+
| `presets`? | `MkSoundPreset[] \| undefined` | Selectable sounds; the ids `custom` and `none` are reserved. Default: the chime only. |
|
|
12533
|
+
| `storageKey`? | `(() => string) \| undefined` | localStorage key for the on/off preference — a function so it can vary per tenant / user. |
|
|
12534
|
+
| `volume`? | `number \| undefined` | Output gain for file presets (0–1). Default `0.8`. |
|
|
12535
|
+
|
|
12536
|
+
### MkSessionExpiryConfig (interface)
|
|
12537
|
+
|
|
12538
|
+
Import: `import { MkSessionExpiryConfig } from '@mk-kit/ui/attention';`
|
|
12539
|
+
|
|
12540
|
+
Options for `provideMkSessionExpiry`.
|
|
12541
|
+
|
|
12542
|
+
Members:
|
|
12543
|
+
|
|
12544
|
+
| Name | Type | Description |
|
|
12545
|
+
| --- | --- | --- |
|
|
12546
|
+
| `expiresAt` | `() => number \| null` | Epoch ms when the session lapses, or `null` when there is none. Read reactively. |
|
|
12547
|
+
| `warnBeforeMs`? | `number \| undefined` | How long before the lapse the dialog appears. Default 2 minutes. |
|
|
12548
|
+
| `extend` | `() => Promise<unknown>` | Extend the session (refresh the token). Resolve = extended, reject = nothing to extend. |
|
|
12549
|
+
| `onExpire` | `() => void` | End the session (sign out, navigate). |
|
|
12550
|
+
| `enabled`? | `(() => boolean) \| undefined` | Read reactively; `false` suspends the watcher (a kiosk / PIN mode, say). |
|
|
12551
|
+
|
|
12552
|
+
### MkSessionExpiryDialogData (interface)
|
|
12553
|
+
|
|
12554
|
+
Import: `import { MkSessionExpiryDialogData } from '@mk-kit/ui/attention';`
|
|
12555
|
+
|
|
12556
|
+
Data handed to `MkSessionExpiryDialog`.
|
|
12557
|
+
|
|
12558
|
+
Members:
|
|
12559
|
+
|
|
12560
|
+
| Name | Type | Description |
|
|
12561
|
+
| --- | --- | --- |
|
|
12562
|
+
| `expiresAt` | `number` | |
|
|
12563
|
+
| `extend` | `() => Promise<unknown>` | |
|
|
12564
|
+
| `onExpire` | `() => void` | |
|
|
12565
|
+
|
|
12566
|
+
### MkSoundPreset (interface)
|
|
12567
|
+
|
|
12568
|
+
Import: `import { MkSoundPreset } from '@mk-kit/ui/attention';`
|
|
12569
|
+
|
|
12570
|
+
One selectable alert sound. `url: null` = the synthesised chime.
|
|
12571
|
+
|
|
12572
|
+
Members:
|
|
12573
|
+
|
|
12574
|
+
| Name | Type | Description |
|
|
12575
|
+
| --- | --- | --- |
|
|
12576
|
+
| `id` | `string` | |
|
|
12577
|
+
| `label` | `string` | |
|
|
12578
|
+
| `url` | `string \| null` | |
|
|
12579
|
+
|
|
12580
|
+
### MkTabAttentionConfig (interface)
|
|
12581
|
+
|
|
12582
|
+
Import: `import { MkTabAttentionConfig } from '@mk-kit/ui/attention';`
|
|
12583
|
+
|
|
12584
|
+
Options for `MkTabAttention`, set with `provideMkTabAttention`.
|
|
12585
|
+
|
|
12586
|
+
Members:
|
|
12587
|
+
|
|
12588
|
+
| Name | Type | Description |
|
|
12589
|
+
| --- | --- | --- |
|
|
12590
|
+
| `badgeColor`? | `string \| undefined` | Badge fill colour (any CSS colour). Default `#e53935`. |
|
|
12591
|
+
| `blinkMs`? | `number \| undefined` | Title blink period in ms while the tab is hidden. Default `1200`. |
|
|
12592
|
+
|
|
12330
12593
|
## @mk-kit/ui/feedback
|
|
12331
12594
|
|
|
12332
12595
|
55 exports. `import { … } from '@mk-kit/ui/feedback';`
|
|
@@ -16243,6 +16506,97 @@ Ukrainian validation messages rendered by `mk-form-field`.
|
|
|
16243
16506
|
const MK_UK_VALIDATION: MkValidationStrings;
|
|
16244
16507
|
```
|
|
16245
16508
|
|
|
16509
|
+
## @mk-kit/ui/media/scanner
|
|
16510
|
+
|
|
16511
|
+
5 exports. `import { … } from '@mk-kit/ui/media/scanner';`
|
|
16512
|
+
|
|
16513
|
+
### MkBarcodeScanner (component)
|
|
16514
|
+
|
|
16515
|
+
Selector: `mk-barcode-scanner`
|
|
16516
|
+
|
|
16517
|
+
Docs: https://mk-kit.dev/components/images
|
|
16518
|
+
|
|
16519
|
+
Import: `import { MkBarcodeScanner } from '@mk-kit/ui/media/scanner';`
|
|
16520
|
+
|
|
16521
|
+
Camera barcode / QR reader. Starts the rear camera when it appears, emits
|
|
16522
|
+
`scanned` once with the first decoded text and stops. The decoder
|
|
16523
|
+
(`html5-qrcode`, an optional peer dependency) is loaded on demand, so pages
|
|
16524
|
+
that only *offer* scanning ship nothing extra until a scan starts. Use
|
|
16525
|
+
inline, or through `MkBarcodeScannerDialog`.
|
|
16526
|
+
|
|
16527
|
+
```html
|
|
16528
|
+
<mk-barcode-scanner (scanned)="onCode($event)" (failed)="show($event)" />
|
|
16529
|
+
```
|
|
16530
|
+
|
|
16531
|
+
Inputs:
|
|
16532
|
+
|
|
16533
|
+
| Name | Type | Default | Description |
|
|
16534
|
+
| --- | --- | --- | --- |
|
|
16535
|
+
| `formats` | `MkBarcodeFormat[]` | `MK_BARCODE_DEFAULT_FORMATS` | Symbologies to decode. Default: QR + the retail 1-D codes. |
|
|
16536
|
+
| `fps` | `number` | `10` | Frames per second offered to the decoder. Default 10. |
|
|
16537
|
+
| `hint` | `boolean` | `true` | Show the built-in hint line above the viewfinder. Default `true`. |
|
|
16538
|
+
| `continuous` | `boolean` | `false` | Keep scanning after a hit instead of stopping. Default `false`. |
|
|
16539
|
+
|
|
16540
|
+
Outputs:
|
|
16541
|
+
|
|
16542
|
+
| Name | Type | Description |
|
|
16543
|
+
| --- | --- | --- |
|
|
16544
|
+
| `scanned` | `string` | Decoded text. |
|
|
16545
|
+
| `failed` | `string` | The camera could not start (permission, no device, insecure context). |
|
|
16546
|
+
|
|
16547
|
+
Methods:
|
|
16548
|
+
|
|
16549
|
+
| Signature | Description |
|
|
16550
|
+
| --- | --- |
|
|
16551
|
+
| `stop(): Promise<void>` | Stop the camera and release it. Safe to call twice. |
|
|
16552
|
+
|
|
16553
|
+
### MkBarcodeScannerDialog (component)
|
|
16554
|
+
|
|
16555
|
+
Selector: `mk-barcode-scanner-dialog`
|
|
16556
|
+
|
|
16557
|
+
Docs: https://mk-kit.dev/components/images
|
|
16558
|
+
|
|
16559
|
+
Import: `import { MkBarcodeScannerDialog } from '@mk-kit/ui/media/scanner';`
|
|
16560
|
+
|
|
16561
|
+
The scanner in a dialog: resolves with the decoded text, or `null` when
|
|
16562
|
+
cancelled. Open it with `MkDialogService`:
|
|
16563
|
+
|
|
16564
|
+
```ts
|
|
16565
|
+
const code = await dialog.open<MkBarcodeScannerDialog, string | null>(MkBarcodeScannerDialog, { size: 'sm' }).afterClosed;
|
|
16566
|
+
if (code) this.search.setValue(code);
|
|
16567
|
+
```
|
|
16568
|
+
|
|
16569
|
+
### MK_BARCODE_DEFAULT_FORMATS (const)
|
|
16570
|
+
|
|
16571
|
+
Import: `import { MK_BARCODE_DEFAULT_FORMATS } from '@mk-kit/ui/media/scanner';`
|
|
16572
|
+
|
|
16573
|
+
```ts
|
|
16574
|
+
const MK_BARCODE_DEFAULT_FORMATS: MkBarcodeFormat[];
|
|
16575
|
+
```
|
|
16576
|
+
|
|
16577
|
+
### MkBarcodeScannerDialogData (interface)
|
|
16578
|
+
|
|
16579
|
+
Import: `import { MkBarcodeScannerDialogData } from '@mk-kit/ui/media/scanner';`
|
|
16580
|
+
|
|
16581
|
+
Optional data for `MkBarcodeScannerDialog`.
|
|
16582
|
+
|
|
16583
|
+
Members:
|
|
16584
|
+
|
|
16585
|
+
| Name | Type | Description |
|
|
16586
|
+
| --- | --- | --- |
|
|
16587
|
+
| `title`? | `string \| undefined` | |
|
|
16588
|
+
| `formats`? | `MkBarcodeFormat[] \| undefined` | |
|
|
16589
|
+
|
|
16590
|
+
### MkBarcodeFormat (type)
|
|
16591
|
+
|
|
16592
|
+
Import: `import { MkBarcodeFormat } from '@mk-kit/ui/media/scanner';`
|
|
16593
|
+
|
|
16594
|
+
Symbologies the scanner reads; names follow `Html5QrcodeSupportedFormats`.
|
|
16595
|
+
|
|
16596
|
+
```ts
|
|
16597
|
+
type MkBarcodeFormat = | 'QR_CODE' | 'EAN_13' | 'EAN_8' | 'CODE_128' | 'CODE_39' | 'UPC_A' | 'UPC_E' | 'DATA_MATRIX' | 'ITF' | 'CODABAR';
|
|
16598
|
+
```
|
|
16599
|
+
|
|
16246
16600
|
## @mk-kit/ui/testing
|
|
16247
16601
|
|
|
16248
16602
|
23 exports. `import { … } from '@mk-kit/ui/testing';`
|
package/data/llms.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# mk-kit
|
|
2
2
|
|
|
3
|
-
> Themable, accessible Angular 22 component library for admin dashboards and UIs. Signals-based, WCAG 2.1 AA, controlled entirely through CSS variables with light/dark out of the box. — `@mk-kit/ui` 0.
|
|
3
|
+
> Themable, accessible Angular 22 component library for admin dashboards and UIs. Signals-based, WCAG 2.1 AA, controlled entirely through CSS variables with light/dark out of the box. — `@mk-kit/ui` 0.57.0. 177 components, 45 directives, 20 services and 155 helper functions across 37 tree-shakeable entry points. MIT licensed, zero runtime dependencies beyond Angular. Standalone components, signals, OnPush, zoneless-ready, SSR-safe, RTL and i18n via `provideMkI18n`.
|
|
4
4
|
|
|
5
5
|
Install with `ng add @mk-kit/ui` (or `npm i @mk-kit/ui` + import `@mk-kit/ui/styles/mk-kit.css`). Import from the group entry points (`@mk-kit/ui/forms`, `@mk-kit/ui/table`, …) so each lazy chunk only carries what it uses; the root `@mk-kit/ui` entry re-exports everything. Every component is standalone: add the class to a component's `imports`. Theme with `--mk-*` CSS custom properties; `MkThemeService` switches light/dark/system and density.
|
|
6
6
|
|
|
@@ -35,6 +35,7 @@ Install with `ng add @mk-kit/ui` (or `npm i @mk-kit/ui` + import `@mk-kit/ui/sty
|
|
|
35
35
|
- [Sliders & rating](https://mk-kit.dev/components/sliders)
|
|
36
36
|
- [Tooltips & popovers](https://mk-kit.dev/components/popovers)
|
|
37
37
|
- [Dialogs](https://mk-kit.dev/components/dialogs)
|
|
38
|
+
- [Attention](https://mk-kit.dev/components/attention)
|
|
38
39
|
- [Translate](https://mk-kit.dev/components/translate)
|
|
39
40
|
- [Status & notifications](https://mk-kit.dev/components/status)
|
|
40
41
|
- [Proportion & KPI charts](https://mk-kit.dev/components/proportion-charts)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mk-kit/mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.57.0",
|
|
4
4
|
"description": "MCP server for @mk-kit/ui — lets AI coding assistants look up every component, directive, service and helper of the mk-kit Angular library (inputs, outputs, methods, import paths, docs links).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|