@3birds/midori-ui 0.0.46 → 0.0.48

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.
@@ -8,12 +8,31 @@
8
8
  dial: import('svelte').Snippet;
9
9
  children: import('svelte').Snippet;
10
10
  } = $props();
11
+
12
+ let overlay: boolean = $state(false);
13
+
14
+ const onFocusOut = (e: FocusEvent): void => {
15
+ const container = e.currentTarget as HTMLElement;
16
+ if (!container.contains(e.relatedTarget as Node | null)) overlay = false;
17
+ };
18
+
19
+ const onClickOverlay = (): void => (document.activeElement as HTMLElement | null)?.blur();
11
20
  </script>
12
21
 
13
- <div class="fab {className}">
22
+ {#if overlay}
23
+ <button
24
+ type="button"
25
+ tabindex="-1"
26
+ aria-label="閉じる"
27
+ class="fixed inset-0 z-40 cursor-default bg-base-content/40"
28
+ onmousedown={(e) => e.preventDefault()}
29
+ onclick={onClickOverlay}
30
+ ></button>
31
+ {/if}
32
+
33
+ <div class="fab z-50 {className}" onfocusin={() => (overlay = true)} onfocusout={onFocusOut}>
14
34
  <div tabindex="0" role="button" class="btn btn-circle btn-primary btn-xl">
15
35
  {@render dial()}
16
36
  </div>
17
- <div class="fixed inset-0 z-0 bg-base-content/40"></div>
18
37
  {@render children()}
19
38
  </div>
package/dist/index.d.ts CHANGED
@@ -246,10 +246,9 @@ export { default as 噴水 } from './assets/poi/噴水.svg';
246
246
  export { default as 球技 } from './assets/poi/球技.svg';
247
247
  export { default as 的 } from './assets/poi/的.svg';
248
248
  export { alert } from './alert';
249
- export { authState } from './auth.svelte.ts';
250
249
  export * as firebase from './auth';
251
250
  export { auth } from './firebase';
252
251
  export * as modal from './modals-context.ts';
253
252
  export * from './utils/index.ts';
254
253
  export { MAP_ATTRIBUTION, MAP_DEFAULT_ICON_SIZE, PRIORITIES, MAP_DEFAULT_ICON_ANCHOR, MAP_MAX_ZOOM, MAP_DEFAULT_LATITUDE, MAP_DEFAULT_LONGITUDE, PRIORITIES_WITHOUT_LOG, PREFECTURE_SVG, POI_ICON } from './constants/index.ts';
255
- export type { BtnType, InputType, AlertType, AlertState, BreadcrumbsItem, FilterItem, Priority, PriorityChoice, ModalsContext, Data, ContentAdditionalInfo, ContentAdmin, ContentImage, ContentReview, ContentMinimal, ContentCasual, ContentFormal, ContentGeo, Dashboard, DashboardPref } from './types/index.ts';
254
+ export type { BtnType, InputType, AlertType, AlertState, BreadcrumbsItem, FilterItem, Priority, PriorityChoice, ModalsContext, Data, ContentAdditionalInfo, ContentAdmin, ContentImage, ContentReview, ContentMinimal, ContentCasual, ContentFormal, ContentGeo, ContentChildren, ContentReviews, Account, Dashboard, DashboardPref } from './types/index.ts';
package/dist/index.js CHANGED
@@ -247,7 +247,6 @@ export { default as 噴水 } from './assets/poi/噴水.svg';
247
247
  export { default as 球技 } from './assets/poi/球技.svg';
248
248
  export { default as 的 } from './assets/poi/的.svg';
249
249
  export { alert } from './alert';
250
- export { authState } from "./auth.svelte.js";
251
250
  export * as firebase from './auth';
252
251
  export { auth } from './firebase';
253
252
  export * as modal from "./modals-context.js";
@@ -48,6 +48,7 @@ export interface ContentReview {
48
48
  content_name: string;
49
49
  reviewer_nickname: string;
50
50
  reviewer_icon?: string;
51
+ updated_at: string;
51
52
  }
52
53
  export interface ContentMinimal {
53
54
  id: string;
@@ -108,6 +109,30 @@ export interface ContentGeo {
108
109
  id: string;
109
110
  thumbnail: string;
110
111
  }
112
+ interface ContentAttribute extends ContentMinimal {
113
+ thumbnail: string;
114
+ }
115
+ export interface ContentChildren extends ContentAttribute {
116
+ children: ContentCasual[];
117
+ }
118
+ export interface ContentReviews extends ContentAttribute {
119
+ reviews: ContentReview[];
120
+ }
121
+ export interface Account {
122
+ id: string;
123
+ photo?: string;
124
+ email: string;
125
+ password: string;
126
+ stripe_customer_id: string;
127
+ plan_id: string;
128
+ nickname: string;
129
+ management_condition: ManagementCondition;
130
+ }
131
+ interface ManagementCondition {
132
+ content_review_ids: string[];
133
+ favorite_content_ids: string[];
134
+ ads: boolean;
135
+ }
111
136
  export interface Dashboard {
112
137
  hot_contents: ContentCasual[];
113
138
  new_contents: ContentCasual[];
@@ -119,3 +144,4 @@ export interface DashboardPref {
119
144
  en: string;
120
145
  count: number;
121
146
  }
147
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@3birds/midori-ui",
3
- "version": "0.0.46",
3
+ "version": "0.0.48",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "dev": "vite dev",
@@ -1,5 +0,0 @@
1
- import { type User } from 'firebase/auth';
2
- export declare const authState: {
3
- user: User | null;
4
- loading: boolean;
5
- };
@@ -1,19 +0,0 @@
1
- import { browser } from '$app/environment';
2
- import { onAuthStateChanged } from 'firebase/auth';
3
- import { auth } from './firebase';
4
- let user = $state(null);
5
- let loading = $state(true);
6
- if (browser) {
7
- onAuthStateChanged(auth, (firebaseUser) => {
8
- user = firebaseUser;
9
- loading = false;
10
- });
11
- }
12
- export const authState = {
13
- get user() {
14
- return user;
15
- },
16
- get loading() {
17
- return loading;
18
- }
19
- };