@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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nubisco/ui",
3
- "version": "1.39.1",
3
+ "version": "1.41.0",
4
4
  "description": "Vue 3 UI component library",
5
5
  "packageManager": "pnpm@11.0.8",
6
6
  "repository": {
@@ -109,11 +109,19 @@
109
109
  "*.{json,md,mts,mjs,scss}": "prettier --write"
110
110
  },
111
111
  "peerDependencies": {
112
+ "pixi.js": "^8.0.0",
112
113
  "vue": "^3.5.30",
113
114
  "vue-i18n": "^11.3.0"
114
115
  },
116
+ "peerDependenciesMeta": {
117
+ "pixi.js": {
118
+ "optional": true
119
+ }
120
+ },
115
121
  "devDependencies": {
116
122
  "@eslint/js": "^10.0.1",
123
+ "@fontsource/fira-code": "^5.2.7",
124
+ "@fontsource/plus-jakarta-sans": "^5.2.8",
117
125
  "@phosphor-icons/core": "^2.1.1",
118
126
  "@semantic-release/changelog": "^6.0.3",
119
127
  "@semantic-release/git": "^10.0.1",
@@ -129,6 +137,7 @@
129
137
  "lint-staged": "^16.4.0",
130
138
  "markdown-it-container": "^4.0.0",
131
139
  "mermaid": "^11.13.0",
140
+ "pixi.js": "^8.19.0",
132
141
  "prettier": "^3.8.1",
133
142
  "sass-embedded": "^1.98.0",
134
143
  "semantic-release": "^25.0.3",
@@ -1,19 +1,71 @@
1
1
  import Unfonts from 'unplugin-fonts/vite'
2
2
 
3
- export const fonts = () =>
4
- Unfonts({
5
- google: {
6
- injectTo: 'head-prepend',
3
+ /**
4
+ * Options accepted by {@link fonts}. This is the exact option object that
5
+ * `unplugin-fonts` exposes, so any provider it supports (`fontsource`,
6
+ * `custom`, `google`, `typekit`) can be configured here.
7
+ */
8
+ export type TFontsOptions = NonNullable<Parameters<typeof Unfonts>[0]>
7
9
 
8
- families: [
9
- {
10
- name: 'Plus+Jakarta+Sans',
11
- styles: 'ital,wght@0,200..800;1,200..800',
12
- },
13
- {
14
- name: 'Fira+Code',
15
- styles: 'wght@300..700',
16
- },
17
- ],
18
- },
19
- })
10
+ /**
11
+ * Default font configuration for NubiscoUI.
12
+ *
13
+ * Self-hosted via the `fontsource` provider (RGPD-friendly, no third-party
14
+ * CDN). These are the two families declared as the library defaults in
15
+ * `src/styles/variables/_type.scss` (`--nb-font-family-sans` / `-mono`):
16
+ *
17
+ * - Plus Jakarta Sans: weights 400, 500, 600, 700 (sans default)
18
+ * - Fira Code: weights 400, 600 (mono default)
19
+ *
20
+ * Only `normal` styles are loaded. Every subset shipped by Fontsource is
21
+ * imported, but each `@font-face` carries a `unicode-range`, so the browser
22
+ * only downloads the subsets a page actually needs. `font-display: swap` is
23
+ * baked into the Fontsource stylesheets.
24
+ *
25
+ * Consumers must install the source packages themselves:
26
+ * `pnpm add -D @fontsource/plus-jakarta-sans @fontsource/fira-code`.
27
+ */
28
+ export const DEFAULT_FONTS: TFontsOptions = {
29
+ fontsource: {
30
+ families: [
31
+ {
32
+ name: 'Plus Jakarta Sans',
33
+ weights: [400, 500, 600, 700],
34
+ styles: ['normal'],
35
+ },
36
+ {
37
+ name: 'Fira Code',
38
+ weights: [400, 600],
39
+ styles: ['normal'],
40
+ },
41
+ ],
42
+ },
43
+ }
44
+
45
+ /**
46
+ * Vite plugin that loads NubiscoUI's typefaces.
47
+ *
48
+ * Called with no arguments it self-hosts the library defaults (Plus Jakarta
49
+ * Sans + Fira Code) via Fontsource, keeping every existing consumer's output
50
+ * unchanged. Pass an options object to fully replace that configuration: load
51
+ * different families/weights, point the `custom` provider at your own woff2
52
+ * files, or use any other provider `unplugin-fonts` supports.
53
+ *
54
+ * @example
55
+ * // vite.config.ts (keep the NubiscoUI defaults)
56
+ * import { fonts } from '@nubisco/ui/plugins/fonts'
57
+ * export default defineConfig({ plugins: [fonts()] })
58
+ *
59
+ * @example
60
+ * // bring your own families/weights
61
+ * fonts({
62
+ * fontsource: {
63
+ * families: [
64
+ * { name: 'Inter', weights: [400, 600], styles: ['normal'] },
65
+ * { name: 'JetBrains Mono', weights: [400], styles: ['normal'] },
66
+ * ],
67
+ * },
68
+ * })
69
+ */
70
+ export const fonts = (options: TFontsOptions = DEFAULT_FONTS) =>
71
+ Unfonts(options)