Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Nov 11, 2024
0 parents commit b885bf3
Show file tree
Hide file tree
Showing 2,286 changed files with 1,449,100 additions and 0 deletions.
Empty file added .nojekyll
Empty file.
1,611 changes: 1,611 additions & 0 deletions FAQ.html

Large diffs are not rendered by default.

59 changes: 59 additions & 0 deletions PyodideServiceWorker.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
const appName = 'Panel'
const appCacheName = 'Panel-1.5.4a2';

const preCacheFiles = [];

const cachePatterns = ['https://cdn.holoviz.org/panel/1.5.4-a.2/dist/', 'https://cdn.bokeh.org/bokeh/', 'https://cdn.jsdelivr.net/pyodide/', 'https://files.pythonhosted.org/packages/', 'https://pypi.org/pypi/'];

self.addEventListener('install', (e) => {
console.log('[Service Worker] Install');
self.skipWaiting();
e.waitUntil((async () => {
const cacheNames = await caches.keys();
for (const cacheName of cacheNames) {
if (cacheName.startsWith(appName) && cacheName !== appCacheName) {
console.log(`[Service Worker] Delete old cache ${cacheName}`);
caches.delete(cacheName);
}
}
const cache = await caches.open(appCacheName);
if (preCacheFiles.length) {
console.log('[Service Worker] Precaching ');
}
preCacheFiles.forEach(async (cacheFile) => {
const request = new Request(cacheFile);
const response = await fetch(request);
if (response.ok || response.type == 'opaque') {
cache.put(request, response);
}
})
})());
});

self.addEventListener('activate', (event) => {
console.log('[Service Worker] Activating');
return self.clients.claim();
});

