Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
jph00 authored and alg747 committed Sep 17, 2024
1 parent 3aca0ac commit 2fcb4f3
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion fasthtml/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ def add_ws(self, path: str, recv: callable, conn:callable=None, disconn:callable
# %% ../nbs/api/00_core.ipynb
htmxsrc = Script(src="https://unpkg.com/htmx.org@next/dist/htmx.min.js")
htmxwssrc = Script(src="https://unpkg.com/htmx-ext-ws/ws.js")
fhjsscr = Script(src="https://cdn.jsdelivr.net/gh/answerdotai/fasthtml-js@1.0.2/fasthtml.js")
fhjsscr = Script(src="https://cdn.jsdelivr.net/gh/answerdotai/fasthtml-js@1.0.3/fasthtml.js")
htmxctsrc = Script(src="https://unpkg.com/htmx-ext-transfer-encoding-chunked/transfer-encoding-chunked.js")
surrsrc = Script(src="https://cdn.jsdelivr.net/gh/answerdotai/surreal@main/surreal.js")
scopesrc = Script(src="https://cdn.jsdelivr.net/gh/gnat/css-scope-inline@main/script.js")
Expand Down
4 changes: 2 additions & 2 deletions fasthtml/js.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def dark_media(

# %% ../nbs/api/03_js.ipynb
marked_imp = """import { marked } from "https://cdn.jsdelivr.net/npm/marked/lib/marked.esm.js";
import { proc_htmx } from "https://cdn.jsdelivr.net/gh/answerdotai/fasthtml-js/fasthtml.js";
import { proc_htmx } from "https://cdn.jsdelivr.net/gh/answerdotai/fasthtml-js@1.0.3/fasthtml.js";
"""
npmcdn = 'https://cdn.jsdelivr.net/npm/'

Expand Down Expand Up @@ -85,7 +85,7 @@ def SortableJS(
):
src = """
import {Sortable} from 'https://cdn.jsdelivr.net/npm/sortablejs/+esm';
import {proc_htmx} from "https://cdn.jsdelivr.net/gh/answerdotai/fasthtml-js/fasthtml.js";
import {proc_htmx} from "https://cdn.jsdelivr.net/gh/answerdotai/fasthtml-js@1.0.3/fasthtml.js";
proc_htmx('%s', Sortable.create);
""" % sel
return Script(src, type='module')
2 changes: 1 addition & 1 deletion nbs/api/00_core.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1224,7 +1224,7 @@
"#| export\n",
"htmxsrc = Script(src=\"https://unpkg.com/htmx.org@next/dist/htmx.min.js\")\n",
"htmxwssrc = Script(src=\"https://unpkg.com/htmx-ext-ws/ws.js\")\n",
"fhjsscr = Script(src=\"https://cdn.jsdelivr.net/gh/answerdotai/fasthtml-js@1.0.2/fasthtml.js\")\n",
"fhjsscr = Script(src=\"https://cdn.jsdelivr.net/gh/answerdotai/fasthtml-js@1.0.3/fasthtml.js\")\n",
"htmxctsrc = Script(src=\"https://unpkg.com/htmx-ext-transfer-encoding-chunked/transfer-encoding-chunked.js\")\n",
"surrsrc = Script(src=\"https://cdn.jsdelivr.net/gh/answerdotai/surreal@main/surreal.js\")\n",
"scopesrc = Script(src=\"https://cdn.jsdelivr.net/gh/gnat/css-scope-inline@main/script.js\")\n",
Expand Down
4 changes: 2 additions & 2 deletions nbs/api/03_js.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
"source": [
"#| export\n",
"marked_imp = \"\"\"import { marked } from \"https://cdn.jsdelivr.net/npm/marked/lib/marked.esm.js\";\n",
" import { proc_htmx } from \"https://cdn.jsdelivr.net/gh/answerdotai/fasthtml-js/fasthtml.js\";\n",
" import { proc_htmx } from \"https://cdn.jsdelivr.net/gh/answerdotai/fasthtml-js@1.0.3/fasthtml.js\";\n",
"\"\"\"\n",
"npmcdn = 'https://cdn.jsdelivr.net/npm/'"
]
Expand Down Expand Up @@ -265,7 +265,7 @@
" ):\n",
" src = \"\"\"\n",
"import {Sortable} from 'https://cdn.jsdelivr.net/npm/sortablejs/+esm';\n",
"import {proc_htmx} from \"https://cdn.jsdelivr.net/gh/answerdotai/fasthtml-js/fasthtml.js\";\n",
"import {proc_htmx} from \"https://cdn.jsdelivr.net/gh/answerdotai/fasthtml-js@1.0.3/fasthtml.js\";\n",
"proc_htmx('%s', Sortable.create);\n",
"\"\"\" % sel\n",
" return Script(src, type='module')"
Expand Down

0 comments on commit 2fcb4f3

Please sign in to comment.