@codecademy/codebytes 1.5.0-alpha.71522d956.0 → 1.5.0-alpha.ef9d033e3.0

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.
Files changed (32) hide show
  1. package/dist/{libs/feature/codebytes/src/MonacoEditor → MonacoEditor}/colorsDark.d.ts +3 -3
  2. package/dist/MonacoEditor/colorsDark.js +2 -2
  3. package/package.json +1 -1
  4. package/dist/libs/data/tracking/src/events/index.d.ts +0 -3
  5. package/dist/libs/data/tracking/src/events/track.d.ts +0 -13
  6. package/dist/libs/data/tracking/src/events/types.d.ts +0 -304
  7. package/dist/libs/data/tracking/src/events/user.d.ts +0 -2
  8. package/dist/libs/data/tracking/src/index.d.ts +0 -3
  9. package/dist/libs/data/tracking/src/integrations/device.d.ts +0 -13
  10. package/dist/libs/data/tracking/src/integrations/fides.d.ts +0 -1
  11. package/dist/libs/data/tracking/src/integrations/gtm.d.ts +0 -9
  12. package/dist/libs/data/tracking/src/integrations/index.d.ts +0 -23
  13. package/dist/libs/data/tracking/src/integrations/partytown/config.d.ts +0 -2
  14. package/dist/libs/data/tracking/src/integrations/partytown/gtmDoubleFrame.d.ts +0 -1
  15. package/dist/libs/data/tracking/src/integrations/partytown/index.d.ts +0 -1
  16. package/dist/libs/data/tracking/src/integrations/types.d.ts +0 -3
  17. /package/dist/{libs/feature/codebytes/src/MonacoEditor → MonacoEditor}/deprecatedEditorSyntaxColors.d.ts +0 -0
  18. /package/dist/{libs/feature/codebytes/src/MonacoEditor → MonacoEditor}/index.d.ts +0 -0
  19. /package/dist/{libs/feature/codebytes/src/MonacoEditor → MonacoEditor}/theme.d.ts +0 -0
  20. /package/dist/{libs/feature/codebytes/src/MonacoEditor → MonacoEditor}/types.d.ts +0 -0
  21. /package/dist/{libs/feature/codebytes/src/api.d.ts → api.d.ts} +0 -0
  22. /package/dist/{libs/feature/codebytes/src/codeByteEditor.d.ts → codeByteEditor.d.ts} +0 -0
  23. /package/dist/{libs/feature/codebytes/src/consts.d.ts → consts.d.ts} +0 -0
  24. /package/dist/{libs/feature/codebytes/src/drawers.d.ts → drawers.d.ts} +0 -0
  25. /package/dist/{libs/feature/codebytes/src/editor.d.ts → editor.d.ts} +0 -0
  26. /package/dist/{libs/feature/codebytes/src/helpers → helpers}/index.d.ts +0 -0
  27. /package/dist/{libs/feature/codebytes/src/helpers → helpers}/useEverInView.d.ts +0 -0
  28. /package/dist/{libs/feature/codebytes/src/helpers → helpers}/useIntersection.d.ts +0 -0
  29. /package/dist/{libs/feature/codebytes/src/index.d.ts → index.d.ts} +0 -0
  30. /package/dist/{libs/feature/codebytes/src/languageSelection.d.ts → languageSelection.d.ts} +0 -0
  31. /package/dist/libs/{feature/codebytes/src/libs/eventTracking.d.ts → eventTracking.d.ts} +0 -0
  32. /package/dist/{libs/feature/codebytes/src/types.d.ts → types.d.ts} +0 -0
