@karagoz/hayali 0.0.0-stage → 0.6.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 (51) hide show
  1. package/LICENSE +21 -0
  2. package/dist/karagoz-hayali.css +3 -0
  3. package/dist/karagoz-hayali.js +3869 -0
  4. package/dist/karagoz-hayali.umd.cjs +15 -0
  5. package/dist/karagoz-logo.svg +3 -0
  6. package/dist/parse.cjs +3 -0
  7. package/dist/parse.js +521 -0
  8. package/dist/src/App.vue.d.ts +3 -0
  9. package/dist/src/callouts.d.ts +28 -0
  10. package/dist/src/components/KrgzHayali.vue.d.ts +49 -0
  11. package/dist/src/components/LessonToolbar.vue.d.ts +17 -0
  12. package/dist/src/components/StepBody.vue.d.ts +7 -0
  13. package/dist/src/components/StepList.vue.d.ts +15 -0
  14. package/dist/src/components/StepLockAlert.vue.d.ts +8 -0
  15. package/dist/src/components/TocDropdown.vue.d.ts +14 -0
  16. package/dist/src/composables/useCounter.d.ts +4 -0
  17. package/dist/src/composables/useIsolationWarning.d.ts +5 -0
  18. package/dist/src/composables/useLessonPosition.d.ts +30 -0
  19. package/dist/src/composables/useLessonReset.d.ts +34 -0
  20. package/dist/src/composables/useStepEntry.d.ts +59 -0
  21. package/dist/src/composables/useStepLocks.d.ts +24 -0
  22. package/dist/src/examples/DefaultExample.vue.d.ts +3 -0
  23. package/dist/src/examples/ParserExample.vue.d.ts +3 -0
  24. package/dist/src/i18n.d.ts +1739 -0
  25. package/dist/src/index.d.ts +11 -0
  26. package/dist/src/layout/breakpoints.d.ts +16 -0
  27. package/dist/src/layout/layoutCss.d.ts +5 -0
  28. package/dist/src/lesson.d.ts +9 -0
  29. package/dist/src/locales/ar.d.ts +25 -0
  30. package/dist/src/locales/de.d.ts +25 -0
  31. package/dist/src/locales/en.d.ts +25 -0
  32. package/dist/src/locales/index.d.ts +1743 -0
  33. package/dist/src/main.d.ts +3 -0
  34. package/dist/src/parse/blocks.d.ts +31 -0
  35. package/dist/src/parse/body.d.ts +7 -0
  36. package/dist/src/parse/fenceInfo.d.ts +8 -0
  37. package/dist/src/parse/fileSource.d.ts +18 -0
  38. package/dist/src/parse/index.d.ts +2 -0
  39. package/dist/src/parse/parseLesson.d.ts +3 -0
  40. package/dist/src/parse/resolve.d.ts +37 -0
  41. package/dist/src/parse/tree.d.ts +11 -0
  42. package/dist/src/parse/types.d.ts +32 -0
  43. package/dist/src/typedoc-entry.d.ts +7 -0
  44. package/dist/src/types.d.ts +69 -0
  45. package/dist/src/validateLesson.d.ts +22 -0
  46. package/dist/tsconfig.tsbuildinfo +1 -0
  47. package/dist/types.d.ts +1943 -0
  48. package/package.json +87 -3
  49. package/src/layout.css +218 -0
  50. package/src/lib.css +50 -0
  51. package/README.md +0 -3
