@nubisco/ui 1.39.1 → 1.41.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.
Files changed (60) hide show
  1. package/dist/components/Blueprint.context.d.ts +9 -1
  2. package/dist/components/Blueprint.context.d.ts.map +1 -1
  3. package/dist/components/Blueprint.renderer.d.ts +85 -0
  4. package/dist/components/Blueprint.renderer.d.ts.map +1 -0
  5. package/dist/components/Blueprint.types.d.ts +179 -0
  6. package/dist/components/Blueprint.types.d.ts.map +1 -1
  7. package/dist/components/Blueprint.vue.d.ts +24 -6
  8. package/dist/components/Blueprint.vue.d.ts.map +1 -1
  9. package/dist/components/BlueprintCard.vue.d.ts.map +1 -1
  10. package/dist/components/BlueprintControls.vue.d.ts +11 -0
  11. package/dist/components/BlueprintControls.vue.d.ts.map +1 -0
  12. package/dist/components/BlueprintDomRenderer.vue.d.ts +30 -0
  13. package/dist/components/BlueprintDomRenderer.vue.d.ts.map +1 -0
  14. package/dist/components/BlueprintMinimap.vue.d.ts +11 -0
  15. package/dist/components/BlueprintMinimap.vue.d.ts.map +1 -0
  16. package/dist/components/BlueprintPixiRenderer.vue.d.ts +32 -0
  17. package/dist/components/BlueprintPixiRenderer.vue.d.ts.map +1 -0
  18. package/dist/components/Charts/InterpolationChart.vue.d.ts +1 -1
  19. package/dist/components/DatePicker.vue.d.ts +3 -3
  20. package/dist/components/Grid.vue.d.ts +1 -1
  21. package/dist/components/JsonTree.vue.d.ts +1 -1
  22. package/dist/components/NumberInput.vue.d.ts +3 -3
  23. package/dist/components/NumberInput.vue.d.ts.map +1 -1
  24. package/dist/components/Radio.vue.d.ts +2 -2
  25. package/dist/components/Select.vue.d.ts +1 -1
  26. package/dist/components/Slider.vue.d.ts +2 -2
  27. package/dist/components/TextInput.vue.d.ts +3 -3
  28. package/dist/components/TextInput.vue.d.ts.map +1 -1
  29. package/dist/components/TreeNode.vue.d.ts +2 -2
  30. package/dist/components/blueprint-pixi/level-color.d.ts +2 -0
  31. package/dist/components/blueprint-pixi/level-color.d.ts.map +1 -0
  32. package/dist/components/blueprint-pixi/live-data.d.ts +19 -0
  33. package/dist/components/blueprint-pixi/live-data.d.ts.map +1 -0
  34. package/dist/components/blueprint-pixi/pixi-color.d.ts +10 -0
  35. package/dist/components/blueprint-pixi/pixi-color.d.ts.map +1 -0
  36. package/dist/components/blueprint-pixi/pixi-scene.d.ts +103 -0
  37. package/dist/components/blueprint-pixi/pixi-scene.d.ts.map +1 -0
  38. package/dist/components/blueprint-pixi/wire-path.d.ts +25 -0
  39. package/dist/components/blueprint-pixi/wire-path.d.ts.map +1 -0
  40. package/dist/components/index.d.ts.map +1 -1
  41. package/dist/components/labs/Spreadsheet.vue.d.ts +2 -2
  42. package/dist/components/labs/Spreadsheet.vue.d.ts.map +1 -1
  43. package/dist/composables/useBlueprint.composable.d.ts +23 -0
  44. package/dist/composables/useBlueprint.composable.d.ts.map +1 -0
  45. package/dist/index.cjs +8 -8
  46. package/dist/index.cjs.map +1 -1
  47. package/dist/index.mjs +11712 -11053
  48. package/dist/index.mjs.map +1 -1
  49. package/dist/main.d.ts +8 -1
  50. package/dist/main.d.ts.map +1 -1
  51. package/dist/pixi-scene-BKcn6pWT.js +300 -0
  52. package/dist/pixi-scene-BKcn6pWT.js.map +1 -0
  53. package/dist/pixi-scene-D8kAPyID.cjs +2 -0
  54. package/dist/pixi-scene-D8kAPyID.cjs.map +1 -0
  55. package/dist/plugins/fonts.d.ts +52 -1
  56. package/dist/plugins/fonts.d.ts.map +1 -1
  57. package/dist/plugins/fonts.js +53 -8
  58. package/dist/ui.css +1 -1
  59. package/package.json +10 -1
  60. package/src/plugins/fonts.ts +68 -16
@@ -1,16 +1,61 @@
1
1
  import Unfonts from 'unplugin-fonts/vite';
2
- export const fonts = () => Unfonts({
3
- google: {
4
- injectTo: 'head-prepend',
2
+ /**
3
+ * Default font configuration for NubiscoUI.
4
+ *
5
+ * Self-hosted via the `fontsource` provider (RGPD-friendly, no third-party
6
+ * CDN). These are the two families declared as the library defaults in
7
+ * `src/styles/variables/_type.scss` (`--nb-font-family-sans` / `-mono`):
8
+ *
9
+ * - Plus Jakarta Sans: weights 400, 500, 600, 700 (sans default)
10
+ * - Fira Code: weights 400, 600 (mono default)
11
+ *
12
+ * Only `normal` styles are loaded. Every subset shipped by Fontsource is
13
+ * imported, but each `@font-face` carries a `unicode-range`, so the browser
14
+ * only downloads the subsets a page actually needs. `font-display: swap` is
15
+ * baked into the Fontsource stylesheets.
16
+ *
17
+ * Consumers must install the source packages themselves:
18
+ * `pnpm add -D @fontsource/plus-jakarta-sans @fontsource/fira-code`.
19
+ */
20
+ export const DEFAULT_FONTS = {
21
+ fontsource: {
5
22
  families: [
6
23
  {
7
- name: 'Plus+Jakarta+Sans',
8
- styles: 'ital,wght@0,200..800;1,200..800',
24
+ name: 'Plus Jakarta Sans',
25
+ weights: [400, 500, 600, 700],
26
+ styles: ['normal'],
9
27
  },
10
28
  {
11
- name: 'Fira+Code',
12
- styles: 'wght@300..700',
29
+ name: 'Fira Code',
30
+ weights: [400, 600],
31
+ styles: ['normal'],
13
32
  },
14
33
  ],
15
34
  },
16
- });
35
+ };
36
+ /**
37
+ * Vite plugin that loads NubiscoUI's typefaces.
38
+ *
39
+ * Called with no arguments it self-hosts the library defaults (Plus Jakarta
40
+ * Sans + Fira Code) via Fontsource, keeping every existing consumer's output
41
+ * unchanged. Pass an options object to fully replace that configuration: load
42
+ * different families/weights, point the `custom` provider at your own woff2
43
+ * files, or use any other provider `unplugin-fonts` supports.
44
+ *
45
+ * @example
46
+ * // vite.config.ts (keep the NubiscoUI defaults)
47
+ * import { fonts } from '@nubisco/ui/plugins/fonts'
48
+ * export default defineConfig({ plugins: [fonts()] })
49
+ *
50
+ * @example
51
+ * // bring your own families/weights
52
+ * fonts({
53
+ * fontsource: {
54
+ * families: [
55
+ * { name: 'Inter', weights: [400, 600], styles: ['normal'] },
56
+ * { name: 'JetBrains Mono', weights: [400], styles: ['normal'] },
57
+ * ],
58
+ * },
59
+ * })
60
+ */
61
+ export const fonts = (options = DEFAULT_FONTS) => Unfonts(options);