@@ -2,7 +2,7 @@ export declare const syntax: {
2
2
  attribute: "#b4d353";
3
3
  annotation: "#ea6c8b";
4
4
  atom: "#cc7bc2";
5
- basic: "#ffffff";
5
+ basic: string;
6
6
  comment: "#939598";
7
7
  constant: "#ff8973";
8
8
  decoration: "#ea6c8b";
@@ -11,7 +11,7 @@ export declare const syntax: {
11
11
  keyword: "#b3ccff";
12
12
  number: "#ea6c8b";
13
13
  operator: "#ea6c8b";
14
- predefined: "#ffffff";
14
+ predefined: string;
15
15
  property: "#ea6c8b";
16
16
  regexp: "#b4d353";
17
17
  string: "#ffe083";
@@ -22,7 +22,7 @@ export declare const syntax: {
22
22
  };
23
23
  export declare const ui: {
24
24
  background: string;
25
- text: "#ffffff";
25
+ text: string;
26
26
  indent: {
27
27
  active: string;
28
28
  inactive: string;
@@ -3,7 +3,6 @@
3
3
  // We are working on a monaco package in client-modules that has more configuration around themes and languages
4
4
  // Monaco as a shared package RFC https://www.notion.so/codecademy/Monaco-editor-as-a-shared-package-1f4484db165b4abc8394c3556451ef6a
5
5
 
6
- import { colors } from '@codecademy/gamut-styles';
7
6
  import { deprecatedEditorSyntaxColors } from './deprecatedEditorSyntaxColors';
8
7
  const darkTheme = {
9
8
  blue: deprecatedEditorSyntaxColors.blue,
@@ -13,7 +12,8 @@ const darkTheme = {
13
12
  orange: deprecatedEditorSyntaxColors.orange,
14
13
  purple: deprecatedEditorSyntaxColors.purple,
15
14
  red: deprecatedEditorSyntaxColors.red,
16
- white: colors.white,
15
+ // Should match `colors.white` in libs/ui/legacy-colors/src/colors.ts (published Codebytes cannot import @mono/ui-legacy-colors).
16
+ white: '#ffffff',
17
17
  yellow: deprecatedEditorSyntaxColors.yellow
18
18
  };
19
19
  export const syntax = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codecademy/codebytes",
3
- "version": "1.5.0-alpha.71522d956.0",
3
+ "version": "1.5.0-alpha.ef9d033e3.0",
4
4
  "description": "Codebytes Editor",
5
5
  "license": "MIT",
6
6
  "repository": "git@github.com:codecademy-engineering/mono.git",
@@ -1,3 +0,0 @@
1
- export * from './track';
2
- export * from './user';
3
- export * from './types';
@@ -1,13 +0,0 @@
1
- import type { BaseEventData, ContentContext, EventDataTypes, TrackingOptions, UserClickData, UserImpressionData, UserVisitData } from './types';
2
- export type TrackerOptions = {
3
- apiBaseUrl: string;
4
- verbose?: boolean;
5
- };
6
- export declare const createTracker: ({ apiBaseUrl, verbose }: TrackerOptions) => {
7
- event: <Category extends keyof EventDataTypes, Event extends string & keyof EventDataTypes[Category], Data extends EventDataTypes[Category][Event] & BaseEventData>(category: Category, event: Event, userData: Data, options?: TrackingOptions) => void;
8
- click: (data: UserClickData) => void;
9
- impression: (data: UserImpressionData) => void;
10
- visit: (data: UserVisitData) => void;
11
- pushDataLayerEvent: (eventName: string) => void;
12
- pushContentLoadedEvent: (contentIds: ContentContext) => Promise<void>;
13
- };
@@ -1,304 +0,0 @@
1
- /**
2
- * The Data types for all of our events.
3
- * Follows the format EventDataTypes[Category].[Event].EventData
4
- * Category + Event gives the corresponding event table in redshift
5
- */
6
- export type EventDataTypes = {
7
- user: {
8
- click: UserClickData;
9
- visit: UserVisitData;
10
- impression: UserImpressionData;
11
- email_trigger: BaseEventAnyData;
12
- content_completed: BaseEventAnyData;
13
- submit: BaseEventAnyData;
14
- workspace_init: BaseEventAnyData;
15
- meaningful_content_loaded: BaseEventAnyData;
16
- practice_completed: BaseEventAnyData;
17
- };
18
- ad: {
19
- click: BaseEventAnyData;
20
- impression: BaseEventAnyData;
21
- };
22
- calendar: {
23
- reminder: BaseEventAnyData;
24
- };
25
- notification: {
26
- clicked: BaseEventAnyData;
27
- ion: BaseEventAnyData;
28
- };
29
- form: {
30
- submit: BaseEventAnyData;
31
- };
32
- sorting_quiz: {
33
- result: BaseEventAnyData;
34
- impression: BaseEventAnyData;
35
- answer: EventAnswerData;
36
- };
37
- onboarding_survey: {
38
- answer: BaseEventAnyData;
39
- recommendation: BaseEventAnyData;
40
- submission_recommendation: BaseEventAnyData;
41
- user_selected_recommendation: BaseEventAnyData;
42
- };
43
- exercise: {
44
- force_pass: BaseEventAnyData;
45
- };
46
- experiment: {
47
- contentful_experiment_assignment_event: BaseEventAnyData;
48
- };
49
- payments: {
50
- cancel_survey: BaseEventAnyData;
51
- extend_trial_survey: BaseEventAnyData;
52
- };
53
- search: {
54
- visit: BaseEventAnyData;
55
- click: BaseEventAnyData;
56
- query: BaseEventAnyData;
57
- result: BaseEventAnyData;
58
- };
59
- page: {
60
- career_path_visited: PagePathVisitedData;
61
- skill_path_visited: PagePathVisitedData;
62
- course_page_visited: CoursePageVisitedData;
63
- };
64
- business: {
65
- filter_event: BusinessFilterData;
66
- search_event: BusinessSearchData;
67
- };
68
- gpt_plugin: {
69
- search: ChatGPTPluginSearchEventData;
70
- };
71
- };
72
- /**
73
- * Base event data shared by all events
74
- */
75
- export type BaseEventData = {
76
- fullpath?: null;
77
- search?: null;
78
- path?: null;
79
- title?: null;
80
- url?: null;
81
- referrer?: string | null;
82
- id?: null;
83
- };
84
- /**
85
- * Generic type to use for event data not typed yet
86
- */
87
- export type BaseEventAnyData = BaseEventData & {
88
- [key: string]: any;
89
- };
90
- /**
91
- * Options to pass to the tracking function
92
- */
93
- export type TrackingOptions = {
94
- /** tells backend not to merge user-identifying data onto the event payload */
95
- gdprSafe?: boolean;
96
- };
97
- /**
98
- * The Content IDs related to the current event, to help build the content context of the event.
99
- * These IDs get hashed into a single value and overwrite content_id before they are sent to
100
- * redshift in lib/content_group_id.rb
101
- */
102
- export type TrackingContentIds = {
103
- assessment_id?: string;
104
- content_item_id?: string;
105
- exercise_id?: string;
106
- learning_standard_id?: string;
107
- module_id?: string;
108
- path_id?: string;
109
- program_id?: string;
110
- program_unit_id?: string;
111
- review_card_id?: string;
112
- skill_benchmark_id?: string;
113
- track_id?: string;
114
- journey_id?: string;
115
- external_course_id?: string;
116
- external_path_id?: string;
117
- lo_id?: string;
118
- };
119
- /**
120
- * Shared data relevant for all user events
121
- */
122
- export type UserSharedData = BaseEventData & {
123
- /** the click target of the event */
124
- target?: string;
125
- /** the page the event is coming from */
126
- page_name?: string;
127
- /** a context id for the event, for events that occur in more than one place */
128
- context?: string;
129
- /** the link being clicked on */
130
- href?: string;
131
- /** a version id for the element (ex. different version ids for redesigns) */
132
- version?: string;
133
- /** an object of content ids related to this event */
134
- content_ids?: TrackingContentIds;
135
- /** the repo that this event is being fired from */
136
- source_codebase?: string;
137
- /** Should be used for arbitrary JSON that has been passed through JSON.stringify. */
138
- misc?: string;
139
- };
140
- /**
141
- * Data sent to user click event table
142
- * NOTE: avoid adding additional properties to these objects
143
- * Instead, reuse existing properties, or make any additional properties generic so that they can be reused.
144
- * https://www.notion.so/codecademy/Guide-to-Event-Tracking-Schema-5d40b09a297743f7a30a2690208194c8#800bbf6cdf2e44de9823cd75bcc574e5
145
- */
146
- export type UserClickData = UserSharedData & {
147
- target: string;
148
- id?: string;
149
- distinct_id?: string;
150
- content_id?: string;
151
- slug?: string;
152
- name?: string;
153
- action?: string;
154
- type?: string;
155
- location?: string;
156
- element?: string;
157
- weekly_goal?: string | number;
158
- complete?: string;
159
- video_url?: string;
160
- path_id?: string;
161
- path_slug?: string;
162
- event_name?: string;
163
- onboarding_entrypoint?: string;
164
- content_slug?: string;
165
- module_id?: string;
166
- track_slug?: string;
167
- module_slug?: string;
168
- button?: string;
169
- current_challenge_day?: string | number;
170
- track_id?: string;
171
- course?: string;
172
- path_name?: string;
173
- event_id?: string;
174
- unit?: string;
175
- lesson?: string;
176
- community_prompt?: string;
177
- contentItem?: any;
178
- unit_slug?: string;
179
- course_slug?: string;
180
- course_progress?: number;
181
- assessment_id?: string;
182
- container_slugs?: string[];
183
- search_id?: string;
184
- /** additional ai builder properties */
185
- project_id?: string;
186
- milestone_id?: string;
187
- task_id?: string;
188
- question_set_id?: string;
189
- business_user?: BaseEventAnyData;
190
- };
191
- /**
192
- * Data sent to user visit event table
193
- * NOTE: avoid adding additional properties to these objects
194
- * Instead, reuse existing properties, or make any additional properties generic so that they can be reused.
195
- * https://www.notion.so/codecademy/Guide-to-Event-Tracking-Schema-5d40b09a297743f7a30a2690208194c8#800bbf6cdf2e44de9823cd75bcc574e5
196
- */
197
- export type UserVisitData = UserSharedData & {
198
- page_name: string;
199
- category?: string;
200
- distinct_id?: string;
201
- type?: string;
202
- target?: string;
203
- section?: string;
204
- plan?: string;
205
- path_id?: string;
206
- post?: string;
207
- story_type?: string;
208
- path_title?: string;
209
- onboarding_entrypoint?: string;
210
- course_slug?: string;
211
- course?: string;
212
- interstitial_name?: string;
213
- content_id?: string;
214
- story_slug?: string;
215
- unit?: string;
216
- lesson?: string;
217
- /** additional ai builder properties */
218
- project_id?: string;
219
- };
220
- export type UserImpressionData = Pick<UserSharedData, 'context' | 'source_codebase' | 'content_ids' | 'misc'> & {
221
- page_name: string;
222
- target: string;
223
- slug?: string;
224
- /** additional ai builder properties */
225
- project_id?: string;
226
- milestone_id?: string;
227
- task_id?: string;
228
- question_set_id?: string;
229
- };
230
- export type EventAnswerData = BaseEventData & {
231
- question_index: number;
232
- answer_index: number;
233
- answer: any;
234
- answer_slug: string;
235
- };
236
- export type User = {
237
- id?: string;
238
- auth_token: string;
239
- profile_image_url?: string;
240
- email?: string;
241
- is_pro?: boolean;
242
- username?: string;
243
- location: {
244
- in_eu: boolean;
245
- geo_country: string;
246
- };
247
- features: string[];
248
- };
249
- export type UseUserResponse = {
250
- user?: User;
251
- status: string;
252
- };
253
- export type PagePathVisitedData = BaseEventData & {
254
- path_id: string;
255
- path_full_title: string;
256
- };
257
- export type CoursePageVisitedData = BaseEventData & {
258
- course_id: string;
259
- course_full_title: string;
260
- };
261
- export type FilterType = string | string[] | number | boolean;
262
- export type BusinessFilterData = BaseEventData & {
263
- filter_key: string;
264
- filter_value: FilterType;
265
- };
266
- export type BusinessSearchData = BaseEventData & {
267
- search_query: string;
268
- };
269
- export declare enum ChatGPTSearchResource {
270
- CATALOG = "catalog",
271
- LITERATURE = "literature"
272
- }
273
- export type ChatGPTPluginSearchEventData = {
274
- resource: ChatGPTSearchResource;
275
- query: string;
276
- };
277
- /**
278
- * Content context for tracking events
279
- */
280
- export type ContentContext = Partial<JourneyComponents & PathComponents & CourseComponents & ContentItem & Exercise & {
281
- enterprise_module_id?: string;
282
- }>;
283
- export interface JourneyComponents {
284
- journey_id?: string;
285
- module_id?: string;
286
- path_id?: string;
287
- track_id?: string;
288
- }
289
- export interface PathComponents {
290
- module_id?: string;
291
- path_id?: string;
292
- track_id?: string;
293
- }
294
- export interface CourseComponents {
295
- module_id?: string;
296
- track_id?: string;
297
- }
298
- export interface ContentItem {
299
- content_item_id?: string;
300
- type?: string;
301
- }
302
- export interface Exercise {
303
- exercise_id?: string;
304
- }
@@ -1,2 +0,0 @@
1
- import { User } from './types';
2
- export declare const fetchUser: (apiBaseUrl: string) => Promise<User>;
@@ -1,3 +0,0 @@
1
- export * from './integrations';
2
- export type { TrackingWindow } from './integrations/types';
3
- export * from './events';
@@ -1,13 +0,0 @@
1
- /**
2
- * @returns Whether the site is running both in ChromeOS and in PWA mode.
3
- */
4
- export declare const isChromeOSPWA: () => boolean;
5
- /**
6
- * @returns Whether the site is running in ChromeOS
7
- */
8
- export declare const isChromeOS: () => boolean;
9
- export declare enum ClientTypes {
10
- PWA = "pwa",
11
- Default = "default"
12
- }
13
- export declare const getClientType: () => ClientTypes;
@@ -1 +0,0 @@
1
- export declare const initializeFides: () => Promise<void>;
@@ -1,9 +0,0 @@
1
- import { TrackingWindow } from './types';
2
- export type GTMSettings = {
3
- environment: string;
4
- scope: TrackingWindow;
5
- optedOutExternalTracking?: boolean;
6
- enablePartytown?: boolean;
7
- };
8
- export declare const OPT_OUT_DATALAYER_VAR = "user_opted_out_external_tracking";
9
- export declare const initializeGTM: ({ scope, environment, optedOutExternalTracking, enablePartytown, }: GTMSettings) => void;
@@ -1,23 +0,0 @@
1
- import { TrackingWindow } from './types';
2
- export type TrackingIntegrationsSettings = {
3
- /**
4
- * Current environment.
5
- */
6
- environment: string;
7
- /**
8
- * Global scope (often the window) where globals such as analytics are stored.
9
- */
10
- scope: TrackingWindow;
11
- /**
12
- * Whether user has opted out or is excluded from external tracking
13
- */
14
- optedOutExternalTracking?: boolean;
15
- /**
16
- * Use Partytown to load 3rd party scripts in a worker.
17
- */
18
- enablePartytown?: boolean;
19
- };
20
- /**
21
- * @see README.md for details and usage.
22
- */
23
- export declare const initializeTrackingIntegrations: ({ environment, scope, optedOutExternalTracking, enablePartytown, }: TrackingIntegrationsSettings) => Promise<void>;
@@ -1,2 +0,0 @@
1
- import { PartytownConfig } from '@qwik.dev/partytown/integration';
2
- export declare const partytownConfig: () => PartytownConfig;
@@ -1 +0,0 @@
1
- export declare function gtmDoubleFrame(src: string): void;
@@ -1 +0,0 @@
1
- export declare function initializePartytown(): void;
@@ -1,3 +0,0 @@
1
- export interface TrackingWindow {
2
- dataLayer?: unknown[];
3
- }