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("def ", line) if reached_functions: # We've reached the functions, so stop. break # If we've reached a docstring, clear the comments. 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.search("\\w+:", line) if match is None: # This line doesn't have a var, so continue. continue # Get the prop.
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().startswith("#"), ( f"Expected comment, 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 prop to the output. out.append( { "prop": prop, "description": comment, } ) # Return the output. return out def format_field(field): prop = field["prop"] try: type_ = prop.type_
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_functions: # We've reached the functions, so stop. break # If we've reached a docstring, clear the comments. 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.search("\\w+:", line) if match is None: # This line doesn't have a var, so continue. continue # Get the prop. prop = match.group(0).strip(":")
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 = Source.get_comment(comments) # reset comments comments.clear() # Skip private props. if "PRIVATE" in comment: continue # Add the prop to the output. out.append( { "prop": prop, "description": comment, } ) # Return the output. return out 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) t
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.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.search("\\w+:", line) if match is None: # This line doesn't have a var, so continue. 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
# 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) # reset comments comments.clear() # Skip private props. if "PRIVATE" in comment: continue # Add the prop to the output. out.append( { "prop": prop, "description": comment, } ) # Return the output. return out 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 hasa
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.search("\\w+:", line) if match is None: # This line doesn't have a var, so continue. 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 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.
# reset comments comments.clear() # Skip private props. if "PRIVATE" in comment: continue # Add the prop to the output. out.append( { "prop": prop, "description": comment, } ) # Return the output. return out 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_) 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, fie
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 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) # reset comments comments.clear() # Skip private props. if "PRIVATE" in comment: continue # Add the prop to the output. out.append( { "prop": prop, "description": comment, } ) # Return the output. return out
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( *[ rx.table.column_header_cell( header, class_name=table_header_class_name ) for header in headers ] ) ), rx.table.body( *[ rx.table.row( rx.table.cell( format_field(field), ), rx.table.cell( markdown(field["description"]), class_name="font-small text-slate-11",
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_) if default: type_str += f" = {default}" return rx.code(field["prop"].name, ": ", type_str, class_name="code-style")
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 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 comments.clear() # Skip private props. if "PRIVATE" in comment: continue # Add the prop to the output. out.append( { "prop": prop, "description": comment, } ) # Return the output. return out def format_field(field):
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" = {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( rx.table.root( rx.table.header( rx.table.row( *[ rx.table.column_header_cell( header, class_name=table_header_class_name ) for header in headers ] ) ),
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 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 comments.clear() # Skip private props. if "PRIVATE" in comment: continue # Add the prop to the output. out.append( { "prop": prop, "description": comment, } ) # Return the output. return out def format_field(field): prop = field["prop"] try:
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"].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.header( rx.table.row( *[ rx.table.column_header_cell( header, class_name=table_header_class_name ) for header in headers ] ) ), rx.table.body(
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("#"), ( f"Expected comment, 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 prop to the output. out.append( { "prop": prop, "description": comment, } ) # Return the output. return out def format_field(field): prop = field["prop"] try: type_ = prop.type_ except AttributeError:
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") 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( *[ rx.table.column_header_cell( header, class_name=table_header_class_name ) for header in headers ] ) ), rx.table.body( *[ rx.table.row(
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, 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 prop to the output. out.append( { "prop": prop, "description": comment, } ) # Return the output. return out def format_field(field): prop = field["prop"] try: type_ = prop.type_ except AttributeError: type_ = prop.type
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-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( *[ rx.table.column_header_cell( header, class_name=table_header_class_name ) for header in headers ] ) ), rx.table.body( *[ rx.table.row( rx.table.cell
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]}" ) # 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 prop to the output. out.append( { "prop": prop, "description": comment, } ) # Return the output. return out def format_field(field): prop = field["prop"] try: type_ = prop.type_ except AttributeError: type_ = prop.type default = field["prop"].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-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( *[ rx.table.column_header_cell( header, class_name=table_header_class_name ) for header in headers ] ) ), rx.table.body( *[ rx.table.row( rx.table.cell( format_field(field),
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 = Source.get_comment(comments) # reset comments comments.clear() # Skip private props. if "PRIVATE" in comment: continue # Add the prop to the output. out.append( { "prop": prop, "description": comment, } ) # Return the output. return out 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)
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( rx.table.root( rx.table.header( rx.table.row( *[ rx.table.column_header_cell( header, class_name=table_header_class_name ) for header in headers ] ) ), rx.table.body( *[ rx.table.row( rx.table.cell( format_field(field), ), rx.table.cell(
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 comments.clear() # Skip private props. if "PRIVATE" in comment: continue # Add the prop to the output. out.append( { "prop": prop, "description": comment, } ) # Return the output. return out 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_)
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.header( rx.table.row( *[ rx.table.column_header_cell( header, class_name=table_header_class_name ) for header in headers ] ) ), rx.table.body( *[ rx.table.row( rx.table.cell( format_field(field), ), rx.table.cell( markdown(field["description"]),
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 prop to the output. out.append( { "prop": prop, "description": comment, } ) # Return the output. return out 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_) if default: type_str += f" = {default}" return rx.code(field["prop"].name, ": ", type_str, class_name="code-style")
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_class_name ) for header in headers ] ) ), rx.table.body( *[ rx.table.row( rx.table.cell( format_field(field), ), rx.table.cell( markdown(field["description"]), class_name="font-small text-slate-11", ), ) for field in fields ],
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 ] ) ), rx.table.body( *[ rx.table.row( rx.table.cell( format_field(field), ), rx.table.cell( markdown(field["description"]), class_name="font-small text-slate-11", ), ) for field in fields ], ), ), max_height="35em", ), ) def generate_docs(title: str, s: Source, extra_fields: list[dict] | None = None):
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( h2_comp(text="Class Fields"), format_fields(["Prop", "Description"], class_fields), overflow="auto", ) if class_fields else rx.fragment() ), ( rx.box( h2_comp(text="Fields"), format_fields(["Prop", "Description"], fields), overflow="auto", ) if fields else rx.fragment() ), rx.box( h2_comp(text="Methods"), rx.scroll_area( rx.table.root( rx.table.header( rx.table.row(
fields = s.get_fields()
[ rx.table.column_header_cell( header, class_name=table_header_class_name ) for header in headers ] ) ), rx.table.body( *[ rx.table.row( rx.table.cell( format_field(field), ), rx.table.cell( markdown(field["description"]), class_name="font-small text-slate-11", ), ) for field in fields ], ), ), max_height="35em", ), ) def generate_docs(title: str, s: Source, extra_fields: list[dict] | None = None): fields = s.get_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( h2_comp(text="Class Fields"), format_fields(["Prop", "Description"], class_fields), overflow="auto", ) if class_fields else rx.fragment() ), ( rx.box( h2_comp(text="Fields"), format_fields(["Prop", "Description"], fields), overflow="auto", ) if fields else rx.fragment() ), rx.box( h2_comp(text="Methods"), rx.scroll_area( rx.table.root( rx.table.header( rx.table.row( rx.table.column_header_cell("Signature"),
if extra_fields: fields.extend(extra_fields)
( header, class_name=table_header_class_name ) for header in headers ] ) ), rx.table.body( *[ rx.table.row( rx.table.cell( format_field(field), ), rx.table.cell( markdown(field["description"]), class_name="font-small text-slate-11", ), ) for field in fields ], ), ), max_height="35em", ), ) def generate_docs(title: str, s: Source, extra_fields: list[dict] | None = None): fields = s.get_fields() if extra_fields: fields.extend(extra_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"), format_fields(["Prop", "Description"], class_fields), overflow="auto", ) if class_fields else rx.fragment() ), ( rx.box( h2_comp(text="Fields"), format_fields(["Prop", "Description"], fields), overflow="auto", ) if fields else rx.fragment() ), rx.box( h2_comp(text="Methods"), rx.scroll_area( rx.table.root( rx.table.header( rx.table.row( rx.table.column_header_cell("Signature"), rx.table.column_header_c
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 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_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 not os.environ.get("REFLEX_PERSIST_WEB_DIR", False): return False # Check if the doc has bee
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_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_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 not os.environ.get("REFLEX_PERSIST_WEB_DIR", False): return False # Check if the doc has been compiled already. c
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 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 .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. compiled_output = f".web/pages/{doc
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.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 .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. compiled_output = f".web/pages/{doc.replace('.md', '
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 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 .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. compiled_output = f".web/pages/{doc.replace('.md', '.js')}" # Get th
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 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_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.replace('.md', '.js')}" # Get the timestamp of the compiled file. c
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_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 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.replace('.md', '.js')}" # Get the timestamp of the compiled file. compiled_time = ( os.path.getmtime(compiled_output) if os.p
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 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 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 = ( os.path.getmtime(compiled_output) if os.path.exists(compiled_output) els
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 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 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(compiled_output) else 0 ) # Get the timestamp of the source fi
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 multi_docs
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_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): 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(compiled_output) else 0 ) # Get the timestamp of the source file. source_time = os.path.getmtime(doc) return compiled_tim
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 multi_docs from pcweb.pages.library_previews import components_previews_pages
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 .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. 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. source_time = os.path.getmtime(doc) return compiled_time > source_time def to_title
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 multi_docs from pcweb.pages.library_previews import components_previews_pages from pcweb.route import Route
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_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.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. source_time = os.path.getmtime(doc) return compiled_time > source_time def to_title_case(text: str) -> str: return " ".join(word.cap
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 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 .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 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.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. 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_n
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 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 .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 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 = ( 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: return " ".join(word.capitalize() for word in text.split("_")) def build_nested_namespace( parent_namespace: Simp
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 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_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 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(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: return " ".join(word.capitalize() for word in text.split("_")) def build_nested_namespace( parent_namespace: SimpleNamespace, path: list, title: str, com
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 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 as cloud_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 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(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: 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(pat
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 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 as cloud_pages from .cloud_cliref import pages as cloud_cliref_pages
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 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. 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.to_snake_case(path[0]) if ( isinstance(parent_namespa
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 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 as cloud_pages from .cloud_cliref import pages as cloud_cliref_pages from .custom_components import custom_components
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. 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. 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.to_snake_case(path[0]) if ( isinstance(parent_namespace, SimpleNamespace)
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 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 as cloud_pages from .cloud_cliref import pages as cloud_cliref_pages from .custom_components import custom_components from .library import library
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.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. 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.to_snake_case(path[0]) if ( isinstance(parent_namespace, SimpleNamespace) and getattr(parent_namespace, namespace
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 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 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 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, 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, title, comp) else: setattr( parent_namespace, 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.get("components", []):
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.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. source_time = os.path.getmtime(doc) return compiled_time > source_time
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 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 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 modified since the last compilation."""
# 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. 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.to_snake_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(nested_namespace, title, comp) else:
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_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_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 not os.environ.get("REFLEX_PERSIST_WEB_DIR", False): return False # Check if the doc has been compiled already.
# 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: 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, namespace, None) is None ): setattr(parent_namespace, namespace, SimpleNamespace()) nested_namespace = getattr(parent_namespace, namespace) if len(path) == 1: setattr(nested_namespace, title, comp) else: setattr( parent_namespace, namespace, build_nested_namespace(
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 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_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.replace('.md', '.js')}" # Get the timestamp of the compiled file.
# 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: 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()) 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:], title, comp, ), ) return parent_namespace def get_
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_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 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(compiled_output) else 0 ) # Get the timestamp of the source file.
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 ( 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, title, comp) else: setattr( parent_namespace, 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 curr
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 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 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. source_time = os.path.getmtime(doc) return compiled_time > source_time
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, namespace, SimpleNamespace()) 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:], 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): components.append(
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): """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.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. 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 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__"): 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}") 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 exec and demo blocks in the document.""" source = doc.cont
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, namespace, SimpleNamespace()) 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:], title, comp, ), ) return 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 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(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: return " ".join(word.capitalize() for word in text.split("_")) def build_nested_namespace( parent_namespace: SimpleNamespace, path: list, title: str, comp ):
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, title, comp) else: setattr( parent_namespace, 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.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(co
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): 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(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: 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])
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:], 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): 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.append((component.__call__.__self__, comp_str)) else: raise ValueError(f"Invali
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 = ( 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: 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, namespace, None) is None ): setattr(parent_namespace, namespace, SimpleNamespace())
if len(path) == 1: setattr(nested_namespace, title, comp) else: setattr( parent_namespace, 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.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, SimpleNamespace) and hasattr(component, "__call__"): # noqa: B004 components.append((component.__call__.__self__, comp_str)) else: raise ValueError(f"Invalid component: {component}") return components flexdown_
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(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: 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, namespace, None) is None ): setattr(parent_namespace, namespace, SimpleNamespace()) nested_namespace = getattr(parent_namespace, namespace)
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(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"Invalid component: {component}") 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 exec and demo blocks in the docume
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, 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()) 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:], title, comp, ), ) return parent_namespace
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 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__.__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 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"
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__"): 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}") return components
. 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.to_snake_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(nested_namespace, title, comp) else: setattr( parent_namespace, namespace, build_nested_namespace( nested_namespace, path[1:], title, comp, ), ) return parent_namespace def get_components_from_metadata(current_doc):
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(component, SimpleNamespace) and hasattr(component, "__call__"): # noqa: B004 components.append((component.__call__.__self__, comp_str)) else: raise ValueError(f"Invalid component: {component}") 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 exec and demo blocks in the document.""" source = doc.content env = doc.metadata.copy() env["__xd"] = xd env["__exe
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]) 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, title, comp) else: setattr( parent_namespace, namespace, build_nested_namespace( nested_namespace, path[1:], title, comp, ), ) return parent_namespace def get_components_from_metadata(current_doc): components = []
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 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__.__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 Components Overview", "docs/custom-components/command-reference.md": "Custom Component CLI Reference", "docs/api-routes/overview.md": "API Routes Overview", "docs/clie
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(component, SimpleNamespace) and hasattr(component, "__call__"): # noqa: B004 components.append((component.__call__.__self__, comp_str)) else: raise ValueError(f"Invalid component: {component}")
_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) 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, title, comp) else: setattr( parent_namespace, 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.get("components", []):
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.append((component.__call__.__self__, comp_str)) else: raise ValueError(f"Invalid component: {component}") 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 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. blo
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, namespace, None) is None ): setattr(parent_namespace, namespace, SimpleNamespace()) 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:], 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)
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 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__.__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 Components Overview", "docs/custom-components/command-reference.md": "Custom Component CLI Reference", "docs/api-routes/overview.md": "API Routes Overview", "docs/clie
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.append((component.__call__.__self__, comp_str)) else: raise ValueError(f"Invalid component: {component}")
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()) 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:], 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): components.append((component, comp_str))
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 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__.__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 Components Overview", "docs/custom-components/command-reference.md": "Custom Component CLI Reference", "docs/api-routes/overview.md": "API Routes Overview", "docs/clie
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"Invalid component: {component}")
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(nested_namespace, title, comp) else: setattr( parent_namespace, 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.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))
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 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__.__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 Components Overview", "docs/custom-components/command-reference.md": "Custom Component CLI Reference", "docs/api-routes/overview.md": "API Routes Overview", "docs/clie
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, ), ) 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(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"Invalid component: {component}") return components
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"] = 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": "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": "Client Storage Overview", "docs/state_structure/overview.md": "State Structure Overview", "docs/s
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 = [] 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(component, SimpleNamespace) and hasattr(component, "__call__"): # noqa: B004 components.append((component.__call__.__self__, comp_str)) else: raise ValueError(f"Invalid component: {component}") return components flexdown_docs = [ str(doc).replace("\\", "/") for doc in flexdown.utils.get_flexdown_files("docs/") ]
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(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", "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": "Client Storage Overview", "docs/state_structure/overview.md": "State Structure Overview", "docs/state/overview.md": "State Overview",
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.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, SimpleNamespace) and hasattr(component, "__call__"): # noqa: B004 components.append((component.__call__.__self__, comp_str)) else: raise ValueError(f"Invalid component: {component}") return components flexdown_docs = [ str(doc).replace("\\", "/") for doc in flexdown.utils.get_flexdown_files("docs/") ] graphing_components = 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(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", "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": "Client Storage Overview", "docs/state_structure/overview.md": "State Structure Overview", "docs/state/overview.md": "State Overview", "docs/styling/overview.md": "Stylin
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", []): 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, SimpleNamespace) and hasattr(component, "__call__"): # noqa: B004 components.append((component.__call__.__self__, comp_str)) else: raise ValueError(f"Invalid component: {component}") return components flexdown_docs = [ str(doc).replace("\\", "/") for doc in flexdown.utils.get_flexdown_files("docs/") ] graphing_components = defaultdict(list) component_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 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 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/overview.md": "State Overview", "docs/styling/overview.md": "Styling Overview", "docs/ui/overvie
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 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.append((component.__call__.__self__, comp_str)) else: raise ValueError(f"Invalid component: {component}") 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)
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__.__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 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/overview.md": "State Overview", "docs/styling/overview.md": "Styling Overview", "docs/ui/overview.md": "UI Overview", "d
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): 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.append((component.__call__.__self__, comp_str)) else: raise ValueError(f"Invalid component: {component}") 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()
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/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": "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/recipes/content/grid.md": "Grid Recipe", } def get_component(doc: str, title: str): if doc.endswith("-sty
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__.__name__ in ["ExecBlock", "DemoBlock"]] for block in blocks: block.render(env)
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__"): 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}") 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 exec and demo blocks in the document."""
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 = [] 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/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": "Wrapping React Overview", "docs/library/html/html.md": "HTML Elements", "
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__"): 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}") 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 exec and demo blocks in the document.""" source = doc.content
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/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": "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": "Wrapping React Overview", "docs/library/html/html.md": "HTML Elements", "docs/recipes-overview.md": "Re
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__, 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}") 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 exec and demo blocks in the document.""" source = doc.content env = doc.metadata.copy()
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": "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": "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": "Wrapping React Overview", "docs/library/html/html.md": "HTML Elements", "docs/recipes-overview.md": "Recipes Overview",
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)) elif isinstance(component, SimpleNamespace) and hasattr(component, "__call__"): # noqa: B004 components.append((component.__call__.__self__, comp_str)) else: raise ValueError(f"Invalid component: {component}") 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 exec and demo blocks in the document.""" source = doc.content env = doc.metadata.copy() env["__xd"] = xd
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", "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": "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": "Wrapping React Overview", "docs/library/html/html.md": "HTML Elements", "docs/recipes-overview.md": "Recipes Overview", "docs/events/special_even
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, SimpleNamespace) and hasattr(component, "__call__"): # noqa: B004 components.append((component.__call__.__self__, comp_str)) else: raise ValueError(f"Invalid component: {component}") 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 exec and demo blocks in the document.""" source = doc.content env = doc.metadata.copy() env["__xd"] = xd env["__exec"] = True
# 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 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/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": "Recipes Overview", "docs/events/special_events.md": "Special Events Docs", "docs/
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 components.append((component.__call__.__self__, comp_str)) else: raise ValueError(f"Invalid component: {component}") 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 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.
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/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", "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/recipes/content/grid.md": "Grid Recipe", } def get_compone
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: raise ValueError(f"Invalid component: {component}") 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 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__.__name__ in ["ExecBlock", "DemoBlock"]]
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/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": "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/recipes/content/grid.md": "Grid Recipe", } def get_component(doc: str, title: str): if doc.endswith("-sty
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}") 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 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__.__name__ in ["ExecBlock", "DemoBlock"]] for block in blocks: block.render(env)
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/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": "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/recipes/content/grid.md": "Grid Recipe", } def get_component(doc: str, title: str): if doc.endswith("-style.md"):
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 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", "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/recipes/content/grid.md": "Grid Recipe", } def get_component(doc: str, title: str):
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 = 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): 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"): clist = [title, *get_components_from_metadata(d)] component_lis
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": "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": "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/recipes/content/grid.md": "Grid Recipe", } def get_component(doc: str, title: str): if doc.endswith("-style.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 = 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): 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"): clist = [title, *get_components_from_metadata(d)] component_list[category].append(clist) if should_ski
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 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": "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.endswith("-ll.md"): return # Get the docpage component.
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.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 = [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[category].append(clist) if should_skip_compile(doc): outblocks.append((d, route))
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/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": "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.endswith("-ll.md"): return # Get the docpage component. doc = doc.replace("\\", "/")
# 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): 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_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)) return return multi_docs(path=route, comp=d, component_list=cli
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", "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/recipes/content/grid.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 files: /folder/index/ -> /folder/
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): 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"): 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) if should_skip_compile(doc): outblocks.append((d, route)) return def comp():
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": "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/recipes/content/grid.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 files: /folder/index/ -> /folder/ if route.endswith("/index/"):
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): 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"): 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) if should_skip_compile(doc): outblocks.append((d, route)) return def comp():
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": "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.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 = manual_titles[doc] if doc in manual_titles else to_title_case(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)] 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): 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(): return (get_toc(d, doc), xd.render(d, doc)) doc_path = Path(doc) doc_module = ".".join(doc_path.parts[:-1]) doc_file = doc
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 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.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 = manual_titles[doc] if doc in manual_titles else to_title_case(title) category = os.path.basename(os.path.dirname(doc)).title()
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=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)) 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(): 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.__nam
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": "Graphing Tooltip", "docs/recipes/content/grid.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 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): return
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, 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=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_file = doc_path.stem comp.__module__ = doc_module comp.__name__ = doc_file comp.__qualnam
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/recipes/content/grid.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 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): return d = Document.from_file(doc)
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) 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 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 = rx.utils.format.to_snake_case(cloud_pa
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, title=title2)
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_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 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): return d = Document.from_file(doc) if doc.startswith("docs/library/graphing"):
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[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(): 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 = [ library, custom_components, overview, *compone
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.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 = 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): outblocks.append((d, route)) return
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): 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(): 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 = [ library, custom_components, overview, *components_previews_pages, *apiref_pages, *cloud_cliref_p
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 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): 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_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_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, # * ai_builder_pages, *cloud_pages, ] 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_route) for ref in cloud_cliref_pages: title = rx.utils.format.to_snake_case(ref.title
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 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.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, component_list=clist, title=title2) if doc.startswith("docs/library"):
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 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) 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(cloud_page.title) build_nested_namespace(docs_ns, ["cloud"], title, cloud_page) for api_route in api
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 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): 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"): clist = [title, *get_components_from_metadata(d)] component_list[category].append(clist)
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_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, # * ai_builder_pages, *cloud_pages, ] 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_route)
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.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, 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=route, comp=d, component_list=clist, title=title2)
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) 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(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_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(flexdo
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_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"): 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) if should_skip_compile(doc): outblocks.append((d, route)) return
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, *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(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_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.forma
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)) 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"): 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) if should_skip_compile(doc): outblocks.append((d, route)) return def comp(): return (get_toc(d, doc), xd.render(d, 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, *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(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_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.ba
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 = [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[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(): return (get_toc(d, doc), xd.render(d, doc)) doc_path = Path(doc)
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, # * ai_builder_pages, *cloud_pages, ] 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_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
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)] 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): 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(): return (get_toc(d, doc), xd.render(d, doc)) doc_path = Path(doc) doc_module = ".".join(doc_path.parts[:-1])
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, *cloud_pages, ] 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_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_case(title) route
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].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): 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(): 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.__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 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_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_case(title) route = rx.utils.format.to_kebab_case(f"
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_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)) 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(): 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.__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 = 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_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_case(title) route = rx.utils.format.to_kebab_case(f"/{doc.replace('.md', '/')}")
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, 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=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_file = doc_path.stem comp.__module__ = doc_module comp.__name__ = 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 = 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_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_case(title) route = rx.utils.format.to_kebab_case(f"/{doc.replace('.md', '/')}") # Handle index files: /folder
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"): 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) 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 comp.__qualname__ = doc_file return docpage(set_path=route, t=title2)(comp)
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_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_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/', and if so, replace 'docs' with an empty string # if route
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)) 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(): 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 = [ library, custom_components, overview, *components_previews_pages, *apiref_pages, *cloud_cliref_pages, # * ai_builder_pages, *cloud_pages, ]
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 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 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 empty string # if route.startswith("/docs/cloud/"): # route = route.replace("/docs", "") if path[0] == "library" and isinstance(library, Route): locals()["libra
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=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_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, # * ai_builder_pages, *cloud_pages, ] for cloud_page in cloud_pages:
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) 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', '/')}") # 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 empty string # if route.startswith("/docs/cloud/"): # route = route.replace("/docs", "") if path[0] ==
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)) 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 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 = rx.utils.format.to_snake_case(cloud_page.title) build_nested_namespace(docs_ns, ["cloud"], title, cloud_page)
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_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/', and if so, replace 'docs' with an empty string # if route.startswith("/docs/cloud/"): # route = route.replace("/docs", "") if path[0] == "library" and isinstance(library, Route): locals()["library_"] = library # print(route) # Add the component to the nested namespaces. build_nested_namespace( docs_ns, path, title, Route(path=route, t
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(): 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 = [ 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(cloud_page.title) build_nested_namespace(docs_ns, ["cloud"], title, cloud_page) for api_route in apiref_pages:
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_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] + "/" comp = get_component(doc, title) # # Check if the path starts with '/docs/cloud/', and if so, replace 'docs' with an empty string # if route.startswith("/docs/cloud/"): # route = route.replace("/docs", "") if path[0] == "library" and isinstance(library, Route): locals()["library_"] = library # print(route) # Add the component to the nested namespaces.
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_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, # * ai_builder_pages, *cloud_pages, ] 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_route)
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 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 empty string # if route.startswith("/docs/cloud/"): # route = route.replace("/docs", "") if path[0] == "library" and isinstance(library, Route): locals()["library_"] = library # print(route) # Add the component to the nested namespaces. build_nested_namespace( docs_ns, path, title, Route(path=route, title=title2, component=lambda: "") ) if comp is not None: if isinstance(comp, tuple): doc_routes.extend(comp)
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.__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, *cloud_pages, ] 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_route) for ref in cloud_cliref_pages:
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', '/')}") # 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 empty string # if route.startswith("/docs/cloud/"): # route = route.replace("/docs", "") if path[0] == "library" and isinstance(library, Route): locals()["library_"] = library # print(route) # Add the component to the nested namespaces. build_nested_namespace( docs_ns, path, title, Route(path=route, title=title2, component=lambda: "") ) if comp is not None: if isinsta
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 = [ 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(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_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):
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] + "/" comp = get_component(doc, title) # # Check if the path starts with '/docs/cloud/', and if so, replace 'docs' with an empty string # if route.startswith("/docs/cloud/"): # route = route.replace("/docs", "") if path[0] == "library" and isinstance(library, Route): locals()["library_"] = library # print(route) # Add the component to the nested namespaces. build_nested_namespace( docs_ns, path, title, Route(path=route, title=title2, component=lambda: "") ) if comp is not None: if isinstance(comp, tuple): doc_routes.extend(comp) else: doc_routes.append(comp) for doc in flexdown_
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_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(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_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]
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/', and if so, replace 'docs' with an empty string # if route.startswith("/docs/cloud/"): # route = route.replace("/docs", "") if path[0] == "library" and isinstance(library, Route): locals()["library_"] = library # print(route) # Add the component to the nested namespaces. build_nested_namespace( docs_ns, path, title, Route(path=route, title=title2, component=lambda: "") ) if comp is not None: if isinstance(comp, tuple): doc_routes.extend(comp) else: doc_routes.append(comp) for doc in flexdown_docs: if "recipes" in doc: category = doc.split("/")[2] recipes_l
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_cliref_pages, # * ai_builder_pages, *cloud_pages, ] 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_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", ""))
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 empty string # if route.startswith("/docs/cloud/"): # route = route.replace("/docs", "") if path[0] == "library" and isinstance(library, Route): locals()["library_"] = library # print(route) # Add the component to the nested namespaces. build_nested_namespace( docs_ns, path, title, Route(path=route, title=title2, component=lambda: "") ) if comp is not None: if isinstance(comp, tuple): doc_routes.extend(comp) else: doc_routes.append(comp) for doc in flexdown_docs: if "recipes" in doc: category = doc.split("/")[2] recipes_list[category].append(doc) for nam
title2 = to_title_case(title)