arcane-os 0.33.0 → 0.33.2

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,24 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.33.2
4
+
5
+ - Initialize the shared file manager's default tree provider before an
6
+ already-ready DBOPFS starts loading. Preserve deferred readiness, custom
7
+ providers, duplicate-ready handling and component disposal without adding
8
+ a startup wait.
9
+ - Correct the isolated-model question runner's sentence and Unicode matcher
10
+ literals so the public module imports successfully. Keep complete questions,
11
+ answers and provider metadata while adding the existing sentence count.
12
+ - Retain standalone app-root hosting through `/node_modules/arcane-os/...`;
13
+ this patch requires no app-local SDK changes or copied `/arcane` tree.
14
+
15
+ ## 0.33.1
16
+
17
+ - Preserve application and pre-existing body classes when the shared header
18
+ applies a saved User skin. Repeated ready notifications replace only skin
19
+ classes previously added by that header, retaining its existing readiness,
20
+ navigation and online-status behavior.
21
+
3
22
  ## 0.33.0
4
23
 
5
24
  - 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.2` 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.2 new hello-speech --path ./hello-speech --target browser
89
89
  cd hello-speech
90
90
  npm install
91
91
  ```
@@ -753,6 +753,11 @@ Slots: `title`, `preview`, `metadata`, `actions`.
753
753
 
754
754
  Browses, filters, selects, opens, and acts on app-scoped files.
755
755
 
756
+ The default tree provider is initialized before storage readiness starts the
757
+ first load. Already-ready DBOPFS loads immediately; otherwise the component
758
+ starts on `dbopfs-ready`. Both paths retain the same `file-manager-ready` event
759
+ and `destroy()` cleanup, without delaying unrelated component startup.
760
+
756
761
  ### Public surface
757
762
 
758
763
  Methods/properties: `setProvider()`, `loadAll()`, `setFilter()`, `select()`, `clearSelection()`, `destroy()`.
@@ -780,6 +785,12 @@ Shared dependencies: [`DBOPFS.js`](runtime-modules.md#dbopfsjs), [`File.js`](run
780
785
 
781
786
  Shared title bar with history, reload, online marker, presentation labels, and 988 link.
782
787
 
788
+ The saved User skin adds its class tokens to the document body without replacing
789
+ application layout or other pre-existing classes. Repeated ready notifications
790
+ replace only skin classes previously added by that header. Skin application
791
+ keeps the existing already-ready check and `user-entity-loaded` subscription;
792
+ navigation and online-status behavior are unchanged.
793
+
783
794
  ### Public surface
784
795
 
785
796
  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.2",
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",
@@ -452,16 +452,6 @@
452
452
  return isVisibleEntry({name:fileName,path:fileName,kind:'file'});
453
453
  }
454
454
 
455
- window.addEventListener(
456
- 'dbopfs-ready',
457
- init,
458
- {once:true,signal:lifecycleController.signal}
459
- );
460
-
461
- if(window.dbopfs?.ready){
462
- init();
463
- }
464
-
465
455
  fileUpload.addEventListener(
466
456
  'change',
467
457
  ()=>uploadFiles().catch(
@@ -698,6 +688,17 @@
698
688
  }
699
689
  };
700
690
 
691
+ // Immediate readiness can enter loadTree before init reaches its first await.
692
+ window.addEventListener(
693
+ 'dbopfs-ready',
694
+ init,
695
+ {once:true,signal:lifecycleController.signal}
696
+ );
697
+
698
+ if(window.dbopfs?.ready){
699
+ init();
700
+ }
701
+
701
702
  function activeTreeProvider(){
702
703
  return provider||dbopfsTreeProvider;
703
704
  }
@@ -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
  }
@@ -1,8 +1,8 @@
1
1
  import Is from 'strong-type';
2
2
  const is=new Is(false);
3
3
 
4
- const SENTENCE_BOUNDARY=/[.!?]+(?:["'\\u2019\\u201d)\\]}]+)?(?=\\s|$)/gu;
5
- const WORD_OR_NUMBER=/[\\p{L}\\p{N}]/u;
4
+ const SENTENCE_BOUNDARY = /[.!?]+(?:["'\u2019\u201d)\]}]+)?(?=\s|$)/gu;
5
+ const WORD_OR_NUMBER = /[\p{L}\p{N}]/u;
6
6
 
7
7
  function codedError(code,message,ErrorType=Error){
8
8
  const error=new ErrorType(message);