@@ -0,0 +1,11 @@
1
+ import './style.css';
2
+ import { calloutPlugin, createCalloutRegistry } from './callouts';
3
+ import KrgzHayali from './components/KrgzHayali.vue';
4
+ import StepBody from './components/StepBody.vue';
5
+ import { i18nMessages } from './locales';
6
+ import { validateLesson } from './validateLesson';
7
+ export { calloutPlugin, createCalloutRegistry, i18nMessages, KrgzHayali, StepBody, validateLesson, };
8
+ export type { CalloutDefinition, CalloutRegistry } from './callouts';
9
+ export type { FullLayoutFrom } from './layout/breakpoints';
10
+ export type { AdjustmentsTree, Chapter, EditorDirective, Lesson, LineSpec, PathPattern, Position, Step, } from './types';
11
+ export type { LessonIssue, LessonIssueRule } from './validateLesson';
@@ -0,0 +1,16 @@
1
+ /** Minimum container width, in rem, per `fullLayoutFrom` value (Tailwind's container breakpoints). */
2
+ export declare const FULL_LAYOUT_BREAKPOINTS: {
3
+ readonly xs: 20;
4
+ readonly sm: 24;
5
+ readonly md: 28;
6
+ readonly lg: 32;
7
+ readonly xl: 36;
8
+ readonly '2xl': 42;
9
+ readonly '3xl': 48;
10
+ readonly '4xl': 56;
11
+ readonly '5xl': 64;
12
+ readonly '6xl': 72;
13
+ readonly '7xl': 80;
14
+ };
15
+ /** Minimum container width for the side-by-side layout; `none` always uses the single-panel layout. */
16
+ export type FullLayoutFrom = 'none' | keyof typeof FULL_LAYOUT_BREAKPOINTS;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generates `src/layout.css`: base rules plus one `@container hayali` block per supported `fullLayoutFrom` value.
3
+ * Container queries cannot read `var()`, so every breakpoint has to be spelled out. Regenerate with `pnpm gen:layout`.
4
+ */
5
+ export declare const layoutCss: () => string;
@@ -0,0 +1,9 @@
1
+ import type { AdjustmentsTree, Lesson, Position, Step } from './types';
2
+ /** Strips a leading `./` or `/` so lesson paths are root-relative. */
3
+ export declare const normalize: (path: string) => string;
4
+ export declare const findStep: (lesson: Lesson, p: Position) => Step | undefined;
5
+ /** Flat map of root-relative file path to contents. */
6
+ export type FlatTree = Map<string, string>;
7
+ export declare const flatten: (tree?: AdjustmentsTree, prefix?: string) => FlatTree;
8
+ /** A step's file tree: lesson base files overlaid with the step's adjustments, minus its removals. Not cumulative. */
9
+ export declare const resolveStepTree: (lesson: Lesson, step: Step | undefined) => FlatTree;
@@ -0,0 +1,25 @@
1
+ export declare const ar: {
2
+ krgz: {
3
+ hayali: {
4
+ prev: string;
5
+ next: string;
6
+ steps: string;
7
+ done: string;
8
+ current: string;
9
+ upcoming: string;
10
+ toc: string;
11
+ lesson: string;
12
+ sandbox: string;
13
+ locks: {
14
+ title: string;
15
+ description: string;
16
+ };
17
+ confirm: {
18
+ title: string;
19
+ description: string;
20
+ cancel: string;
21
+ continue: string;
22
+ };
23
+ };
24
+ };
25
+ };
@@ -0,0 +1,25 @@
1
+ export declare const de: {
2
+ krgz: {
3
+ hayali: {
4
+ prev: string;
5
+ next: string;
6
+ steps: string;
7
+ done: string;
8
+ current: string;
9
+ upcoming: string;
10
+ toc: string;
11
+ lesson: string;
12
+ sandbox: string;
13
+ locks: {
14
+ title: string;
15
+ description: string;
16
+ };
17
+ confirm: {
18
+ title: string;
19
+ description: string;
20
+ cancel: string;
21
+ continue: string;
22
+ };
23
+ };
24
+ };
25
+ };
@@ -0,0 +1,25 @@
1
+ export declare const en: {
2
+ krgz: {
3
+ hayali: {
4
+ prev: string;
5
+ next: string;
6
+ steps: string;
7
+ done: string;
8
+ current: string;
9
+ upcoming: string;
10
+ toc: string;
11
+ lesson: string;
12
+ sandbox: string;
13
+ locks: {
14
+ title: string;
15
+ description: string;
16
+ };
17
+ confirm: {
18
+ title: string;
19
+ description: string;
20
+ cancel: string;
21
+ continue: string;
22
+ };
23
+ };
24
+ };
25
+ };