Skip to content
Draft
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
cc813f0
feat(Compilers): add basic support for ripple
hatemhosny Aug 29, 2025
bb8c04f
upgrade ripple, use default export
hatemhosny Aug 30, 2025
f0c18a7
add syntax highlighting for ripple in monaco
hatemhosny Aug 31, 2025
16eeddb
add support for CSS in Ripple components
hatemhosny Sep 1, 2025
085b3a3
fix typos in ripple syntax file
hatemhosny Sep 1, 2025
cd0045b
temporarily use latest published ripple version
hatemhosny Sep 1, 2025
b7a457c
prepare for ripple formatter
hatemhosny Sep 1, 2025
1dd4f75
minor fixes
hatemhosny Sep 1, 2025
3324ef9
add prettier-plugin-ripple
hatemhosny Sep 1, 2025
a6c6cce
update ripple formatter
hatemhosny Sep 1, 2025
4a8b37d
add ripple basic syntax highlight for codemirror and codejar
hatemhosny Sep 2, 2025
2c88177
use a workaround till ripple formatter is fixed
hatemhosny Sep 2, 2025
6d65af0
revert formatting workaround
hatemhosny Sep 2, 2025
813cbdd
add postFormat to parsers
hatemhosny Sep 2, 2025
db6a670
edit
hatemhosny Sep 2, 2025
24df424
add a todo comment
hatemhosny Sep 2, 2025
f3702a7
update ripple formatter and remove workaround
hatemhosny Sep 4, 2025
28387b9
allow changing ripple compiler version
hatemhosny Sep 4, 2025
20f8def
add ripple starter template
hatemhosny Sep 5, 2025
20a473d
compile styles in ripple components
hatemhosny Sep 5, 2025
ffffb1a
add docs for ripple support
hatemhosny Sep 5, 2025
dfe0702
fix
hatemhosny Sep 5, 2025
abd3e58
allow importing external ripple components
hatemhosny Sep 6, 2025
dbfe2e1
edit ripple docs
hatemhosny Sep 6, 2025
e62a259
upgrade ripple formatter
hatemhosny Sep 6, 2025
28592cd
feat(Compilers): add basic support for ripple
hatemhosny Sep 6, 2025
ffbdbfc
upgrade ripple, use default export
hatemhosny Sep 6, 2025
f9c3b47
add syntax highlighting for ripple in monaco
hatemhosny Sep 6, 2025
ce7fea3
add support for CSS in Ripple components
hatemhosny Sep 6, 2025
e2d6cea
fix typos in ripple syntax file
hatemhosny Sep 6, 2025
0c0b60e
temporarily use latest published ripple version
hatemhosny Sep 6, 2025
05d6552
prepare for ripple formatter
hatemhosny Sep 6, 2025
b2cf421
minor fixes
hatemhosny Sep 6, 2025
b324074
add prettier-plugin-ripple
hatemhosny Sep 6, 2025
224bdac
update ripple formatter
hatemhosny Sep 6, 2025
bea5b56
add ripple basic syntax highlight for codemirror and codejar
hatemhosny Sep 6, 2025
ec6838b
use a workaround till ripple formatter is fixed
hatemhosny Sep 6, 2025
fc56a41
revert formatting workaround
hatemhosny Sep 6, 2025
00683e9
add postFormat to parsers
hatemhosny Sep 6, 2025
a8ee0a9
edit
hatemhosny Sep 6, 2025
6d5f6d3
add a todo comment
hatemhosny Sep 6, 2025
765861f
update ripple formatter and remove workaround
hatemhosny Sep 6, 2025
0c1e45f
allow changing ripple compiler version
hatemhosny Sep 6, 2025
bba104d
add ripple starter template
hatemhosny Sep 6, 2025
7881b06
compile styles in ripple components
hatemhosny Sep 6, 2025
0887ab8
add docs for ripple support
hatemhosny Sep 6, 2025
defbe25
fix
hatemhosny Sep 6, 2025
d420059
allow importing external ripple components
hatemhosny Sep 6, 2025
56805b0
edit ripple docs
hatemhosny Sep 6, 2025
6848574
upgrade ripple formatter
hatemhosny Sep 6, 2025
eb71c13
Merge branch 'ripple' of https://github.com/live-codes/livecodes into…
hatemhosny Sep 6, 2025
a57b44a
use esm plugin for prettier
hatemhosny Sep 6, 2025
264033e
Merge branch 'develop' into ripple
hatemhosny Sep 8, 2025
b10c3c3
allow loading ripple compiler & formatter from pkg.pr.new
hatemhosny Sep 9, 2025
544dea0
fixes
hatemhosny Sep 12, 2025
971330a
Merge branch 'develop' into ripple
hatemhosny Sep 13, 2025
35d6186
Merge branch 'ripple' of https://github.com/live-codes/livecodes into…
hatemhosny Sep 13, 2025
6885b11
use filename `Component.ripple`
hatemhosny Sep 13, 2025
0d1a869
Merge branch 'develop' into ripple
hatemhosny Sep 18, 2025
b0ecd9b
fix ripple editor losing syntax highlighting
hatemhosny Sep 18, 2025
3126c4f
update ripple starter to use new reactivity syntax
hatemhosny Sep 21, 2025
ddb54e9
Merge branch 'develop' into ripple
hatemhosny Sep 23, 2025
0bed5bb
fix(Config): avoid unnecessarily reloading editors when changing them…
hatemhosny Sep 23, 2025
16d57df
add ripple language info and logo
hatemhosny Sep 24, 2025
fafc9a2
Merge branch 'develop' into ripple
hatemhosny Sep 24, 2025
2b71b23
run `i18n-export`
hatemhosny Sep 24, 2025
75b7334
Merge branch 'develop' into ripple
hatemhosny Sep 24, 2025
b91d192
Merge branch 'develop' into ripple
hatemhosny Sep 24, 2025
a0df890
update docs with new reactivity syntax
hatemhosny Sep 24, 2025
39b67f4
Merge branch 'ripple' of https://github.com/live-codes/livecodes into…
hatemhosny Sep 24, 2025
3b4c76d
Merge branch 'develop' into ripple
hatemhosny Sep 27, 2025
efdea7e
update ripple syntax
hatemhosny Sep 27, 2025
2234dc2
Merge branch 'develop' of https://github.com/live-codes/livecodes int…
hatemhosny Sep 27, 2025
a7f817f
fix ripple
hatemhosny Sep 27, 2025
4894b33
fix loading ripple formatter
hatemhosny Sep 28, 2025
0413d21
Merge branch 'develop' into ripple
hatemhosny Oct 1, 2025
6b00d82
fix loading ripple runtime version
hatemhosny Oct 2, 2025
5a0d428
fix ripple imports
hatemhosny Oct 4, 2025
d530d30
Merge branch 'develop' into ripple
hatemhosny Oct 5, 2025
fee8369
docs(SDK): add docs for using SDK in Ripple
hatemhosny Oct 7, 2025
d8ba8a5
Merge branch 'develop' into ripple
hatemhosny Oct 8, 2025
35de26b
Merge branch 'develop' of https://github.com/live-codes/livecodes int…
hatemhosny Oct 8, 2025
8bf2be9
add `ripple/bind`
hatemhosny Oct 8, 2025
2404bed
Merge branch 'ripple' of https://github.com/live-codes/livecodes into…
hatemhosny Oct 8, 2025
7eb2056
Merge branch 'develop' into ripple
hatemhosny Oct 8, 2025
dca57b7
clean up ripple examples in docs
hatemhosny Oct 8, 2025
4513aa7
Merge branch 'develop' into ripple
hatemhosny Oct 8, 2025
7a6fe48
edit sdk docs
hatemhosny Oct 8, 2025
1ff714e
Merge branch 'develop' into ripple
hatemhosny Oct 13, 2025
550c7cc
update ripple formatter package name
hatemhosny Nov 6, 2025
902a78a
update ripple runtime importmap
hatemhosny Nov 6, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/livecodes/languages/languages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ import { reason } from './reason';
import { rescript } from './rescript';
import { richtext } from './richtext';
import { riot } from './riot';
import { ripple } from './ripple';
import { ruby } from './ruby';
import { rubyWasm } from './ruby-wasm';
import { scheme } from './scheme';
Expand Down Expand Up @@ -128,6 +129,7 @@ export const languages: LanguageSpecs[] = [
solidTsx,
riot,
malina,
ripple,
coffeescript,
livescript,
civet,
Expand Down
1 change: 1 addition & 0 deletions src/livecodes/languages/ripple/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './lang-ripple';
31 changes: 31 additions & 0 deletions src/livecodes/languages/ripple/lang-ripple.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import type { LanguageSpecs } from '../../models';
import { rippleUrl } from '../../vendors';
import { parserPlugins } from '../prettier';

export const ripple: LanguageSpecs = {
name: 'ripple',
title: 'Ripple',
info: false,
parser: {
name: 'babel-ts',
pluginUrls: [parserPlugins.babel, parserPlugins.html],
},
compiler: {
factory: async () => {
// TODO: convert to UMD
const { compile } = await import(rippleUrl);
return async (code) => {
if (!code.trim()) return '';
const { js, css } = await compile(code, './src/App.ripple');
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Avoid empty module when editor content is blank.

Returning '' yields a module with no exports; the runtime import then fails. Emit a tiny no-op component instead.

-      return async (code) => {
-        if (!code.trim()) return '';
+      return async (code) => {
+        if (!code.trim()) return "export default () => null;";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
return async (code) => {
if (!code.trim()) return '';
const { js, css } = await compile(code, './src/App.ripple');
return async (code) => {
if (!code.trim()) return "export default () => null;";
const { js, css } = await compile(code, './src/App.ripple');
🤖 Prompt for AI Agents
In src/livecodes/languages/ripple/lang-ripple.ts around lines 17 to 19,
returning an empty string when the editor content is blank produces a module
with no exports and causes runtime import failures; change this to emit a
minimal no-op component module string instead (for example return a JS module
that exports a default no-op component/function or a minimal component export)
so the runtime can import it successfully.

const cssCode =
css === ''
? ''
: `\n\nconst styles = document.createElement('style');\nstyles.innerHTML = ${JSON.stringify(css)};\ndocument.head.appendChild(styles);\n`;
return `${js.code}${cssCode}`;
};
},
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Add compiler.imports, guard imports, and surface compile errors.

  • Map the runtime to a pinned URL: imports: { ripple: rippleModuleUrl }.
  • Wrap compile in try/catch to return meaningful errors in the sandbox.
   compiler: {
-    factory: async () => {
+    factory: async () => {
       // TODO: convert to UMD
-      const { compile } = await import(rippleUrl);
+      const { compile } = await import(rippleUrl);
       return async (code) => {
-        if (!code.trim()) return '';
-        const { js, css } = await compile(code, './src/App.ripple');
+        if (!code.trim()) return "export default () => null;";
+        try {
+          const { js, css } = await compile(code, './src/App.ripple');
           const cssCode =
-          css === ''
-            ? ''
-            : `\n\nconst styles = document.createElement('style');\nstyles.innerHTML = ${JSON.stringify(css)};\ndocument.head.appendChild(styles);\n`;
-        return `${js.code}${cssCode}`;
+            css === ''
+              ? ''
+              : `\n\n(function(){const id='lc-ripple-style';let s=document.getElementById(id);if(!s){s=document.createElement('style');s.id=id;document.head.appendChild(s);}s.textContent=${JSON.stringify(
+                  css,
+                )};})();`;
+          return `${js.code}${cssCode}`;
+        } catch (err) {
+          console.error('[ripple] compile error:', err);
+          throw err;
+        }
       };
     },
+    imports: { ripple: rippleModuleUrl },
   },
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
factory: async () => {
// TODO: convert to UMD
const { compile } = await import(rippleUrl);
return async (code) => {
if (!code.trim()) return '';
const { js, css } = await compile(code, './src/App.ripple');
const cssCode =
css === ''
? ''
: `\n\nconst styles = document.createElement('style');\nstyles.innerHTML = ${JSON.stringify(css)};\ndocument.head.appendChild(styles);\n`;
return `${js.code}${cssCode}`;
};
},
factory: async () => {
// TODO: convert to UMD
const { compile } = await import(rippleUrl);
return async (code) => {
if (!code.trim()) return "export default () => null;";
try {
const { js, css } = await compile(code, './src/App.ripple');
const cssCode =
css === ''
? ''
: `\n\n(function(){const id='lc-ripple-style';let s=document.getElementById(id);if(!s){s=document.createElement('style');s.id=id;document.head.appendChild(s);}s.textContent=${JSON.stringify(css)};})();`;
return `${js.code}${cssCode}`;
} catch (err) {
console.error('[ripple] compile error:', err);
throw err;
}
};
},
imports: { ripple: rippleModuleUrl },
🤖 Prompt for AI Agents
In src/livecodes/languages/ripple/lang-ripple.ts around lines 14 to 26, the
factory currently imports the ripple compiler directly but doesn't expose a
pinned runtime mapping, doesn't guard against missing imports, and doesn't
surface compile errors to the sandbox; update the language descriptor to include
an imports property mapping the runtime key (e.g., "ripple") to the pinned
rippleModuleUrl, add a guard around the dynamic import so you return a clear
error if the module cannot be loaded, and wrap the compile invocation in
try/catch so any compile errors are caught and returned as a readable error
string from the sandbox rather than throwing.

},
extensions: ['ripple'],
editor: 'script',
editorLanguage: 'typescript',
};
9 changes: 9 additions & 0 deletions src/livecodes/languages/ripple/ripple-runtime.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export const rippleRuntime = `
import { mount } from 'ripple';
import App from "./script";
(() => {
mount(App, {
target: document.querySelector("#livecodes-app") || document.body.appendChild(document.createElement('div')),
});
})();
`;
Comment on lines +1 to +9
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Make runtime resilient to non-default exports from compiled script.

If the Ripple compiler doesn’t emit a default export, import App from "./script" will throw at runtime. Import the namespace and pick the best candidate.

-export const rippleRuntime = `
-import { mount } from 'ripple';
-import App from "./script";
-(() => {
-  mount(App, {
-    target: document.querySelector("#livecodes-app") || document.body.appendChild(document.createElement('div')),
-  });
-})();
-`;
+export const rippleRuntime = `
+import { mount } from 'ripple';
+import * as AppModule from "./script";
+(() => {
+  const App = AppModule.default || AppModule.App || AppModule;
+  const target =
+    document.querySelector("#livecodes-app") ||
+    (() => { const el = document.createElement('div'); el.id = 'livecodes-app'; return document.body.appendChild(el); })();
+  mount(App, { target });
+})();
+`;

🏁 Script executed:

#!/bin/bash
# List all files under the Ripple language integration directory
fd src/livecodes/languages/ripple -t f

# Locate any compiler or codegen files in that directory
fd compile src/livecodes/languages/ripple -t f

# Search for default export patterns in the ripple language code
rg -n "export default" src/livecodes/languages/ripple

# Search for named export patterns (const/function/class) in the same directory
rg -n "export (const|function|class) " src/livecodes/languages/ripple

Length of output: 812


🏁 Script executed:

#!/bin/bash
sed -n '1,200p' src/livecodes/languages/ripple/ripple-runtime.ts

Length of output: 308


🏁 Script executed:

#!/bin/bash
# Preview the first 200 lines of the Ripple language spec to see how compiled script is generated
sed -n '1,200p' src/livecodes/languages/ripple/lang-ripple.ts

Length of output: 1003


Use namespace import with export fallbacks and assign id="livecodes-app" for a single mount node
Replace the default import with import * as AppModule and pick AppModule.default || AppModule.App || AppModule; when creating the mount container, set its id so subsequent runs reuse it.

File: src/livecodes/languages/ripple/ripple-runtime.ts

-export const rippleRuntime = `
-import { mount } from 'ripple';
-import App from "./script";
-(() => {
-  mount(App, {
-    target: document.querySelector("#livecodes-app") || document.body.appendChild(document.createElement('div')),
-  });
-})();
-`;
+export const rippleRuntime = `
+import { mount } from 'ripple';
+import * as AppModule from "./script";
+(() => {
+  const App = AppModule.default || AppModule.App || AppModule;
+  const target =
+    document.querySelector("#livecodes-app") ||
+    (() => {
+      const el = document.createElement('div');
+      el.id = 'livecodes-app';
+      return document.body.appendChild(el);
+    })();
+  mount(App, { target });
+})();
+`;
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
export const rippleRuntime = `
import { mount } from 'ripple';
import App from "./script";
(() => {
mount(App, {
target: document.querySelector("#livecodes-app") || document.body.appendChild(document.createElement('div')),
});
})();
`;
export const rippleRuntime = `
import { mount } from 'ripple';
import * as AppModule from "./script";
(() => {
const App = AppModule.default || AppModule.App || AppModule;
const target =
document.querySelector("#livecodes-app") ||
(() => {
const el = document.createElement('div');
el.id = 'livecodes-app';
return document.body.appendChild(el);
})();
mount(App, { target });
})();
`;
🤖 Prompt for AI Agents
In src/livecodes/languages/ripple/ripple-runtime.ts around lines 1 to 9, replace
the default import and the mount container creation: import the module as a
namespace (e.g. import * as AppModule from "ripple script path") and select the
component as AppModule.default || AppModule.App || AppModule, and when creating
the mount container ensure you create or reuse an element with
id="livecodes-app" (set id on newly created div and query by that id so
subsequent runs reuse the same mount node).

4 changes: 3 additions & 1 deletion src/livecodes/result/result-page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
import { cssPresets, getLanguageCompiler, getLanguageExtension } from '../languages';
import { reactRuntime } from '../languages/jsx/react-runtime';
import { reactNativeRuntime } from '../languages/react-native/react-native-runtime';
import { rippleRuntime } from '../languages/ripple/ripple-runtime';
import { solidRuntime } from '../languages/solid/solid-runtime';
import { hasCustomJsxRuntime } from '../languages/typescript';
import type { Cache, CompileInfo, Config, EditorId, Language } from '../models';
Expand Down Expand Up @@ -210,6 +211,7 @@ export const createResultPage = async ({
'react-native-tsx': reactNativeRuntime,
solid: solidRuntime,
'solid.tsx': solidRuntime,
ripple: rippleRuntime,
};
Comment on lines +221 to 222
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Ensure Ripple runtime dependency is version-pinned in import map

jsxRuntimes.ripple insertion is good, but without a pinned import map entry for "ripple" you risk loading a different runtime than the compiler version. Prefer adding compiler.imports = { ripple: rippleModuleUrl } in the Ripple language spec (see vendors comment) so compilerImports here injects a pinned mapping.


🏁 Script executed:

#!/bin/bash
# Locate the result-page.ts file
FILE=$(fd result-page.ts)
echo "Found file: $FILE"

# Show lines around the snippet (200–240)
sed -n '200,240p' "$FILE"

# Search for any compiler.imports usage across TypeScript files
rg -n "compiler\.imports" -g '*.ts'

# Search for import map or importMap references
rg -n "importMap" -g '*.ts'
rg -n "import map" -g '*.ts'

Length of output: 5400


🏁 Script executed:

#!/bin/bash
# Find ripple compiler file under languages directory
fd -g "*ripple*" -t f src/livecodes/languages

Length of output: 142


🏁 Script executed:

#!/bin/bash
# Show Ripple language compiler implementation
sed -n '1,200p' src/livecodes/languages/ripple/lang-ripple.ts

Length of output: 1003


Add pinned Ripple runtime import in ripple language spec
In src/livecodes/languages/ripple/lang-ripple.ts, extend the compiler block to include

imports: { ripple: rippleUrl },

so that result-page.ts’s compilerImports injection will load the exact compiler-matched runtime.

🤖 Prompt for AI Agents
In src/livecodes/result/result-page.ts around lines 214-215, the compilerImports
injection expects a pinned "ripple" runtime URL but the Ripple language spec
doesn't export it; update src/livecodes/languages/ripple/lang-ripple.ts to
extend the compiler block by adding imports: { ripple: rippleUrl } (ensure
rippleUrl is defined/exported in that module or imported from the runtime
constants), so the language spec provides the exact compiler-matched runtime URL
that result-page.ts will inject.

const jsxRuntime = jsxRuntimes[code.script.language] || '';
const reactImport =
Expand Down Expand Up @@ -439,7 +441,7 @@ export const createResultPage = async ({
}
}

// React JSX runtime
// JSX runtime
if (shouldInsertJsxRuntime) {
const jsxRuntimeScript = dom.createElement('script');
jsxRuntimeScript.type = 'module';
Expand Down
2 changes: 2 additions & 0 deletions src/livecodes/vendors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,8 @@ export const resetCssUrl = /* @__PURE__ */ getUrl('[email protected]/reset.css');

export const riotBaseUrl = /* @__PURE__ */ getUrl('[email protected]/');

export const rippleUrl = /* @__PURE__ */ getModuleUrl('[email protected]/compiler');
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Pin Ripple runtime to the same version as the compiler to avoid skew

Compiler is pinned to [email protected], but runtime imports resolve "ripple" via generic import maps, which may pull a different version. Add a pinned module URL to use in the Ripple language spec compiler.imports.

Apply this diff here and reference it from the Ripple language spec:

 export const riotBaseUrl = /* @__PURE__ */ getUrl('[email protected]/');
 
-export const rippleUrl = /* @__PURE__ */ getModuleUrl('[email protected]/compiler');
+export const rippleUrl = /* @__PURE__ */ getModuleUrl('[email protected]/compiler');
+export const rippleModuleUrl = /* @__PURE__ */ getModuleUrl('[email protected]');

Then, in src/livecodes/languages/ripple/lang-ripple.ts, set:

import { rippleUrl, rippleModuleUrl } from '../../vendors';

compiler: {
  factory: async () => { /* unchanged */ },
  imports: { ripple: rippleModuleUrl },
},

🌐 Web query:

Does the Ripple package v0.2.5 expose an ESM entry at "[email protected]/compiler" that exports a `compile` function, and is `import { mount } from 'ripple'` the recommended runtime import for mounting a component?

💡 Result:

Short answer: No — I couldn't find any evidence that a package named "ripple" at version 0.2.5 exposes an ESM entry "[email protected]/compiler" that exports a compile function, nor that the documented runtime API is import { mount } from 'ripple'.

Evidence:

  • The ripple.js docs and guide show the runtime API uses the ripple function (e.g. require('ripple') or ripple(template) and view.appendTo / onMount), not an exported mount function. (ripplejs.github.io)
  • The public npm listing for ripple/ripplejs points to CommonJS usage (require('ripple')) and does not document an ESM subpath "compiler" or an exported compile/mount API. (npmjs.com, snyk.io)

If you want me to check a specific npm package tarball or the exact contents of [email protected] (e.g. via unpkg or npm pack) I can fetch and list the package files to confirm.

Citations:


🏁 Script executed:

#!/bin/bash
set -e
# List files in [email protected] npm package
echo "Listing files in [email protected] package..."
curl -sL https://registry.npmjs.org/ripple/-/ripple-0.2.5.tgz | tar -tz > ripple-files.txt

echo -e "\nFiles containing 'compiler':"
grep -R 'compiler' ripple-files.txt || echo "(none found)"

echo -e "\nShowing package.json (first 200 lines):"
curl -sL https://registry.npmjs.org/ripple/-/ripple-0.2.5.tgz | tar -xzO package/package.json | sed -n '1,200p'

Length of output: 2560


🏁 Script executed:

#!/bin/bash
set -e

# Verify if the compiler entry exports a `compile` function
echo "Checking compiler exports for 'compile':"
curl -sL https://registry.npmjs.org/ripple/-/ripple-0.2.5.tgz \
  | tar -xzO package/src/compiler/index.js \
  | grep -E "export (async )?function compile|export { compile"

# List all top-level exports in the runtime entry
echo -e "\nListing exports in runtime index:"
curl -sL https://registry.npmjs.org/ripple/-/ripple-0.2.5.tgz \
  | tar -xzO package/src/runtime/index.js \
  | grep -E "export "

# Search for any `mount` export or usage in the runtime entry
echo -e "\nSearching for 'mount' in runtime index:"
curl -sL https://registry.npmjs.org/ripple/-/ripple-0.2.5.tgz \
  | tar -xzO package/src/runtime/index.js \
  | grep -R "mount"

Length of output: 4193


Pin Ripple runtime URL to v0.2.5 and update Ripple language spec
Add a new export in src/livecodes/vendors.ts:

 export const rippleUrl = /* @__PURE__ */ getModuleUrl('[email protected]/compiler');
+export const rippleModuleUrl = /* @__PURE__ */ getModuleUrl('[email protected]');

Then in src/livecodes/languages/ripple/lang-ripple.ts, pass this URL into the compiler imports:

import { rippleUrl, rippleModuleUrl } from '../../vendors';

compiler: {
  factory: async () => { /* unchanged */ },
  imports: { ripple: rippleModuleUrl },
},
🤖 Prompt for AI Agents
In src/livecodes/vendors.ts around line 392, add a new exported identifier
rippleModuleUrl pinned to the v0.2.5 Ripple runtime (e.g. export const
rippleModuleUrl = /* @__PURE__ */ getModuleUrl('[email protected]/compiler');) so the
runtime URL is explicitly exported; then update
src/livecodes/languages/ripple/lang-ripple.ts to import rippleModuleUrl from
'../../vendors' and pass it into the compiler imports (compiler.imports.ripple =
rippleModuleUrl) so the compiler uses the pinned v0.2.5 URL.


export const rubyWasmBaseUrl = /* @__PURE__ */ getUrl('@ruby/[email protected]/dist/');

export const rubyWasmScriptUrl = /* @__PURE__ */ getUrl(
Expand Down
1 change: 1 addition & 0 deletions src/sdk/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -968,6 +968,7 @@ export type Language =
| 'riotjs'
| 'malina'
| 'malinajs'
| 'ripple'
| 'xht'
| 'coffeescript'
| 'coffee'
Expand Down