accomadesc 0.1.12 → 0.1.14

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.
@@ -13,6 +13,7 @@
13
13
  defaultMonthHeaderFormat,
14
14
  } from './state.svelte.js';
15
15
  import { DateTime } from 'luxon';
16
+ import { browser } from '$app/environment';
16
17
 
17
18
  let {
18
19
  url,
@@ -43,10 +44,12 @@
43
44
 
44
45
  const oStateID = `i-${url}-${OCCUPATION_STATE}`;
45
46
  let occupationState: OccupationState = getContext(oStateID);
46
- if (!occupationState) {
47
- occupationState = new OccupationState(url);
48
- setContext(oStateID, occupationState);
49
- }
47
+ $effect(() => {
48
+ if (browser && !occupationState) {
49
+ occupationState = new OccupationState(url);
50
+ setContext(oStateID, occupationState);
51
+ }
52
+ });
50
53
 
51
54
  /*
52
55
  use different component based on different media size.
package/dist/types.d.ts CHANGED
@@ -291,6 +291,8 @@ export type Block = Text | Photo | PhotoGallery | Calendar | CalendarAvailable |
291
291
  export interface PageProps {
292
292
  id: string;
293
293
  path: string;
294
+ lastChange?: string;
295
+ created?: string;
294
296
  nav?: Nav;
295
297
  hero?: Hero;
296
298
  title?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "accomadesc",
3
- "version": "0.1.12",
3
+ "version": "0.1.14",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "vite build && npm run package",