@lobb-js/studio 0.9.1 → 0.9.3

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.
@@ -14,7 +14,6 @@
14
14
  loadExtensions,
15
15
  } from "../extensions/extensionUtils";
16
16
  import extensionMap from 'virtual:lobb-studio-extensions';
17
- import { STUDIO_VERSION } from "../version.ts";
18
17
  import { mediaQueries } from "../utils";
19
18
  import Home from "./routes/home.svelte";
20
19
  import DataModel from "./routes/data_model/dataModel.svelte";
@@ -33,7 +32,6 @@
33
32
  extensions: {},
34
33
  meta: null,
35
34
  currentUrl: new URL(window.location.href),
36
- studioVersion: STUDIO_VERSION,
37
35
  });
38
36
 
39
37
  const lobb = createLobb(lobbUrl ?? "");
@@ -9,7 +9,7 @@
9
9
 
10
10
  const { ctx } = getStudioContext();
11
11
 
12
- let releaseDates: Record<string, string | null> = $state({});
12
+ let coreReleaseDate: string | null = $state(null);
13
13
 
14
14
  async function fetchReleaseDate(pkg: string, version: string): Promise<string | null> {
15
15
  try {
@@ -23,28 +23,16 @@
23
23
  }
24
24
 
25
25
  onMount(async () => {
26
- const [coreDate, studioDate] = await Promise.all([
27
- fetchReleaseDate("@lobb-js/core", ctx.meta.version),
28
- ctx.studioVersion ? fetchReleaseDate("@lobb-js/studio", ctx.studioVersion) : Promise.resolve(null),
29
- ]);
30
- releaseDates = { core: coreDate, studio: studioDate };
26
+ coreReleaseDate = await fetchReleaseDate("@lobb-js/core", ctx.meta.version);
31
27
  });
32
28
  </script>
33
29
 
34
30
  <div class="flex justify-end p-2 text-xs text-muted-foreground/50">
35
31
  <div class="flex flex-col text-end gap-0.5">
36
- {#if ctx.studioVersion}
37
- <div>
38
- studio: v{ctx.studioVersion}
39
- {#if releaseDates.studio}
40
- <span>({timeAgo.format(new Date(releaseDates.studio!))})</span>
41
- {/if}
42
- </div>
43
- {/if}
44
32
  <div>
45
33
  core: v{ctx.meta.version}
46
- {#if releaseDates.core}
47
- <span>({timeAgo.format(new Date(releaseDates.core!))})</span>
34
+ {#if coreReleaseDate}
35
+ <span>({timeAgo.format(new Date(coreReleaseDate))})</span>
48
36
  {/if}
49
37
  </div>
50
38
  </div>
@@ -17,7 +17,6 @@ interface Meta {
17
17
  studio_workflows: any[];
18
18
  }
19
19
  export interface CTX {
20
- studioVersion?: string;
21
20
  lobbUrl: string | null;
22
21
  extensions: Record<string, Extension>;
23
22
  meta: Meta;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobb-js/studio",
3
- "version": "0.9.1",
3
+ "version": "0.9.3",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -14,7 +14,6 @@
14
14
  loadExtensions,
15
15
  } from "../extensions/extensionUtils";
16
16
  import extensionMap from 'virtual:lobb-studio-extensions';
17
- import { STUDIO_VERSION } from "../version.ts";
18
17
  import { mediaQueries } from "../utils";
19
18
  import Home from "./routes/home.svelte";
20
19
  import DataModel from "./routes/data_model/dataModel.svelte";
@@ -33,7 +32,6 @@
33
32
  extensions: {},
34
33
  meta: null,
35
34
  currentUrl: new URL(window.location.href),
36
- studioVersion: STUDIO_VERSION,
37
35
  });
38
36
 
39
37
  const lobb = createLobb(lobbUrl ?? "");
@@ -9,7 +9,7 @@
9
9
 
10
10
  const { ctx } = getStudioContext();
11
11
 
12
- let releaseDates: Record<string, string | null> = $state({});
12
+ let coreReleaseDate: string | null = $state(null);
13
13
 
14
14
  async function fetchReleaseDate(pkg: string, version: string): Promise<string | null> {
15
15
  try {
@@ -23,28 +23,16 @@
23
23
  }
24
24
 
25
25
  onMount(async () => {
26
- const [coreDate, studioDate] = await Promise.all([
27
- fetchReleaseDate("@lobb-js/core", ctx.meta.version),
28
- ctx.studioVersion ? fetchReleaseDate("@lobb-js/studio", ctx.studioVersion) : Promise.resolve(null),
29
- ]);
30
- releaseDates = { core: coreDate, studio: studioDate };
26
+ coreReleaseDate = await fetchReleaseDate("@lobb-js/core", ctx.meta.version);
31
27
  });
32
28
  </script>
33
29
 
34
30
  <div class="flex justify-end p-2 text-xs text-muted-foreground/50">
35
31
  <div class="flex flex-col text-end gap-0.5">
36
- {#if ctx.studioVersion}
37
- <div>
38
- studio: v{ctx.studioVersion}
39
- {#if releaseDates.studio}
40
- <span>({timeAgo.format(new Date(releaseDates.studio!))})</span>
41
- {/if}
42
- </div>
43
- {/if}
44
32
  <div>
45
33
  core: v{ctx.meta.version}
46
- {#if releaseDates.core}
47
- <span>({timeAgo.format(new Date(releaseDates.core!))})</span>
34
+ {#if coreReleaseDate}
35
+ <span>({timeAgo.format(new Date(coreReleaseDate))})</span>
48
36
  {/if}
49
37
  </div>
50
38
  </div>
@@ -20,7 +20,6 @@ interface Meta {
20
20
  }
21
21
 
22
22
  export interface CTX {
23
- studioVersion?: string;
24
23
  lobbUrl: string | null;
25
24
  extensions: Record<string, Extension>;
26
25
  meta: Meta;
package/dist/version.d.ts DELETED
@@ -1 +0,0 @@
1
- export declare const STUDIO_VERSION: string;
package/dist/version.js DELETED
@@ -1,2 +0,0 @@
1
- import pkg from "../../package.json" assert { type: "json" };
2
- export var STUDIO_VERSION = pkg.version;
@@ -1,2 +0,0 @@
1
- import pkg from "../../package.json" assert { type: "json" };
2
- export const STUDIO_VERSION: string = pkg.version;