@dialpad/dialtone-css 8.80.0-next.9 → 8.81.0-next.1
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/lib/build/js/dialtone_migrate/index.mjs +86 -7
- package/lib/build/js/dialtone_migration_helper/configs/vue3-to-vue-imports.mjs +5 -2
- package/lib/build/less/components/box.less +1 -1
- package/lib/build/less/components/rich-text-editor.less +8 -0
- package/lib/dist/dialtone-default-theme.css +6 -0
- package/lib/dist/dialtone-default-theme.min.css +1 -1
- package/lib/dist/dialtone-docs.json +1 -1
- package/lib/dist/dialtone-fonts.css +53 -0
- package/lib/dist/dialtone.css +6 -0
- package/lib/dist/dialtone.min.css +1 -1
- package/lib/dist/fonts.js +1 -0
- package/lib/dist/js/dialtone_migrate/index.mjs +86 -7
- package/lib/dist/js/dialtone_migrate_border_radius/index.mjs +0 -0
- package/lib/dist/js/dialtone_migrate_chip_interactive/index.mjs +0 -0
- package/lib/dist/js/dialtone_migrate_link_rendering/index.mjs +0 -0
- package/lib/dist/js/dialtone_migrate_props/index.mjs +0 -0
- package/lib/dist/js/dialtone_migrate_scrollbar_always/index.mjs +0 -0
- package/lib/dist/js/dialtone_migrate_tshirt_to_numeric/index.mjs +0 -0
- package/lib/dist/js/dialtone_migrate_typography/index.mjs +0 -0
- package/lib/dist/js/dialtone_migration_helper/configs/vue3-to-vue-imports.mjs +5 -2
- package/package.json +3 -10
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
* npx dialtone-migrate --only color-stops,hsl-to-oklch
|
|
29
29
|
*/
|
|
30
30
|
|
|
31
|
-
import { spawn } from 'node:child_process';
|
|
31
|
+
import { spawn, execFileSync } from 'node:child_process';
|
|
32
32
|
import fs from 'fs/promises';
|
|
33
33
|
import path from 'path';
|
|
34
34
|
import readline from 'readline';
|
|
@@ -302,11 +302,12 @@ const MIGRATIONS = [
|
|
|
302
302
|
{
|
|
303
303
|
id: 'vue3-to-vue-imports',
|
|
304
304
|
name: 'Vue 3 Import Paths',
|
|
305
|
-
description: '@dialpad/dialtone-icons/vue3 and @dialpad/dialtone-vue/vue3 import paths renamed to /vue.',
|
|
305
|
+
description: '@dialpad/dialtone/vue3, @dialpad/dialtone-icons/vue3, and @dialpad/dialtone-vue/vue3 import paths renamed to /vue.',
|
|
306
306
|
category: 'required',
|
|
307
307
|
type: 'config',
|
|
308
308
|
configName: 'vue3-to-vue-imports',
|
|
309
309
|
detectPatterns: [
|
|
310
|
+
/@dialpad\/dialtone\/vue3/,
|
|
310
311
|
/@dialpad\/dialtone-icons\/vue3/,
|
|
311
312
|
/@dialpad\/dialtone-vue\/vue3/,
|
|
312
313
|
],
|
|
@@ -314,6 +315,43 @@ const MIGRATIONS = [
|
|
|
314
315
|
},
|
|
315
316
|
];
|
|
316
317
|
|
|
318
|
+
// ---------------------------------------------------------------------------
|
|
319
|
+
// Migration markers
|
|
320
|
+
// ---------------------------------------------------------------------------
|
|
321
|
+
|
|
322
|
+
const MARKER_DIR = '.dialtone-migrations';
|
|
323
|
+
|
|
324
|
+
function getRepoRoot (cwd) {
|
|
325
|
+
try {
|
|
326
|
+
return execFileSync('git', ['rev-parse', '--show-toplevel'], {
|
|
327
|
+
cwd,
|
|
328
|
+
encoding: 'utf8',
|
|
329
|
+
stdio: ['ignore', 'pipe', 'ignore'],
|
|
330
|
+
}).trim();
|
|
331
|
+
} catch {
|
|
332
|
+
return cwd;
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
function markerPath (cwd, id) {
|
|
337
|
+
return path.join(getRepoRoot(cwd), MARKER_DIR, id);
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
async function checkMigrationMarker (cwd, id) {
|
|
341
|
+
try {
|
|
342
|
+
await fs.access(markerPath(cwd, id));
|
|
343
|
+
return true;
|
|
344
|
+
} catch {
|
|
345
|
+
return false;
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
async function writeMigrationMarker (cwd, id) {
|
|
350
|
+
const p = markerPath(cwd, id);
|
|
351
|
+
await fs.mkdir(path.dirname(p), { recursive: true });
|
|
352
|
+
await fs.writeFile(p, '', 'utf8');
|
|
353
|
+
}
|
|
354
|
+
|
|
317
355
|
// ---------------------------------------------------------------------------
|
|
318
356
|
// CLI parsing
|
|
319
357
|
// ---------------------------------------------------------------------------
|
|
@@ -370,7 +408,7 @@ Examples:
|
|
|
370
408
|
// File walker (shared utility)
|
|
371
409
|
// ---------------------------------------------------------------------------
|
|
372
410
|
|
|
373
|
-
const DEFAULT_IGNORE = ['node_modules', 'dist', '.git', '.vuepress/public', '.vuepress/.temp', '.vuepress/.cache', 'storybook-static'];
|
|
411
|
+
const DEFAULT_IGNORE = ['node_modules', 'dist', '.git', '.vuepress/public', '.vuepress/.temp', '.vuepress/.cache', 'storybook-static', 'compiled'];
|
|
374
412
|
|
|
375
413
|
function isIgnoredPath (fullPath) {
|
|
376
414
|
const segments = fullPath.split(path.sep);
|
|
@@ -386,6 +424,31 @@ function isIgnoredPath (fullPath) {
|
|
|
386
424
|
});
|
|
387
425
|
}
|
|
388
426
|
|
|
427
|
+
/**
|
|
428
|
+
* Filter out files that are ignored by .gitignore using git check-ignore.
|
|
429
|
+
* Falls back gracefully if git is not available.
|
|
430
|
+
*/
|
|
431
|
+
function filterGitIgnored (files, cwd) {
|
|
432
|
+
if (files.length === 0) return files;
|
|
433
|
+
try {
|
|
434
|
+
const input = files.join('\n');
|
|
435
|
+
const output = execFileSync('git', ['check-ignore', '--stdin'], {
|
|
436
|
+
input,
|
|
437
|
+
cwd,
|
|
438
|
+
encoding: 'utf8',
|
|
439
|
+
stdio: ['pipe', 'pipe', 'ignore'],
|
|
440
|
+
});
|
|
441
|
+
const ignored = new Set(output.trim().split('\n').filter(Boolean));
|
|
442
|
+
return files.filter(f => !ignored.has(f));
|
|
443
|
+
} catch (err) {
|
|
444
|
+
// status 1 → no paths ignored; status 128 → not a git repo; ENOENT → git missing
|
|
445
|
+
if (err.status === 1 || err.status === 128 || err.code === 'ENOENT') {
|
|
446
|
+
return files;
|
|
447
|
+
}
|
|
448
|
+
throw err;
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
|
|
389
452
|
async function findFiles (dir, extensions) {
|
|
390
453
|
const results = [];
|
|
391
454
|
async function walk (currentDir) {
|
|
@@ -404,7 +467,7 @@ async function findFiles (dir, extensions) {
|
|
|
404
467
|
}
|
|
405
468
|
}
|
|
406
469
|
await walk(dir);
|
|
407
|
-
return results;
|
|
470
|
+
return filterGitIgnored(results, dir);
|
|
408
471
|
}
|
|
409
472
|
|
|
410
473
|
// ---------------------------------------------------------------------------
|
|
@@ -723,8 +786,11 @@ async function runStandaloneMigration (migration, opts) {
|
|
|
723
786
|
});
|
|
724
787
|
|
|
725
788
|
child.on('close', code => {
|
|
726
|
-
|
|
727
|
-
|
|
789
|
+
if (code !== 0) {
|
|
790
|
+
reject(new Error(`child process exited with code ${code}`));
|
|
791
|
+
} else {
|
|
792
|
+
resolve({ exitCode: code });
|
|
793
|
+
}
|
|
728
794
|
});
|
|
729
795
|
|
|
730
796
|
child.on('error', reject);
|
|
@@ -732,8 +798,21 @@ async function runStandaloneMigration (migration, opts) {
|
|
|
732
798
|
}
|
|
733
799
|
|
|
734
800
|
async function runMigration (migration, opts) {
|
|
801
|
+
if (migration.id === 'color-stops' && !opts.dryRun) {
|
|
802
|
+
if (await checkMigrationMarker(opts.cwd, migration.id)) {
|
|
803
|
+
console.log(` ✓ Already applied on this branch (${path.join(getRepoRoot(opts.cwd), MARKER_DIR, migration.id)} exists). Skipping.\n`);
|
|
804
|
+
console.log(` Remove that file to re-run.\n`);
|
|
805
|
+
return { skipped: true };
|
|
806
|
+
}
|
|
807
|
+
}
|
|
808
|
+
|
|
735
809
|
if (migration.type === 'config') {
|
|
736
|
-
|
|
810
|
+
const result = await runConfigMigration(migration, opts);
|
|
811
|
+
if (migration.id === 'color-stops' && result.applied) {
|
|
812
|
+
await writeMigrationMarker(opts.cwd, migration.id);
|
|
813
|
+
console.log(` Marker written to ${path.join(getRepoRoot(opts.cwd), MARKER_DIR, migration.id)} — commit this file with your changes.\n`);
|
|
814
|
+
}
|
|
815
|
+
return result;
|
|
737
816
|
}
|
|
738
817
|
|
|
739
818
|
if (migration.type === 'standalone') {
|
|
@@ -5,10 +5,13 @@
|
|
|
5
5
|
|
|
6
6
|
export default {
|
|
7
7
|
description:
|
|
8
|
-
'Renames /vue3 import subpaths to /vue for @dialpad/dialtone
|
|
9
|
-
'@dialpad/dialtone-
|
|
8
|
+
'Renames /vue3 import subpaths to /vue for @dialpad/dialtone,\n' +
|
|
9
|
+
'@dialpad/dialtone-icons, and @dialpad/dialtone-vue.\n' +
|
|
10
|
+
'After Vue 2 removal, /vue is the canonical path.',
|
|
10
11
|
patterns: ['**/*.{vue,js,ts,jsx,tsx,mjs,mts}'],
|
|
11
12
|
expressions: [
|
|
13
|
+
// @dialpad/dialtone/vue3 → @dialpad/dialtone/vue
|
|
14
|
+
{ from: /@dialpad\/dialtone\/vue3/g, to: '@dialpad/dialtone/vue' },
|
|
12
15
|
// @dialpad/dialtone-icons/vue3 → @dialpad/dialtone-icons/vue
|
|
13
16
|
{ from: /@dialpad\/dialtone-icons\/vue3/g, to: '@dialpad/dialtone-icons/vue' },
|
|
14
17
|
// @dialpad/dialtone-vue/vue3 → @dialpad/dialtone-vue (or /vue if used)
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
// ============================================================================
|
|
112
112
|
// $ VALUE LISTS
|
|
113
113
|
// ----------------------------------------------------------------------------
|
|
114
|
-
@box-surface-values: primary, secondary, moderate, bold, strong, contrast, backdrop, brand, info, warning, critical, positive, success, brand-subtle, brand-strong, info-subtle, info-strong, warning-subtle, warning-strong, critical-subtle, critical-strong, positive-subtle, positive-strong, success-subtle, success-strong, primary-opaque, secondary-opaque, moderate-opaque, bold-opaque, strong-opaque, contrast-opaque, brand-opaque, brand-subtle-opaque, info-opaque, info-subtle-opaque, warning-opaque, warning-subtle-opaque, critical-opaque, critical-subtle-opaque, positive-opaque, positive-subtle-opaque, success-opaque, success-subtle-opaque;
|
|
114
|
+
@box-surface-values: primary, secondary, moderate, bold, strong, contrast, backdrop, overlay, brand, info, warning, critical, positive, success, brand-subtle, brand-strong, info-subtle, info-strong, warning-subtle, warning-strong, critical-subtle, critical-strong, positive-subtle, positive-strong, success-subtle, success-strong, primary-opaque, secondary-opaque, moderate-opaque, bold-opaque, strong-opaque, contrast-opaque, brand-opaque, brand-subtle-opaque, info-opaque, info-subtle-opaque, warning-opaque, warning-subtle-opaque, critical-opaque, critical-subtle-opaque, positive-opaque, positive-subtle-opaque, success-opaque, success-subtle-opaque;
|
|
115
115
|
|
|
116
116
|
@box-border-color-values: subtle, default, moderate, bold, accent, focus, brand, warning, critical, info, positive, success, brand-subtle, brand-strong, warning-subtle, warning-strong, critical-subtle, critical-strong, info-subtle, info-strong, positive-subtle, positive-strong, success-subtle, success-strong;
|
|
117
117
|
|
|
@@ -25,6 +25,14 @@
|
|
|
25
25
|
display: inline;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
// The :where(a) rule above has effective specificity (0,2,0) due to the scoping selectors,
|
|
29
|
+
// which overrides .d-link's (0,1,0) and flattens mention/channel node view links from
|
|
30
|
+
// inline-flex to inline. Restoring inline-flex at higher specificity keeps the flex layout
|
|
31
|
+
// intact so DtStack inside these chips doesn't create a stray block formatting context.
|
|
32
|
+
[data-node-view-wrapper] .d-link {
|
|
33
|
+
display: inline-flex;
|
|
34
|
+
}
|
|
35
|
+
|
|
28
36
|
p.is-editor-empty:first-child::before {
|
|
29
37
|
float: inline-start;
|
|
30
38
|
block-size: 0;
|
|
@@ -1255,6 +1255,9 @@
|
|
|
1255
1255
|
.d-box--surface-backdrop {
|
|
1256
1256
|
--box-surface: var(--dt-color-surface-backdrop);
|
|
1257
1257
|
}
|
|
1258
|
+
.d-box--surface-overlay {
|
|
1259
|
+
--box-surface: var(--dt-color-surface-overlay);
|
|
1260
|
+
}
|
|
1258
1261
|
.d-box--surface-brand {
|
|
1259
1262
|
--box-surface: var(--dt-color-surface-brand);
|
|
1260
1263
|
}
|
|
@@ -8449,6 +8452,9 @@
|
|
|
8449
8452
|
.d-rich-text-editor > .ProseMirror :where(a) {
|
|
8450
8453
|
display: inline;
|
|
8451
8454
|
}
|
|
8455
|
+
.d-rich-text-editor > .ProseMirror [data-node-view-wrapper] .d-link {
|
|
8456
|
+
display: inline-flex;
|
|
8457
|
+
}
|
|
8452
8458
|
.d-rich-text-editor > .ProseMirror p.is-editor-empty:first-child::before {
|
|
8453
8459
|
float: inline-start;
|
|
8454
8460
|
block-size: 0;
|