@nyuccl/smile 0.2.0-beta.31 → 0.2.0-beta.34

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/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nyuccl/smile",
3
3
  "configKey": "smile",
4
- "version": "0.2.0-beta.31",
4
+ "version": "0.2.0-beta.34",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
package/dist/module.mjs CHANGED
@@ -19,6 +19,14 @@ const module$1 = defineNuxtModule({
19
19
  _nuxt.options.ssr = false;
20
20
  _nuxt.options.build.transpile.push(runtimeDir);
21
21
  _nuxt.options.nitro = _nuxt.options.nitro || {};
22
+ _nuxt.options.nitro.watchOptions = _nuxt.options.nitro.watchOptions || {};
23
+ _nuxt.options.nitro.watchOptions.ignored = _nuxt.options.nitro.watchOptions.ignored || [];
24
+ if (Array.isArray(_nuxt.options.nitro.watchOptions.ignored)) {
25
+ _nuxt.options.nitro.watchOptions.ignored.push("**/.data/**");
26
+ }
27
+ _nuxt.options.watch = _nuxt.options.watch || {};
28
+ _nuxt.options.watch.exclude = _nuxt.options.watch.exclude || [];
29
+ _nuxt.options.watch.exclude.push(".data/**");
22
30
  _nuxt.options.nitro.publicAssets = _nuxt.options.nitro.publicAssets || [];
23
31
  _nuxt.options.nitro.publicAssets.push({
24
32
  dir: resolver.resolve("./runtime/public"),
@@ -35,8 +43,8 @@ const module$1 = defineNuxtModule({
35
43
  };
36
44
  _nuxt.options.runtimeConfig.public = _nuxt.options.runtimeConfig.public || {};
37
45
  _nuxt.options.runtimeConfig.public.smile = {
38
- codeName: process.env.VITE_CODE_NAME || "",
39
- projectRef: process.env.VITE_PROJECT_REF || ""
46
+ codeName: process.env.VITE_CODE_NAME || "unnamed-experiment",
47
+ projectRef: process.env.VITE_PROJECT_REF || "local-experiment-main"
40
48
  };
41
49
  _nuxt.options.alias["#smile-dev"] = resolver.resolve("./runtime/components/dev");
42
50
  _nuxt.options.alias["#smile-composables"] = resolver.resolve("./runtime/composables");
@@ -4,10 +4,11 @@ import { useNuxtApp } from "#imports";
4
4
  import PresentationNavBar from "#smile-dev/presentation/PresentationNavBar.vue";
5
5
  import PresentationModeView from "../builtins/PresentationModeView.vue";
6
6
  import useSmileStore from "../../stores/smilestore";
7
+ import useAPI from "../../composables/useAPI";
7
8
  import { useSmileColorMode } from "../../composables/useColorMode";
8
9
  const nuxtApp = useNuxtApp();
9
10
  const store = useSmileStore();
10
- const _api = useAPI();
11
+ useAPI();
11
12
  useSmileColorMode("global");
12
13
  const timelineReady = ref(false);
13
14
  const presentationHome = computed(() => {
@@ -67,8 +67,8 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
67
67
  }>> & Readonly<{}>, {
68
68
  variant: string;
69
69
  disabled: boolean;
70
- asChild: boolean;
71
70
  inset: boolean;
71
+ asChild: boolean;
72
72
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
73
73
  type __VLS_Slots = {
74
74
  default?: ((props: {}) => any) | undefined;
@@ -67,8 +67,8 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
67
67
  }>> & Readonly<{}>, {
68
68
  variant: string;
69
69
  disabled: boolean;
70
- asChild: boolean;
71
70
  inset: boolean;
71
+ asChild: boolean;
72
72
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
73
73
  type __VLS_Slots = {
74
74
  default?: ((props: {}) => any) | undefined;
@@ -39,8 +39,8 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
39
39
  required: false;
40
40
  };
41
41
  }>> & Readonly<{}>, {
42
- asChild: boolean;
43
42
  inset: boolean;
43
+ asChild: boolean;
44
44
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
45
45
  type __VLS_Slots = {
46
46
  default?: ((props: {}) => any) | undefined;
@@ -39,8 +39,8 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
39
39
  required: false;
40
40
  };
41
41
  }>> & Readonly<{}>, {
42
- asChild: boolean;
43
42
  inset: boolean;
43
+ asChild: boolean;
44
44
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
45
45
  type __VLS_Slots = {
46
46
  default?: ((props: {}) => any) | undefined;
@@ -82,9 +82,9 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
82
82
  pointerDownOutside: (...args: any[]) => void;
83
83
  focusOutside: (...args: any[]) => void;
84
84
  interactOutside: (...args: any[]) => void;
85
- openAutoFocus: (...args: any[]) => void;
86
85
  closeAutoFocus: (...args: any[]) => void;
87
86
  entryFocus: (...args: any[]) => void;
87
+ openAutoFocus: (...args: any[]) => void;
88
88
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
89
89
  forceMount: {
90
90
  type: BooleanConstructor;
@@ -163,9 +163,9 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
163
163
  onPointerDownOutside?: ((...args: any[]) => any) | undefined;
164
164
  onFocusOutside?: ((...args: any[]) => any) | undefined;
165
165
  onInteractOutside?: ((...args: any[]) => any) | undefined;
166
- onOpenAutoFocus?: ((...args: any[]) => any) | undefined;
167
166
  onCloseAutoFocus?: ((...args: any[]) => any) | undefined;
168
167
  onEntryFocus?: ((...args: any[]) => any) | undefined;
168
+ onOpenAutoFocus?: ((...args: any[]) => any) | undefined;
169
169
  }>, {
170
170
  loop: boolean;
171
171
  asChild: boolean;
@@ -82,9 +82,9 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
82
82
  pointerDownOutside: (...args: any[]) => void;
83
83
  focusOutside: (...args: any[]) => void;
84
84
  interactOutside: (...args: any[]) => void;
85
- openAutoFocus: (...args: any[]) => void;
86
85
  closeAutoFocus: (...args: any[]) => void;
87
86
  entryFocus: (...args: any[]) => void;
87
+ openAutoFocus: (...args: any[]) => void;
88
88
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
89
89
  forceMount: {
90
90
  type: BooleanConstructor;
@@ -163,9 +163,9 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
163
163
  onPointerDownOutside?: ((...args: any[]) => any) | undefined;
164
164
  onFocusOutside?: ((...args: any[]) => any) | undefined;
165
165
  onInteractOutside?: ((...args: any[]) => any) | undefined;
166
- onOpenAutoFocus?: ((...args: any[]) => any) | undefined;
167
166
  onCloseAutoFocus?: ((...args: any[]) => any) | undefined;
168
167
  onEntryFocus?: ((...args: any[]) => any) | undefined;
168
+ onOpenAutoFocus?: ((...args: any[]) => any) | undefined;
169
169
  }>, {
170
170
  loop: boolean;
171
171
  asChild: boolean;
@@ -56,8 +56,8 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
56
56
  };
57
57
  }>> & Readonly<{}>, {
58
58
  disabled: boolean;
59
- asChild: boolean;
60
59
  inset: boolean;
60
+ asChild: boolean;
61
61
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
62
62
  type __VLS_Slots = {
63
63
  default?: ((props: {}) => any) | undefined;
@@ -56,8 +56,8 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
56
56
  };
57
57
  }>> & Readonly<{}>, {
58
58
  disabled: boolean;
59
- asChild: boolean;
60
59
  inset: boolean;
60
+ asChild: boolean;
61
61
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
62
62
  type __VLS_Slots = {
63
63
  default?: ((props: {}) => any) | undefined;
@@ -92,8 +92,8 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
92
92
  pointerDownOutside: (...args: any[]) => void;
93
93
  focusOutside: (...args: any[]) => void;
94
94
  interactOutside: (...args: any[]) => void;
95
- openAutoFocus: (...args: any[]) => void;
96
95
  closeAutoFocus: (...args: any[]) => void;
96
+ openAutoFocus: (...args: any[]) => void;
97
97
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
98
98
  forceMount: {
99
99
  type: BooleanConstructor;
@@ -182,8 +182,8 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
182
182
  onPointerDownOutside?: ((...args: any[]) => any) | undefined;
183
183
  onFocusOutside?: ((...args: any[]) => any) | undefined;
184
184
  onInteractOutside?: ((...args: any[]) => any) | undefined;
185
- onOpenAutoFocus?: ((...args: any[]) => any) | undefined;
186
185
  onCloseAutoFocus?: ((...args: any[]) => any) | undefined;
186
+ onOpenAutoFocus?: ((...args: any[]) => any) | undefined;
187
187
  }>, {
188
188
  asChild: boolean;
189
189
  forceMount: boolean;
@@ -92,8 +92,8 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
92
92
  pointerDownOutside: (...args: any[]) => void;
93
93
  focusOutside: (...args: any[]) => void;
94
94
  interactOutside: (...args: any[]) => void;
95
- openAutoFocus: (...args: any[]) => void;
96
95
  closeAutoFocus: (...args: any[]) => void;
96
+ openAutoFocus: (...args: any[]) => void;
97
97
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
98
98
  forceMount: {
99
99
  type: BooleanConstructor;
@@ -182,8 +182,8 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
182
182
  onPointerDownOutside?: ((...args: any[]) => any) | undefined;
183
183
  onFocusOutside?: ((...args: any[]) => any) | undefined;
184
184
  onInteractOutside?: ((...args: any[]) => any) | undefined;
185
- onOpenAutoFocus?: ((...args: any[]) => any) | undefined;
186
185
  onCloseAutoFocus?: ((...args: any[]) => any) | undefined;
186
+ onOpenAutoFocus?: ((...args: any[]) => any) | undefined;
187
187
  }>, {
188
188
  asChild: boolean;
189
189
  forceMount: boolean;
@@ -39,8 +39,8 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
39
39
  pointerDownOutside: (...args: any[]) => void;
40
40
  focusOutside: (...args: any[]) => void;
41
41
  interactOutside: (...args: any[]) => void;
42
- openAutoFocus: (...args: any[]) => void;
43
42
  closeAutoFocus: (...args: any[]) => void;
43
+ openAutoFocus: (...args: any[]) => void;
44
44
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
45
45
  class: {
46
46
  type: null;
@@ -76,8 +76,8 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
76
76
  onPointerDownOutside?: ((...args: any[]) => any) | undefined;
77
77
  onFocusOutside?: ((...args: any[]) => any) | undefined;
78
78
  onInteractOutside?: ((...args: any[]) => any) | undefined;
79
- onOpenAutoFocus?: ((...args: any[]) => any) | undefined;
80
79
  onCloseAutoFocus?: ((...args: any[]) => any) | undefined;
80
+ onOpenAutoFocus?: ((...args: any[]) => any) | undefined;
81
81
  }>, {
82
82
  side: string;
83
83
  asChild: boolean;
@@ -39,8 +39,8 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
39
39
  pointerDownOutside: (...args: any[]) => void;
40
40
  focusOutside: (...args: any[]) => void;
41
41
  interactOutside: (...args: any[]) => void;
42
- openAutoFocus: (...args: any[]) => void;
43
42
  closeAutoFocus: (...args: any[]) => void;
43
+ openAutoFocus: (...args: any[]) => void;
44
44
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
45
45
  class: {
46
46
  type: null;
@@ -76,8 +76,8 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
76
76
  onPointerDownOutside?: ((...args: any[]) => any) | undefined;
77
77
  onFocusOutside?: ((...args: any[]) => any) | undefined;
78
78
  onInteractOutside?: ((...args: any[]) => any) | undefined;
79
- onOpenAutoFocus?: ((...args: any[]) => any) | undefined;
80
79
  onCloseAutoFocus?: ((...args: any[]) => any) | undefined;
80
+ onOpenAutoFocus?: ((...args: any[]) => any) | undefined;
81
81
  }>, {
82
82
  side: string;
83
83
  asChild: boolean;
@@ -1,44 +1,44 @@
1
1
  declare namespace _default {
2
- let mode: any;
3
- let smileVersion: any;
4
- let projectName: any;
5
- let projectRef: any;
6
- let codeName: any;
7
- let codeNameURL: any;
8
- let localStorageKey: string;
9
- let devLocalStorageKey: string;
10
- namespace github {
11
- let repoName: any;
12
- let owner: any;
13
- let branch: any;
14
- let lastCommitMsg: any;
15
- let lastCommitHash: any;
16
- let commitURL: string;
2
+ export let mode: any;
3
+ export let smileVersion: any;
4
+ export let projectName: any;
5
+ export { projectRef };
6
+ export { codeName };
7
+ export let codeNameURL: any;
8
+ export let localStorageKey: string;
9
+ export let devLocalStorageKey: string;
10
+ export namespace github {
11
+ export { repoName };
12
+ export { owner };
13
+ export { branch };
14
+ export let lastCommitMsg: any;
15
+ export { hash as lastCommitHash };
16
+ export let commitURL: string;
17
17
  }
18
- let allowRepeats: boolean;
19
- let autoSave: any;
20
- let maxWrites: any;
21
- let minWriteInterval: any;
22
- let maxSteps: any;
23
- let randomSeed: any;
24
- let deployURL: any;
25
- let labURL: any;
26
- let brandLogoFn: any;
27
- let advertisementImageFn: string;
28
- let advertisementImageInvertDark: boolean;
29
- let colorMode: any;
30
- let responsiveUI: boolean;
31
- let googleAnalyticsID: any;
32
- let windowsizerRequest: object;
33
- let windowsizerAggressive: boolean;
34
- let anonymousMode: boolean;
35
- let unpaidStudy: boolean;
36
- namespace sona {
18
+ export let allowRepeats: boolean;
19
+ export let autoSave: any;
20
+ export let maxWrites: any;
21
+ export let minWriteInterval: any;
22
+ export let maxSteps: any;
23
+ export let randomSeed: any;
24
+ export let deployURL: any;
25
+ export let labURL: any;
26
+ export let brandLogoFn: any;
27
+ export let advertisementImageFn: string;
28
+ export let advertisementImageInvertDark: boolean;
29
+ export let colorMode: any;
30
+ export let responsiveUI: boolean;
31
+ export let googleAnalyticsID: any;
32
+ export let windowsizerRequest: object;
33
+ export let windowsizerAggressive: boolean;
34
+ export let anonymousMode: boolean;
35
+ export let unpaidStudy: boolean;
36
+ export namespace sona {
37
37
  let url: any;
38
38
  let experimentId: any;
39
39
  let creditToken: any;
40
40
  }
41
- namespace sonaPaid {
41
+ export namespace sonaPaid {
42
42
  let url_1: any;
43
43
  export { url_1 as url };
44
44
  let experimentId_1: any;
@@ -46,10 +46,10 @@ declare namespace _default {
46
46
  let creditToken_1: any;
47
47
  export { creditToken_1 as creditToken };
48
48
  }
49
- namespace spark {
49
+ export namespace spark {
50
50
  let completionUrl: string;
51
51
  }
52
- namespace firebaseConfig {
52
+ export namespace firebaseConfig {
53
53
  let apiKey: any;
54
54
  let authDomain: any;
55
55
  let projectId: any;
@@ -166,3 +166,47 @@ export type Config = {
166
166
  appId: string;
167
167
  };
168
168
  };
169
+ declare const projectRef: any;
170
+ /**
171
+ * Global configuration object for the Smile application
172
+ * @typedef {object} Config
173
+ * @property {string} mode - Application mode ('development', 'production', 'testing')
174
+ * @property {string} projectName - Name of the project
175
+ * @property {string} projectRef - Project reference derived from deploy base path
176
+ * @property {string} codeName - Project code name
177
+ * @property {string} codeNameURL - Deploy URL for code name
178
+ * @property {string} localStorageKey - Key for storing data in localStorage
179
+ * @property {string} devLocalStorageKey - Key for storing dev data in localStorage
180
+ * @property {object} github - GitHub repository information
181
+ * @property {string} github.repoName - Repository name
182
+ * @property {string} github.owner - Repository owner
183
+ * @property {string} github.branch - Current branch name
184
+ * @property {string} github.lastCommitMsg - Last commit message
185
+ * @property {string} github.lastCommitHash - Last commit hash
186
+ * @property {string} github.commitURL - URL to last commit
187
+ * @property {boolean} allowRepeats - Whether to allow repeat participants
188
+ * @property {boolean} autoSave - Whether to auto-save data
189
+ * @property {number} maxWrites - Maximum number of writes allowed
190
+ * @property {number} minWriteInterval - Minimum interval between writes
191
+ * @property {number} maxSteps - Maximum rows in stepper tables
192
+ * @property {string} randomSeed - Seed for random number generation
193
+ * @property {string} deployURL - URL where app is deployed
194
+ * @property {string} labURL - URL of the lab website
195
+ * @property {string} brandLogoFn - Function name for brand logo
196
+ * @property {string} googleAnalyticsID - Google Analytics tracking ID
197
+ * @property {object} windowsizerRequest - Requested window dimensions
198
+ * @property {boolean} windowsizerAggressive - Whether to force window sizing
199
+ * @property {boolean} anonymousMode - Whether to enable anonymous mode
200
+ * @property {object} firebaseConfig - Firebase configuration object
201
+ * @property {string} firebaseConfig.apiKey - Firebase API key
202
+ * @property {string} firebaseConfig.authDomain - Firebase auth domain
203
+ * @property {string} firebaseConfig.projectId - Firebase project ID
204
+ * @property {string} firebaseConfig.storageBucket - Firebase storage bucket
205
+ * @property {string} firebaseConfig.messagingSenderId - Firebase messaging sender ID
206
+ * @property {string} firebaseConfig.appId - Firebase app ID
207
+ */
208
+ declare const codeName: any;
209
+ declare const repoName: any;
210
+ declare const owner: any;
211
+ declare const branch: any;
212
+ declare const hash: any;
@@ -58,24 +58,29 @@ function parseWidthHeight(value) {
58
58
  * @property {string} firebaseConfig.messagingSenderId - Firebase messaging sender ID
59
59
  * @property {string} firebaseConfig.appId - Firebase app ID
60
60
  */
61
+ const codeName = import.meta.env.VITE_CODE_NAME || 'unnamed-experiment'
62
+ const projectRef = (import.meta.env.VITE_DEPLOY_BASE_PATH || '/local/experiment/main/').slice(1, -1).replace(/\//g, '-')
63
+ const owner = import.meta.env.VITE_GIT_OWNER || 'local'
64
+ const repoName = import.meta.env.VITE_GIT_REPO_NAME || 'experiment'
65
+ const branch = import.meta.env.VITE_GIT_BRANCH_NAME || 'main'
66
+ const hash = import.meta.env.VITE_GIT_HASH || '0000000'
67
+
61
68
  export default {
62
69
  mode: import.meta.env.MODE,
63
70
  smileVersion: import.meta.env.VITE_SMILE_VERSION,
64
- projectName: import.meta.env.VITE_PROJECT_NAME, // autocompute this on intitialization
65
- projectRef: (import.meta.env.VITE_DEPLOY_BASE_PATH || '/').slice(1, -1).replace(/\//g, '-'),
66
- codeName: import.meta.env.VITE_CODE_NAME,
71
+ projectName: import.meta.env.VITE_PROJECT_NAME || 'experiment',
72
+ projectRef,
73
+ codeName,
67
74
  codeNameURL: import.meta.env.VITE_CODE_NAME_DEPLOY_URL,
68
- localStorageKey: `smilestore-${import.meta.env.VITE_CODE_NAME}`,
69
- devLocalStorageKey: `smilestore-${import.meta.env.VITE_CODE_NAME}_dev`,
75
+ localStorageKey: `smilestore-${codeName}`,
76
+ devLocalStorageKey: `smilestore-${codeName}_dev`,
70
77
  github: {
71
- repoName: import.meta.env.VITE_GIT_REPO_NAME,
72
- owner: import.meta.env.VITE_GIT_OWNER,
73
- branch: import.meta.env.VITE_GIT_BRANCH_NAME,
74
- lastCommitMsg: import.meta.env.VITE_GIT_LAST_MSG,
75
- lastCommitHash: import.meta.env.VITE_GIT_HASH, // autocompute this all the time
76
- commitURL: `https://github.com/${import.meta.env.VITE_GIT_OWNER}/${import.meta.env.VITE_GIT_REPO_NAME}/commit/${
77
- import.meta.env.VITE_GIT_HASH
78
- }`,
78
+ repoName,
79
+ owner,
80
+ branch,
81
+ lastCommitMsg: import.meta.env.VITE_GIT_LAST_MSG || '(no commits yet)',
82
+ lastCommitHash: hash,
83
+ commitURL: `https://github.com/${owner}/${repoName}/commit/${hash}`,
79
84
  },
80
85
  // browser_exclude: import.meta.env.VITE_BROWSER_EXCLUDE,
81
86
  allowRepeats: import.meta.env.VITE_ALLOW_REPEATS === 'true',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nyuccl/smile",
3
- "version": "0.2.0-beta.31",
3
+ "version": "0.2.0-beta.34",
4
4
  "description": "SMILE experiment framework as a Nuxt module",
5
5
  "author": "Todd Gureckis <gureckis@gmail.com>",
6
6
  "license": "MIT",