@ndmspc/ndmspc-ui 0.0.0 → 0.0.1-rc.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/README.md CHANGED
@@ -41,3 +41,71 @@ npm install
41
41
  ```bash
42
42
  npm run dev
43
43
  ```
44
+
45
+ ## Prebuilt page (release artifact)
46
+
47
+ `npm run build` produces the publishable **library** (`dist/ndmspc-ui.es.js`,
48
+ `dist/ndmspc-ui.css`, `dist/index.d.ts`) but no page. The servable page
49
+ (`index.html` + `assets/`) is built separately:
50
+
51
+ ```bash
52
+ npm run build:page # -> page-dist/ (index.html, assets/, vite.svg)
53
+ ```
54
+
55
+ On every git tag the `build-page` job builds this page, tars it, and uploads it
56
+ to the Generic Package Registry under the tag; the `release-page` job then
57
+ attaches it to the tag's GitLab Release. ndmspc's CMake consumes it instead of
58
+ running the npm builds, from the stable URL:
59
+
60
+ ```
61
+ https://gitlab.com/ndmspc/ndmspc-ui/-/releases/<tag>/downloads/ndmspc-ui-page.tar.gz
62
+ ```
63
+
64
+ That URL redirects to the package it was built from, which is downloadable
65
+ directly if you prefer:
66
+
67
+ ```
68
+ https://gitlab.com/api/v4/projects/ndmspc%2Fndmspc-ui/packages/generic/ndmspc-ui-page/<tag>/ndmspc-ui-page.tar.gz
69
+ ```
70
+
71
+ (use `permalink/latest` in place of `<tag>` to always follow the newest release)
72
+
73
+ For a rolling development pointer, every build of `main` is published by the
74
+ `release-next` job to a single over-writable `next` slot in the Generic Package
75
+ Registry, so the URL always serves the latest `main` page:
76
+
77
+ ```
78
+ https://gitlab.com/api/v4/projects/ndmspc%2Fndmspc-ui/packages/generic/ndmspc-ui-page/next/ndmspc-ui-page.tar.gz
79
+ ```
80
+
81
+ Point `_ui_url` above at that URL instead of the release downloads path to track
82
+ `main` (substitute the numeric project id for `ndmspc%2Fndmspc-ui` if you prefer).
83
+
84
+ The archive extracts to a ready-to-serve web root (`index.html` + `assets/`).
85
+ A minimal CMake consumption looks like:
86
+
87
+ ```cmake
88
+ set(NDMSPC_UI_TAG "v1.0.0" CACHE STRING "ndmspc-ui release tag")
89
+
90
+ set(_ui_url
91
+ "https://gitlab.com/ndmspc/ndmspc-ui/-/releases/${NDMSPC_UI_TAG}/downloads/ndmspc-ui-page.tar.gz")
92
+ set(_ui_archive "${CMAKE_BINARY_DIR}/ndmspc-ui-page.tar.gz")
93
+ set(_ui_dir "${CMAKE_BINARY_DIR}/ndmspc-ui-page")
94
+
95
+ file(DOWNLOAD "${_ui_url}" "${_ui_archive}" SHOW_PROGRESS STATUS _dl_status TLS_VERIFY ON)
96
+ list(GET _dl_status 0 _dl_code)
97
+ if(NOT _dl_code EQUAL 0)
98
+ message(FATAL_ERROR "Failed to download ndmspc-ui page from ${_ui_url}: ${_dl_status}")
99
+ endif()
100
+
101
+ file(MAKE_DIRECTORY "${_ui_dir}")
102
+ execute_process(
103
+ COMMAND ${CMAKE_COMMAND} -E tar xzf "${_ui_archive}"
104
+ WORKING_DIRECTORY "${_ui_dir}"
105
+ RESULT_VARIABLE _untar)
106
+ if(NOT _untar EQUAL 0)
107
+ message(FATAL_ERROR "Failed to extract ndmspc-ui page")
108
+ endif()
109
+
110
+ install(DIRECTORY "${_ui_dir}/" DESTINATION <web-root>)
111
+ ```
package/dist/index.d.ts CHANGED
@@ -2,4 +2,15 @@ import { JSX } from 'react';
2
2
 
