instruction stringlengths 0 1k | input stringlengths 1 1k | output stringlengths 10 6.51k |
|---|---|---|
rns:
A dictionary of the props and their descriptions.
"""
# The output.
out = []
comments = []
# Loop through the source code.
for i, line in enumerate(self.code):
# Check if we've reached the functions.
reached_functions = re.search(... |
if prop not in props or prop.startswith("_"):
# This isn't a prop, so continue.
comments.clear()
continue
prop = props[prop]
# redundant check just to double-check line above prop is a comment
assert self.code[i - 1].strip... | prop = match.group(0).strip(":") |
d their descriptions.
"""
# The output.
out = []
comments = []
# Loop through the source code.
for i, line in enumerate(self.code):
# Check if we've reached the functions.
reached_functions = re.search("def ", line)
if reached_function... |
prop = props[prop]
# redundant check just to double-check line above prop is a comment
assert self.code[i - 1].strip().startswith("#"), (
f"Expected comment, got {self.code[i - 1]}"
)
# Get the comment for this prop.
comment = So... | if prop not in props or prop.startswith("_"):
# This isn't a prop, so continue.
comments.clear()
continue |
e(self.code):
# Check if we've reached the functions.
reached_functions = re.search("def ", line)
if reached_functions:
# We've reached the functions, so stop.
break
# If we've reached a docstring, clear the comments.
if line.s... |
# redundant check just to double-check line above prop is a comment
assert self.code[i - 1].strip().startswith("#"), (
f"Expected comment, got {self.code[i - 1]}"
)
# Get the comment for this prop.
comment = Source.get_comment(comments)
... | prop = props[prop] |
nts.
if line.strip() == '"""':
comments.clear()
continue
# Get comments for prop
if line.strip().startswith("#"):
comments.append(line)
continue
# Check if this line has a prop.
match = re.searc... |
# reset comments
comments.clear()
# Skip private props.
if "PRIVATE" in comment:
continue
# Add the prop to the output.
out.append(
{
"prop": prop,
"description": comment,
... | comment = Source.get_comment(comments) |
continue
# Get the prop.
prop = match.group(0).strip(":")
if prop not in props or prop.startswith("_"):
# This isn't a prop, so continue.
comments.clear()
continue
prop = props[prop]
# redundant check just ... |
table_header_class_name = (
"font-small text-slate-12 text-normal w-auto justify-start pl-4 font-bold"
)
def format_fields(headers, fields):
return (
rx.scroll_area(
rx.table.root(
rx.table.header(
rx.table.row(
*[
... | def format_field(field):
prop = field["prop"]
try:
type_ = prop.type_
except AttributeError:
type_ = prop.type
default = field["prop"].default
default = None if default is dataclasses.MISSING else repr(default)
type_str = type_.__name__ if hasattr(type_, "__name__") else str(type... |
et the prop.
prop = match.group(0).strip(":")
if prop not in props or prop.startswith("_"):
# This isn't a prop, so continue.
comments.clear()
continue
prop = props[prop]
# redundant check just to double-check line above pr... |
try:
type_ = prop.type_
except AttributeError:
type_ = prop.type
default = field["prop"].default
default = None if default is dataclasses.MISSING else repr(default)
type_str = type_.__name__ if hasattr(type_, "__name__") else str(type_)
if default:
type_str += f" = {defa... | prop = field["prop"] |
group(0).strip(":")
if prop not in props or prop.startswith("_"):
# This isn't a prop, so continue.
comments.clear()
continue
prop = props[prop]
# redundant check just to double-check line above prop is a comment
assert sel... |
except AttributeError:
type_ = prop.type
default = field["prop"].default
default = None if default is dataclasses.MISSING else repr(default)
type_str = type_.__name__ if hasattr(type_, "__name__") else str(type_)
if default:
type_str += f" = {default}"
return rx.code(field["prop... | type_ = prop.type_ |
r prop.startswith("_"):
# This isn't a prop, so continue.
comments.clear()
continue
prop = props[prop]
# redundant check just to double-check line above prop is a comment
assert self.code[i - 1].strip().startswith("#"), (
... |
default = field["prop"].default
default = None if default is dataclasses.MISSING else repr(default)
type_str = type_.__name__ if hasattr(type_, "__name__") else str(type_)
if default:
type_str += f" = {default}"
return rx.code(field["prop"].name, ": ", type_str, class_name="code-style")
t... | type_ = prop.type |
:
# This isn't a prop, so continue.
comments.clear()
continue
prop = props[prop]
# redundant check just to double-check line above prop is a comment
assert self.code[i - 1].strip().startswith("#"), (
f"Expected comment,... |
default = None if default is dataclasses.MISSING else repr(default)
type_str = type_.__name__ if hasattr(type_, "__name__") else str(type_)
if default:
type_str += f" = {default}"
return rx.code(field["prop"].name, ": ", type_str, class_name="code-style")
table_header_class_name = (
"font... | default = field["prop"].default |
p, so continue.
comments.clear()
continue
prop = props[prop]
# redundant check just to double-check line above prop is a comment
assert self.code[i - 1].strip().startswith("#"), (
f"Expected comment, got {self.code[i - 1]}"
... |
type_str = type_.__name__ if hasattr(type_, "__name__") else str(type_)
if default:
type_str += f" = {default}"
return rx.code(field["prop"].name, ": ", type_str, class_name="code-style")
table_header_class_name = (
"font-small text-slate-12 text-normal w-auto justify-start pl-4 font-bold"
)
... | default = None if default is dataclasses.MISSING else repr(default) |
e
prop = props[prop]
# redundant check just to double-check line above prop is a comment
assert self.code[i - 1].strip().startswith("#"), (
f"Expected comment, got {self.code[i - 1]}"
)
# Get the comment for this prop.
comment = S... |
if default:
type_str += f" = {default}"
return rx.code(field["prop"].name, ": ", type_str, class_name="code-style")
table_header_class_name = (
"font-small text-slate-12 text-normal w-auto justify-start pl-4 font-bold"
)
def format_fields(headers, fields):
return (
rx.scroll_area(
... | type_str = type_.__name__ if hasattr(type_, "__name__") else str(type_) |
le-check line above prop is a comment
assert self.code[i - 1].strip().startswith("#"), (
f"Expected comment, got {self.code[i - 1]}"
)
# Get the comment for this prop.
comment = Source.get_comment(comments)
# reset comments
comment... |
return rx.code(field["prop"].name, ": ", type_str, class_name="code-style")
table_header_class_name = (
"font-small text-slate-12 text-normal w-auto justify-start pl-4 font-bold"
)
def format_fields(headers, fields):
return (
rx.scroll_area(
rx.table.root(
rx.table.h... | if default:
type_str += f" = {default}" |
mment, got {self.code[i - 1]}"
)
# Get the comment for this prop.
comment = Source.get_comment(comments)
# reset comments
comments.clear()
# Skip private props.
if "PRIVATE" in comment:
continue
# Add the ... |
def format_fields(headers, fields):
return (
rx.scroll_area(
rx.table.root(
rx.table.header(
rx.table.row(
*[
rx.table.column_header_cell(
header, class_name=table_header_cl... | table_header_class_name = (
"font-small text-slate-12 text-normal w-auto justify-start pl-4 font-bold"
) |
w(
*[
rx.table.column_header_cell(
header, class_name=table_header_class_name
)
for header in headers
]
)
),
... |
if extra_fields:
fields.extend(extra_fields)
class_fields = s.get_class_fields()
return rx.box(
h1_comp(text=title.title()),
rx.code(s.get_name(), class_name="code-style text-[18px]"),
rx.divider(),
markdown(s.get_overview()),
(
rx.box(
... | fields = s.get_fields() |
[
rx.table.column_header_cell(
header, class_name=table_header_class_name
)
for header in headers
]
)
),
rx.table.body(
... |
class_fields = s.get_class_fields()
return rx.box(
h1_comp(text=title.title()),
rx.code(s.get_name(), class_name="code-style text-[18px]"),
rx.divider(),
markdown(s.get_overview()),
(
rx.box(
h2_comp(text="Class Fields"),
forma... | if extra_fields:
fields.extend(extra_fields) |
(
header, class_name=table_header_class_name
)
for header in headers
]
)
),
rx.table.body(
*[
rx.table.row(
... |
return rx.box(
h1_comp(text=title.title()),
rx.code(s.get_name(), class_name="code-style text-[18px]"),
rx.divider(),
markdown(s.get_overview()),
(
rx.box(
h2_comp(text="Class Fields"),
format_fields(["Prop", "Description"], class_... | class_fields = s.get_class_fields() |
import os
|
from pathlib import Path
from types import SimpleNamespace
import flexdown
import reflex as rx
from flexdown.document import Document
# External Components
from reflex_pyplot import pyplot as pyplot
from pcweb.flexdown import xd
from pcweb.pages.docs.component import multi_docs
from pcweb.pages.library_previews imp... | from collections import defaultdict |
import os
from collections import defaultdict
|
from types import SimpleNamespace
import flexdown
import reflex as rx
from flexdown.document import Document
# External Components
from reflex_pyplot import pyplot as pyplot
from pcweb.flexdown import xd
from pcweb.pages.docs.component import multi_docs
from pcweb.pages.library_previews import components_previews_p... | from pathlib import Path |
import os
from collections import defaultdict
from pathlib import Path
|
import flexdown
import reflex as rx
from flexdown.document import Document
# External Components
from reflex_pyplot import pyplot as pyplot
from pcweb.flexdown import xd
from pcweb.pages.docs.component import multi_docs
from pcweb.pages.library_previews import components_previews_pages
from pcweb.route import Route... | from types import SimpleNamespace |
import os
from collections import defaultdict
from pathlib import Path
from types import SimpleNamespace
|
import reflex as rx
from flexdown.document import Document
# External Components
from reflex_pyplot import pyplot as pyplot
from pcweb.flexdown import xd
from pcweb.pages.docs.component import multi_docs
from pcweb.pages.library_previews import components_previews_pages
from pcweb.route import Route
from pcweb.templ... | import flexdown |
import os
from collections import defaultdict
from pathlib import Path
from types import SimpleNamespace
import flexdown
|
from flexdown.document import Document
# External Components
from reflex_pyplot import pyplot as pyplot
from pcweb.flexdown import xd
from pcweb.pages.docs.component import multi_docs
from pcweb.pages.library_previews import components_previews_pages
from pcweb.route import Route
from pcweb.templates.docpage import ... | import reflex as rx |
import os
from collections import defaultdict
from pathlib import Path
from types import SimpleNamespace
import flexdown
import reflex as rx
|
# External Components
from reflex_pyplot import pyplot as pyplot
from pcweb.flexdown import xd
from pcweb.pages.docs.component import multi_docs
from pcweb.pages.library_previews import components_previews_pages
from pcweb.route import Route
from pcweb.templates.docpage import docpage, get_toc
from pcweb.whitelist i... | from flexdown.document import Document |
import os
from collections import defaultdict
from pathlib import Path
from types import SimpleNamespace
import flexdown
import reflex as rx
from flexdown.document import Document
# External Components
|
from pcweb.flexdown import xd
from pcweb.pages.docs.component import multi_docs
from pcweb.pages.library_previews import components_previews_pages
from pcweb.route import Route
from pcweb.templates.docpage import docpage, get_toc
from pcweb.whitelist import _check_whitelisted_path
from .apiref import pages as apiref... | from reflex_pyplot import pyplot as pyplot |
import os
from collections import defaultdict
from pathlib import Path
from types import SimpleNamespace
import flexdown
import reflex as rx
from flexdown.document import Document
# External Components
from reflex_pyplot import pyplot as pyplot
|
from pcweb.pages.docs.component import multi_docs
from pcweb.pages.library_previews import components_previews_pages
from pcweb.route import Route
from pcweb.templates.docpage import docpage, get_toc
from pcweb.whitelist import _check_whitelisted_path
from .apiref import pages as apiref_pages
from .cloud import pages... | from pcweb.flexdown import xd |
import os
from collections import defaultdict
from pathlib import Path
from types import SimpleNamespace
import flexdown
import reflex as rx
from flexdown.document import Document
# External Components
from reflex_pyplot import pyplot as pyplot
from pcweb.flexdown import xd
|
from pcweb.pages.library_previews import components_previews_pages
from pcweb.route import Route
from pcweb.templates.docpage import docpage, get_toc
from pcweb.whitelist import _check_whitelisted_path
from .apiref import pages as apiref_pages
from .cloud import pages as cloud_pages
from .cloud_cliref import pages as... | from pcweb.pages.docs.component import multi_docs |
import os
from collections import defaultdict
from pathlib import Path
from types import SimpleNamespace
import flexdown
import reflex as rx
from flexdown.document import Document
# External Components
from reflex_pyplot import pyplot as pyplot
from pcweb.flexdown import xd
from pcweb.pages.docs.component import mul... |
from pcweb.route import Route
from pcweb.templates.docpage import docpage, get_toc
from pcweb.whitelist import _check_whitelisted_path
from .apiref import pages as apiref_pages
from .cloud import pages as cloud_pages
from .cloud_cliref import pages as cloud_cliref_pages
from .custom_components import custom_component... | from pcweb.pages.library_previews import components_previews_pages |
import os
from collections import defaultdict
from pathlib import Path
from types import SimpleNamespace
import flexdown
import reflex as rx
from flexdown.document import Document
# External Components
from reflex_pyplot import pyplot as pyplot
from pcweb.flexdown import xd
from pcweb.pages.docs.component import mul... |
from pcweb.templates.docpage import docpage, get_toc
from pcweb.whitelist import _check_whitelisted_path
from .apiref import pages as apiref_pages
from .cloud import pages as cloud_pages
from .cloud_cliref import pages as cloud_cliref_pages
from .custom_components import custom_components
from .library import library... | from pcweb.route import Route |
import os
from collections import defaultdict
from pathlib import Path
from types import SimpleNamespace
import flexdown
import reflex as rx
from flexdown.document import Document
# External Components
from reflex_pyplot import pyplot as pyplot
from pcweb.flexdown import xd
from pcweb.pages.docs.component import mul... |
from pcweb.whitelist import _check_whitelisted_path
from .apiref import pages as apiref_pages
from .cloud import pages as cloud_pages
from .cloud_cliref import pages as cloud_cliref_pages
from .custom_components import custom_components
from .library import library
from .recipes_overview import overview
def should_... | from pcweb.templates.docpage import docpage, get_toc |
import os
from collections import defaultdict
from pathlib import Path
from types import SimpleNamespace
import flexdown
import reflex as rx
from flexdown.document import Document
# External Components
from reflex_pyplot import pyplot as pyplot
from pcweb.flexdown import xd
from pcweb.pages.docs.component import mul... |
from .apiref import pages as apiref_pages
from .cloud import pages as cloud_pages
from .cloud_cliref import pages as cloud_cliref_pages
from .custom_components import custom_components
from .library import library
from .recipes_overview import overview
def should_skip_compile(doc: flexdown.Document):
"""Skip co... | from pcweb.whitelist import _check_whitelisted_path |
import os
from collections import defaultdict
from pathlib import Path
from types import SimpleNamespace
import flexdown
import reflex as rx
from flexdown.document import Document
# External Components
from reflex_pyplot import pyplot as pyplot
from pcweb.flexdown import xd
from pcweb.pages.docs.component import mul... |
from .cloud import pages as cloud_pages
from .cloud_cliref import pages as cloud_cliref_pages
from .custom_components import custom_components
from .library import library
from .recipes_overview import overview
def should_skip_compile(doc: flexdown.Document):
"""Skip compilation if the markdown file has not been... | from .apiref import pages as apiref_pages |
import os
from collections import defaultdict
from pathlib import Path
from types import SimpleNamespace
import flexdown
import reflex as rx
from flexdown.document import Document
# External Components
from reflex_pyplot import pyplot as pyplot
from pcweb.flexdown import xd
from pcweb.pages.docs.component import mul... |
from .cloud_cliref import pages as cloud_cliref_pages
from .custom_components import custom_components
from .library import library
from .recipes_overview import overview
def should_skip_compile(doc: flexdown.Document):
"""Skip compilation if the markdown file has not been modified since the last compilation."""... | from .cloud import pages as cloud_pages |
import os
from collections import defaultdict
from pathlib import Path
from types import SimpleNamespace
import flexdown
import reflex as rx
from flexdown.document import Document
# External Components
from reflex_pyplot import pyplot as pyplot
from pcweb.flexdown import xd
from pcweb.pages.docs.component import mul... |
from .custom_components import custom_components
from .library import library
from .recipes_overview import overview
def should_skip_compile(doc: flexdown.Document):
"""Skip compilation if the markdown file has not been modified since the last compilation."""
if not os.environ.get("REFLEX_PERSIST_WEB_DIR", F... | from .cloud_cliref import pages as cloud_cliref_pages |
import os
from collections import defaultdict
from pathlib import Path
from types import SimpleNamespace
import flexdown
import reflex as rx
from flexdown.document import Document
# External Components
from reflex_pyplot import pyplot as pyplot
from pcweb.flexdown import xd
from pcweb.pages.docs.component import mul... |
from .library import library
from .recipes_overview import overview
def should_skip_compile(doc: flexdown.Document):
"""Skip compilation if the markdown file has not been modified since the last compilation."""
if not os.environ.get("REFLEX_PERSIST_WEB_DIR", False):
return False
# Check if the d... | from .custom_components import custom_components |
import os
from collections import defaultdict
from pathlib import Path
from types import SimpleNamespace
import flexdown
import reflex as rx
from flexdown.document import Document
# External Components
from reflex_pyplot import pyplot as pyplot
from pcweb.flexdown import xd
from pcweb.pages.docs.component import mul... |
from .recipes_overview import overview
def should_skip_compile(doc: flexdown.Document):
"""Skip compilation if the markdown file has not been modified since the last compilation."""
if not os.environ.get("REFLEX_PERSIST_WEB_DIR", False):
return False
# Check if the doc has been compiled already.... | from .library import library |
import os
from collections import defaultdict
from pathlib import Path
from types import SimpleNamespace
import flexdown
import reflex as rx
from flexdown.document import Document
# External Components
from reflex_pyplot import pyplot as pyplot
from pcweb.flexdown import xd
from pcweb.pages.docs.component import mul... |
def should_skip_compile(doc: flexdown.Document):
"""Skip compilation if the markdown file has not been modified since the last compilation."""
if not os.environ.get("REFLEX_PERSIST_WEB_DIR", False):
return False
# Check if the doc has been compiled already.
compiled_output = f".web/pages/{do... | from .recipes_overview import overview |
import os
from collections import defaultdict
from pathlib import Path
from types import SimpleNamespace
import flexdown
import reflex as rx
from flexdown.document import Document
# External Components
from reflex_pyplot import pyplot as pyplot
from pcweb.flexdown import xd
from pcweb.pages.docs.component import mul... |
def to_title_case(text: str) -> str:
return " ".join(word.capitalize() for word in text.split("_"))
def build_nested_namespace(
parent_namespace: SimpleNamespace, path: list, title: str, comp
):
namespace = rx.utils.format.to_snake_case(path[0])
if (
isinstance(parent_namespace, SimpleName... | def should_skip_compile(doc: flexdown.Document):
"""Skip compilation if the markdown file has not been modified since the last compilation."""
if not os.environ.get("REFLEX_PERSIST_WEB_DIR", False):
return False
# Check if the doc has been compiled already.
compiled_output = f".web/pages/{doc.r... |
import os
from collections import defaultdict
from pathlib import Path
from types import SimpleNamespace
import flexdown
import reflex as rx
from flexdown.document import Document
# External Components
from reflex_pyplot import pyplot as pyplot
from pcweb.flexdown import xd
from pcweb.pages.docs.component import mul... |
# Check if the doc has been compiled already.
compiled_output = f".web/pages/{doc.replace('.md', '.js')}"
# Get the timestamp of the compiled file.
compiled_time = (
os.path.getmtime(compiled_output) if os.path.exists(compiled_output) else 0
)
# Get the timestamp of the source file.
... | if not os.environ.get("REFLEX_PERSIST_WEB_DIR", False):
return False |
h
from types import SimpleNamespace
import flexdown
import reflex as rx
from flexdown.document import Document
# External Components
from reflex_pyplot import pyplot as pyplot
from pcweb.flexdown import xd
from pcweb.pages.docs.component import multi_docs
from pcweb.pages.library_previews import components_previews_... |
# Get the timestamp of the compiled file.
compiled_time = (
os.path.getmtime(compiled_output) if os.path.exists(compiled_output) else 0
)
# Get the timestamp of the source file.
source_time = os.path.getmtime(doc)
return compiled_time > source_time
def to_title_case(text: str) -> str:... | compiled_output = f".web/pages/{doc.replace('.md', '.js')}" |
t
# External Components
from reflex_pyplot import pyplot as pyplot
from pcweb.flexdown import xd
from pcweb.pages.docs.component import multi_docs
from pcweb.pages.library_previews import components_previews_pages
from pcweb.route import Route
from pcweb.templates.docpage import docpage, get_toc
from pcweb.whitelist ... |
# Get the timestamp of the source file.
source_time = os.path.getmtime(doc)
return compiled_time > source_time
def to_title_case(text: str) -> str:
return " ".join(word.capitalize() for word in text.split("_"))
def build_nested_namespace(
parent_namespace: SimpleNamespace, path: list, title: st... | compiled_time = (
os.path.getmtime(compiled_output) if os.path.exists(compiled_output) else 0
) |
web.pages.library_previews import components_previews_pages
from pcweb.route import Route
from pcweb.templates.docpage import docpage, get_toc
from pcweb.whitelist import _check_whitelisted_path
from .apiref import pages as apiref_pages
from .cloud import pages as cloud_pages
from .cloud_cliref import pages as cloud_c... |
return compiled_time > source_time
def to_title_case(text: str) -> str:
return " ".join(word.capitalize() for word in text.split("_"))
def build_nested_namespace(
parent_namespace: SimpleNamespace, path: list, title: str, comp
):
namespace = rx.utils.format.to_snake_case(path[0])
if (
... | source_time = os.path.getmtime(doc) |
import Route
from pcweb.templates.docpage import docpage, get_toc
from pcweb.whitelist import _check_whitelisted_path
from .apiref import pages as apiref_pages
from .cloud import pages as cloud_pages
from .cloud_cliref import pages as cloud_cliref_pages
from .custom_components import custom_components
from .library im... |
def build_nested_namespace(
parent_namespace: SimpleNamespace, path: list, title: str, comp
):
namespace = rx.utils.format.to_snake_case(path[0])
if (
isinstance(parent_namespace, SimpleNamespace)
and getattr(parent_namespace, namespace, None) is None
):
setattr(parent_namesp... | def to_title_case(text: str) -> str:
return " ".join(word.capitalize() for word in text.split("_")) |
listed_path
from .apiref import pages as apiref_pages
from .cloud import pages as cloud_pages
from .cloud_cliref import pages as cloud_cliref_pages
from .custom_components import custom_components
from .library import library
from .recipes_overview import overview
def should_skip_compile(doc: flexdown.Document):
... |
def get_components_from_metadata(current_doc):
components = []
for comp_str in current_doc.metadata.get("components", []):
component = eval(comp_str)
if isinstance(component, type):
components.append((component, comp_str))
elif hasattr(component, "__self__"):
... | def build_nested_namespace(
parent_namespace: SimpleNamespace, path: list, title: str, comp
):
namespace = rx.utils.format.to_snake_case(path[0])
if (
isinstance(parent_namespace, SimpleNamespace)
and getattr(parent_namespace, namespace, None) is None
):
setattr(parent_namespace... |
oud_cliref import pages as cloud_cliref_pages
from .custom_components import custom_components
from .library import library
from .recipes_overview import overview
def should_skip_compile(doc: flexdown.Document):
"""Skip compilation if the markdown file has not been modified since the last compilation."""
if n... |
if (
isinstance(parent_namespace, SimpleNamespace)
and getattr(parent_namespace, namespace, None) is None
):
setattr(parent_namespace, namespace, SimpleNamespace())
nested_namespace = getattr(parent_namespace, namespace)
if len(path) == 1:
setattr(nested_namespace, ti... | namespace = rx.utils.format.to_snake_case(path[0]) |
om_components import custom_components
from .library import library
from .recipes_overview import overview
def should_skip_compile(doc: flexdown.Document):
"""Skip compilation if the markdown file has not been modified since the last compilation."""
if not os.environ.get("REFLEX_PERSIST_WEB_DIR", False):
... |
nested_namespace = getattr(parent_namespace, namespace)
if len(path) == 1:
setattr(nested_namespace, title, comp)
else:
setattr(
parent_namespace,
namespace,
build_nested_namespace(
nested_namespace,
path[1:],
... | if (
isinstance(parent_namespace, SimpleNamespace)
and getattr(parent_namespace, namespace, None) is None
):
setattr(parent_namespace, namespace, SimpleNamespace()) |
file has not been modified since the last compilation."""
if not os.environ.get("REFLEX_PERSIST_WEB_DIR", False):
return False
# Check if the doc has been compiled already.
compiled_output = f".web/pages/{doc.replace('.md', '.js')}"
# Get the timestamp of the compiled file.
compiled_time = ... |
if len(path) == 1:
setattr(nested_namespace, title, comp)
else:
setattr(
parent_namespace,
namespace,
build_nested_namespace(
nested_namespace,
path[1:],
title,
comp,
),
)
... | nested_namespace = getattr(parent_namespace, namespace) |
if not os.environ.get("REFLEX_PERSIST_WEB_DIR", False):
return False
# Check if the doc has been compiled already.
compiled_output = f".web/pages/{doc.replace('.md', '.js')}"
# Get the timestamp of the compiled file.
compiled_time = (
os.path.getmtime(compiled_output) if os.path.exists... |
return parent_namespace
def get_components_from_metadata(current_doc):
components = []
for comp_str in current_doc.metadata.get("components", []):
component = eval(comp_str)
if isinstance(component, type):
components.append((component, comp_str))
elif hasattr(componen... | if len(path) == 1:
setattr(nested_namespace, title, comp)
else:
setattr(
parent_namespace,
namespace,
build_nested_namespace(
nested_namespace,
path[1:],
title,
comp,
),
) |
0
)
# Get the timestamp of the source file.
source_time = os.path.getmtime(doc)
return compiled_time > source_time
def to_title_case(text: str) -> str:
return " ".join(word.capitalize() for word in text.split("_"))
def build_nested_namespace(
parent_namespace: SimpleNamespace, path: list, t... |
flexdown_docs = [
str(doc).replace("\\", "/") for doc in flexdown.utils.get_flexdown_files("docs/")
]
graphing_components = defaultdict(list)
component_list = defaultdict(list)
recipes_list = defaultdict(list)
docs_ns = SimpleNamespace()
def exec_blocks(doc, href):
"""Execute the exec and demo blocks in t... | def get_components_from_metadata(current_doc):
components = []
for comp_str in current_doc.metadata.get("components", []):
component = eval(comp_str)
if isinstance(component, type):
components.append((component, comp_str))
elif hasattr(component, "__self__"):
com... |
.
source_time = os.path.getmtime(doc)
return compiled_time > source_time
def to_title_case(text: str) -> str:
return " ".join(word.capitalize() for word in text.split("_"))
def build_nested_namespace(
parent_namespace: SimpleNamespace, path: list, title: str, comp
):
namespace = rx.utils.format.... |
for comp_str in current_doc.metadata.get("components", []):
component = eval(comp_str)
if isinstance(component, type):
components.append((component, comp_str))
elif hasattr(component, "__self__"):
components.append((component.__self__, comp_str))
elif isinst... | components = [] |
s.path.getmtime(doc)
return compiled_time > source_time
def to_title_case(text: str) -> str:
return " ".join(word.capitalize() for word in text.split("_"))
def build_nested_namespace(
parent_namespace: SimpleNamespace, path: list, title: str, comp
):
namespace = rx.utils.format.to_snake_case(path[0]... |
return components
flexdown_docs = [
str(doc).replace("\\", "/") for doc in flexdown.utils.get_flexdown_files("docs/")
]
graphing_components = defaultdict(list)
component_list = defaultdict(list)
recipes_list = defaultdict(list)
docs_ns = SimpleNamespace()
def exec_blocks(doc, href):
"""Execute the ex... | for comp_str in current_doc.metadata.get("components", []):
component = eval(comp_str)
if isinstance(component, type):
components.append((component, comp_str))
elif hasattr(component, "__self__"):
components.append((component.__self__, comp_str))
elif isinstance(c... |
_title_case(text: str) -> str:
return " ".join(word.capitalize() for word in text.split("_"))
def build_nested_namespace(
parent_namespace: SimpleNamespace, path: list, title: str, comp
):
namespace = rx.utils.format.to_snake_case(path[0])
if (
isinstance(parent_namespace, SimpleNamespace)
... |
if isinstance(component, type):
components.append((component, comp_str))
elif hasattr(component, "__self__"):
components.append((component.__self__, comp_str))
elif isinstance(component, SimpleNamespace) and hasattr(component, "__call__"): # noqa: B004
compo... | component = eval(comp_str) |
return " ".join(word.capitalize() for word in text.split("_"))
def build_nested_namespace(
parent_namespace: SimpleNamespace, path: list, title: str, comp
):
namespace = rx.utils.format.to_snake_case(path[0])
if (
isinstance(parent_namespace, SimpleNamespace)
and getattr(parent_namespace,... |
return components
flexdown_docs = [
str(doc).replace("\\", "/") for doc in flexdown.utils.get_flexdown_files("docs/")
]
graphing_components = defaultdict(list)
component_list = defaultdict(list)
recipes_list = defaultdict(list)
docs_ns = SimpleNamespace()
def exec_blocks(doc, href):
"""Execute the ex... | if isinstance(component, type):
components.append((component, comp_str))
elif hasattr(component, "__self__"):
components.append((component.__self__, comp_str))
elif isinstance(component, SimpleNamespace) and hasattr(component, "__call__"): # noqa: B004
components.app... |
parent_namespace: SimpleNamespace, path: list, title: str, comp
):
namespace = rx.utils.format.to_snake_case(path[0])
if (
isinstance(parent_namespace, SimpleNamespace)
and getattr(parent_namespace, namespace, None) is None
):
setattr(parent_namespace, namespace, SimpleNamespace... |
return components
flexdown_docs = [
str(doc).replace("\\", "/") for doc in flexdown.utils.get_flexdown_files("docs/")
]
graphing_components = defaultdict(list)
component_list = defaultdict(list)
recipes_list = defaultdict(list)
docs_ns = SimpleNamespace()
def exec_blocks(doc, href):
"""Execute the ex... | elif hasattr(component, "__self__"):
components.append((component.__self__, comp_str))
elif isinstance(component, SimpleNamespace) and hasattr(component, "__call__"): # noqa: B004
components.append((component.__call__.__self__, comp_str))
else:
raise ValueError(f"Inv... |
nake_case(path[0])
if (
isinstance(parent_namespace, SimpleNamespace)
and getattr(parent_namespace, namespace, None) is None
):
setattr(parent_namespace, namespace, SimpleNamespace())
nested_namespace = getattr(parent_namespace, namespace)
if len(path) == 1:
setattr(ne... |
return components
flexdown_docs = [
str(doc).replace("\\", "/") for doc in flexdown.utils.get_flexdown_files("docs/")
]
graphing_components = defaultdict(list)
component_list = defaultdict(list)
recipes_list = defaultdict(list)
docs_ns = SimpleNamespace()
def exec_blocks(doc, href):
"""Execute the ex... | elif isinstance(component, SimpleNamespace) and hasattr(component, "__call__"): # noqa: B004
components.append((component.__call__.__self__, comp_str))
else:
raise ValueError(f"Invalid component: {component}") |
amespace)
if len(path) == 1:
setattr(nested_namespace, title, comp)
else:
setattr(
parent_namespace,
namespace,
build_nested_namespace(
nested_namespace,
path[1:],
title,
comp,
),
... |
graphing_components = defaultdict(list)
component_list = defaultdict(list)
recipes_list = defaultdict(list)
docs_ns = SimpleNamespace()
def exec_blocks(doc, href):
"""Execute the exec and demo blocks in the document."""
source = doc.content
env = doc.metadata.copy()
env["__xd"] = xd
env["__exec"... | flexdown_docs = [
str(doc).replace("\\", "/") for doc in flexdown.utils.get_flexdown_files("docs/")
] |
parent_namespace,
namespace,
build_nested_namespace(
nested_namespace,
path[1:],
title,
comp,
),
)
return parent_namespace
def get_components_from_metadata(current_doc):
components = []
... |
component_list = defaultdict(list)
recipes_list = defaultdict(list)
docs_ns = SimpleNamespace()
def exec_blocks(doc, href):
"""Execute the exec and demo blocks in the document."""
source = doc.content
env = doc.metadata.copy()
env["__xd"] = xd
env["__exec"] = True
blocks = xd.get_blocks(sourc... | graphing_components = defaultdict(list) |
namespace,
build_nested_namespace(
nested_namespace,
path[1:],
title,
comp,
),
)
return parent_namespace
def get_components_from_metadata(current_doc):
components = []
for comp_str in current_doc.metadata.g... |
recipes_list = defaultdict(list)
docs_ns = SimpleNamespace()
def exec_blocks(doc, href):
"""Execute the exec and demo blocks in the document."""
source = doc.content
env = doc.metadata.copy()
env["__xd"] = xd
env["__exec"] = True
blocks = xd.get_blocks(source, href)
# Get only the exec an... | component_list = defaultdict(list) |
ted_namespace(
nested_namespace,
path[1:],
title,
comp,
),
)
return parent_namespace
def get_components_from_metadata(current_doc):
components = []
for comp_str in current_doc.metadata.get("components", []):
compo... |
docs_ns = SimpleNamespace()
def exec_blocks(doc, href):
"""Execute the exec and demo blocks in the document."""
source = doc.content
env = doc.metadata.copy()
env["__xd"] = xd
env["__exec"] = True
blocks = xd.get_blocks(source, href)
# Get only the exec and demo blocks.
blocks = [b fo... | recipes_list = defaultdict(list) |
sted_namespace,
path[1:],
title,
comp,
),
)
return parent_namespace
def get_components_from_metadata(current_doc):
components = []
for comp_str in current_doc.metadata.get("components", []):
component = eval(comp_str)
if ... |
def exec_blocks(doc, href):
"""Execute the exec and demo blocks in the document."""
source = doc.content
env = doc.metadata.copy()
env["__xd"] = xd
env["__exec"] = True
blocks = xd.get_blocks(source, href)
# Get only the exec and demo blocks.
blocks = [b for b in blocks if b.__class__... | docs_ns = SimpleNamespace() |
path[1:],
title,
comp,
),
)
return parent_namespace
def get_components_from_metadata(current_doc):
components = []
for comp_str in current_doc.metadata.get("components", []):
component = eval(comp_str)
if isinstance(component, type):
... |
outblocks = []
manual_titles = {
"docs/database/overview.md": "Database Overview",
"docs/custom-components/overview.md": "Custom Components Overview",
"docs/custom-components/command-reference.md": "Custom Component CLI Reference",
"docs/api-routes/overview.md": "API Routes Overview",
"docs/cli... | def exec_blocks(doc, href):
"""Execute the exec and demo blocks in the document."""
source = doc.content
env = doc.metadata.copy()
env["__xd"] = xd
env["__exec"] = True
blocks = xd.get_blocks(source, href)
# Get only the exec and demo blocks.
blocks = [b for b in blocks if b.__class__.__... |
parent_namespace
def get_components_from_metadata(current_doc):
components = []
for comp_str in current_doc.metadata.get("components", []):
component = eval(comp_str)
if isinstance(component, type):
components.append((component, comp_str))
elif hasattr(component, "__self_... |
env = doc.metadata.copy()
env["__xd"] = xd
env["__exec"] = True
blocks = xd.get_blocks(source, href)
# Get only the exec and demo blocks.
blocks = [b for b in blocks if b.__class__.__name__ in ["ExecBlock", "DemoBlock"]]
for block in blocks:
block.render(env)
outblocks = []
manu... | source = doc.content |
et_components_from_metadata(current_doc):
components = []
for comp_str in current_doc.metadata.get("components", []):
component = eval(comp_str)
if isinstance(component, type):
components.append((component, comp_str))
elif hasattr(component, "__self__"):
componen... |
env["__xd"] = xd
env["__exec"] = True
blocks = xd.get_blocks(source, href)
# Get only the exec and demo blocks.
blocks = [b for b in blocks if b.__class__.__name__ in ["ExecBlock", "DemoBlock"]]
for block in blocks:
block.render(env)
outblocks = []
manual_titles = {
"docs/databa... | env = doc.metadata.copy() |
rrent_doc):
components = []
for comp_str in current_doc.metadata.get("components", []):
component = eval(comp_str)
if isinstance(component, type):
components.append((component, comp_str))
elif hasattr(component, "__self__"):
components.append((component.__self__,... |
env["__exec"] = True
blocks = xd.get_blocks(source, href)
# Get only the exec and demo blocks.
blocks = [b for b in blocks if b.__class__.__name__ in ["ExecBlock", "DemoBlock"]]
for block in blocks:
block.render(env)
outblocks = []
manual_titles = {
"docs/database/overview.md": "Dat... | env["__xd"] = xd |
nents = []
for comp_str in current_doc.metadata.get("components", []):
component = eval(comp_str)
if isinstance(component, type):
components.append((component, comp_str))
elif hasattr(component, "__self__"):
components.append((component.__self__, comp_str))
e... |
blocks = xd.get_blocks(source, href)
# Get only the exec and demo blocks.
blocks = [b for b in blocks if b.__class__.__name__ in ["ExecBlock", "DemoBlock"]]
for block in blocks:
block.render(env)
outblocks = []
manual_titles = {
"docs/database/overview.md": "Database Overview",
"doc... | env["__exec"] = True |
str in current_doc.metadata.get("components", []):
component = eval(comp_str)
if isinstance(component, type):
components.append((component, comp_str))
elif hasattr(component, "__self__"):
components.append((component.__self__, comp_str))
elif isinstance(component,... |
# Get only the exec and demo blocks.
blocks = [b for b in blocks if b.__class__.__name__ in ["ExecBlock", "DemoBlock"]]
for block in blocks:
block.render(env)
outblocks = []
manual_titles = {
"docs/database/overview.md": "Database Overview",
"docs/custom-components/overview.md": "Custom... | blocks = xd.get_blocks(source, href) |
tr)
if isinstance(component, type):
components.append((component, comp_str))
elif hasattr(component, "__self__"):
components.append((component.__self__, comp_str))
elif isinstance(component, SimpleNamespace) and hasattr(component, "__call__"): # noqa: B004
co... |
for block in blocks:
block.render(env)
outblocks = []
manual_titles = {
"docs/database/overview.md": "Database Overview",
"docs/custom-components/overview.md": "Custom Components Overview",
"docs/custom-components/command-reference.md": "Custom Component CLI Reference",
"docs/api-routes... | blocks = [b for b in blocks if b.__class__.__name__ in ["ExecBlock", "DemoBlock"]] |
omp_str))
elif hasattr(component, "__self__"):
components.append((component.__self__, comp_str))
elif isinstance(component, SimpleNamespace) and hasattr(component, "__call__"): # noqa: B004
components.append((component.__call__.__self__, comp_str))
else:
rais... |
outblocks = []
manual_titles = {
"docs/database/overview.md": "Database Overview",
"docs/custom-components/overview.md": "Custom Components Overview",
"docs/custom-components/command-reference.md": "Custom Component CLI Reference",
"docs/api-routes/overview.md": "API Routes Overview",
"docs/cli... | for block in blocks:
block.render(env) |
__"):
components.append((component.__self__, comp_str))
elif isinstance(component, SimpleNamespace) and hasattr(component, "__call__"): # noqa: B004
components.append((component.__call__.__self__, comp_str))
else:
raise ValueError(f"Invalid component: {component}")
... |
manual_titles = {
"docs/database/overview.md": "Database Overview",
"docs/custom-components/overview.md": "Custom Components Overview",
"docs/custom-components/command-reference.md": "Custom Component CLI Reference",
"docs/api-routes/overview.md": "API Routes Overview",
"docs/client_storage/overv... | outblocks = [] |
block.render(env)
outblocks = []
manual_titles = {
"docs/database/overview.md": "Database Overview",
"docs/custom-components/overview.md": "Custom Components Overview",
"docs/custom-components/command-reference.md": "Custom Component CLI Reference",
"docs/api-routes/overview.md": "API Routes Ove... |
if doc.endswith("-ll.md"):
return
# Get the docpage component.
doc = doc.replace("\\", "/")
route = rx.utils.format.to_kebab_case(f"/{doc.replace('.md', '/')}")
# Handle index files: /folder/index/ -> /folder/
if route.endswith("/index/"):
route = route[:-7] + "/"
title2 =... | if doc.endswith("-style.md"):
return |
tles = {
"docs/database/overview.md": "Database Overview",
"docs/custom-components/overview.md": "Custom Components Overview",
"docs/custom-components/command-reference.md": "Custom Component CLI Reference",
"docs/api-routes/overview.md": "API Routes Overview",
"docs/client_storage/overview.md": "Cl... |
# Get the docpage component.
doc = doc.replace("\\", "/")
route = rx.utils.format.to_kebab_case(f"/{doc.replace('.md', '/')}")
# Handle index files: /folder/index/ -> /folder/
if route.endswith("/index/"):
route = route[:-7] + "/"
title2 = manual_titles[doc] if doc in manual_titles els... | if doc.endswith("-ll.md"):
return |
components/overview.md": "Custom Components Overview",
"docs/custom-components/command-reference.md": "Custom Component CLI Reference",
"docs/api-routes/overview.md": "API Routes Overview",
"docs/client_storage/overview.md": "Client Storage Overview",
"docs/state_structure/overview.md": "State Structure... |
route = rx.utils.format.to_kebab_case(f"/{doc.replace('.md', '/')}")
# Handle index files: /folder/index/ -> /folder/
if route.endswith("/index/"):
route = route[:-7] + "/"
title2 = manual_titles[doc] if doc in manual_titles else to_title_case(title)
category = os.path.basename(os.path.dirn... | doc = doc.replace("\\", "/") |
Components Overview",
"docs/custom-components/command-reference.md": "Custom Component CLI Reference",
"docs/api-routes/overview.md": "API Routes Overview",
"docs/client_storage/overview.md": "Client Storage Overview",
"docs/state_structure/overview.md": "State Structure Overview",
"docs/state/overv... |
# Handle index files: /folder/index/ -> /folder/
if route.endswith("/index/"):
route = route[:-7] + "/"
title2 = manual_titles[doc] if doc in manual_titles else to_title_case(title)
category = os.path.basename(os.path.dirname(doc)).title()
if not _check_whitelisted_path(route):
ret... | route = rx.utils.format.to_kebab_case(f"/{doc.replace('.md', '/')}") |
s/overview.md": "API Routes Overview",
"docs/client_storage/overview.md": "Client Storage Overview",
"docs/state_structure/overview.md": "State Structure Overview",
"docs/state/overview.md": "State Overview",
"docs/styling/overview.md": "Styling Overview",
"docs/ui/overview.md": "UI Overview",
"... |
title2 = manual_titles[doc] if doc in manual_titles else to_title_case(title)
category = os.path.basename(os.path.dirname(doc)).title()
if not _check_whitelisted_path(route):
return
d = Document.from_file(doc)
if doc.startswith("docs/library/graphing"):
if should_skip_compile(doc... | if route.endswith("/index/"):
route = route[:-7] + "/" |
"docs/client_storage/overview.md": "Client Storage Overview",
"docs/state_structure/overview.md": "State Structure Overview",
"docs/state/overview.md": "State Overview",
"docs/styling/overview.md": "Styling Overview",
"docs/ui/overview.md": "UI Overview",
"docs/wrapping-react/overview.md": "Wra... |
title2 = manual_titles[doc] if doc in manual_titles else to_title_case(title)
category = os.path.basename(os.path.dirname(doc)).title()
if not _check_whitelisted_path(route):
return
d = Document.from_file(doc)
if doc.startswith("docs/library/graphing"):
if should_skip_compile(doc... | route = route[:-7] + "/" |
te Structure Overview",
"docs/state/overview.md": "State Overview",
"docs/styling/overview.md": "Styling Overview",
"docs/ui/overview.md": "UI Overview",
"docs/wrapping-react/overview.md": "Wrapping React Overview",
"docs/library/html/html.md": "HTML Elements",
"docs/recipes-overview.md": "Recip... |
if not _check_whitelisted_path(route):
return
d = Document.from_file(doc)
if doc.startswith("docs/library/graphing"):
if should_skip_compile(doc):
outblocks.append((d, route))
return
clist = [title, *get_components_from_metadata(d)]
graphing_compon... | category = os.path.basename(os.path.dirname(doc)).title() |
erview",
"docs/styling/overview.md": "Styling Overview",
"docs/ui/overview.md": "UI Overview",
"docs/wrapping-react/overview.md": "Wrapping React Overview",
"docs/library/html/html.md": "HTML Elements",
"docs/recipes-overview.md": "Recipes Overview",
"docs/events/special_events.md": "Special Eve... |
d = Document.from_file(doc)
if doc.startswith("docs/library/graphing"):
if should_skip_compile(doc):
outblocks.append((d, route))
return
clist = [title, *get_components_from_metadata(d)]
graphing_components[category].append(clist)
return multi_docs(path... | if not _check_whitelisted_path(route):
return |
,
"docs/ui/overview.md": "UI Overview",
"docs/wrapping-react/overview.md": "Wrapping React Overview",
"docs/library/html/html.md": "HTML Elements",
"docs/recipes-overview.md": "Recipes Overview",
"docs/events/special_events.md": "Special Events Docs",
"docs/library/graphing/general/tooltip.md": ... |
if doc.startswith("docs/library/graphing"):
if should_skip_compile(doc):
outblocks.append((d, route))
return
clist = [title, *get_components_from_metadata(d)]
graphing_components[category].append(clist)
return multi_docs(path=route, comp=d, component_list=cl... | d = Document.from_file(doc) |
Overview",
"docs/wrapping-react/overview.md": "Wrapping React Overview",
"docs/library/html/html.md": "HTML Elements",
"docs/recipes-overview.md": "Recipes Overview",
"docs/events/special_events.md": "Special Events Docs",
"docs/library/graphing/general/tooltip.md": "Graphing Tooltip",
"docs/rec... |
if doc.startswith("docs/library"):
clist = [title, *get_components_from_metadata(d)]
component_list[category].append(clist)
if should_skip_compile(doc):
outblocks.append((d, route))
return
return multi_docs(path=route, comp=d, component_list=clist, title=titl... | if doc.startswith("docs/library/graphing"):
if should_skip_compile(doc):
outblocks.append((d, route))
return
clist = [title, *get_components_from_metadata(d)]
graphing_components[category].append(clist)
return multi_docs(path=route, comp=d, component_list=clist, t... |
rapping React Overview",
"docs/library/html/html.md": "HTML Elements",
"docs/recipes-overview.md": "Recipes Overview",
"docs/events/special_events.md": "Special Events Docs",
"docs/library/graphing/general/tooltip.md": "Graphing Tooltip",
"docs/recipes/content/grid.md": "Grid Recipe",
}
def get_co... |
clist = [title, *get_components_from_metadata(d)]
graphing_components[category].append(clist)
return multi_docs(path=route, comp=d, component_list=clist, title=title2)
if doc.startswith("docs/library"):
clist = [title, *get_components_from_metadata(d)]
component_list[categor... | if should_skip_compile(doc):
outblocks.append((d, route))
return |
view.md": "Recipes Overview",
"docs/events/special_events.md": "Special Events Docs",
"docs/library/graphing/general/tooltip.md": "Graphing Tooltip",
"docs/recipes/content/grid.md": "Grid Recipe",
}
def get_component(doc: str, title: str):
if doc.endswith("-style.md"):
return
if doc.endsw... |
graphing_components[category].append(clist)
return multi_docs(path=route, comp=d, component_list=clist, title=title2)
if doc.startswith("docs/library"):
clist = [title, *get_components_from_metadata(d)]
component_list[category].append(clist)
if should_skip_compile(doc):
... | clist = [title, *get_components_from_metadata(d)] |
.md": "Grid Recipe",
}
def get_component(doc: str, title: str):
if doc.endswith("-style.md"):
return
if doc.endswith("-ll.md"):
return
# Get the docpage component.
doc = doc.replace("\\", "/")
route = rx.utils.format.to_kebab_case(f"/{doc.replace('.md', '/')}")
# Handle index... |
if should_skip_compile(doc):
outblocks.append((d, route))
return
def comp():
return (get_toc(d, doc), xd.render(d, doc))
doc_path = Path(doc)
doc_module = ".".join(doc_path.parts[:-1])
doc_file = doc_path.stem
comp.__module__ = doc_module
comp.__name__ = doc_file... | if doc.startswith("docs/library"):
clist = [title, *get_components_from_metadata(d)]
component_list[category].append(clist)
if should_skip_compile(doc):
outblocks.append((d, route))
return
return multi_docs(path=route, comp=d, component_list=clist, title=title2) |
doc: str, title: str):
if doc.endswith("-style.md"):
return
if doc.endswith("-ll.md"):
return
# Get the docpage component.
doc = doc.replace("\\", "/")
route = rx.utils.format.to_kebab_case(f"/{doc.replace('.md', '/')}")
# Handle index files: /folder/index/ -> /folder/
if r... |
component_list[category].append(clist)
if should_skip_compile(doc):
outblocks.append((d, route))
return
return multi_docs(path=route, comp=d, component_list=clist, title=title2)
if should_skip_compile(doc):
outblocks.append((d, route))
return
de... | clist = [title, *get_components_from_metadata(d)] |
return
# Get the docpage component.
doc = doc.replace("\\", "/")
route = rx.utils.format.to_kebab_case(f"/{doc.replace('.md', '/')}")
# Handle index files: /folder/index/ -> /folder/
if route.endswith("/index/"):
route = route[:-7] + "/"
title2 = manual_titles[doc] if doc in manu... |
return multi_docs(path=route, comp=d, component_list=clist, title=title2)
if should_skip_compile(doc):
outblocks.append((d, route))
return
def comp():
return (get_toc(d, doc), xd.render(d, doc))
doc_path = Path(doc)
doc_module = ".".join(doc_path.parts[:-1])
doc_f... | if should_skip_compile(doc):
outblocks.append((d, route))
return |
es: /folder/index/ -> /folder/
if route.endswith("/index/"):
route = route[:-7] + "/"
title2 = manual_titles[doc] if doc in manual_titles else to_title_case(title)
category = os.path.basename(os.path.dirname(doc)).title()
if not _check_whitelisted_path(route):
return
d = Document.f... |
def comp():
return (get_toc(d, doc), xd.render(d, doc))
doc_path = Path(doc)
doc_module = ".".join(doc_path.parts[:-1])
doc_file = doc_path.stem
comp.__module__ = doc_module
comp.__name__ = doc_file
comp.__qualname__ = doc_file
return docpage(set_path=route, t=title2)(comp)
... | if should_skip_compile(doc):
outblocks.append((d, route))
return |
[:-7] + "/"
title2 = manual_titles[doc] if doc in manual_titles else to_title_case(title)
category = os.path.basename(os.path.dirname(doc)).title()
if not _check_whitelisted_path(route):
return
d = Document.from_file(doc)
if doc.startswith("docs/library/graphing"):
if should_skip_... |
doc_path = Path(doc)
doc_module = ".".join(doc_path.parts[:-1])
doc_file = doc_path.stem
comp.__module__ = doc_module
comp.__name__ = doc_file
comp.__qualname__ = doc_file
return docpage(set_path=route, t=title2)(comp)
doc_routes = [
library,
custom_components,
overview,
... | def comp():
return (get_toc(d, doc), xd.render(d, doc)) |
lse to_title_case(title)
category = os.path.basename(os.path.dirname(doc)).title()
if not _check_whitelisted_path(route):
return
d = Document.from_file(doc)
if doc.startswith("docs/library/graphing"):
if should_skip_compile(doc):
outblocks.append((d, route))
re... |
doc_module = ".".join(doc_path.parts[:-1])
doc_file = doc_path.stem
comp.__module__ = doc_module
comp.__name__ = doc_file
comp.__qualname__ = doc_file
return docpage(set_path=route, t=title2)(comp)
doc_routes = [
library,
custom_components,
overview,
*components_previews_pag... | doc_path = Path(doc) |
category = os.path.basename(os.path.dirname(doc)).title()
if not _check_whitelisted_path(route):
return
d = Document.from_file(doc)
if doc.startswith("docs/library/graphing"):
if should_skip_compile(doc):
outblocks.append((d, route))
return
clist = [tit... |
doc_file = doc_path.stem
comp.__module__ = doc_module
comp.__name__ = doc_file
comp.__qualname__ = doc_file
return docpage(set_path=route, t=title2)(comp)
doc_routes = [
library,
custom_components,
overview,
*components_previews_pages,
*apiref_pages,
*cloud_cliref_pages,... | doc_module = ".".join(doc_path.parts[:-1]) |
(doc)).title()
if not _check_whitelisted_path(route):
return
d = Document.from_file(doc)
if doc.startswith("docs/library/graphing"):
if should_skip_compile(doc):
outblocks.append((d, route))
return
clist = [title, *get_components_from_metadata(d)]
g... |
comp.__module__ = doc_module
comp.__name__ = doc_file
comp.__qualname__ = doc_file
return docpage(set_path=route, t=title2)(comp)
doc_routes = [
library,
custom_components,
overview,
*components_previews_pages,
*apiref_pages,
*cloud_cliref_pages,
# * ai_builder_pages,
... | doc_file = doc_path.stem |
eck_whitelisted_path(route):
return
d = Document.from_file(doc)
if doc.startswith("docs/library/graphing"):
if should_skip_compile(doc):
outblocks.append((d, route))
return
clist = [title, *get_components_from_metadata(d)]
graphing_components[category].a... |
comp.__name__ = doc_file
comp.__qualname__ = doc_file
return docpage(set_path=route, t=title2)(comp)
doc_routes = [
library,
custom_components,
overview,
*components_previews_pages,
*apiref_pages,
*cloud_cliref_pages,
# * ai_builder_pages,
*cloud_pages,
]
for cloud_page ... | comp.__module__ = doc_module |
return
d = Document.from_file(doc)
if doc.startswith("docs/library/graphing"):
if should_skip_compile(doc):
outblocks.append((d, route))
return
clist = [title, *get_components_from_metadata(d)]
graphing_components[category].append(clist)
return multi... |
comp.__qualname__ = doc_file
return docpage(set_path=route, t=title2)(comp)
doc_routes = [
library,
custom_components,
overview,
*components_previews_pages,
*apiref_pages,
*cloud_cliref_pages,
# * ai_builder_pages,
*cloud_pages,
]
for cloud_page in cloud_pages:
title = r... | comp.__name__ = doc_file |
from_file(doc)
if doc.startswith("docs/library/graphing"):
if should_skip_compile(doc):
outblocks.append((d, route))
return
clist = [title, *get_components_from_metadata(d)]
graphing_components[category].append(clist)
return multi_docs(path=route, comp=d, com... |
return docpage(set_path=route, t=title2)(comp)
doc_routes = [
library,
custom_components,
overview,
*components_previews_pages,
*apiref_pages,
*cloud_cliref_pages,
# * ai_builder_pages,
*cloud_pages,
]
for cloud_page in cloud_pages:
title = rx.utils.format.to_snake_case(clou... | comp.__qualname__ = doc_file |
kip_compile(doc):
outblocks.append((d, route))
return
clist = [title, *get_components_from_metadata(d)]
graphing_components[category].append(clist)
return multi_docs(path=route, comp=d, component_list=clist, title=title2)
if doc.startswith("docs/library"):
cli... |
for cloud_page in cloud_pages:
title = rx.utils.format.to_snake_case(cloud_page.title)
build_nested_namespace(docs_ns, ["cloud"], title, cloud_page)
for api_route in apiref_pages:
title = rx.utils.format.to_snake_case(api_route.title)
build_nested_namespace(docs_ns, ["api_reference"], title, api_rout... | doc_routes = [
library,
custom_components,
overview,
*components_previews_pages,
*apiref_pages,
*cloud_cliref_pages,
# * ai_builder_pages,
*cloud_pages,
] |
return multi_docs(path=route, comp=d, component_list=clist, title=title2)
if doc.startswith("docs/library"):
clist = [title, *get_components_from_metadata(d)]
component_list[category].append(clist)
if should_skip_compile(doc):
outblocks.append((d, route))
retu... |
for api_route in apiref_pages:
title = rx.utils.format.to_snake_case(api_route.title)
build_nested_namespace(docs_ns, ["api_reference"], title, api_route)
for ref in cloud_cliref_pages:
title = rx.utils.format.to_snake_case(ref.title)
build_nested_namespace(docs_ns, ["cloud"], title, ref)
for doc in... | for cloud_page in cloud_pages:
title = rx.utils.format.to_snake_case(cloud_page.title)
build_nested_namespace(docs_ns, ["cloud"], title, cloud_page) |
e, comp=d, component_list=clist, title=title2)
if doc.startswith("docs/library"):
clist = [title, *get_components_from_metadata(d)]
component_list[category].append(clist)
if should_skip_compile(doc):
outblocks.append((d, route))
return
return multi_docs(path=r... |
build_nested_namespace(docs_ns, ["cloud"], title, cloud_page)
for api_route in apiref_pages:
title = rx.utils.format.to_snake_case(api_route.title)
build_nested_namespace(docs_ns, ["api_reference"], title, api_route)
for ref in cloud_cliref_pages:
title = rx.utils.format.to_snake_case(ref.title)
... | title = rx.utils.format.to_snake_case(cloud_page.title) |
ts_from_metadata(d)]
component_list[category].append(clist)
if should_skip_compile(doc):
outblocks.append((d, route))
return
return multi_docs(path=route, comp=d, component_list=clist, title=title2)
if should_skip_compile(doc):
outblocks.append((d, route))
... |
for ref in cloud_cliref_pages:
title = rx.utils.format.to_snake_case(ref.title)
build_nested_namespace(docs_ns, ["cloud"], title, ref)
for doc in sorted(flexdown_docs):
path = doc.split("/")[1:-1]
title = rx.utils.format.to_snake_case(os.path.basename(doc).replace(".md", ""))
title2 = to_title_c... | for api_route in apiref_pages:
title = rx.utils.format.to_snake_case(api_route.title)
build_nested_namespace(docs_ns, ["api_reference"], title, api_route) |
ent_list[category].append(clist)
if should_skip_compile(doc):
outblocks.append((d, route))
return
return multi_docs(path=route, comp=d, component_list=clist, title=title2)
if should_skip_compile(doc):
outblocks.append((d, route))
return
def comp():
... |
build_nested_namespace(docs_ns, ["api_reference"], title, api_route)
for ref in cloud_cliref_pages:
title = rx.utils.format.to_snake_case(ref.title)
build_nested_namespace(docs_ns, ["cloud"], title, ref)
for doc in sorted(flexdown_docs):
path = doc.split("/")[1:-1]
title = rx.utils.format.to_sna... | title = rx.utils.format.to_snake_case(api_route.title) |
return multi_docs(path=route, comp=d, component_list=clist, title=title2)
if should_skip_compile(doc):
outblocks.append((d, route))
return
def comp():
return (get_toc(d, doc), xd.render(d, doc))
doc_path = Path(doc)
doc_module = ".".join(doc_path.parts[:-1])
doc_f... |
for doc in sorted(flexdown_docs):
path = doc.split("/")[1:-1]
title = rx.utils.format.to_snake_case(os.path.basename(doc).replace(".md", ""))
title2 = to_title_case(title)
route = rx.utils.format.to_kebab_case(f"/{doc.replace('.md', '/')}")
# Handle index files: /folder/index/ -> /folder/
if ... | for ref in cloud_cliref_pages:
title = rx.utils.format.to_snake_case(ref.title)
build_nested_namespace(docs_ns, ["cloud"], title, ref) |
te, comp=d, component_list=clist, title=title2)
if should_skip_compile(doc):
outblocks.append((d, route))
return
def comp():
return (get_toc(d, doc), xd.render(d, doc))
doc_path = Path(doc)
doc_module = ".".join(doc_path.parts[:-1])
doc_file = doc_path.stem
comp.__mod... |
build_nested_namespace(docs_ns, ["cloud"], title, ref)
for doc in sorted(flexdown_docs):
path = doc.split("/")[1:-1]
title = rx.utils.format.to_snake_case(os.path.basename(doc).replace(".md", ""))
title2 = to_title_case(title)
route = rx.utils.format.to_kebab_case(f"/{doc.replace('.md', '/')}")
... | title = rx.utils.format.to_snake_case(ref.title) |
():
return (get_toc(d, doc), xd.render(d, doc))
doc_path = Path(doc)
doc_module = ".".join(doc_path.parts[:-1])
doc_file = doc_path.stem
comp.__module__ = doc_module
comp.__name__ = doc_file
comp.__qualname__ = doc_file
return docpage(set_path=route, t=title2)(comp)
doc_routes =... |
title = rx.utils.format.to_snake_case(os.path.basename(doc).replace(".md", ""))
title2 = to_title_case(title)
route = rx.utils.format.to_kebab_case(f"/{doc.replace('.md', '/')}")
# Handle index files: /folder/index/ -> /folder/
if route.endswith("/index/"):
route = route[:-7] + "/"
co... | path = doc.split("/")[1:-1] |
c), xd.render(d, doc))
doc_path = Path(doc)
doc_module = ".".join(doc_path.parts[:-1])
doc_file = doc_path.stem
comp.__module__ = doc_module
comp.__name__ = doc_file
comp.__qualname__ = doc_file
return docpage(set_path=route, t=title2)(comp)
doc_routes = [
library,
custom_compon... |
title2 = to_title_case(title)
route = rx.utils.format.to_kebab_case(f"/{doc.replace('.md', '/')}")
# Handle index files: /folder/index/ -> /folder/
if route.endswith("/index/"):
route = route[:-7] + "/"
comp = get_component(doc, title)
# # Check if the path starts with '/docs/cloud/',... | title = rx.utils.format.to_snake_case(os.path.basename(doc).replace(".md", "")) |
parts[:-1])
doc_file = doc_path.stem
comp.__module__ = doc_module
comp.__name__ = doc_file
comp.__qualname__ = doc_file
return docpage(set_path=route, t=title2)(comp)
doc_routes = [
library,
custom_components,
overview,
*components_previews_pages,
*apiref_pages,
*cloud_cl... |
route = rx.utils.format.to_kebab_case(f"/{doc.replace('.md', '/')}")
# Handle index files: /folder/index/ -> /folder/
if route.endswith("/index/"):
route = route[:-7] + "/"
comp = get_component(doc, title)
# # Check if the path starts with '/docs/cloud/', and if so, replace 'docs' with an... | title2 = to_title_case(title) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.