self.addEventListener('fetch', (e) => {
if (e.request.method !== 'GET') {
return
}
e.respondWith((async () => {
const cache = await caches.open(appCacheName);
let response = await cache.match(e.request);
console.log(`[Service Worker] Fetching resource: ${e.request.url}`);
if (response) {
return response;
}
response = await fetch(e.request);
if (!response.ok && !(response.type == 'opaque')) {
throw Error(`[Service Worker] Fetching resource ${e.request.url} failed with response: ${response.status}`);
}
console.log(`[Service Worker] Caching new resource: ${e.request.url}`);
if (e.request.mode !== 'no-cors') {
cache.put(e.request, response.clone());
}
return response;
})());
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
{
"Panel App": {
"prefix": "import panel",
"body": [
"import panel as pn",
"",
"pn.extension(sizing_mode=\"stretch_width\")",
"",
"TEXT = \"Panel\"",
"",
"length = pn.widgets.IntSlider(value=len(TEXT), end=len(TEXT), name=\"length\")",
"",
"def text(value):",
" return TEXT[:value]",
"",
"layout = pn.Column(length, pn.bind(text, length))",
"",
"pn.template.FastListTemplate(site=\"Panel\", title=\"App\", sidebar=[length], main=[layout]).servable()"
]
},
"Panel ReactiveHTML component": {
"prefix": [
"import panel",
"from panel.reactive"
],
"body": [
"import panel as pn",
"import param",
"from panel.reactive import ReactiveHTML",
"",
"pn.extension()",
"",
"",
"class CustomComponent(ReactiveHTML):",
" index = param.Integer(default=0)",
"",
" _template = '<img id=\"slideshow\" src=\"https://picsum.photos/800/300?image=${index}\" onclick=\"${_img_click}\"></img>'",
"",
" def _img_click(self, event):",
" self.index += 1",
"",
"CustomComponent(width=500, height=200).servable()"
]
},
"Panel Viewer component": {
"prefix": [
"import panel",
"from panel.viewable"
],
"body": [
"import param",
"import panel as pn",
"",
"from panel.viewable import Viewer",
"",
"class CustomComponent(Viewer):",
"",
" value = param.Parameter()",
"",
" def __init__(self, **params):",
" super().__init__(**params)",
" self._layout = None",
" ",
"",
" def __panel__(self):",
" if not self._layout:",
" self._layout = self._get_layout()",
" ",
" return self._layout",
"",
" def _get_layout(self):",
" return pn.Column(\"# Custom Component\", self.param.value)",
"",
"if pn.state.served:",
" pn.extension(sizing_mode=\"stretch_width\")",
" ",
" pn.Column(",
" CustomComponent",
" ).servable()"
]
}
}
Binary file added _images/Accordion.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/Alert.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/AnyWidgetComponent.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/ArrayInput.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/Audio.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/AutocompleteInput.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/Bokeh.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/BooleanStatus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/Bootstrap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/Button.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/ButtonIcon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/Card.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/ChatAreaInput.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/ChatFeed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/ChatInterface.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/ChatMessage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/ChatStep.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/CheckBoxGroup.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/CheckButtonGroup.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/Checkbox.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/CodeEditor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/ColorMap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/ColorPicker.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/Column.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/CrossSelector.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/DataFrame.png
Binary file added _images/DataFrame1.png
Binary file added _images/DatePicker.png
Binary file added _images/DateRangePicker.png
Binary file added _images/DateRangeSlider.png
Binary file added _images/DateSlider.png
Binary file added _images/DatetimeInput.png
Binary file added _images/DatetimePicker.png
Binary file added _images/DatetimeRangeInput.png
Binary file added _images/DatetimeRangePicker.png
Binary file added _images/DatetimeRangeSlider.png
Binary file added _images/Debugger.png
Binary file added _images/DeckGL.png
Binary file added _images/Dial.png
Binary file added _images/DiscretePlayer.png
Binary file added _images/DiscreteSlider.png
Binary file added _images/Divider.png
Binary file added _images/ECharts.png
Binary file added _images/EditableFloatSlider.png
Binary file added _images/EditableIntSlider.png
Binary file added _images/EditableRangeSlider.png
Binary file added _images/EditableTemplate.png
Binary file added _images/FastGridTemplate.png
Binary file added _images/FastListTemplate.png
Binary file added _images/Feed.png
Binary file added _images/FileDownload.png
Binary file added _images/FileDropper.png
Binary file added _images/FileInput.png
Binary file added _images/FileSelector.png
Binary file added _images/FlexBox.png
Binary file added _images/FloatInput.png
Binary file added _images/FloatPanel.png
Binary file added _images/FloatSlider.png
Binary file added _images/Folium.png
Binary file added _images/GIF.png
Binary file added _images/Gauge.png
Binary file added _images/GoldenLayout.png
Binary file added _images/GridBox.png
Binary file added _images/GridSpec.png
Binary file added _images/GridStack.png
Binary file added _images/HTML.png
Binary file added _images/HoloViews.png
Binary file added _images/IPyWidget.png
Binary file added _images/Image.png
Binary file added _images/IntInput.png
Binary file added _images/IntRangeSlider.png
Binary file added _images/IntSlider.png
Binary file added _images/JPG.png
Binary file added _images/JSComponent.png
Binary file added _images/JSON.png
Binary file added _images/JSONEditor.png
Binary file added _images/LaTeX.png
Binary file added _images/LinearGauge.png
Binary file added _images/LiteralInput.png
Binary file added _images/LoadingSpinner.png
Binary file added _images/Markdown.png
Binary file added _images/Material.png
Binary file added _images/Matplotlib.png
Binary file added _images/MenuButton.png
Binary file added _images/MultiChoice.png
Binary file added _images/MultiSelect.png
Binary file added _images/NestedSelect.png
Binary file added _images/Notifications.png
Binary file added _images/Number.png
Binary file added _images/PDF.png
Binary file added _images/PNG.png
Binary file added _images/PanelCallbackHandler.png
Binary file added _images/Param.png
Binary file added _images/PasswordInput.png
Binary file added _images/Perspective.png
Binary file added _images/Placeholder.png
Binary file added _images/Player.png
Binary file added _images/Plotly.png
Binary file added _images/Progress.png
Binary file added _images/PyComponent.png
Binary file added _images/RadioBoxGroup.png
Binary file added _images/RadioButtonGroup.png
Binary file added _images/RangeSlider.png
Binary file added _images/React.png
Binary file added _images/ReactComponent.png
Binary file added _images/ReactiveExpr.png
Binary file added _images/Reacton.png
Binary file added _images/Row.png
Binary file added _images/SVG.png
Binary file added _images/Select.png
Binary file added _images/Slides.png
Binary file added _images/SpeechToText.png
Binary file added _images/StaticText.png
Binary file added _images/Str.png
Binary file added _images/Streamz.png
Binary file added _images/Swipe.png
Binary file added _images/Switch.png
Binary file added _images/Tabs.png
Binary file added _images/Tabulator.png
Binary file added _images/Terminal.png
Binary file added _images/TextAreaInput.png
Binary file added _images/TextEditor.png
Binary file added _images/TextInput.png
Binary file added _images/TextToSpeech.png
Binary file added _images/Textual.png
Binary file added _images/TimePicker.png
Binary file added _images/Toggle.png
Binary file added _images/ToggleGroup.png
Binary file added _images/ToggleIcon.png
Binary file added _images/TooltipIcon.png
Binary file added _images/Tqdm.png
Binary file added _images/Trend.png
Binary file added _images/VTK.png
Binary file added _images/VTKJS.png
Binary file added _images/VTKVolume.png
Binary file added _images/Vanilla.png
Binary file added _images/Vega.png
Binary file added _images/Video.png
Binary file added _images/VideoStream.png
Binary file added _images/Viewer.png
Binary file added _images/Vizzu.png
Binary file added _images/WebP.png
Binary file added _images/WidgetBox.png
Binary file added _images/align-cards-solution.png
Binary file added _images/altair-logo.png
Binary file added _images/awesome-panel.png
Binary file added _images/aws.png
Binary file added _images/azure.png
Binary file added _images/basic_auth.png
Binary file added _images/basic_auth_invalid.png
Binary file added _images/basic_auth_valid.png
Binary file added _images/binder.png
Binary file added _images/builder_delete.png
Binary file added _images/builder_initial.png
Binary file added _images/builder_rearrange.png
Binary file added _images/builder_reset_layout.png
Binary file added _images/builder_resize.png
Binary file added _images/builder_save_layout.png
Binary file added _images/builder_undo.png
Binary file added _images/callbacks_diagram.png
Binary file added _images/colab-notebook.png
Binary file added _images/custom_template.png
Binary file added _images/dask-dashboard-empty.png
Binary file added _images/develop_editor_breakpoint.png
Binary file added _images/develop_editor_click_me.png
Binary file added _images/develop_editor_hover.png
Binary file added _images/develop_editor_panel_serve_before.png
Binary file added _images/develop_editor_param.png
Binary file added _images/develop_notebook_simple_example.png
Binary file added _images/django.png
Binary file added _images/django_sliders.png
Binary file added _images/echarts-logo.png
Binary file added _images/fastapi.png
Binary file added _images/flask.png
Binary file added _images/gcp.png
Binary file added _images/getting_started_app.png
Binary file added _images/heroku.png
Binary file added _images/hugging_face_spaces_delete.png
Binary file added _images/hugging_face_spaces_duplicate.png
Binary file added _images/hugging_face_spaces_duplicate_form.png
Binary file added _images/hugging_face_spaces_files.png
Binary file added _images/huggingface.png
Binary file added _images/jlabpreview.png
Binary file added _images/join_community_discord.png
Binary file added _images/join_community_discourse.png
Binary file added _images/join_community_github.png
Binary file added _images/join_community_linkedin.png
Binary file added _images/join_community_open_source.png
Binary file added _images/join_community_twitter.png
Binary file added _images/logo_horizontal_dark_theme.png
Binary file added _images/logo_horizontal_light_theme.png
Binary file added _images/logout_template.png
Binary file added _images/markdown_sample.png
Binary file added _images/matplotlib-logo.png
Binary file added _images/notebook_inspect_param_class.png
Binary file added _images/notebook_inspect_param_instance.png
Binary file added _images/notebook_inspect_print.png
Binary file added _images/notebook_inspect_print_1.png
Binary file added _images/notebook_inspect_shift_tab.png
Binary file added _images/notebook_inspect_shift_tab_link.png
Binary file added _images/notebook_intslider_reference_doc.png
Binary file added _images/optional_auth.png
Binary file added _images/panel-chat-examples.png
Binary file added _images/panel-serve-multipage-app.png
Binary file added _images/panel-serve-py-app.png
Binary file added _images/panel-wasm-manual-test.png
Binary file added _images/panel_chat_entry.png
Binary file added _images/panel_dynamic_layout.png
Binary file added _images/panel_echo_bot.png
Binary file added _images/panel_hello_world.png
Binary file added _images/panel_layout_example.png
Binary file added _images/panel_markdown_example.png
Binary file added _images/panel_mpl_example.png
Binary file added _images/panel_widgets_example.png
Binary file added _images/ploomber.png
Binary file added _images/plotly-logo.png
Binary file added _images/pycafe.png
Binary file added _images/pycharm-configure-panel.png
Binary file added _images/pycharm-debug-panel.png
Binary file added _images/pycharm-notebook.png
Binary file added _images/pycharm-run-panel.png
Binary file added _images/pycharm-serve-panel.png
Binary file added _images/pyodide_app_simple.png
Binary file added _images/pyodide_xgboost_app.png
Binary file added _images/reactive-html-dataframe-in-console.png
Binary file added _images/reactive_diagram.png
Binary file added _images/reuse_sessions.png
Binary file added _images/reuse_sessions_example.png
Binary file added _images/sizing_modes.png
Binary file added _images/streamlit_chat_message.png
Binary file added _images/streamlit_dymamic_layout.png
Binary file added _images/streamlit_echo_bot.png
Binary file added _images/streamlit_hello_world.png
Binary file added _images/streamlit_layout_example.png
Binary file added _images/streamlit_mpl_example.png
Binary file added _images/streamlit_widgets_example.png
Binary file added _images/structure_data_store_app.png
Binary file added _images/templates_customized_dark.png
Binary file added _images/templates_customized_default.png
Binary file added _images/templates_hello_world.png
Binary file added _images/templates_hello_world_notebook.png
Binary file added _images/vegalite-logo.png
Binary file added _images/vs_code_simple-browser.png
Binary file added _images/vscode-integrated-debugging.png
Binary file added _images/vscode-no-output-try-again.png
Binary file added _images/vscode-notebook.png
Binary file added _images/vscode-snippets-python.png
Binary file added _images/vscode_preview.png
Binary file added _images/vue_bootstrap_component.png
1 change: 1 addition & 0 deletions _rediraffe_redirected.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"developer_guide/testing": "developer_guide/index", "user_guide/APIs": "explanation/api/index", "user_guide/Pipelines": "how_to/pipeline/index", "user_guide/Templates": "how_to/templates/index", "user_guide/Server_Configuration": "how_to/server/index"}
101 changes: 101 additions & 0 deletions _sphinx_design_static/design-tabs.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
// @ts-check

// Extra JS capability for selected tabs to be synced
// The selection is stored in local storage so that it persists across page loads.

/**
* @type {Record<string, HTMLElement[]>}
*/
let sd_id_to_elements = {};
const storageKeyPrefix = "sphinx-design-tab-id-";

/**
* Create a key for a tab element.
* @param {HTMLElement} el - The tab element.
* @returns {[string, string, string] | null} - The key.
*
*/
function create_key(el) {
let syncId = el.getAttribute("data-sync-id");
let syncGroup = el.getAttribute("data-sync-group");
if (!syncId || !syncGroup) return null;
return [syncGroup, syncId, syncGroup + "--" + syncId];
}

/**
* Initialize the tab selection.
*
*/
function ready() {
// Find all tabs with sync data

/** @type {string[]} */
let groups = [];

document.querySelectorAll(".sd-tab-label").forEach((label) => {
if (label instanceof HTMLElement) {
let data = create_key(label);
if (data) {
let [group, id, key] = data;

// add click event listener
// @ts-ignore
label.onclick = onSDLabelClick;

// store map of key to elements
if (!sd_id_to_elements[key]) {
sd_id_to_elements[key] = [];
}
sd_id_to_elements[key].push(label);

if (groups.indexOf(group) === -1) {
groups.push(group);
// Check if a specific tab has been selected via URL parameter
const tabParam = new URLSearchParams(window.location.search).get(
group
);
if (tabParam) {
console.log(
"sphinx-design: Selecting tab id for group '" +
group +
"' from URL parameter: " +
tabParam
);
window.sessionStorage.setItem(storageKeyPrefix + group, tabParam);
}
}

// Check is a specific tab has been selected previously
let previousId = window.sessionStorage.getItem(
storageKeyPrefix + group
);
if (previousId === id) {
// console.log(
// "sphinx-design: Selecting tab from session storage: " + id
// );
// @ts-ignore
label.previousElementSibling.checked = true;
}
}
}
});
}

/**
* Activate other tabs with the same sync id.
*
* @this {HTMLElement} - The element that was clicked.
*/
function onSDLabelClick() {
let data = create_key(this);
if (!data) return;
let [group, id, key] = data;
for (const label of sd_id_to_elements[key]) {
if (label === this) continue;
// @ts-ignore
label.previousElementSibling.checked = true;
}
window.sessionStorage.setItem(storageKeyPrefix + group, id);
}

document.addEventListener("DOMContentLoaded", ready, false);
1 change: 1 addition & 0 deletions _sphinx_design_static/sphinx-design.min.css

Large diffs are not rendered by default.

Loading

0 comments on commit b885bf3

Please sign in to comment.