@almadar/shell-web 1.1.0 → 1.2.1

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 (91) hide show
  1. package/LICENSE +72 -0
  2. package/dist/AvlGlyph-KZMJDBEB.js +5 -0
  3. package/dist/AvlStateMachine-KVZMFHFU.js +8 -0
  4. package/dist/AvlTransitionDetail-7DVGV27I.js +10 -0
  5. package/dist/AvlTransitionExplainer-RMJ5LQLK.js +11 -0
  6. package/dist/BehaviorView-EYRPME67.js +10 -0
  7. package/dist/FlowCanvas-J54627TC.js +23 -0
  8. package/dist/{FlowCanvas-VWUPMBKB.css → FlowCanvas-R4LL3KRI.css} +1 -1
  9. package/dist/{GameAudioProvider-D7wo5ryN.d.ts → GameAudioProvider-BgWOOYT3.d.ts} +15 -20
  10. package/dist/{KernelEngineContext-CPeWQMAz.d.ts → KernelEngineContext-BPx-q0iw.d.ts} +1 -1
  11. package/dist/{LayersPanel-M2LHWUFF.js → LayersPanel-PSXI4EHG.js} +4 -4
  12. package/dist/ModuleCard-TNRLL45H.js +6 -0
  13. package/dist/{OrbInspector-VMTMZHNQ.css → OrbInspector-2EGVZLOJ.css} +1 -1
  14. package/dist/OrbInspector-UBEQWWZ2.js +23 -0
  15. package/dist/{parseLessonSegments-GpCeMrb2.d.ts → SegmentRenderer-BAQ6Jwf6.d.ts} +4 -20
  16. package/dist/{Select-C2Uq6t86.d.ts → Select-BJ8Fgc8A.d.ts} +1 -1
  17. package/dist/{UISlotContext-Dl_ewwCI.d.ts → UISlotContext-7r0SQdTL.d.ts} +1 -1
  18. package/dist/UISlotRenderer-5OURMAP2.js +23 -0
  19. package/dist/{UISlotRenderer-BIS6KT7T.css → UISlotRenderer-SJBSQGBQ.css} +1 -1
  20. package/dist/auth/react/index.js +7 -6
  21. package/dist/avl/index.css +1 -1
  22. package/dist/avl/index.js +31 -31
  23. package/dist/{chunk-AE7VCQB6.js → chunk-2LNXLMK3.js} +2 -2
  24. package/dist/{chunk-REXYVBUO.js → chunk-3DA36FOA.js} +1 -1
  25. package/dist/{chunk-FAKU5F62.js → chunk-3UQNFRYV.js} +2 -5
  26. package/dist/{chunk-AGXD77SL.js → chunk-3YUMGEEW.js} +1 -1
  27. package/dist/{chunk-OWNG4JZI.js → chunk-6RXP5ZXE.js} +7 -7
  28. package/dist/{chunk-VUIACGDU.js → chunk-7UCL26QB.js} +4 -4
  29. package/dist/{chunk-57DC34LY.js → chunk-AL2XXMYR.js} +2 -2
  30. package/dist/{chunk-YHMRX6YA.js → chunk-ANTJUQRD.js} +53 -13
  31. package/dist/{chunk-P4ZFUQFF.js → chunk-AZ74UPG6.js} +4 -1
  32. package/dist/{chunk-YYIHRIDH.js → chunk-B23EZH2P.js} +3 -3
  33. package/dist/{chunk-AGVSO4WY.js → chunk-CCO2ZH7F.js} +3 -3
  34. package/dist/{chunk-4YXBKHHM.js → chunk-D5FJU4XC.js} +87 -16
  35. package/dist/{chunk-7N6ZPHQ5.js → chunk-DPDKBY6Z.js} +1 -1
  36. package/dist/{chunk-A2LR6VQQ.js → chunk-ECC3WQIB.js} +9 -93
  37. package/dist/{chunk-VO2TTLS5.js → chunk-GHAF7QUD.js} +1 -1
  38. package/dist/{chunk-M74BCDBQ.js → chunk-HA2BYO5E.js} +1 -1
  39. package/dist/{chunk-ILQXJ2AR.js → chunk-JEN4EIUF.js} +1 -1
  40. package/dist/{chunk-UTDC2NEA.js → chunk-KTYOYEVA.js} +1 -1
  41. package/dist/{chunk-VHC2M26B.js → chunk-LINJRTNB.js} +2 -2
  42. package/dist/{chunk-2WGR4TDJ.js → chunk-LKL5RULQ.js} +5 -108
  43. package/dist/{chunk-UU57VNS2.js → chunk-PWXZN5G5.js} +2 -2
  44. package/dist/{chunk-4YJ53G7S.js → chunk-RDPELAFQ.js} +4 -4
  45. package/dist/{chunk-PRXQGGCO.js → chunk-S3LS3B7N.js} +1 -1
  46. package/dist/{chunk-MS4K3K2R.js → chunk-TAEOMNDK.js} +996 -456
  47. package/dist/{chunk-3S54FWRC.js → chunk-UFQLHCFJ.js} +1 -1
  48. package/dist/{chunk-PRLHKBXG.js → chunk-V5SVGUYN.js} +2 -2
  49. package/dist/components/index.css +1 -1
  50. package/dist/components/index.d.ts +155 -21
  51. package/dist/components/index.js +25 -25
  52. package/dist/context/index.d.ts +2 -2
  53. package/dist/context/index.js +5 -5
  54. package/dist/core.d.ts +21 -4
  55. package/dist/core.js +1 -1
  56. package/dist/{fx-Br8zjvu9.d.ts → fx-Bx5RqplG.d.ts} +4 -1
  57. package/dist/hooks/index.d.ts +8 -8
  58. package/dist/hooks/index.js +6 -6
  59. package/dist/{katexPlugin-FA7NX4PE.css → katexPlugin-BUHVNRBJ.css} +1 -1
  60. package/dist/{kernel-client-JW6OH5FX.js → kernel-client-NMZ56JVU.js} +36 -3
  61. package/dist/{kernel-wire-DGAySGhX.d.ts → kernel-wire-CRsHtLsf.d.ts} +1 -1
  62. package/dist/lib/index.d.ts +3 -3
  63. package/dist/lib/index.js +434 -2
  64. package/dist/providers/index.css +1 -1
  65. package/dist/providers/index.d.ts +5 -5
  66. package/dist/providers/index.js +19 -19
  67. package/dist/renderer/index.d.ts +3 -79
  68. package/dist/renderer/index.js +2 -2
  69. package/dist/runtime/index.css +1 -1
  70. package/dist/runtime/index.d.ts +3 -1
  71. package/dist/runtime/index.js +18 -18
  72. package/dist/ssr/index.cjs +105 -28
  73. package/dist/ssr/index.js +106 -29
  74. package/dist/test-support.js +1 -1
  75. package/dist/{useUISlots-CiobNFGb.d.ts → useUISlots-BLcGd__D.d.ts} +2 -0
  76. package/dist/{verificationRegistry-oopV1J1n.d.ts → verificationRegistry-BLuQU1JV.d.ts} +1 -1
  77. package/package.json +9 -9
  78. package/src/core/locales/ar.json +10 -1
  79. package/src/core/locales/en.json +10 -1
  80. package/src/core/locales/sl.json +10 -1
  81. package/tailwind-preset.cjs +8 -4
  82. package/dist/AvlGlyph-PIXU6QH5.js +0 -5
  83. package/dist/AvlStateMachine-CKGMECMG.js +0 -8
  84. package/dist/AvlTransitionDetail-QZX6G5KJ.js +0 -10
  85. package/dist/AvlTransitionExplainer-26WLEIC6.js +0 -11
  86. package/dist/BehaviorView-JLZ4PKWY.js +0 -10
  87. package/dist/FlowCanvas-RPII4V24.js +0 -23
  88. package/dist/ModuleCard-NJD6JQGD.js +0 -6
  89. package/dist/OrbInspector-OWWKPOBF.js +0 -23
  90. package/dist/UISlotRenderer-PY7FIJXN.js +0 -23
  91. /package/dist/{katexPlugin-NCDKOOQY.js → katexPlugin-WGJ4JFZU.js} +0 -0
