@peers-app/peers-ui 0.33.21 → 0.33.22

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.
@@ -1,37 +1,4 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
2
  Object.defineProperty(exports, "__esModule", { value: true });
36
3
  exports.canScanQr = canScanQr;
37
4
  exports.QrScanner = QrScanner;
@@ -130,7 +97,8 @@ function QrScanner(props) {
130
97
  (async () => {
131
98
  try {
132
99
  if (!detector) {
133
- jsqr = (await Promise.resolve().then(() => __importStar(require("jsqr")))).default;
100
+ // Loaded on first use. A `require`, as `import()` would be a separate bundle chunk.
101
+ jsqr = require("jsqr").default;
134
102
  }
135
103
  stream = await navigator.mediaDevices.getUserMedia({
136
104
  video: { facingMode: { ideal: "environment" } },
package/dist/theme.css CHANGED
@@ -2362,3 +2362,214 @@
2362
2362
  stroke-linecap: round;
2363
2363
  stroke-dasharray: 0.01 4.5;
2364
2364
  }
2365
+
2366
+ /* ─── Markdown editor: links, code, dividers, callouts, highlight ─────────────────────────
2367
+ components/markdown-editor: link-plugin.tsx (the link popup), code-plugin.tsx (the language
2368
+ picker), blocks.ts (dividers and callouts), theme.ts (the class names). */
2369
+
2370
+ .editor-input .editor-link {
2371
+ cursor: pointer;
2372
+ }
2373
+
2374
+ /* The link popup, under the link the caret is in: its URL, Edit and Remove, or the URL input. */
2375
+ .peers-link-popup {
2376
+ position: fixed;
2377
+ z-index: 1080;
2378
+ min-width: 14rem;
2379
+ padding: 0.25rem 0.375rem;
2380
+ border: 1px solid var(--bs-border-color);
2381
+ border-radius: var(--bs-border-radius);
2382
+ background: var(--bs-body-bg);
2383
+ box-shadow: var(--bs-box-shadow-sm);
2384
+ font-size: 0.875rem;
2385
+ }
2386
+
2387
+ .peers-link-popup-url {
2388
+ flex: 1 1 auto;
2389
+ min-width: 0;
2390
+ padding: 0 0.25rem;
2391
+ }
2392
+
2393
+ .peers-link-popup .form-control {
2394
+ min-width: 14rem;
2395
+ }
2396
+
2397
+ /* Code blocks, colored by language (Prism's tokens; theme.ts maps them to these classes). */
2398
+ .editor-input .editor-code {
2399
+ display: block;
2400
+ margin: 0.5rem 0;
2401
+ padding: 0.5rem 0.75rem;
2402
+ overflow-x: auto;
2403
+ border: 1px solid var(--bs-border-color-translucent);
2404
+ border-radius: var(--bs-border-radius);
2405
+ background: var(--bs-tertiary-bg);
2406
+ color: var(--bs-body-color);
2407
+ font-family: var(--bs-font-monospace);
2408
+ font-size: 0.875em;
2409
+ line-height: 1.5;
2410
+ white-space: pre;
2411
+ tab-size: 2;
2412
+ }
2413
+
2414
+ .editor-token-comment {
2415
+ color: var(--bs-secondary-color);
2416
+ font-style: italic;
2417
+ }
2418
+
2419
+ .editor-token-punctuation {
2420
+ color: var(--bs-secondary-color);
2421
+ }
2422
+
2423
+ .editor-token-keyword {
2424
+ color: #a626a4;
2425
+ }
2426
+
2427
+ .editor-token-string,
2428
+ .editor-token-inserted {
2429
+ color: #50a14f;
2430
+ }
2431
+
2432
+ .editor-token-constant,
2433
+ .editor-token-deleted {
2434
+ color: #c18401;
2435
+ }
2436
+
2437
+ .editor-token-function {
2438
+ color: #4078f2;
2439
+ }
2440
+
2441
+ .editor-token-attr,
2442
+ .editor-token-variable {
2443
+ color: #e45649;
2444
+ }
2445
+
2446
+ .editor-token-operator {
2447
+ color: #0184bc;
2448
+ }
2449
+
2450
+ [data-bs-theme="dark"] .editor-token-keyword {
2451
+ color: #c678dd;
2452
+ }
2453
+
2454
+ [data-bs-theme="dark"] .editor-token-string,
2455
+ [data-bs-theme="dark"] .editor-token-inserted {
2456
+ color: #98c379;
2457
+ }
2458
+
2459
+ [data-bs-theme="dark"] .editor-token-constant,
2460
+ [data-bs-theme="dark"] .editor-token-deleted {
2461
+ color: #d19a66;
2462
+ }
2463
+
2464
+ [data-bs-theme="dark"] .editor-token-function {
2465
+ color: #61afef;
2466
+ }
2467
+
2468
+ [data-bs-theme="dark"] .editor-token-attr,
2469
+ [data-bs-theme="dark"] .editor-token-variable {
2470
+ color: #e06c75;
2471
+ }
2472
+
2473
+ [data-bs-theme="dark"] .editor-token-operator {
2474
+ color: #56b6c2;
2475
+ }
2476
+
2477
+ /* The language picker, at the top right of the code block the caret is in. */
2478
+ .peers-code-language {
2479
+ position: fixed;
2480
+ z-index: 1070;
2481
+ width: auto;
2482
+ max-width: 10rem;
2483
+ padding: 0 1.75rem 0 0.5rem;
2484
+ transform: translateX(-100%);
2485
+ font-size: 0.75rem;
2486
+ opacity: 0.85;
2487
+ }
2488
+
2489
+ .peers-code-language:focus,
2490
+ .peers-code-language:hover {
2491
+ opacity: 1;
2492
+ }
2493
+
2494
+ /* Dividers; a selected one (clicked, so Backspace removes it) is marked. */
2495
+ .editor-input .editor-hr {
2496
+ margin: 0.75rem 0;
2497
+ padding: 0.25rem 0;
2498
+ border: none;
2499
+ background: none;
2500
+ cursor: pointer;
2501
+ opacity: 1;
2502
+ }
2503
+
2504
+ .editor-input .editor-hr::after {
2505
+ content: "";
2506
+ display: block;
2507
+ height: 1px;
2508
+ background: var(--bs-border-color);
2509
+ }
2510
+
2511
+ .editor-input .editor-hr.selected {
2512
+ outline: 2px solid var(--bs-primary);
2513
+ outline-offset: 1px;
2514
+ border-radius: 2px;
2515
+ }
2516
+
2517
+ /* Callouts (> [!NOTE] and the like): a quote with its kind's color and title. */
2518
+ .editor-input .editor-callout {
2519
+ margin: 0.5rem 0;
2520
+ padding: 0.375rem 0.75rem;
2521
+ border-left: 4px solid var(--peers-callout-color);
2522
+ border-radius: 0 var(--bs-border-radius) var(--bs-border-radius) 0;
2523
+ background: color-mix(in srgb, var(--peers-callout-color) 8%, transparent);
2524
+ color: var(--bs-body-color);
2525
+ font-size: inherit;
2526
+ }
2527
+
2528
+ .editor-input .editor-callout::before {
2529
+ content: attr(data-callout-title);
2530
+ display: block;
2531
+ color: var(--peers-callout-color);
2532
+ font-weight: 600;
2533
+ }
2534
+
2535
+ .editor-callout-note {
2536
+ --peers-callout-color: var(--bs-primary);
2537
+ }
2538
+
2539
+ .editor-callout-tip {
2540
+ --peers-callout-color: var(--bs-success);
2541
+ }
2542
+
2543
+ .editor-callout-important {
2544
+ --peers-callout-color: #8250df;
2545
+ }
2546
+
2547
+ .editor-callout-warning {
2548
+ --peers-callout-color: #bf8700;
2549
+ }
2550
+
2551
+ .editor-callout-caution {
2552
+ --peers-callout-color: var(--bs-danger);
2553
+ }
2554
+
2555
+ [data-bs-theme="dark"] .editor-callout-important {
2556
+ --peers-callout-color: #a371f7;
2557
+ }
2558
+
2559
+ [data-bs-theme="dark"] .editor-callout-warning {
2560
+ --peers-callout-color: #d29922;
2561
+ }
2562
+
2563
+ /* ==Highlighted text==: Lexical wraps it in <mark>, which Bootstrap pads and colors. */
2564
+ .editor-input mark {
2565
+ padding: 0;
2566
+ background: none;
2567
+ color: inherit;
2568
+ }
2569
+
2570
+ .editor-text-highlight {
2571
+ padding: 0 0.1em;
2572
+ border-radius: 2px;
2573
+ background: rgba(255, 212, 0, 0.4);
2574
+ color: inherit;
2575
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@peers-app/peers-ui",
3
- "version": "0.33.21",
3
+ "version": "0.33.22",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/peers-app/peers-ui.git"
@@ -36,7 +36,7 @@
36
36
  "lint:fix": "biome check --write ."
37
37
  },
38
38
  "peerDependencies": {
39
- "@peers-app/peers-sdk": "^0.33.21",
39
+ "@peers-app/peers-sdk": "^0.33.22",
40
40
  "bootstrap": "^5.3.3",
41
41
  "react": "^18.0.0",
42
42
  "react-dom": "^18.0.0"
@@ -47,7 +47,7 @@
47
47
  "@babel/preset-react": "^7.24.1",
48
48
  "@babel/preset-typescript": "^7.27.1",
49
49
  "@biomejs/biome": "2.3.11",
50
- "@peers-app/peers-sdk": "0.33.21",
50
+ "@peers-app/peers-sdk": "0.33.22",
51
51
  "@testing-library/dom": "^10.4.0",
52
52
  "@testing-library/jest-dom": "^6.6.3",
53
53
  "@testing-library/react": "^16.3.0",
@@ -80,10 +80,12 @@
80
80
  "dependencies": {
81
81
  "@langchain/community": "^0.0.55",
82
82
  "@langchain/core": "^0.1.62",
83
- "@lexical/code": "^0.41.0",
84
- "@lexical/list": "^0.41.0",
85
- "@lexical/markdown": "^0.41.0",
86
- "@lexical/react": "^0.41.0",
83
+ "@lexical/code": "^0.53.0",
84
+ "@lexical/code-prism": "^0.53.0",
85
+ "@lexical/extension": "^0.53.0",
86
+ "@lexical/list": "^0.53.0",
87
+ "@lexical/markdown": "^0.53.0",
88
+ "@lexical/react": "^0.53.0",
87
89
  "@types/sortablejs": "^1.15.8",
88
90
  "bootstrap": "^5.3.3",
89
91
  "bootstrap-icons": "^1.11.3",
@@ -100,7 +102,7 @@
100
102
  "jsqr": "^1.4.0",
101
103
  "keytar": "^7.9.0",
102
104
  "langchain": "^0.1.36",
103
- "lexical": "^0.41.0",
105
+ "lexical": "^0.53.0",
104
106
  "lodash": "^4.17.21",
105
107
  "ml-tree-similarity": "^2.2.0",
106
108
  "moment": "^2.30.1",