3
3
  export declare function AnalyticsConsent(): JSX.Element | null;
4
4
 
5
+ export declare function isLegacyWebXRRuntime(): boolean;
6
+
7
+ export declare function NdmspcApp(): JSX.Element;
8
+
9
+ /**
10
+ * `crypto.randomUUID()` with the polyfill above applied. Importing this keeps
11
+ * the polyfill in the bundle: browsers only expose `randomUUID` in secure
12
+ * contexts, so plain-HTTP deployments would otherwise fail at runtime.
13
+ */
14
+ export declare function randomUUID(): string;
15
+
5
16
  export { }
@@ -0,0 +1,3 @@
1
+ /*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */
2
+ @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){:root,:host{--shimmer-angle:20deg}*,:before,:after,::backdrop{--tw-border-style:solid;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-animation-delay:0s;--tw-animation-direction:normal;--tw-animation-duration:initial;--tw-animation-fill-mode:none;--tw-animation-iteration-count:1;--tw-enter-blur:0;--tw-enter-opacity:1;--tw-enter-rotate:0;--tw-enter-scale:1;--tw-enter-translate-x:0;--tw-enter-translate-y:0;--tw-exit-blur:0;--tw-exit-opacity:1;--tw-exit-rotate:0;--tw-exit-scale:1;--tw-exit-translate-x:0;--tw-exit-translate-y:0;--scroll-fade-t:0px;--scroll-fade-b:0px;--scroll-fade-s:0px;--scroll-fade-e:0px;--scroll-fade-mask:initial;--shimmer-image:initial;--shimmer-text-fill:initial}}}@layer theme{:root,:host{--font-sans:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-gray-200:oklch(92.8% .006 264.531);--color-white:#fff;--spacing:.25rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--font-weight-semibold:600;--tracking-tight:-.025em;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring:where(:not(iframe)){outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{border-color:var(--border);outline-color:var(--ring)}@supports (color:color-mix(in lab, red, red)){*{outline-color:color-mix(in oklab, var(--ring) 50%, transparent)}}}@layer components;@layer utilities{.visible{visibility:visible}.fixed{position:fixed}.flex{display:flex}.h-full{height:100%}.w-full{width:100%}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.gap-1{gap:var(--spacing)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.border{border-style:var(--tw-border-style);border-width:1px}.border-gray-200{border-color:var(--color-gray-200)}.bg-background{background-color:var(--background)}.bg-muted\/20{background-color:var(--muted)}@supports (color:color-mix(in lab, red, red)){.bg-muted\/20{background-color:color-mix(in oklab, var(--muted) 20%, transparent)}}.bg-primary{background-color:var(--primary)}.bg-white{background-color:var(--color-white)}.p-4{padding:calc(var(--spacing) * 4)}.px-3{padding-inline:calc(var(--spacing) * 3)}.py-1{padding-block:var(--spacing)}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.text-foreground{color:var(--foreground)}.text-muted-foreground{color:var(--muted-foreground)}.text-white{color:var(--color-white)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}}@property --tw-animation-delay{syntax:"*";inherits:false;initial-value:0s}@property --tw-animation-direction{syntax:"*";inherits:false;initial-value:normal}@property --tw-animation-duration{syntax:"*";inherits:false}@property --tw-animation-fill-mode{syntax:"*";inherits:false;initial-value:none}@property --tw-animation-iteration-count{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-enter-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-enter-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-blur{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-opacity{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-rotate{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-scale{syntax:"*";inherits:false;initial-value:1}@property --tw-exit-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-exit-translate-y{syntax:"*";inherits:false;initial-value:0}@property --scroll-fade-t{syntax:"<length-percentage>";inherits:false;initial-value:0}@property --scroll-fade-b{syntax:"<length-percentage>";inherits:false;initial-value:0}@property --scroll-fade-s{syntax:"<length-percentage>";inherits:false;initial-value:0}@property --scroll-fade-e{syntax:"<length-percentage>";inherits:false;initial-value:0}@property --scroll-fade-mask{syntax:"*";inherits:false}@property --shimmer-angle{syntax:"<angle>";inherits:true;initial-value:20deg}@property --shimmer-image{syntax:"*";inherits:false}@property --shimmer-text-fill{syntax:"*";inherits:false}@media (prefers-reduced-motion:reduce){.shimmer{-webkit-text-fill-color:currentColor;background-image:none;animation:none}}:root{--radius:.625rem;--background:oklch(100% 0 0);--foreground:oklch(14.1% .005 285.823);--card:oklch(100% 0 0);--card-foreground:oklch(14.1% .005 285.823);--popover:oklch(100% 0 0);--popover-foreground:oklch(14.1% .005 285.823);--primary:oklch(21% .006 285.885);--primary-foreground:oklch(98.5% 0 0);--secondary:oklch(96.7% .001 286.375);--secondary-foreground:oklch(21% .006 285.885);--muted:oklch(96.7% .001 286.375);--muted-foreground:oklch(55.2% .016 285.938);--accent:oklch(96.7% .001 286.375);--accent-foreground:oklch(21% .006 285.885);--destructive:oklch(57.7% .245 27.325);--border:oklch(92% .004 286.32);--input:oklch(92% .004 286.32);--ring:oklch(70.5% .015 286.067);--chart-1:oklch(64.6% .222 41.116);--chart-2:oklch(60% .118 184.704);--chart-3:oklch(39.8% .07 227.392);--chart-4:oklch(82.8% .189 84.429);--chart-5:oklch(76.9% .188 70.08);--sidebar:oklch(98.5% 0 0);--sidebar-foreground:oklch(14.1% .005 285.823);--sidebar-primary:oklch(21% .006 285.885);--sidebar-primary-foreground:oklch(98.5% 0 0);--sidebar-accent:oklch(96.7% .001 286.375);--sidebar-accent-foreground:oklch(21% .006 285.885);--sidebar-border:oklch(92% .004 286.32);--sidebar-ring:oklch(70.5% .015 286.067)}.dark{--background:oklch(14.1% .005 285.823);--foreground:oklch(98.5% 0 0);--card:oklch(21% .006 285.885);--card-foreground:oklch(98.5% 0 0);--popover:oklch(21% .006 285.885);--popover-foreground:oklch(98.5% 0 0);--primary:oklch(92% .004 286.32);--primary-foreground:oklch(21% .006 285.885);--secondary:oklch(27.4% .006 286.033);--secondary-foreground:oklch(98.5% 0 0);--muted:oklch(27.4% .006 286.033);--muted-foreground:oklch(70.5% .015 286.067);--accent:oklch(27.4% .006 286.033);--accent-foreground:oklch(98.5% 0 0);--destructive:oklch(70.4% .191 22.216);--border:oklch(100% 0 0/.1);--input:oklch(100% 0 0/.15);--ring:oklch(55.2% .016 285.938);--chart-1:oklch(48.8% .243 264.376);--chart-2:oklch(69.6% .17 162.48);--chart-3:oklch(76.9% .188 70.08);--chart-4:oklch(62.7% .265 303.9);--chart-5:oklch(64.5% .246 16.439);--sidebar:oklch(21% .006 285.885);--sidebar-foreground:oklch(98.5% 0 0);--sidebar-primary:oklch(48.8% .243 264.376);--sidebar-primary-foreground:oklch(98.5% 0 0);--sidebar-accent:oklch(27.4% .006 286.033);--sidebar-accent-foreground:oklch(98.5% 0 0);--sidebar-border:oklch(100% 0 0/.1);--sidebar-ring:oklch(55.2% .016 285.938)}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}
3
+ /*$vite$:1*/
@@ -1,43 +1,44 @@
1
1
  import { c as e } from "react/compiler-runtime";
2
2
  import { useEffect as t, useState as n } from "react";
3
3
  import { jsx as r, jsxs as i } from "react/jsx-runtime";
4
+ import { Material as a } from "three";
4
5
  //#region src/lib/utils/analytics.ts
5
- function a() {
6
+ function o() {
6
7
  return window;
7
8
  }
8
- function o() {
9
+ function s() {
9
10
  return "";
10
11
  }
11
- function s() {
12
- return o().length > 0;
12
+ function c() {
13
+ return s().length > 0;
13
14
  }
14
- function c(e) {
15
- let t = e || o();
16
- if (!t || a().gtag) return;
15
+ function l(e) {
16
+ let t = e || s();
17
+ if (!t || o().gtag) return;
17
18
  let n = document.createElement("script");
18
19
  n.async = !0, n.src = `https://www.googletagmanager.com/gtag/js?id=${t}`, document.head.appendChild(n);
19
- let r = a(), i = r.dataLayer ?? [];
20
+ let r = o(), i = r.dataLayer ?? [];
20
21
  r.dataLayer = i;
21
- function s(...e) {
22
- i.push(e);
22
+ function a() {
23
+ i.push(arguments);
23
24
  }
24
- r.gtag = s, r.gtag("js", /* @__PURE__ */ new Date()), r.gtag("config", t);
25
+ r.gtag = a, r.gtag("js", /* @__PURE__ */ new Date()), r.gtag("config", t);
25
26
  }
26
- function l() {
27
+ function u() {
27
28
  try {
28
29
  return localStorage.getItem("analytics_consent") === "granted";
29
30
  } catch {
30
31
  return !1;
31
32
  }
32
33
  }
33
- function u() {
34
+ function d() {
34
35
  try {
35
36
  return localStorage.getItem("analytics_consent") !== null;
36
37
  } catch {
37
38
  return !1;
38
39
  }
39
40
  }
40
- function d(e) {
41
+ function f(e) {
41
42
  try {
42
43
  localStorage.setItem("analytics_consent", e ? "granted" : "denied");
43
44
  try {
@@ -47,17 +48,17 @@ function d(e) {
47
48
  }
48
49
  //#endregion
49
50
  //#region src/lib/components/AnalyticsConsent/AnalyticsConsent.tsx
50
- function f() {
51
- let a = e(9), [o, f] = n(p), [m, h] = n(null), g, _;
51
+ function p() {
52
+ let a = e(9), [o, s] = n(m), [p, h] = n(null), g, _;
52
53
  a[0] === Symbol.for("react.memo_cache_sentinel") ? (g = () => {
53
54
  let e = (e) => {
54
- if (!s()) {
55
- f(!1);
55
+ if (!c()) {
56
+ s(!1);
56
57
  return;
57
58
  }
58
- u() ? ((typeof e == "boolean" ? e : l()) && c(), f(!1)) : f(!0);
59
+ d() ? ((typeof e == "boolean" ? e : u()) && l(), s(!1)) : s(!0);
59
60
  };
60
- l() && c();
61
+ u() && l();
61
62
  let t = (t) => {
62
63
  let n = t?.detail, r = typeof n?.granted == "boolean" ? n.granted : void 0;
63
64
  try {
@@ -70,7 +71,7 @@ function f() {
70
71
  let n = (t) => {
71
72
  let n = t?.detail;
72
73
  if (n && n.rect) try {
73
- h(n.rect), f(!0);
74
+ h(n.rect), s(!0);
74
75
  return;
75
76
  } catch {}
76
77
  e();
@@ -85,30 +86,30 @@ function f() {
85
86
  }, _ = [], a[0] = g, a[1] = _) : (g = a[0], _ = a[1]), t(g, _);
86
87
  let v;
87
88
  a[2] === Symbol.for("react.memo_cache_sentinel") ? (v = () => {
88
- d(!0), c(), f(!1);
89
+ f(!0), l(), s(!1);
89
90
  }, a[2] = v) : v = a[2];
90
91
  let y = v, b;
91
92
  a[3] === Symbol.for("react.memo_cache_sentinel") ? (b = () => {
92
- d(!1), f(!1);
93
+ f(!1), s(!1);
93
94
  }, a[3] = b) : b = a[3];
94
95
  let x = b;
95
96
  if (!o) return null;
96
97
  let S;
97
- if (a[4] !== m) {
98
+ if (a[4] !== p) {
98
99
  if (S = {
99
100
  position: "fixed",
100
101
  zIndex: 9999,
101
102
  maxWidth: 360
102
- }, m) {
103
- let e = window.innerWidth, t = window.innerHeight, n = Math.round(m.left + window.scrollX);
103
+ }, p) {
104
+ let e = window.innerWidth, t = window.innerHeight, n = Math.round(p.left + window.scrollX);
104
105
  n + 360 + 8 > e && (n = Math.max(8, e - 360 - 8) + window.scrollX), S.left = n + "px";
105
- let r = m.bottom + window.scrollY + 8;
106
+ let r = p.bottom + window.scrollY + 8;
106
107
  if (r + 160 + 8 > window.scrollY + t) {
107
- let e = m.top + window.scrollY - 160 - 8;
108
+ let e = p.top + window.scrollY - 160 - 8;
108
109
  S.top = Math.max(8 + window.scrollY, e) + "px";
109
110
  } else S.top = r + "px";
110
111
  } else S.right = 16, S.bottom = 16;
111
- a[4] = m, a[5] = S;
112
+ a[4] = p, a[5] = S;
112
113
  } else S = a[5];
113
114
  let C;
114
115
  a[6] === Symbol.for("react.memo_cache_sentinel") ? (C = /* @__PURE__ */ i("div", {
@@ -157,8 +158,62 @@ function f() {
157
158
  children: C
158
159
  }), a[7] = S, a[8] = w), w;
159
160
  }
160
- function p() {
161
- return s() && !u();
161
+ function m() {
162
+ return c() && !d();
163
+ }
164
+ //#endregion
165
+ //#region src/lib/components/NdmspcApp/NdmspcApp.tsx
166
+ function h() {
167
+ let t = e(1), n;
168
+ return t[0] === Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */ i("div", {
169
+ className: "flex h-full w-full flex-col items-center justify-center gap-1 bg-background text-foreground",
170
+ children: [/* @__PURE__ */ r("h1", {
171
+ className: "text-lg font-semibold tracking-tight",
172
+ children: "NDMSPC UI"
173
+ }), /* @__PURE__ */ r("p", {
174
+ className: "text-xs text-muted-foreground",
175
+ children: "Next UI — under construction"
176
+ })]
177
+ }), t[0] = n) : n = t[0], n;
178
+ }
179
+ //#endregion
180
+ //#region src/lib/compatibility/cryptoCompatibility.ts
181
+ var g = globalThis.crypto;
182
+ g && typeof g.randomUUID != "function" && typeof g.getRandomValues == "function" && Object.defineProperty(g, "randomUUID", {
183
+ configurable: !0,
184
+ value: () => {
185
+ let e = g.getRandomValues(/* @__PURE__ */ new Uint8Array(16));
186
+ e[6] = e[6] & 15 | 64, e[8] = e[8] & 63 | 128;
187
+ let t = Array.from(e, (e) => e.toString(16).padStart(2, "0"));
188
+ return `${t.slice(0, 4).join("")}-${t.slice(4, 6).join("")}-${t.slice(6, 8).join("")}-${t.slice(8, 10).join("")}-${t.slice(10).join("")}`;
189
+ }
190
+ });
191
+ function _() {
192
+ return g.randomUUID();
193
+ }
194
+ //#endregion
195
+ //#region src/lib/compatibility/webxrCompatibility.ts
196
+ var v = typeof window < "u" && [
197
+ "localhost",
198
+ "127.0.0.1",
199
+ "::1"
200
+ ].includes(window.location.hostname), y = typeof navigator < "u" ? navigator.userAgent : "", b = /OculusBrowser|Quest|Meta Quest|Pico|VIVE|VR/i.test(y);
201
+ v && typeof a.prototype.onBuild != "function" && (a.prototype.onBuild = () => {});
202
+ function x() {
203
+ let e = typeof navigator < "u" ? navigator.xr : void 0, t = e?.requestSession, n = typeof t == "function" ? Function.prototype.toString.call(t) : "", r = e?.constructor ? Function.prototype.toString.call(e.constructor) : "", i = n.toLowerCase(), a = r.toLowerCase(), o = n.includes("[native code]"), s = v && !b, c = typeof document < "u" && Array.from(document.scripts).some((e) => e.src.toLowerCase().includes("webxr-polyfill"));
204
+ return !!e && (c || globalThis.WebXRPolyfill !== void 0 || globalThis.XRCoordinateSystem !== void 0 || typeof e?.requestDevice == "function" || e?.constructor?.name.toLowerCase().includes("polyfill") || a.includes("polyfill") || a.includes("emulatedxrdevice") || n.length > 0 && !o && (i.includes("polyfill") || i.includes("coordinatesystem") || i.includes("emulatedxrdevice") || !s));
205
+ }
206
+ if (x() && typeof navigator < "u") try {
207
+ Object.defineProperty(navigator, "xr", {
208
+ value: void 0,
209
+ configurable: !0
210
+ });
211
+ } catch (e) {
212
+ console.warn("[WebXR] Could not disable localhost navigator.xr polyfill", e);
162
213
  }
214
+ v && !b && "XRWebGLBinding" in globalThis && Object.defineProperty(globalThis, "XRWebGLBinding", {
215
+ value: void 0,
216
+ configurable: !0
217
+ });
163
218
  //#endregion
164
- export { f as AnalyticsConsent };
219
+ export { p as AnalyticsConsent, h as NdmspcApp, x as isLegacyWebXRRuntime, _ as randomUUID };
package/package.json CHANGED
@@ -1,6 +1,10 @@
1
1
  {
2
2
  "name": "@ndmspc/ndmspc-ui",
3
- "version": "0.0.0",
3
+ "version": "0.0.1-rc.1",
4
+ "repository": {
5
+ "type": "git",
6
+ "url": "git+https://gitlab.com/ndmspc/ndmspc-ui.git"
7
+ },
4
8
  "files": [
5
9
  "dist"
6
10
  ],
@@ -15,7 +19,8 @@
15
19
  ".": {
16
20
  "types": "./dist/index.d.ts",
17
21
  "import": "./dist/ndmspc-ui.es.js"
18
- }
22
+ },
23
+ "./styles.css": "./dist/ndmspc-ui.css"
19
24
  },
20
25
  "publishConfig": {
21
26
  "access": "public"
@@ -23,7 +28,10 @@
23
28
  "scripts": {
24
29
  "dev": "vite --config vite.config.app.ts",
25
30
  "build": "NODE_OPTIONS=--max-old-space-size=6144 tsc -b && NODE_OPTIONS=--max-old-space-size=6144 vite build",
31
+ "postbuild": "npm run check:css",
26
32
  "build:app": "NODE_OPTIONS=--max-old-space-size=6144 vite build --config vite.config.app.ts",
33
+ "build:page": "NODE_OPTIONS=--max-old-space-size=6144 vite build --config vite.config.app.ts --outDir page-dist --emptyOutDir",
34
+ "check:css": "node scripts/check-library-css.mjs",
27
35
  "lint": "eslint .",
28
36
  "preview": "vite preview --config vite.config.app.ts"
29
37
  },
@@ -45,9 +53,9 @@
45
53
  "keycloak-js": "^26.2.4",
46
54
  "lucide-react": "^1.17.0",
47
55
  "radix-ui": "^1.4.3",
48
- "react": "^19.2.6",
56
+ "react": "~19.2.6",
49
57
  "react-compiler-runtime": "^1.0.0",
50
- "react-dom": "^19.2.6",
58
+ "react-dom": "~19.2.6",
51
59
  "react-hook-form": "^7.77.0",
52
60
  "react-resizable-panels": "^4.11.2",
53
61
  "tailwind-merge": "^3.6.0",