arcane-os 0.33.0 → 0.33.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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.33.1
4
+
5
+ - Preserve application and pre-existing body classes when the shared header
6
+ applies a saved User skin. Repeated ready notifications replace only skin
7
+ classes previously added by that header, retaining its existing readiness,
8
+ navigation and online-status behavior.
9
+
3
10
  ## 0.33.0
4
11
 
5
12
  - Add the default and named `AIModelSelectionController` export at
package/README.md CHANGED
@@ -19,7 +19,7 @@ version-locked SDK runtime, while an integrated Arcane checkout uses its live
19
19
  `arcane/` runtime. Both profiles share the theme, packaging, event, cancellation,
20
20
  and browser run contracts while retaining their selected application layout.
21
21
 
22
- This checkout defines the `0.33.0` SDK contract. Applications pin one exact npm
22
+ This checkout defines the `0.33.1` SDK contract. Applications pin one exact npm
23
23
  version and lockfile; registry state is deliberately not baked into application
24
24
  artifacts.
25
25
 
@@ -85,7 +85,7 @@ Create one browser application, install its pinned SDK, and start its source
85
85
  server:
86
86
 
87
87
  ```bash
88
- npx arcane-os@0.33.0 new hello-speech --path ./hello-speech --target browser
88
+ npx arcane-os@0.33.1 new hello-speech --path ./hello-speech --target browser
89
89
  cd hello-speech
90
90
  npm install
91
91
  ```
@@ -780,6 +780,12 @@ Shared dependencies: [`DBOPFS.js`](runtime-modules.md#dbopfsjs), [`File.js`](run
780
780
 
781
781
  Shared title bar with history, reload, online marker, presentation labels, and 988 link.
782
782
 
783
+ The saved User skin adds its class tokens to the document body without replacing
784
+ application layout or other pre-existing classes. Repeated ready notifications
785
+ replace only skin classes previously added by that header. Skin application
786
+ keeps the existing already-ready check and `user-entity-loaded` subscription;
787
+ navigation and online-status behavior are unchanged.
788
+
783
789
  ### Public surface
784
790
 
785
791
  This fragment declares no public host method.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arcane-os",
3
- "version": "0.33.0",
3
+ "version": "0.33.1",
4
4
  "description": "Arcane OS JavaScript SDK, project-local CLI, browser runtime, and repository-portable application packager.",
5
5
  "type": "module",
6
6
  "main": "./src/index.mjs",
@@ -83,6 +83,7 @@
83
83
  import('../entities/User.js');
84
84
 
85
85
  const host=this;
86
+ const appliedSkinClasses=new Set();
86
87
 
87
88
  window.addEventListener('user-entity-loaded', setSkin);
88
89
  window.addEventListener('online', checkInternet);
@@ -123,7 +124,22 @@
123
124
  try {
124
125
  const skin = window.user?.skin;
125
126
  if (skin) {
126
- document.body.className = skin;
127
+ const nextClasses=new Set(String(skin).match(/[^\t\n\f\r ]+/gu)||[]);
128
+ const classes=document.body.classList;
129
+ // Only replace classes added by this header; application layout
130
+ // and independently owned theme classes stay with their owners.
131
+ for(const name of appliedSkinClasses){
132
+ if(!nextClasses.has(name)){
133
+ classes.remove(name);
134
+ appliedSkinClasses.delete(name);
135
+ }
136
+ }
137
+ for(const name of nextClasses){
138
+ if(!classes.contains(name)){
139
+ classes.add(name);
140
+ appliedSkinClasses.add(name);
141
+ }
142
+ }
127
143
  } else {
128
144
  arcaneLogging.log('No saved skin found. Using default.');
129
145
  }