@@ -1,4 +1,4 @@
1
- import { ThemeProvider, useTheme } from './chunk-4YXBKHHM.js';
1
+ import { ThemeProvider, useTheme } from './chunk-D5FJU4XC.js';
2
2
 
3
3
  // src/providers/DesignThemeContext.tsx
4
4
  var DesignThemeProvider = ThemeProvider;
@@ -1,5 +1,5 @@
1
- import { AvlTransitionDetail } from './chunk-OWNG4JZI.js';
2
- import { Box, domPassthrough } from './chunk-4YXBKHHM.js';
1
+ import { AvlTransitionDetail } from './chunk-6RXP5ZXE.js';
2
+ import { Box, domPassthrough } from './chunk-D5FJU4XC.js';
3
3
  import { jsx } from 'react/jsx-runtime';
4
4
 
5
5
  var AvlTransitionExplainer = ({ orbitalName, traitName, transition, annotations, className, ...rest }) => {
@@ -1,5 +1,5 @@
1
1
  import { perfStore, pushPerfEntry } from './chunk-ZDRDJKYB.js';
2
- import { isMotionEnabled } from './chunk-4YXBKHHM.js';
2
+ import { isMotionEnabled } from './chunk-D5FJU4XC.js';
3
3
  import { useRef, useLayoutEffect, useSyncExternalStore } from 'react';
4
4
  import { ENTER_DELAY_STEPS, ENTER_ANIMATIONS, isFileValue } from '@almadar/core';
5
5
  export { getNestedValue } from '@almadar/core';
@@ -535,32 +535,6 @@ function resolveKeyMapEvent(map, e) {
535
535
  if (!map || isEditableTarget(e.target)) return void 0;
536
536
  return map[keyMapCode(e)] ?? map[e.code];
537
537
  }
538
-
539
- // src/lib/lessonSegmentUtils.ts
540
- function parseMarkdownWithCodeBlocks(content) {
541
- const segments = [];
542
- const codeBlockRegex = /```([^\n\r]*)\r?\n([\s\S]*?)```/g;
543
- let lastIndex = 0;
544
- let match;
545
- while ((match = codeBlockRegex.exec(content)) !== null) {
546
- const before = content.slice(lastIndex, match.index);
547
- if (before.trim()) {
548
- segments.push({ type: "markdown", content: before });
549
- }
550
- const tokens = match[1].trim().split(/\s+/).filter(Boolean);
551
- let rawLanguage = tokens[0] ?? "text";
552
- const suffixRunnable = rawLanguage.endsWith("-runnable");
553
- const runnable = suffixRunnable || tokens.includes("run");
554
- const baseLanguage = suffixRunnable ? rawLanguage.slice(0, -"-runnable".length) || "text" : rawLanguage;
555
- segments.push({ type: "code", language: baseLanguage, content: match[2].trim(), runnable });
556
- lastIndex = codeBlockRegex.lastIndex;
557
- }
558
- const remaining = content.slice(lastIndex);
559
- if (remaining.trim()) {
560
- segments.push({ type: "markdown", content: remaining });
561
- }
562
- return segments;
563
- }
564
538
  function resolveImageUrl(value) {
565
539
  if (typeof value === "string") {
566
540
  return value;
@@ -991,7 +965,7 @@ function tryParseOrbitalSchema(code) {
991
965
  }
992
966
  return null;
993
967
  }
994
- function parseMarkdownWithCodeBlocks2(content) {
968
+ function parseMarkdownWithCodeBlocks(content) {
995
969
  if (!content) return [];
996
970
  const segments = [];
997
971
  const codeBlockRegex = /```(\w+)?\n([\s\S]*?)```/g;
@@ -1030,7 +1004,7 @@ function parseContentSegments(content) {
1030
1004
  while ((match = tagRegex.exec(content)) !== null) {
1031
1005
  const before = content.slice(lastIndex, match.index);
1032
1006
  if (before.trim()) {
1033
- segments.push(...parseMarkdownWithCodeBlocks2(before));
1007
+ segments.push(...parseMarkdownWithCodeBlocks(before));
1034
1008
  }
1035
1009
  segments.push({
1036
1010
  type: "quiz",
@@ -1041,7 +1015,7 @@ function parseContentSegments(content) {
1041
1015
  }
1042
1016
  const remaining = content.slice(lastIndex);
1043
1017
  if (remaining.trim()) {
1044
- segments.push(...parseMarkdownWithCodeBlocks2(remaining));
1018
+ segments.push(...parseMarkdownWithCodeBlocks(remaining));
1045
1019
  }
1046
1020
  return segments;
1047
1021
  }
@@ -1400,81 +1374,4 @@ function initDebugShortcut() {
1400
1374
  return () => window.removeEventListener("keydown", handleKeyDown);
1401
1375
  }
1402
1376
 
1403
- // src/lib/parseLessonSegments.ts
1404
- function extractTagContent(content, tagName) {
1405
- const closedTagRegex = new RegExp(`<${tagName}>([\\s\\S]*?)<\\/${tagName}>`, "i");
1406
- const closedMatch = content.match(closedTagRegex);
1407
- if (closedMatch) {
1408
- return { content: closedMatch[1].trim(), fullMatch: closedMatch[0] };
1409
- }
1410
- const unclosedTagRegex = new RegExp(
1411
- `<${tagName}>([\\s\\S]*?)(?=<(?:activate|connect|reflect|bloom|prq|question|answer|visualize)|\\n\\n#|$)`,
1412
- "i"
1413
- );
1414
- const unclosedMatch = content.match(unclosedTagRegex);
1415
- if (unclosedMatch) {
1416
- return { content: unclosedMatch[1].trim(), fullMatch: unclosedMatch[0] };
1417
- }
1418
- return null;
1419
- }
1420
- function parseLessonSegments(lesson) {
1421
- if (!lesson) return [];
1422
- let content = lesson.replace(/<prq>[\s\S]*?<\/prq>/gi, "").trim();
1423
- const segments = [];
1424
- const activateResult = extractTagContent(content, "activate");
1425
- if (activateResult) {
1426
- segments.push({ type: "activate", question: activateResult.content });
1427
- content = content.replace(activateResult.fullMatch, "").trim();
1428
- }
1429
- const connectResult = extractTagContent(content, "connect");
1430
- if (connectResult) {
1431
- segments.push({ type: "connect", content: connectResult.content });
1432
- content = content.replace(connectResult.fullMatch, "").trim();
1433
- }
1434
- const tagRegex = new RegExp(
1435
- '(?<reflect><reflect>(?<reflectClosed>[\\s\\S]*?)<\\/reflect>)|(?<reflectUnclosed><reflect>(?<reflectOpen>[\\s\\S]*?)(?=<(?:activate|connect|reflect|bloom|prq|question|answer|visualize)|\\n\\n#|$))|(?<bloom><bloom\\s+level="(?<bloomLevel>remember|understand|apply|analyze|evaluate|create)">(?<bloomClosed>[\\s\\S]*?)<\\/bloom>)|(?<bloomUnclosed><bloom\\s+level="(?<bloomLevelUn>remember|understand|apply|analyze|evaluate|create)">(?<bloomOpen>[\\s\\S]*?)(?=<(?:activate|connect|reflect|bloom|prq|question|answer|visualize)|\\n\\n#|$))|(?<quiz><question>(?<quizQuestion>[\\s\\S]*?)<\\/question>\\s*<answer>(?<quizAnswer>[\\s\\S]*?)<\\/answer>)|(?<visualize><visualize\\s+type="(?<vizType>algorithms|math|physics|biology|chemistry|probability)"\\s+description="(?<vizDesc>[^"]*?)"\\s*\\/?>)',
1436
- "gi"
1437
- );
1438
- let lastIndex = 0;
1439
- let match;
1440
- while ((match = tagRegex.exec(content)) !== null) {
1441
- const before = content.slice(lastIndex, match.index);
1442
- if (before.trim()) {
1443
- segments.push(...parseMarkdownWithCodeBlocks(before));
1444
- }
1445
- const g = match.groups ?? {};
1446
- if (g.reflect || g.reflectUnclosed) {
1447
- const prompt = (g.reflectClosed ?? g.reflectOpen ?? "").trim();
1448
- if (prompt) segments.push({ type: "reflect", prompt });
1449
- } else if (g.bloom || g.bloomUnclosed) {
1450
- const level = g.bloomLevel ?? g.bloomLevelUn;
1451
- const bloomContent = g.bloomClosed ?? g.bloomOpen ?? "";
1452
- if (level && bloomContent) {
1453
- const qMatch = bloomContent.match(/<question>([\s\S]*?)<\/question>/i);
1454
- const aMatch = bloomContent.match(/<answer>([\s\S]*?)<\/answer>/i);
1455
- if (qMatch && aMatch) {
1456
- segments.push({ type: "bloom", level, question: qMatch[1].trim(), answer: aMatch[1].trim() });
1457
- } else if (qMatch) {
1458
- segments.push({ type: "bloom", level, question: qMatch[1].trim(), answer: "(Answer not provided)" });
1459
- } else {
1460
- const clean = bloomContent.replace(/^\*\*Question\s*\d*:?\*\*\s*/i, "").replace(/^\*\*Q\d*:?\*\*\s*/i, "").trim();
1461
- if (clean) segments.push({ type: "bloom", level, question: clean, answer: "(See answers section below)" });
1462
- }
1463
- }
1464
- } else if (g.quiz) {
1465
- segments.push({ type: "quiz", question: g.quizQuestion.trim(), answer: g.quizAnswer.trim() });
1466
- } else if (g.visualize) {
1467
- segments.push({
1468
- type: "visualization",
1469
- visualizationType: g.vizType,
1470
- description: g.vizDesc ?? ""
1471
- });
1472
- }
1473
- lastIndex = tagRegex.lastIndex;
1474
- }
1475
- const remaining = content.slice(lastIndex);
1476
- if (remaining.trim()) segments.push(...parseMarkdownWithCodeBlocks(remaining));
1477
- return segments;
1478
- }
1479
-
1480
- export { EDITOR_MOTIONS, EDITOR_OPERATORS, ENTER_SLOT_CLASS, INDENT_UNIT, MAX_ENTER_DELAY, applyMotion, applyOperator, asEnterAnimation, bindCanvasCapture, bindConfigApplier, bindEventBus, bindLastDrawables, bindTraitStateGetter, clearDebugEvents, clearEntityProvider, clearGuardHistory, clearTicks, clearTraits, clearVerification, computeLineDiff, debug, debugCollision, debugError, debugGameState, debugGroup, debugGroupEnd, debugInput, debugPhysics, debugTable, debugTime, debugTimeEnd, debugWarn, enterClassName, getAllChecks, getAllTicks, getAllTraits, getBridgeHealth, getDebugEvents, getEntitiesByType, getEntityById, getEntitySnapshot, getEventsBySource, getEventsByType, getGuardEvaluationsForTrait, getGuardHistory, getRecentEvents, getRecentGuardEvaluations, getSnapshot, getSummary, getTick, getTrait, getTraitSnapshots, getTransitions, getTransitionsForTrait, initDebugShortcut, isDebugEnabled, isDebugEnabled2, isEditableTarget, isEditorMotion, isEditorOperator, keyMapCode, logDebugEvent, logEffectExecuted, logError, logEventFired, logInfo, logStateChange, logWarning, motionRange, onDebugToggle, parseContentSegments, parseLessonSegments, parseMarkdownWithCodeBlocks, parseMarkdownWithCodeBlocks2, profilerOnRender, recordGuardEvaluation, recordOrbitalResponse, recordServerResponse, recordTransition, recordingTransport, registerCheck, registerTick, registerTrait, registerTraitSnapshot, resolveImageUrl, resolveKeyMapEvent, serverEffectTraces, setDebugEnabled, setEntityProvider, setTickActive, slotPlaysDefaultEnter, subscribeToDebugEvents, subscribeToGuardChanges, subscribeToTickChanges, subscribeToTraitChanges, subscribeToVerification, toggleDebug, unregisterTick, unregisterTrait, updateAssetStatus, updateBridgeHealth, updateCheck, updateGuardResult, updateTickExecution, updateTraitState, usePerfBuffer, useSlotEnterRestart, verifierAttached, waitForTransition };
1377
+ export { EDITOR_MOTIONS, EDITOR_OPERATORS, ENTER_SLOT_CLASS, INDENT_UNIT, MAX_ENTER_DELAY, applyMotion, applyOperator, asEnterAnimation, bindCanvasCapture, bindConfigApplier, bindEventBus, bindLastDrawables, bindTraitStateGetter, clearDebugEvents, clearEntityProvider, clearGuardHistory, clearTicks, clearTraits, clearVerification, computeLineDiff, debug, debugCollision, debugError, debugGameState, debugGroup, debugGroupEnd, debugInput, debugPhysics, debugTable, debugTime, debugTimeEnd, debugWarn, enterClassName, getAllChecks, getAllTicks, getAllTraits, getBridgeHealth, getDebugEvents, getEntitiesByType, getEntityById, getEntitySnapshot, getEventsBySource, getEventsByType, getGuardEvaluationsForTrait, getGuardHistory, getRecentEvents, getRecentGuardEvaluations, getSnapshot, getSummary, getTick, getTrait, getTraitSnapshots, getTransitions, getTransitionsForTrait, initDebugShortcut, isDebugEnabled, isDebugEnabled2, isEditableTarget, isEditorMotion, isEditorOperator, keyMapCode, logDebugEvent, logEffectExecuted, logError, logEventFired, logInfo, logStateChange, logWarning, motionRange, onDebugToggle, parseContentSegments, parseMarkdownWithCodeBlocks, profilerOnRender, recordGuardEvaluation, recordOrbitalResponse, recordServerResponse, recordTransition, recordingTransport, registerCheck, registerTick, registerTrait, registerTraitSnapshot, resolveImageUrl, resolveKeyMapEvent, serverEffectTraces, setDebugEnabled, setEntityProvider, setTickActive, slotPlaysDefaultEnter, subscribeToDebugEvents, subscribeToGuardChanges, subscribeToTickChanges, subscribeToTraitChanges, subscribeToVerification, toggleDebug, unregisterTick, unregisterTrait, updateAssetStatus, updateBridgeHealth, updateCheck, updateGuardResult, updateTickExecution, updateTraitState, usePerfBuffer, useSlotEnterRestart, verifierAttached, waitForTransition };
@@ -1,5 +1,5 @@
1
- import { claimDelivery } from './chunk-PRXQGGCO.js';
2
- import { useEventBus, getTraitPresence, beginPending, endPending } from './chunk-4YXBKHHM.js';
1
+ import { claimDelivery } from './chunk-S3LS3B7N.js';
2
+ import { useEventBus, getTraitPresence, beginPending, endPending } from './chunk-D5FJU4XC.js';
3
3
  import { createContext, useState, useCallback, useEffect, useMemo, useRef, useContext, useSyncExternalStore } from 'react';
4
4
  import { createLogger } from '@almadar/logger';
5
5
  import { mergeEntityFrame } from '@almadar/core';
@@ -1,8 +1,8 @@
1
- import { useContainerWidth, computeTraitLayout, roundedEdgePath } from './chunk-M74BCDBQ.js';
2
- import { AvlExplain, AvlEffectChip } from './chunk-PRLHKBXG.js';
3
- import { AVL_INK, AVL_FONT, AVL_STROKE, avlTint } from './chunk-FAKU5F62.js';
1
+ import { useContainerWidth, computeTraitLayout, roundedEdgePath } from './chunk-HA2BYO5E.js';
2
+ import { AvlExplain, AvlEffectChip } from './chunk-V5SVGUYN.js';
3
+ import { AVL_INK, AVL_FONT, AVL_STROKE, avlTint } from './chunk-3UQNFRYV.js';
4
4
  import { gearTeethPath } from './chunk-TZZBINQY.js';
5
- import { domPassthrough, useTranslate, useEventBus, useMediaQuery, Box, Typography, Button } from './chunk-4YXBKHHM.js';
5
+ import { domPassthrough, useTranslate, useEventBus, useMediaQuery, Box, Typography, Button } from './chunk-D5FJU4XC.js';
6
6
  import { useState, useRef, useMemo, useEffect } from 'react';
7
7
  import { formatSExpr } from '@almadar/core';
8
8
  import { createLogger } from '@almadar/logger';
@@ -1,4 +1,4 @@
1
- import { useEventBus, useTranslate } from './chunk-4YXBKHHM.js';
1
+ import { useEventBus, useTranslate } from './chunk-D5FJU4XC.js';
2
2
  import { createContext, useMemo, useContext, useRef, useEffect, useCallback, useState } from 'react';
3
3
  import { jsx } from 'react/jsx-runtime';
4
4
  import { resolvePageMeta } from '@almadar/core';