@asymmetric-effort/specifyjs 0.2.97 → 0.2.100
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/specifyjs-build.cjs.js +160 -1
- package/dist/specifyjs-build.cjs.js.map +7 -1
- package/dist/specifyjs-build.d.ts +1 -110
- package/dist/specifyjs-build.esm.js +160 -1
- package/dist/specifyjs-build.esm.js.map +7 -1
- package/dist/specifyjs-client.cjs.js +2 -1
- package/dist/specifyjs-client.cjs.js.map +7 -1
- package/dist/specifyjs-client.d.ts +1 -159
- package/dist/specifyjs-client.esm.js +2 -1
- package/dist/specifyjs-client.esm.js.map +7 -1
- package/dist/specifyjs-components.cjs.js +8 -1
- package/dist/specifyjs-components.cjs.js.map +7 -1
- package/dist/specifyjs-components.d.ts +1 -3334
- package/dist/specifyjs-components.esm.js +8 -1
- package/dist/specifyjs-components.esm.js.map +7 -1
- package/dist/specifyjs-dom.cjs.js +2 -1
- package/dist/specifyjs-dom.cjs.js.map +7 -1
- package/dist/specifyjs-dom.d.ts +1 -107
- package/dist/specifyjs-dom.esm.js +2 -1
- package/dist/specifyjs-dom.esm.js.map +7 -1
- package/dist/specifyjs-jsx-dev-runtime.cjs.js +2 -1
- package/dist/specifyjs-jsx-dev-runtime.cjs.js.map +7 -1
- package/dist/specifyjs-jsx-dev-runtime.esm.js +2 -1
- package/dist/specifyjs-jsx-dev-runtime.esm.js.map +7 -1
- package/dist/specifyjs-jsx-runtime.cjs.js +2 -1
- package/dist/specifyjs-jsx-runtime.cjs.js.map +7 -1
- package/dist/specifyjs-jsx-runtime.esm.js +2 -1
- package/dist/specifyjs-jsx-runtime.esm.js.map +7 -1
- package/dist/specifyjs-server.cjs.js +2 -1
- package/dist/specifyjs-server.cjs.js.map +7 -1
- package/dist/specifyjs-server.d.ts +1 -136
- package/dist/specifyjs-server.esm.js +2 -1
- package/dist/specifyjs-server.esm.js.map +7 -1
- package/dist/specifyjs-telemetry.cjs.js +2 -1
- package/dist/specifyjs-telemetry.cjs.js.map +7 -1
- package/dist/specifyjs-telemetry.d.ts +1 -165
- package/dist/specifyjs-telemetry.esm.js +2 -1
- package/dist/specifyjs-telemetry.esm.js.map +7 -1
- package/dist/specifyjs.cjs.js +2 -1
- package/dist/specifyjs.cjs.js.map +7 -1
- package/dist/specifyjs.d.ts +1 -581
- package/dist/specifyjs.esm.js +2 -1
- package/dist/specifyjs.esm.js.map +7 -1
- package/dist/types/build/index.d.ts +5 -0
- package/dist/types/build/index.d.ts.map +1 -0
- package/dist/types/build/noscript-plugin.d.ts +63 -0
- package/dist/types/build/noscript-plugin.d.ts.map +1 -0
- package/dist/types/build/seo-plugin.d.ts +43 -0
- package/dist/types/build/seo-plugin.d.ts.map +1 -0
- package/dist/types/client/graphql.d.ts +64 -0
- package/dist/types/client/graphql.d.ts.map +1 -0
- package/dist/types/client/index.d.ts +4 -0
- package/dist/types/client/index.d.ts.map +1 -0
- package/dist/types/client/protobuf.d.ts +40 -0
- package/dist/types/client/protobuf.d.ts.map +1 -0
- package/dist/types/client/rest.d.ts +61 -0
- package/dist/types/client/rest.d.ts.map +1 -0
- package/dist/types/components/ad/adsense/src/AdSense.d.ts +19 -0
- package/dist/types/components/ad/adsense/src/index.d.ts +2 -0
- package/dist/types/components/analytics/google-analytics/src/GoogleAnalytics.d.ts +13 -0
- package/dist/types/components/analytics/google-analytics/src/index.d.ts +2 -0
- package/dist/types/components/component.d.ts +39 -0
- package/dist/types/components/component.d.ts.map +1 -0
- package/dist/types/components/data/analog-clock/src/AnalogClock.d.ts +17 -0
- package/dist/types/components/data/analog-clock/src/index.d.ts +2 -0
- package/dist/types/components/data/avatar/src/Avatar.d.ts +19 -0
- package/dist/types/components/data/avatar/src/index.d.ts +2 -0
- package/dist/types/components/data/badge/src/Badge.d.ts +17 -0
- package/dist/types/components/data/badge/src/index.d.ts +2 -0
- package/dist/types/components/data/data-grid/src/DataGrid.d.ts +47 -0
- package/dist/types/components/data/data-grid/src/index.d.ts +2 -0
- package/dist/types/components/data/digital-clock/src/DigitalClock.d.ts +15 -0
- package/dist/types/components/data/digital-clock/src/index.d.ts +2 -0
- package/dist/types/components/data/list-view/src/ListView.d.ts +23 -0
- package/dist/types/components/data/list-view/src/index.d.ts +2 -0
- package/dist/types/components/data/tag/src/Tag.d.ts +21 -0
- package/dist/types/components/data/tag/src/index.d.ts +2 -0
- package/dist/types/components/data/virtual-scroll/src/VirtualScroll.d.ts +13 -0
- package/dist/types/components/data/virtual-scroll/src/index.d.ts +2 -0
- package/dist/types/components/error-boundary.d.ts +23 -0
- package/dist/types/components/error-boundary.d.ts.map +1 -0
- package/dist/types/components/errors/_shared/src/HttpErrorPage.d.ts +15 -0
- package/dist/types/components/errors/_shared/src/index.d.ts +2 -0
- package/dist/types/components/errors/http-400/src/Http400.d.ts +9 -0
- package/dist/types/components/errors/http-400/src/index.d.ts +2 -0
- package/dist/types/components/errors/http-401/src/Http401.d.ts +9 -0
- package/dist/types/components/errors/http-401/src/index.d.ts +2 -0
- package/dist/types/components/errors/http-403/src/Http403.d.ts +9 -0
- package/dist/types/components/errors/http-403/src/index.d.ts +2 -0
- package/dist/types/components/errors/http-404/src/Http404.d.ts +9 -0
- package/dist/types/components/errors/http-404/src/index.d.ts +2 -0
- package/dist/types/components/errors/http-405/src/Http405.d.ts +9 -0
- package/dist/types/components/errors/http-405/src/index.d.ts +2 -0
- package/dist/types/components/errors/http-408/src/Http408.d.ts +9 -0
- package/dist/types/components/errors/http-408/src/index.d.ts +2 -0
- package/dist/types/components/errors/http-429/src/Http429.d.ts +9 -0
- package/dist/types/components/errors/http-429/src/index.d.ts +2 -0
- package/dist/types/components/errors/http-500/src/Http500.d.ts +9 -0
- package/dist/types/components/errors/http-500/src/index.d.ts +2 -0
- package/dist/types/components/errors/http-502/src/Http502.d.ts +9 -0
- package/dist/types/components/errors/http-502/src/index.d.ts +2 -0
- package/dist/types/components/errors/http-503/src/Http503.d.ts +9 -0
- package/dist/types/components/errors/http-503/src/index.d.ts +2 -0
- package/dist/types/components/errors/http-504/src/Http504.d.ts +9 -0
- package/dist/types/components/errors/http-504/src/index.d.ts +2 -0
- package/dist/types/components/feedback/alert/src/Alert.d.ts +25 -0
- package/dist/types/components/feedback/alert/src/index.d.ts +2 -0
- package/dist/types/components/feedback/empty-state/src/EmptyState.d.ts +17 -0
- package/dist/types/components/feedback/empty-state/src/index.d.ts +2 -0
- package/dist/types/components/feedback/progress-bar/src/ProgressBar.d.ts +23 -0
- package/dist/types/components/feedback/progress-bar/src/index.d.ts +2 -0
- package/dist/types/components/feedback/skeleton/src/Skeleton.d.ts +15 -0
- package/dist/types/components/feedback/skeleton/src/index.d.ts +2 -0
- package/dist/types/components/feedback/spinner/src/Spinner.d.ts +13 -0
- package/dist/types/components/feedback/spinner/src/index.d.ts +2 -0
- package/dist/types/components/form/button/src/Button.d.ts +25 -0
- package/dist/types/components/form/button/src/index.d.ts +2 -0
- package/dist/types/components/form/checkbox/src/Checkbox.d.ts +19 -0
- package/dist/types/components/form/checkbox/src/index.d.ts +2 -0
- package/dist/types/components/form/color-picker/src/ColorPicker.d.ts +19 -0
- package/dist/types/components/form/color-picker/src/index.d.ts +2 -0
- package/dist/types/components/form/color-wheel/src/ColorWheel.d.ts +17 -0
- package/dist/types/components/form/color-wheel/src/index.d.ts +2 -0
- package/dist/types/components/form/datepicker/src/DatePicker.d.ts +23 -0
- package/dist/types/components/form/datepicker/src/index.d.ts +2 -0
- package/dist/types/components/form/file-upload/src/FileUpload.d.ts +19 -0
- package/dist/types/components/form/file-upload/src/index.d.ts +2 -0
- package/dist/types/components/form/multiline/src/MultilineField.d.ts +41 -0
- package/dist/types/components/form/multiline/src/index.d.ts +2 -0
- package/dist/types/components/form/number-spinner/src/NumberSpinner.d.ts +25 -0
- package/dist/types/components/form/number-spinner/src/index.d.ts +2 -0
- package/dist/types/components/form/radio/src/RadioGroup.d.ts +26 -0
- package/dist/types/components/form/radio/src/index.d.ts +2 -0
- package/dist/types/components/form/select/src/Select.d.ts +33 -0
- package/dist/types/components/form/select/src/index.d.ts +2 -0
- package/dist/types/components/form/slider/src/Slider.d.ts +33 -0
- package/dist/types/components/form/slider/src/index.d.ts +2 -0
- package/dist/types/components/form/texteditor/src/TextEditor.d.ts +46 -0
- package/dist/types/components/form/texteditor/src/index.d.ts +2 -0
- package/dist/types/components/form/textfield/src/TextField.d.ts +48 -0
- package/dist/types/components/form/textfield/src/index.d.ts +2 -0
- package/dist/types/components/form/timepicker/src/TimePicker.d.ts +29 -0
- package/dist/types/components/form/timepicker/src/index.d.ts +2 -0
- package/dist/types/components/form/toggle/src/Toggle.d.ts +19 -0
- package/dist/types/components/form/toggle/src/index.d.ts +2 -0
- package/dist/types/components/form/wrapper/src/FormFieldWrapper.d.ts +67 -0
- package/dist/types/components/form/wrapper/src/index.d.ts +2 -0
- package/dist/types/components/layout/card/src/Card.d.ts +31 -0
- package/dist/types/components/layout/card/src/index.d.ts +2 -0
- package/dist/types/components/layout/desktop-background/src/DesktopBackground.d.ts +23 -0
- package/dist/types/components/layout/desktop-background/src/index.d.ts +2 -0
- package/dist/types/components/layout/draggable-window/src/DraggableWindow.d.ts +59 -0
- package/dist/types/components/layout/draggable-window/src/index.d.ts +2 -0
- package/dist/types/components/layout/flex-container/src/FlexContainer.d.ts +42 -0
- package/dist/types/components/layout/flex-container/src/index.d.ts +2 -0
- package/dist/types/components/layout/footer/src/Footer.d.ts +25 -0
- package/dist/types/components/layout/footer/src/index.d.ts +2 -0
- package/dist/types/components/layout/grid/src/Grid.d.ts +54 -0
- package/dist/types/components/layout/grid/src/index.d.ts +2 -0
- package/dist/types/components/layout/panel/src/Panel.d.ts +23 -0
- package/dist/types/components/layout/panel/src/index.d.ts +2 -0
- package/dist/types/components/layout/scroll-container/src/ScrollContainer.d.ts +21 -0
- package/dist/types/components/layout/scroll-container/src/index.d.ts +2 -0
- package/dist/types/components/layout/splitter/src/Splitter.d.ts +19 -0
- package/dist/types/components/layout/splitter/src/index.d.ts +2 -0
- package/dist/types/components/layout/tabs/src/Tabs.d.ts +29 -0
- package/dist/types/components/layout/tabs/src/index.d.ts +2 -0
- package/dist/types/components/layout/window-manager/src/WindowManager.d.ts +106 -0
- package/dist/types/components/layout/window-manager/src/index.d.ts +2 -0
- package/dist/types/components/math/src/index.d.ts +5 -0
- package/dist/types/components/math/src/mat.d.ts +71 -0
- package/dist/types/components/math/src/mat4.d.ts +101 -0
- package/dist/types/components/math/src/quaternion.d.ts +62 -0
- package/dist/types/components/math/src/solver.d.ts +55 -0
- package/dist/types/components/math/src/vec.d.ts +54 -0
- package/dist/types/components/media/carousel/src/Carousel.d.ts +23 -0
- package/dist/types/components/media/carousel/src/index.d.ts +2 -0
- package/dist/types/components/media/image/src/Image.d.ts +23 -0
- package/dist/types/components/media/image/src/index.d.ts +2 -0
- package/dist/types/components/media/video-player/src/VideoPlayer.d.ts +27 -0
- package/dist/types/components/media/video-player/src/index.d.ts +2 -0
- package/dist/types/components/nav/accordion/src/Accordion.d.ts +52 -0
- package/dist/types/components/nav/accordion/src/index.d.ts +2 -0
- package/dist/types/components/nav/breadcrumb/src/Breadcrumb.d.ts +20 -0
- package/dist/types/components/nav/breadcrumb/src/index.d.ts +2 -0
- package/dist/types/components/nav/dock/src/Dock.d.ts +46 -0
- package/dist/types/components/nav/dock/src/index.d.ts +2 -0
- package/dist/types/components/nav/dropdown/src/Dropdown.d.ts +36 -0
- package/dist/types/components/nav/dropdown/src/index.d.ts +2 -0
- package/dist/types/components/nav/menubar/src/Menubar.d.ts +27 -0
- package/dist/types/components/nav/menubar/src/index.d.ts +2 -0
- package/dist/types/components/nav/pagination/src/Pagination.d.ts +19 -0
- package/dist/types/components/nav/pagination/src/index.d.ts +2 -0
- package/dist/types/components/nav/sidebar/src/Sidebar.d.ts +29 -0
- package/dist/types/components/nav/sidebar/src/index.d.ts +2 -0
- package/dist/types/components/nav/stepper/src/Stepper.d.ts +25 -0
- package/dist/types/components/nav/stepper/src/index.d.ts +2 -0
- package/dist/types/components/nav/system-tray/src/SystemTray.d.ts +47 -0
- package/dist/types/components/nav/system-tray/src/index.d.ts +2 -0
- package/dist/types/components/nav/toolbar/src/Toolbar.d.ts +27 -0
- package/dist/types/components/nav/toolbar/src/index.d.ts +2 -0
- package/dist/types/components/nav/treenav/src/TreeNav.d.ts +34 -0
- package/dist/types/components/nav/treenav/src/TreeNode.d.ts +74 -0
- package/dist/types/components/nav/treenav/src/index.d.ts +4 -0
- package/dist/types/components/nav/wrapper/src/NavWrapper.d.ts +73 -0
- package/dist/types/components/nav/wrapper/src/index.d.ts +2 -0
- package/dist/types/components/overlay/context-menu/src/ContextMenu.d.ts +21 -0
- package/dist/types/components/overlay/context-menu/src/index.d.ts +2 -0
- package/dist/types/components/overlay/drawer/src/Drawer.d.ts +22 -0
- package/dist/types/components/overlay/drawer/src/index.d.ts +2 -0
- package/dist/types/components/overlay/modal/src/Modal.d.ts +22 -0
- package/dist/types/components/overlay/modal/src/index.d.ts +2 -0
- package/dist/types/components/overlay/popover/src/Popover.d.ts +20 -0
- package/dist/types/components/overlay/popover/src/index.d.ts +2 -0
- package/dist/types/components/overlay/toast/src/Toast.d.ts +59 -0
- package/dist/types/components/overlay/toast/src/index.d.ts +2 -0
- package/dist/types/components/overlay/tooltip/src/Tooltip.d.ts +14 -0
- package/dist/types/components/overlay/tooltip/src/index.d.ts +2 -0
- package/dist/types/components/page/ide/src/IDE.d.ts +5 -0
- package/dist/types/components/page/ide/src/index.d.ts +2 -0
- package/dist/types/components/page/trading-dashboard/src/TradingDashboard.d.ts +5 -0
- package/dist/types/components/page/trading-dashboard/src/index.d.ts +2 -0
- package/dist/types/components/page/unity-desktop/src/UnityApp.d.ts +30 -0
- package/dist/types/components/page/unity-desktop/src/UnityDesktop.d.ts +30 -0
- package/dist/types/components/page/unity-desktop/src/index.d.ts +4 -0
- package/dist/types/components/page/word-processor/src/WordProcessor.d.ts +7 -0
- package/dist/types/components/page/word-processor/src/index.d.ts +2 -0
- package/dist/types/components/profiler.d.ts +6 -0
- package/dist/types/components/profiler.d.ts.map +1 -0
- package/dist/types/components/strict-mode.d.ts +6 -0
- package/dist/types/components/strict-mode.d.ts.map +1 -0
- package/dist/types/components/suspense.d.ts +6 -0
- package/dist/types/components/suspense.d.ts.map +1 -0
- package/dist/types/components/viz/2D-bar-graph/src/BarGraph.d.ts +61 -0
- package/dist/types/components/viz/2D-bar-graph/src/index.d.ts +2 -0
- package/dist/types/components/viz/2D-cartesian-raw/src/CartesianGraph2D.d.ts +40 -0
- package/dist/types/components/viz/2D-cartesian-raw/src/index.d.ts +2 -0
- package/dist/types/components/viz/2D-complex-graph/src/ComplexGraph2D.d.ts +33 -0
- package/dist/types/components/viz/2D-complex-graph/src/index.d.ts +2 -0
- package/dist/types/components/viz/2D-discrete-cartesian/src/DiscreteCartesian2D.d.ts +31 -0
- package/dist/types/components/viz/2D-discrete-cartesian/src/index.d.ts +2 -0
- package/dist/types/components/viz/2D-line-graph/src/LineGraph.d.ts +53 -0
- package/dist/types/components/viz/2D-line-graph/src/index.d.ts +2 -0
- package/dist/types/components/viz/2D-pie-graph/src/PieGraph.d.ts +49 -0
- package/dist/types/components/viz/2D-pie-graph/src/index.d.ts +3 -0
- package/dist/types/components/viz/2D-polar-graph/src/PolarGraph2D.d.ts +35 -0
- package/dist/types/components/viz/2D-polar-graph/src/index.d.ts +2 -0
- package/dist/types/components/viz/3d-layers/src/ThreeDLayers.d.ts +35 -0
- package/dist/types/components/viz/3d-layers/src/index.d.ts +2 -0
- package/dist/types/components/viz/3dSpace/src/Space3D.d.ts +63 -0
- package/dist/types/components/viz/3dSpace/src/animation.d.ts +75 -0
- package/dist/types/components/viz/3dSpace/src/bounds.d.ts +36 -0
- package/dist/types/components/viz/3dSpace/src/camera-controller.d.ts +59 -0
- package/dist/types/components/viz/3dSpace/src/camera.d.ts +43 -0
- package/dist/types/components/viz/3dSpace/src/collision.d.ts +54 -0
- package/dist/types/components/viz/3dSpace/src/cpu-pipeline.d.ts +47 -0
- package/dist/types/components/viz/3dSpace/src/index.d.ts +32 -0
- package/dist/types/components/viz/3dSpace/src/light.d.ts +23 -0
- package/dist/types/components/viz/3dSpace/src/lighting-model.d.ts +34 -0
- package/dist/types/components/viz/3dSpace/src/material.d.ts +12 -0
- package/dist/types/components/viz/3dSpace/src/mesh.d.ts +35 -0
- package/dist/types/components/viz/3dSpace/src/picking.d.ts +51 -0
- package/dist/types/components/viz/3dSpace/src/render-pipeline.d.ts +12 -0
- package/dist/types/components/viz/3dSpace/src/scene-graph.d.ts +20 -0
- package/dist/types/components/viz/3dSpace/src/scene-object.d.ts +31 -0
- package/dist/types/components/viz/3dSpace/src/terrain.d.ts +34 -0
- package/dist/types/components/viz/3dSpace/src/texture.d.ts +22 -0
- package/dist/types/components/viz/3dSpace/src/types.d.ts +42 -0
- package/dist/types/components/viz/3dSpace/src/viewport.d.ts +19 -0
- package/dist/types/components/viz/3dSpace/src/webgl-pipeline.d.ts +54 -0
- package/dist/types/components/viz/big-number/src/BigNumber.d.ts +29 -0
- package/dist/types/components/viz/big-number/src/index.d.ts +2 -0
- package/dist/types/components/viz/bloch-sphere/src/BlochSphere.d.ts +73 -0
- package/dist/types/components/viz/bloch-sphere/src/index.d.ts +2 -0
- package/dist/types/components/viz/box-plot/src/BoxPlot.d.ts +47 -0
- package/dist/types/components/viz/box-plot/src/index.d.ts +2 -0
- package/dist/types/components/viz/bubble-chart/src/BubbleChart.d.ts +38 -0
- package/dist/types/components/viz/bubble-chart/src/index.d.ts +2 -0
- package/dist/types/components/viz/calendar-heat-map/src/CalendarHeatMap.d.ts +29 -0
- package/dist/types/components/viz/calendar-heat-map/src/index.d.ts +2 -0
- package/dist/types/components/viz/chord/src/ChordDiagram.d.ts +25 -0
- package/dist/types/components/viz/chord/src/index.d.ts +2 -0
- package/dist/types/components/viz/decomposition-tree/src/DecompositionTree.d.ts +33 -0
- package/dist/types/components/viz/decomposition-tree/src/index.d.ts +2 -0
- package/dist/types/components/viz/earth-globe/src/EarthGlobe.d.ts +62 -0
- package/dist/types/components/viz/earth-globe/src/globe-data.d.ts +23 -0
- package/dist/types/components/viz/earth-globe/src/index.d.ts +5 -0
- package/dist/types/components/viz/force-graph/src/ForceGraph.d.ts +99 -0
- package/dist/types/components/viz/force-graph/src/index.d.ts +2 -0
- package/dist/types/components/viz/funnel/src/FunnelChart.d.ts +28 -0
- package/dist/types/components/viz/funnel/src/index.d.ts +2 -0
- package/dist/types/components/viz/gantt-chart/src/GanttChart.d.ts +33 -0
- package/dist/types/components/viz/gantt-chart/src/index.d.ts +2 -0
- package/dist/types/components/viz/gauge/src/Gauge.d.ts +37 -0
- package/dist/types/components/viz/gauge/src/index.d.ts +2 -0
- package/dist/types/components/viz/graph/src/HypercubeGraph.d.ts +43 -0
- package/dist/types/components/viz/graph/src/hypercube.d.ts +78 -0
- package/dist/types/components/viz/graph/src/index.d.ts +4 -0
- package/dist/types/components/viz/heat-map/src/HeatMap.d.ts +29 -0
- package/dist/types/components/viz/heat-map/src/index.d.ts +2 -0
- package/dist/types/components/viz/histogram/src/Histogram.d.ts +27 -0
- package/dist/types/components/viz/histogram/src/index.d.ts +2 -0
- package/dist/types/components/viz/lollipop/src/LollipopChart.d.ts +32 -0
- package/dist/types/components/viz/lollipop/src/index.d.ts +2 -0
- package/dist/types/components/viz/matrix/src/Matrix.d.ts +29 -0
- package/dist/types/components/viz/matrix/src/index.d.ts +2 -0
- package/dist/types/components/viz/partition/src/Partition.d.ts +31 -0
- package/dist/types/components/viz/partition/src/index.d.ts +2 -0
- package/dist/types/components/viz/pivot-table/src/PivotTable.d.ts +25 -0
- package/dist/types/components/viz/pivot-table/src/index.d.ts +2 -0
- package/dist/types/components/viz/radar-chart/src/RadarChart.d.ts +35 -0
- package/dist/types/components/viz/radar-chart/src/index.d.ts +2 -0
- package/dist/types/components/viz/sankey/src/SankeyDiagram.d.ts +38 -0
- package/dist/types/components/viz/sankey/src/index.d.ts +2 -0
- package/dist/types/components/viz/sunburst/src/Sunburst.d.ts +27 -0
- package/dist/types/components/viz/sunburst/src/index.d.ts +2 -0
- package/dist/types/components/viz/tree-map/src/TreeMap.d.ts +29 -0
- package/dist/types/components/viz/tree-map/src/index.d.ts +2 -0
- package/dist/types/components/viz/us-state-map/src/USStateMap.d.ts +23 -0
- package/dist/types/components/viz/us-state-map/src/index.d.ts +4 -0
- package/dist/types/components/viz/us-state-map/src/us-state-paths.d.ts +10 -0
- package/dist/types/components/viz/vector-field/src/VectorField.d.ts +61 -0
- package/dist/types/components/viz/vector-field/src/index.d.ts +2 -0
- package/dist/types/components/viz/waterfall/src/WaterfallChart.d.ts +32 -0
- package/dist/types/components/viz/waterfall/src/index.d.ts +2 -0
- package/dist/types/components/viz/word-cloud/src/WordCloud.d.ts +30 -0
- package/dist/types/components/viz/word-cloud/src/index.d.ts +2 -0
- package/dist/types/components/viz/wrapper/src/VizWrapper.d.ts +60 -0
- package/dist/types/components/viz/wrapper/src/index.d.ts +2 -0
- package/dist/types/compute/context.d.ts +20 -0
- package/dist/types/compute/context.d.ts.map +1 -0
- package/dist/types/compute/cpu-backend.d.ts +15 -0
- package/dist/types/compute/cpu-backend.d.ts.map +1 -0
- package/dist/types/compute/index.d.ts +3 -0
- package/dist/types/compute/index.d.ts.map +1 -0
- package/dist/types/compute/types.d.ts +57 -0
- package/dist/types/compute/types.d.ts.map +1 -0
- package/dist/types/compute/webgl-backend.d.ts +33 -0
- package/dist/types/compute/webgl-backend.d.ts.map +1 -0
- package/dist/types/compute/webgpu-backend.d.ts +50 -0
- package/dist/types/compute/webgpu-backend.d.ts.map +1 -0
- package/dist/types/context/create-context.d.ts +15 -0
- package/dist/types/context/create-context.d.ts.map +1 -0
- package/dist/types/core/children.d.ts +15 -0
- package/dist/types/core/children.d.ts.map +1 -0
- package/dist/types/core/clone-element.d.ts +10 -0
- package/dist/types/core/clone-element.d.ts.map +1 -0
- package/dist/types/core/create-element.d.ts +20 -0
- package/dist/types/core/create-element.d.ts.map +1 -0
- package/dist/types/core/create-ref.d.ts +7 -0
- package/dist/types/core/create-ref.d.ts.map +1 -0
- package/dist/types/core/fiber.d.ts +30 -0
- package/dist/types/core/fiber.d.ts.map +1 -0
- package/dist/types/core/forward-ref.d.ts +16 -0
- package/dist/types/core/forward-ref.d.ts.map +1 -0
- package/dist/types/core/fragment.d.ts +6 -0
- package/dist/types/core/fragment.d.ts.map +1 -0
- package/dist/types/core/is-valid-element.d.ts +7 -0
- package/dist/types/core/is-valid-element.d.ts.map +1 -0
- package/dist/types/core/lanes.d.ts +47 -0
- package/dist/types/core/lanes.d.ts.map +1 -0
- package/dist/types/core/lazy.d.ts +20 -0
- package/dist/types/core/lazy.d.ts.map +1 -0
- package/dist/types/core/memo.d.ts +13 -0
- package/dist/types/core/memo.d.ts.map +1 -0
- package/dist/types/core/reconciler.d.ts +12 -0
- package/dist/types/core/reconciler.d.ts.map +1 -0
- package/dist/types/core/scheduler-host-config.d.ts +37 -0
- package/dist/types/core/scheduler-host-config.d.ts.map +1 -0
- package/dist/types/core/scheduler.d.ts +29 -0
- package/dist/types/core/scheduler.d.ts.map +1 -0
- package/dist/types/core/src/build/index.d.ts +4 -0
- package/dist/types/core/src/build/noscript-plugin.d.ts +62 -0
- package/dist/types/core/src/build/seo-plugin.d.ts +42 -0
- package/dist/types/core/src/client/graphql.d.ts +63 -0
- package/dist/types/core/src/client/index.d.ts +3 -0
- package/dist/types/core/src/client/protobuf.d.ts +39 -0
- package/dist/types/core/src/client/rest.d.ts +60 -0
- package/dist/types/core/src/components/component.d.ts +38 -0
- package/dist/types/core/src/components/error-boundary.d.ts +22 -0
- package/dist/types/core/src/components/profiler.d.ts +5 -0
- package/dist/types/core/src/components/strict-mode.d.ts +5 -0
- package/dist/types/core/src/components/suspense.d.ts +5 -0
- package/dist/types/core/src/components-barrel.d.ts +100 -0
- package/dist/types/core/src/compute/context.d.ts +19 -0
- package/dist/types/core/src/compute/cpu-backend.d.ts +14 -0
- package/dist/types/core/src/compute/index.d.ts +2 -0
- package/dist/types/core/src/compute/types.d.ts +56 -0
- package/dist/types/core/src/compute/webgl-backend.d.ts +32 -0
- package/dist/types/core/src/compute/webgpu-backend.d.ts +49 -0
- package/dist/types/core/src/context/create-context.d.ts +14 -0
- package/dist/types/core/src/core/children.d.ts +14 -0
- package/dist/types/core/src/core/clone-element.d.ts +9 -0
- package/dist/types/core/src/core/create-element.d.ts +19 -0
- package/dist/types/core/src/core/create-ref.d.ts +6 -0
- package/dist/types/core/src/core/fiber.d.ts +29 -0
- package/dist/types/core/src/core/forward-ref.d.ts +15 -0
- package/dist/types/core/src/core/fragment.d.ts +5 -0
- package/dist/types/core/src/core/is-valid-element.d.ts +6 -0
- package/dist/types/core/src/core/lanes.d.ts +46 -0
- package/dist/types/core/src/core/lazy.d.ts +19 -0
- package/dist/types/core/src/core/memo.d.ts +12 -0
- package/dist/types/core/src/core/reconciler.d.ts +11 -0
- package/dist/types/core/src/core/scheduler-host-config.d.ts +36 -0
- package/dist/types/core/src/core/scheduler.d.ts +28 -0
- package/dist/types/core/src/core/transitions.d.ts +31 -0
- package/dist/types/core/src/devtools/index.d.ts +21 -0
- package/dist/types/core/src/dom/create-portal.d.ts +6 -0
- package/dist/types/core/src/dom/create-root.d.ts +23 -0
- package/dist/types/core/src/dom/flush-sync.d.ts +1 -0
- package/dist/types/core/src/dom/index.d.ts +4 -0
- package/dist/types/core/src/dom/legacy.d.ts +16 -0
- package/dist/types/core/src/dom/synthetic-event.d.ts +90 -0
- package/dist/types/core/src/dom/work-loop.d.ts +34 -0
- package/dist/types/core/src/features/feature-flags.d.ts +38 -0
- package/dist/types/core/src/features/index.d.ts +27 -0
- package/dist/types/core/src/hooks/dispatcher.d.ts +26 -0
- package/dist/types/core/src/hooks/hook-state.d.ts +46 -0
- package/dist/types/core/src/hooks/index.d.ts +47 -0
- package/dist/types/core/src/hooks/install-dispatcher.d.ts +2 -0
- package/dist/types/core/src/hooks/use-head.d.ts +54 -0
- package/dist/types/core/src/index.d.ts +23 -0
- package/dist/types/core/src/jsx-dev-runtime.d.ts +1 -0
- package/dist/types/core/src/jsx-runtime.d.ts +7 -0
- package/dist/types/core/src/router/index.d.ts +12 -0
- package/dist/types/core/src/router/link-component.d.ts +16 -0
- package/dist/types/core/src/router/match-path.d.ts +28 -0
- package/dist/types/core/src/router/route-component.d.ts +12 -0
- package/dist/types/core/src/router/router-component.d.ts +5 -0
- package/dist/types/core/src/router/router-context.d.ts +13 -0
- package/dist/types/core/src/router/router-store.d.ts +22 -0
- package/dist/types/core/src/router/use-navigate.d.ts +4 -0
- package/dist/types/core/src/router/use-params.d.ts +2 -0
- package/dist/types/core/src/router/use-router.d.ts +3 -0
- package/dist/types/core/src/server/index.d.ts +3 -0
- package/dist/types/core/src/server/render-to-pipeable-stream.d.ts +31 -0
- package/dist/types/core/src/server/render-to-readable-stream.d.ts +19 -0
- package/dist/types/core/src/server/render-to-string.d.ts +25 -0
- package/dist/types/core/src/shared/act.d.ts +1 -0
- package/dist/types/core/src/shared/aria-warnings.d.ts +1 -0
- package/dist/types/core/src/shared/async-compute.d.ts +63 -0
- package/dist/types/core/src/shared/component-registry.d.ts +53 -0
- package/dist/types/core/src/shared/render-guard.d.ts +47 -0
- package/dist/types/core/src/shared/secure-fetch.d.ts +21 -0
- package/dist/types/core/src/shared/types.d.ts +127 -0
- package/dist/types/core/src/shared/warnings.d.ts +19 -0
- package/dist/types/core/src/telemetry/index.d.ts +2 -0
- package/dist/types/core/src/telemetry/metrics.d.ts +67 -0
- package/dist/types/core/src/telemetry/tracing.d.ts +95 -0
- package/dist/types/core/transitions.d.ts +32 -0
- package/dist/types/core/transitions.d.ts.map +1 -0
- package/dist/types/devtools/index.d.ts +22 -0
- package/dist/types/devtools/index.d.ts.map +1 -0
- package/dist/types/dom/create-portal.d.ts +7 -0
- package/dist/types/dom/create-portal.d.ts.map +1 -0
- package/dist/types/dom/create-root.d.ts +24 -0
- package/dist/types/dom/create-root.d.ts.map +1 -0
- package/dist/types/dom/flush-sync.d.ts +2 -0
- package/dist/types/dom/flush-sync.d.ts.map +1 -0
- package/dist/types/dom/index.d.ts +5 -0
- package/dist/types/dom/index.d.ts.map +1 -0
- package/dist/types/dom/legacy.d.ts +17 -0
- package/dist/types/dom/legacy.d.ts.map +1 -0
- package/dist/types/dom/synthetic-event.d.ts +91 -0
- package/dist/types/dom/synthetic-event.d.ts.map +1 -0
- package/dist/types/dom/work-loop.d.ts +35 -0
- package/dist/types/dom/work-loop.d.ts.map +1 -0
- package/dist/types/features/feature-flags.d.ts +39 -0
- package/dist/types/features/feature-flags.d.ts.map +1 -0
- package/dist/types/features/index.d.ts +28 -0
- package/dist/types/features/index.d.ts.map +1 -0
- package/dist/types/hooks/dispatcher.d.ts +27 -0
- package/dist/types/hooks/dispatcher.d.ts.map +1 -0
- package/dist/types/hooks/hook-state.d.ts +47 -0
- package/dist/types/hooks/hook-state.d.ts.map +1 -0
- package/dist/types/hooks/index.d.ts +48 -0
- package/dist/types/hooks/index.d.ts.map +1 -0
- package/dist/types/hooks/install-dispatcher.d.ts +3 -0
- package/dist/types/hooks/install-dispatcher.d.ts.map +1 -0
- package/dist/types/hooks/use-head.d.ts +55 -0
- package/dist/types/hooks/use-head.d.ts.map +1 -0
- package/dist/types/index.d.ts +24 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/jsx-dev-runtime.d.ts +2 -0
- package/dist/types/jsx-dev-runtime.d.ts.map +1 -0
- package/dist/types/jsx-runtime.d.ts +8 -0
- package/dist/types/jsx-runtime.d.ts.map +1 -0
- package/dist/types/router/index.d.ts +13 -0
- package/dist/types/router/index.d.ts.map +1 -0
- package/dist/types/router/link-component.d.ts +17 -0
- package/dist/types/router/link-component.d.ts.map +1 -0
- package/dist/types/router/match-path.d.ts +29 -0
- package/dist/types/router/match-path.d.ts.map +1 -0
- package/dist/types/router/route-component.d.ts +13 -0
- package/dist/types/router/route-component.d.ts.map +1 -0
- package/dist/types/router/router-component.d.ts +6 -0
- package/dist/types/router/router-component.d.ts.map +1 -0
- package/dist/types/router/router-context.d.ts +14 -0
- package/dist/types/router/router-context.d.ts.map +1 -0
- package/dist/types/router/router-store.d.ts +23 -0
- package/dist/types/router/router-store.d.ts.map +1 -0
- package/dist/types/router/use-navigate.d.ts +5 -0
- package/dist/types/router/use-navigate.d.ts.map +1 -0
- package/dist/types/router/use-params.d.ts +3 -0
- package/dist/types/router/use-params.d.ts.map +1 -0
- package/dist/types/router/use-router.d.ts +4 -0
- package/dist/types/router/use-router.d.ts.map +1 -0
- package/dist/types/server/index.d.ts +4 -0
- package/dist/types/server/index.d.ts.map +1 -0
- package/dist/types/server/render-to-pipeable-stream.d.ts +32 -0
- package/dist/types/server/render-to-pipeable-stream.d.ts.map +1 -0
- package/dist/types/server/render-to-readable-stream.d.ts +20 -0
- package/dist/types/server/render-to-readable-stream.d.ts.map +1 -0
- package/dist/types/server/render-to-string.d.ts +26 -0
- package/dist/types/server/render-to-string.d.ts.map +1 -0
- package/dist/types/shared/act.d.ts +2 -0
- package/dist/types/shared/act.d.ts.map +1 -0
- package/dist/types/shared/aria-warnings.d.ts +2 -0
- package/dist/types/shared/aria-warnings.d.ts.map +1 -0
- package/dist/types/shared/async-compute.d.ts +64 -0
- package/dist/types/shared/async-compute.d.ts.map +1 -0
- package/dist/types/shared/component-registry.d.ts +54 -0
- package/dist/types/shared/component-registry.d.ts.map +1 -0
- package/dist/types/shared/render-guard.d.ts +48 -0
- package/dist/types/shared/render-guard.d.ts.map +1 -0
- package/dist/types/shared/secure-fetch.d.ts +22 -0
- package/dist/types/shared/secure-fetch.d.ts.map +1 -0
- package/dist/types/shared/types.d.ts +128 -0
- package/dist/types/shared/types.d.ts.map +1 -0
- package/dist/types/shared/warnings.d.ts +20 -0
- package/dist/types/shared/warnings.d.ts.map +1 -0
- package/dist/types/telemetry/index.d.ts +3 -0
- package/dist/types/telemetry/index.d.ts.map +1 -0
- package/dist/types/telemetry/metrics.d.ts +68 -0
- package/dist/types/telemetry/metrics.d.ts.map +1 -0
- package/dist/types/telemetry/tracing.d.ts +96 -0
- package/dist/types/telemetry/tracing.d.ts.map +1 -0
- package/package.json +8 -17
|
@@ -1,2 +1,161 @@
|
|
|
1
|
-
|
|
1
|
+
/* (c) 2025-2026 Asymmetric Effort, LLC. MIT LICENSE */
|
|
2
|
+
"use strict";var P=Object.create;var x=Object.defineProperty;var L=Object.getOwnPropertyDescriptor;var N=Object.getOwnPropertyNames;var C=Object.getPrototypeOf,z=Object.prototype.hasOwnProperty;var A=(t,e)=>{for(var s in e)x(t,s,{get:e[s],enumerable:!0})},k=(t,e,s,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of N(e))!z.call(t,o)&&o!==s&&x(t,o,{get:()=>e[o],enumerable:!(i=L(e,o))||i.enumerable});return t};var $=(t,e,s)=>(s=t!=null?P(C(t)):{},k(e||!t||!t.__esModule?x(s,"default",{value:t,enumerable:!0}):s,t)),D=t=>k(x({},"__esModule",{value:!0}),t);var J={};A(J,{generateNoscriptHtml:()=>S,specifyJsNoscriptPlugin:()=>j,specifyJsSeoPlugin:()=>v,stripInteractiveElements:()=>w});module.exports=D(J);var d=$(require("fs"),1),g=$(require("path"),1);function F(t,e){let s=[{dir:t,prefix:""}];for(;s.length>0;){let{dir:i,prefix:o}=s.pop(),r=d.default.readdirSync(i,{withFileTypes:!0});for(let n of r)n.isDirectory()?s.push({dir:g.default.join(i,n.name),prefix:o+n.name+"/"}):n.name.endsWith(".md")&&e.push(o+n.name.replace(".md",""))}}function T(t,e,s){return['<?xml version="1.0" encoding="UTF-8"?>','<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">',...e.map(o=>` <url><loc>${t}${o}</loc><lastmod>${s}</lastmod></url>`),"</urlset>"].join(`
|
|
3
|
+
`)}function B(t,e){let s=["User-agent: *","Allow: /"];return e&&s.push(...e),s.push("",`Sitemap: ${t}/sitemap.xml`),s.join(`
|
|
4
|
+
`)}function O(t,e){let i=[`# ${t.title??"Site"}`];if(t.description){i.push("");let n=t.description.split(`
|
|
5
|
+
`);for(let p of n)i.push(`> ${p}`)}i.push(""),i.push(`## Website: ${t.siteUrl}`),t.repository&&i.push(`## Repository: ${t.repository}`),t.npmPackage&&i.push(`## npm: https://www.npmjs.com/package/${t.npmPackage}`);let o=e.filter(n=>n.startsWith("guides/")).map(n=>n.replace("guides/","")),r=e.filter(n=>n.startsWith("api/")).map(n=>n.replace("api/",""));if(o.length>0){i.push("","## Documentation","");for(let n of o)i.push(`- ${n}: ${t.siteUrl}/#/docs/guides/${n}`)}if(r.length>0){i.push("","## API Reference","");for(let n of r)i.push(`- ${n}: ${t.siteUrl}/#/docs/api/${n}`)}return t.npmPackage&&i.push("","## Install","","```",`npm install ${t.npmPackage}`,"```"),t.license&&i.push("",`## License: ${t.license}`),t.author&&i.push(`## Author: ${t.author}`),i.join(`
|
|
6
|
+
`)}function v(t){return{name:"specifyjs-seo",closeBundle(){let e=g.default.resolve(process.cwd(),"dist"),s=new Date().toISOString().split("T")[0]??"",i=[...t.routes??["/"]],o=[];if(t.docsDir&&d.default.existsSync(t.docsDir)){F(t.docsDir,o);for(let a of o)i.push(`/#/docs/${a}`)}let r=T(t.siteUrl,i,s);d.default.writeFileSync(g.default.join(e,"sitemap.xml"),r);let n=B(t.siteUrl,t.robotsRules);d.default.writeFileSync(g.default.join(e,"robots.txt"),n);let p=O(t,o);if(d.default.writeFileSync(g.default.join(e,"llms.txt"),p),t.jsonLd){let a=g.default.join(e,"index.html");if(d.default.existsSync(a)){let l=d.default.readFileSync(a,"utf-8"),m=(Array.isArray(t.jsonLd)?t.jsonLd:[t.jsonLd]).map(u=>`<script type="application/ld+json">${JSON.stringify(u)}<\/script>`).join(`
|
|
7
|
+
`);l=l.replace("</head>",` ${m}
|
|
8
|
+
</head>`),d.default.writeFileSync(a,l,"utf-8")}}let c=t.jsonLd?", JSON-LD":"";console.log(`Generated: sitemap.xml (${i.length} URLs), robots.txt, llms.txt${c}`)}}}var b=$(require("fs"),1),y=$(require("path"),1),R=new Set(["h1","h2","h3","h4","h5","h6","p","br","hr","blockquote","ul","ol","li","dl","dt","dd","table","thead","tbody","tfoot","tr","th","td","caption","a","strong","em","b","i","u","s","code","pre","kbd","samp","span","div","section","article","aside","header","footer","nav","img","figure","figcaption","picture","source","details","summary","mark","small","sub","sup","abbr","time"]),E=new Set(["script","style","textarea","select","noscript","iframe","object","embed","applet"]),I=new Set(["href","src","alt","title","width","height","class","id","name","colspan","rowspan","scope","rel","target","lang","dir","role","aria-label","aria-describedby","aria-hidden","style"]);function w(t){let e=[],s=0,i=t.length;for(;s<i;){let o=t.indexOf("<",s);if(o===-1){e.push(t.slice(s));break}o>s&&e.push(t.slice(s,o));let r=t.indexOf(">",o);if(r===-1){e.push(t.slice(o));break}let n=t.slice(o+1,r),p=n.startsWith("/"),c=p?n.slice(1).trim():n.trim(),a=c.search(/[\s/]/),l=(a===-1?c:c.slice(0,a)).toLowerCase();if(R.has(l))if(p)e.push(`</${l}>`);else{let h=a===-1?"":c.slice(a),m=U(h),u=n.trimEnd().endsWith("/")?" /":"";e.push(`<${l}${m}${u}>`)}else if(!p&&E.has(l)){let h=`</${l}`,m=t.toLowerCase().indexOf(h,r+1);if(m!==-1){let u=t.indexOf(">",m);s=u!==-1?u+1:r+1;continue}}s=r+1}return e.join("")}function U(t){let e=[],s=/([a-z][a-z0-9-]*)\s*(?:=\s*(?:"([^"]*)"|'([^']*)'|(\S+)))?/gi,i;for(;(i=s.exec(t))!==null;){let o=i[1].toLowerCase(),r=i[2]??i[3]??i[4]??"";I.has(o)&&(/javascript\s*:/i.test(r)||e.push(` ${o}="${W(r)}"`))}return e.join("")}function W(t){return t.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}function S(t){let e=t.classPrefix??"ns",s=t.sections;if(s.length===0)return"";let i=s.map(c=>`<a href="#${c.id}" class="${e}-nav-link">${f(c.title)}</a>`).join(`
|
|
9
|
+
`),o=s.map(c=>{let a=w(c.html);return`
|
|
10
|
+
<section id="${c.id}" class="${e}-section">
|
|
11
|
+
<h2 class="${e}-section-title">${f(c.title)}</h2>
|
|
12
|
+
<div class="${e}-section-content">
|
|
13
|
+
${a}
|
|
14
|
+
</div>
|
|
15
|
+
<p class="${e}-back-to-top"><a href="#${e}-top">Back to top</a></p>
|
|
16
|
+
</section>`}).join(`
|
|
17
|
+
`),r=t.title?`<h1 class="${e}-title">${f(t.title)}</h1>`:"",n=t.description?`<p class="${e}-desc">${f(t.description)}</p>`:"",p=t.copyright?`<footer class="${e}-footer"><p>${f(t.copyright)}</p></footer>`:"";return`
|
|
18
|
+
<noscript>
|
|
19
|
+
<style>
|
|
20
|
+
.${e}-container {
|
|
21
|
+
max-width: 900px;
|
|
22
|
+
margin: 0 auto;
|
|
23
|
+
padding: 20px;
|
|
24
|
+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
25
|
+
line-height: 1.6;
|
|
26
|
+
color: #1f2937;
|
|
27
|
+
}
|
|
28
|
+
.${e}-title {
|
|
29
|
+
font-size: 2rem;
|
|
30
|
+
margin-bottom: 0.5rem;
|
|
31
|
+
color: #0f172a;
|
|
32
|
+
}
|
|
33
|
+
.${e}-desc {
|
|
34
|
+
font-size: 1.1rem;
|
|
35
|
+
color: #64748b;
|
|
36
|
+
margin-bottom: 1.5rem;
|
|
37
|
+
}
|
|
38
|
+
.${e}-nav {
|
|
39
|
+
display: flex;
|
|
40
|
+
flex-wrap: wrap;
|
|
41
|
+
gap: 8px;
|
|
42
|
+
padding: 12px 0;
|
|
43
|
+
border-bottom: 1px solid #e2e8f0;
|
|
44
|
+
margin-bottom: 2rem;
|
|
45
|
+
position: sticky;
|
|
46
|
+
top: 0;
|
|
47
|
+
background: white;
|
|
48
|
+
z-index: 10;
|
|
49
|
+
}
|
|
50
|
+
.${e}-nav-link {
|
|
51
|
+
padding: 6px 14px;
|
|
52
|
+
border-radius: 6px;
|
|
53
|
+
background: #f1f5f9;
|
|
54
|
+
color: #3b82f6;
|
|
55
|
+
text-decoration: none;
|
|
56
|
+
font-size: 14px;
|
|
57
|
+
font-weight: 500;
|
|
58
|
+
}
|
|
59
|
+
.${e}-nav-link:hover {
|
|
60
|
+
background: #3b82f6;
|
|
61
|
+
color: white;
|
|
62
|
+
}
|
|
63
|
+
.${e}-section {
|
|
64
|
+
margin-bottom: 3rem;
|
|
65
|
+
padding-bottom: 2rem;
|
|
66
|
+
border-bottom: 1px solid #f1f5f9;
|
|
67
|
+
}
|
|
68
|
+
.${e}-section-title {
|
|
69
|
+
font-size: 1.5rem;
|
|
70
|
+
color: #1e293b;
|
|
71
|
+
margin-bottom: 1rem;
|
|
72
|
+
padding-top: 1rem;
|
|
73
|
+
}
|
|
74
|
+
.${e}-section-content h3 {
|
|
75
|
+
font-size: 1.2rem;
|
|
76
|
+
margin-top: 1.5rem;
|
|
77
|
+
color: #334155;
|
|
78
|
+
}
|
|
79
|
+
.${e}-section-content p {
|
|
80
|
+
margin: 0.5rem 0;
|
|
81
|
+
}
|
|
82
|
+
.${e}-section-content pre {
|
|
83
|
+
background: #1e293b;
|
|
84
|
+
color: #e2e8f0;
|
|
85
|
+
padding: 12px 16px;
|
|
86
|
+
border-radius: 6px;
|
|
87
|
+
overflow-x: auto;
|
|
88
|
+
font-size: 13px;
|
|
89
|
+
line-height: 1.5;
|
|
90
|
+
}
|
|
91
|
+
.${e}-section-content code {
|
|
92
|
+
background: #f1f5f9;
|
|
93
|
+
padding: 2px 6px;
|
|
94
|
+
border-radius: 3px;
|
|
95
|
+
font-size: 0.9em;
|
|
96
|
+
}
|
|
97
|
+
.${e}-section-content pre code {
|
|
98
|
+
background: none;
|
|
99
|
+
padding: 0;
|
|
100
|
+
}
|
|
101
|
+
.${e}-section-content table {
|
|
102
|
+
width: 100%;
|
|
103
|
+
border-collapse: collapse;
|
|
104
|
+
margin: 1rem 0;
|
|
105
|
+
}
|
|
106
|
+
.${e}-section-content th,
|
|
107
|
+
.${e}-section-content td {
|
|
108
|
+
padding: 8px 12px;
|
|
109
|
+
border: 1px solid #e2e8f0;
|
|
110
|
+
text-align: left;
|
|
111
|
+
}
|
|
112
|
+
.${e}-section-content th {
|
|
113
|
+
background: #f8fafc;
|
|
114
|
+
font-weight: 600;
|
|
115
|
+
}
|
|
116
|
+
.${e}-section-content img {
|
|
117
|
+
max-width: 100%;
|
|
118
|
+
height: auto;
|
|
119
|
+
}
|
|
120
|
+
.${e}-back-to-top {
|
|
121
|
+
font-size: 13px;
|
|
122
|
+
margin-top: 1.5rem;
|
|
123
|
+
}
|
|
124
|
+
.${e}-back-to-top a {
|
|
125
|
+
color: #3b82f6;
|
|
126
|
+
text-decoration: none;
|
|
127
|
+
}
|
|
128
|
+
.${e}-footer {
|
|
129
|
+
margin-top: 3rem;
|
|
130
|
+
padding-top: 1rem;
|
|
131
|
+
border-top: 1px solid #e2e8f0;
|
|
132
|
+
color: #94a3b8;
|
|
133
|
+
font-size: 13px;
|
|
134
|
+
text-align: center;
|
|
135
|
+
}
|
|
136
|
+
.${e}-js-notice {
|
|
137
|
+
background: #fef3c7;
|
|
138
|
+
border: 1px solid #f59e0b;
|
|
139
|
+
border-radius: 6px;
|
|
140
|
+
padding: 12px 16px;
|
|
141
|
+
margin-bottom: 1.5rem;
|
|
142
|
+
font-size: 14px;
|
|
143
|
+
color: #92400e;
|
|
144
|
+
}
|
|
145
|
+
</style>
|
|
146
|
+
<div id="${e}-top" class="${e}-container">
|
|
147
|
+
${r}
|
|
148
|
+
${n}
|
|
149
|
+
<div class="${e}-js-notice">
|
|
150
|
+
This page works best with JavaScript enabled. You are viewing a
|
|
151
|
+
static version of the content.
|
|
152
|
+
</div>
|
|
153
|
+
<nav class="${e}-nav" aria-label="Section navigation">
|
|
154
|
+
${i}
|
|
155
|
+
</nav>
|
|
156
|
+
${o}
|
|
157
|
+
${p}
|
|
158
|
+
</div>
|
|
159
|
+
</noscript>`}function f(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}function j(t){return{name:"specifyjs-noscript",closeBundle(){let e=y.default.resolve(process.cwd(),"dist"),s=y.default.join(e,"index.html");if(!b.default.existsSync(s)){console.warn("[specifyjs-noscript] index.html not found in dist/");return}let i=S(t);if(!i){console.warn("[specifyjs-noscript] No sections provided, skipping.");return}let o=t.maxContentSize??512*1024,r=Buffer.byteLength(i,"utf-8");r>o&&console.warn(`[specifyjs-noscript] Noscript content is ${(r/1024).toFixed(0)}KB (limit: ${(o/1024).toFixed(0)}KB). Consider reducing section content.`);let n=b.default.readFileSync(s,"utf-8");n=n.replace("</body>",`${i}
|
|
160
|
+
</body>`),b.default.writeFileSync(s,n,"utf-8"),console.log(`Generated: noscript fallback (${t.sections.length} sections, ${(r/1024).toFixed(1)}KB)`)}}}
|
|
2
161
|
//# sourceMappingURL=specifyjs-build.cjs.js.map
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/build/index.ts", "../src/build/seo-plugin.ts", "../src/build/noscript-plugin.ts"],
|
|
4
|
+
"sourcesContent": ["// (c) 2025-2026 Asymmetric Effort, LLC. MIT LICENSE\n// SPDX-License-Identifier: MIT\n\nexport { specifyJsSeoPlugin } from './seo-plugin';\nexport type { SeoPluginConfig } from './seo-plugin';\nexport {\n specifyJsNoscriptPlugin,\n generateNoscriptHtml,\n stripInteractiveElements,\n} from './noscript-plugin';\nexport type { NoscriptPluginConfig, NoscriptSection } from './noscript-plugin';\n", "// (c) 2025-2026 Asymmetric Effort, LLC. MIT LICENSE\n// SPDX-License-Identifier: MIT\n\n/**\n * SpecifyJS SEO Plugin for Vite\n * Auto-generates sitemap.xml, robots.txt, and llms.txt at build time.\n *\n * Usage in vite.config.ts:\n * import { specifyJsSeoPlugin } from '@asymmetric-effort/specifyjs/build';\n * export default defineConfig({ plugins: [specifyJsSeoPlugin({ ... })] });\n */\n\nimport type { Plugin } from 'vite';\nimport fs from 'fs';\nimport path from 'path';\n\nexport interface SeoPluginConfig {\n /** Base URL of the site (e.g., 'https://example.com') */\n siteUrl: string;\n /** Site title for llms.txt */\n title?: string;\n /** Site description for llms.txt */\n description?: string;\n /** Hash-based routes to include in sitemap */\n routes?: string[];\n /** Path to docs directory (generates doc routes in sitemap) */\n docsDir?: string;\n /** npm package name for llms.txt install instructions */\n npmPackage?: string;\n /** Author name for llms.txt */\n author?: string;\n /** License for llms.txt */\n license?: string;\n /** Additional robots.txt rules */\n robotsRules?: string[];\n /** Repository URL for llms.txt */\n repository?: string;\n /** Schema.org structured data (JSON-LD). When provided, a\n * `<script type=\"application/ld+json\">` block is injected into index.html.\n * Can be a plain object or an array of objects for multiple schemas. */\n jsonLd?: Record<string, unknown> | Record<string, unknown>[];\n}\n\n/**\n * Iteratively walk a directory and collect markdown file paths (without .md extension).\n * Uses an explicit stack instead of recursion per project coding standards.\n */\nfunction walkDocs(rootDir: string, results: string[]): void {\n const stack: Array<{ dir: string; prefix: string }> = [{ dir: rootDir, prefix: '' }];\n while (stack.length > 0) {\n const { dir, prefix } = stack.pop()!;\n const entries = fs.readdirSync(dir, { withFileTypes: true });\n for (const entry of entries) {\n if (entry.isDirectory()) {\n stack.push({ dir: path.join(dir, entry.name), prefix: prefix + entry.name + '/' });\n } else if (entry.name.endsWith('.md')) {\n results.push(prefix + entry.name.replace('.md', ''));\n }\n }\n }\n}\n\n/**\n * Generate sitemap.xml content from a list of routes.\n */\nfunction generateSitemap(siteUrl: string, routes: string[], today: string): string {\n const sitemapEntries = routes.map(\n (r) => ` <url><loc>${siteUrl}${r}</loc><lastmod>${today}</lastmod></url>`,\n );\n return [\n '<?xml version=\"1.0\" encoding=\"UTF-8\"?>',\n '<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">',\n ...sitemapEntries,\n '</urlset>',\n ].join('\\n');\n}\n\n/**\n * Generate robots.txt content.\n */\nfunction generateRobots(siteUrl: string, extraRules?: string[]): string {\n const lines = ['User-agent: *', 'Allow: /'];\n if (extraRules) {\n lines.push(...extraRules);\n }\n lines.push('', `Sitemap: ${siteUrl}/sitemap.xml`);\n return lines.join('\\n');\n}\n\n/**\n * Generate llms.txt content with project metadata and doc links.\n */\nfunction generateLlmsTxt(config: SeoPluginConfig, docPaths: string[]): string {\n const title = config.title ?? 'Site';\n const lines: string[] = [`# ${title}`];\n\n if (config.description) {\n lines.push('');\n const descLines = config.description.split('\\n');\n for (const dl of descLines) {\n lines.push(`> ${dl}`);\n }\n }\n\n lines.push('');\n lines.push(`## Website: ${config.siteUrl}`);\n if (config.repository) {\n lines.push(`## Repository: ${config.repository}`);\n }\n if (config.npmPackage) {\n lines.push(`## npm: https://www.npmjs.com/package/${config.npmPackage}`);\n }\n\n // Documentation section\n const guideNames = docPaths\n .filter((p) => p.startsWith('guides/'))\n .map((p) => p.replace('guides/', ''));\n const apiNames = docPaths.filter((p) => p.startsWith('api/')).map((p) => p.replace('api/', ''));\n\n if (guideNames.length > 0) {\n lines.push('', '## Documentation', '');\n for (const g of guideNames) {\n lines.push(`- ${g}: ${config.siteUrl}/#/docs/guides/${g}`);\n }\n }\n\n if (apiNames.length > 0) {\n lines.push('', '## API Reference', '');\n for (const a of apiNames) {\n lines.push(`- ${a}: ${config.siteUrl}/#/docs/api/${a}`);\n }\n }\n\n if (config.npmPackage) {\n lines.push('', '## Install', '', '```', `npm install ${config.npmPackage}`, '```');\n }\n\n if (config.license) {\n lines.push('', `## License: ${config.license}`);\n }\n if (config.author) {\n lines.push(`## Author: ${config.author}`);\n }\n\n return lines.join('\\n');\n}\n\n/**\n * Create the SpecifyJS SEO Vite plugin.\n *\n * Generates sitemap.xml, robots.txt, and llms.txt in the build output directory\n * during the closeBundle hook.\n */\nexport function specifyJsSeoPlugin(config: SeoPluginConfig): Plugin {\n return {\n name: 'specifyjs-seo',\n closeBundle() {\n const distDir = path.resolve(process.cwd(), 'dist');\n const today = new Date().toISOString().split('T')[0] ?? '';\n\n // Collect routes\n const routes = [...(config.routes ?? ['/'])];\n\n // Collect doc routes from docsDir\n const docPaths: string[] = [];\n if (config.docsDir && fs.existsSync(config.docsDir)) {\n walkDocs(config.docsDir, docPaths);\n for (const dp of docPaths) {\n routes.push(`/#/docs/${dp}`);\n }\n }\n\n // Generate and write sitemap.xml\n const sitemap = generateSitemap(config.siteUrl, routes, today);\n fs.writeFileSync(path.join(distDir, 'sitemap.xml'), sitemap);\n\n // Generate and write robots.txt\n const robots = generateRobots(config.siteUrl, config.robotsRules);\n fs.writeFileSync(path.join(distDir, 'robots.txt'), robots);\n\n // Generate and write llms.txt\n const llmsTxt = generateLlmsTxt(config, docPaths);\n fs.writeFileSync(path.join(distDir, 'llms.txt'), llmsTxt);\n\n /* v8 ignore start -- JSON-LD injection uses fs in Vite closeBundle */\n // Inject JSON-LD structured data into index.html\n if (config.jsonLd) {\n const indexPath = path.join(distDir, 'index.html');\n if (fs.existsSync(indexPath)) {\n let html = fs.readFileSync(indexPath, 'utf-8');\n const schemas = Array.isArray(config.jsonLd) ? config.jsonLd : [config.jsonLd];\n const ldBlocks = schemas\n .map((s) => `<script type=\"application/ld+json\">${JSON.stringify(s)}</script>`)\n .join('\\n ');\n html = html.replace('</head>', ` ${ldBlocks}\\n </head>`);\n fs.writeFileSync(indexPath, html, 'utf-8');\n }\n }\n\n /* v8 ignore stop */\n const extras = config.jsonLd ? ', JSON-LD' : '';\n console.log(`Generated: sitemap.xml (${routes.length} URLs), robots.txt, llms.txt${extras}`);\n },\n };\n}\n", "// (c) 2025-2026 Asymmetric Effort, LLC. MIT LICENSE\n// SPDX-License-Identifier: MIT\n\n/**\n * SpecifyJS Noscript Plugin for Vite\n *\n * Generates a `<noscript>` fallback block inside the built index.html,\n * providing a fully navigable static HTML document for environments\n * where JavaScript is disabled (accessibility) or not executed\n * (search engine crawlers).\n *\n * The noscript content is a single long-form document with:\n * - A navigation bar with anchor links to each section\n * - Each section rendered as semantic HTML (headings, paragraphs, lists)\n * - Internal links mapped to `#section-id` anchors\n *\n * Usage in vite.config.ts:\n * import { specifyJsNoscriptPlugin } from 'specifyjs/build';\n * export default defineConfig({\n * plugins: [\n * specifyJsNoscriptPlugin({\n * title: 'My App',\n * sections: [\n * { id: 'home', title: 'Home', html: '<h1>Welcome</h1><p>...</p>' },\n * { id: 'docs', title: 'Docs', html: '<h2>Getting Started</h2>...' },\n * ],\n * }),\n * ],\n * });\n */\n\nimport type { Plugin } from 'vite';\nimport fs from 'fs';\nimport path from 'path';\n\n// ---------------------------------------------------------------------------\n// Configuration\n// ---------------------------------------------------------------------------\n\nexport interface NoscriptSection {\n /** Anchor ID (used in href=\"#id\" links) */\n id: string;\n /** Display title in the navigation bar */\n title: string;\n /** Static HTML content for this section.\n * Can include headings, paragraphs, lists, tables, code blocks, images.\n * Interactive elements (buttons, inputs) are stripped automatically. */\n html: string;\n}\n\nexport interface NoscriptPluginConfig {\n /** Page title shown at the top of the noscript document */\n title?: string;\n /** Subtitle / description shown below the title */\n description?: string;\n /** Sections to render in the noscript block */\n sections: NoscriptSection[];\n /** Copyright notice shown at the bottom */\n copyright?: string;\n /** CSS class prefix for noscript elements (default: 'ns') */\n classPrefix?: string;\n /** Maximum content length in bytes before truncation warning (default: 512KB) */\n maxContentSize?: number;\n}\n\n// ---------------------------------------------------------------------------\n// HTML sanitization\n// ---------------------------------------------------------------------------\n\n/**\n * Allowed HTML tags for noscript content.\n * Only these tags are preserved \u2014 everything else is stripped.\n * This whitelist approach avoids the inherent insecurity of\n * regex-based blocklist sanitization (no bypasses possible).\n */\nconst ALLOWED_TAGS = new Set([\n 'h1',\n 'h2',\n 'h3',\n 'h4',\n 'h5',\n 'h6',\n 'p',\n 'br',\n 'hr',\n 'blockquote',\n 'ul',\n 'ol',\n 'li',\n 'dl',\n 'dt',\n 'dd',\n 'table',\n 'thead',\n 'tbody',\n 'tfoot',\n 'tr',\n 'th',\n 'td',\n 'caption',\n 'a',\n 'strong',\n 'em',\n 'b',\n 'i',\n 'u',\n 's',\n 'code',\n 'pre',\n 'kbd',\n 'samp',\n 'span',\n 'div',\n 'section',\n 'article',\n 'aside',\n 'header',\n 'footer',\n 'nav',\n 'img',\n 'figure',\n 'figcaption',\n 'picture',\n 'source',\n 'details',\n 'summary',\n 'mark',\n 'small',\n 'sub',\n 'sup',\n 'abbr',\n 'time',\n]);\n\n/** Tags whose content is removed entirely (not just the tag itself) */\nconst CONTENT_BLOCK_TAGS = new Set([\n 'script',\n 'style',\n 'textarea',\n 'select',\n 'noscript',\n 'iframe',\n 'object',\n 'embed',\n 'applet',\n]);\n\n/** Allowed attributes (no event handlers, no javascript: URIs) */\nconst ALLOWED_ATTRS = new Set([\n 'href',\n 'src',\n 'alt',\n 'title',\n 'width',\n 'height',\n 'class',\n 'id',\n 'name',\n 'colspan',\n 'rowspan',\n 'scope',\n 'rel',\n 'target',\n 'lang',\n 'dir',\n 'role',\n 'aria-label',\n 'aria-describedby',\n 'aria-hidden',\n 'style', // style is allowed but javascript: URIs within it are stripped\n]);\n\n/**\n * Strip interactive elements from HTML using a whitelist approach.\n * Only allowed tags with allowed attributes are kept. All other\n * tags are removed (their text content is preserved). This is\n * immune to regex bypass attacks because unknown tags are never\n * emitted \u2014 they're simply not in the whitelist.\n */\nexport function stripInteractiveElements(html: string): string {\n // Parse tags iteratively \u2014 no regex on untrusted HTML structure\n const out: string[] = [];\n let i = 0;\n const len = html.length;\n\n while (i < len) {\n const ltIdx = html.indexOf('<', i);\n if (ltIdx === -1) {\n // No more tags \u2014 emit remaining text\n out.push(html.slice(i));\n break;\n }\n\n // Emit text before the tag\n if (ltIdx > i) out.push(html.slice(i, ltIdx));\n\n // Find end of tag\n const gtIdx = html.indexOf('>', ltIdx);\n if (gtIdx === -1) {\n // Unclosed tag \u2014 emit as text\n out.push(html.slice(ltIdx));\n break;\n }\n\n const tagContent = html.slice(ltIdx + 1, gtIdx);\n const isClosing = tagContent.startsWith('/');\n const tagBody = isClosing ? tagContent.slice(1).trim() : tagContent.trim();\n\n // Extract tag name (first word)\n const spaceIdx = tagBody.search(/[\\s/]/);\n const tagName = (spaceIdx === -1 ? tagBody : tagBody.slice(0, spaceIdx)).toLowerCase();\n\n if (ALLOWED_TAGS.has(tagName)) {\n if (isClosing) {\n out.push(`</${tagName}>`);\n } else {\n // Rebuild tag with only allowed attributes\n const attrStr = spaceIdx === -1 ? '' : tagBody.slice(spaceIdx);\n const safeAttrs = filterAttributes(attrStr);\n const selfClose = tagContent.trimEnd().endsWith('/') ? ' /' : '';\n out.push(`<${tagName}${safeAttrs}${selfClose}>`);\n }\n } else if (!isClosing && CONTENT_BLOCK_TAGS.has(tagName)) {\n // Blocked tags whose CONTENT must also be removed (script, textarea, select, style)\n // Skip everything until the matching closing tag\n const closeTag = `</${tagName}`;\n const closeIdx = html.toLowerCase().indexOf(closeTag, gtIdx + 1);\n if (closeIdx !== -1) {\n const closeGt = html.indexOf('>', closeIdx);\n i = closeGt !== -1 ? closeGt + 1 : gtIdx + 1;\n continue;\n }\n }\n // else: tag not in whitelist \u2014 silently dropped (text content preserved)\n\n i = gtIdx + 1;\n }\n\n return out.join('');\n}\n\n/** Filter attributes: keep only whitelisted, strip javascript: URIs */\nfunction filterAttributes(attrString: string): string {\n const result: string[] = [];\n // Match attr=\"value\" or attr='value' or attr=value or standalone attr\n const attrRegex = /([a-z][a-z0-9-]*)\\s*(?:=\\s*(?:\"([^\"]*)\"|'([^']*)'|(\\S+)))?/gi;\n let match: RegExpExecArray | null;\n while ((match = attrRegex.exec(attrString)) !== null) {\n const name = match[1]!.toLowerCase();\n const value = match[2] ?? match[3] ?? match[4] ?? '';\n if (!ALLOWED_ATTRS.has(name)) continue;\n // Block javascript: URIs in href/src/style\n if (/javascript\\s*:/i.test(value)) continue;\n result.push(` ${name}=\"${escapeAttrValue(value)}\"`);\n }\n return result.join('');\n}\n\nfunction escapeAttrValue(val: string): string {\n return val\n .replace(/&/g, '&')\n .replace(/\"/g, '"')\n .replace(/</g, '<')\n .replace(/>/g, '>');\n}\n\n// ---------------------------------------------------------------------------\n// Noscript HTML generation\n// ---------------------------------------------------------------------------\n\nexport function generateNoscriptHtml(config: NoscriptPluginConfig): string {\n const prefix = config.classPrefix ?? 'ns';\n const sections = config.sections;\n\n if (sections.length === 0) return '';\n\n // Navigation bar\n const navLinks = sections\n .map((s) => `<a href=\"#${s.id}\" class=\"${prefix}-nav-link\">${escapeHtml(s.title)}</a>`)\n .join('\\n ');\n\n // Section blocks\n const sectionBlocks = sections\n .map((s) => {\n const cleanHtml = stripInteractiveElements(s.html);\n return `\n <section id=\"${s.id}\" class=\"${prefix}-section\">\n <h2 class=\"${prefix}-section-title\">${escapeHtml(s.title)}</h2>\n <div class=\"${prefix}-section-content\">\n ${cleanHtml}\n </div>\n <p class=\"${prefix}-back-to-top\"><a href=\"#${prefix}-top\">Back to top</a></p>\n </section>`;\n })\n .join('\\n');\n\n const title = config.title ? `<h1 class=\"${prefix}-title\">${escapeHtml(config.title)}</h1>` : '';\n const desc = config.description\n ? `<p class=\"${prefix}-desc\">${escapeHtml(config.description)}</p>`\n : '';\n const copyright = config.copyright\n ? `<footer class=\"${prefix}-footer\"><p>${escapeHtml(config.copyright)}</p></footer>`\n : '';\n\n return `\n <noscript>\n <style>\n .${prefix}-container {\n max-width: 900px;\n margin: 0 auto;\n padding: 20px;\n font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif;\n line-height: 1.6;\n color: #1f2937;\n }\n .${prefix}-title {\n font-size: 2rem;\n margin-bottom: 0.5rem;\n color: #0f172a;\n }\n .${prefix}-desc {\n font-size: 1.1rem;\n color: #64748b;\n margin-bottom: 1.5rem;\n }\n .${prefix}-nav {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n padding: 12px 0;\n border-bottom: 1px solid #e2e8f0;\n margin-bottom: 2rem;\n position: sticky;\n top: 0;\n background: white;\n z-index: 10;\n }\n .${prefix}-nav-link {\n padding: 6px 14px;\n border-radius: 6px;\n background: #f1f5f9;\n color: #3b82f6;\n text-decoration: none;\n font-size: 14px;\n font-weight: 500;\n }\n .${prefix}-nav-link:hover {\n background: #3b82f6;\n color: white;\n }\n .${prefix}-section {\n margin-bottom: 3rem;\n padding-bottom: 2rem;\n border-bottom: 1px solid #f1f5f9;\n }\n .${prefix}-section-title {\n font-size: 1.5rem;\n color: #1e293b;\n margin-bottom: 1rem;\n padding-top: 1rem;\n }\n .${prefix}-section-content h3 {\n font-size: 1.2rem;\n margin-top: 1.5rem;\n color: #334155;\n }\n .${prefix}-section-content p {\n margin: 0.5rem 0;\n }\n .${prefix}-section-content pre {\n background: #1e293b;\n color: #e2e8f0;\n padding: 12px 16px;\n border-radius: 6px;\n overflow-x: auto;\n font-size: 13px;\n line-height: 1.5;\n }\n .${prefix}-section-content code {\n background: #f1f5f9;\n padding: 2px 6px;\n border-radius: 3px;\n font-size: 0.9em;\n }\n .${prefix}-section-content pre code {\n background: none;\n padding: 0;\n }\n .${prefix}-section-content table {\n width: 100%;\n border-collapse: collapse;\n margin: 1rem 0;\n }\n .${prefix}-section-content th,\n .${prefix}-section-content td {\n padding: 8px 12px;\n border: 1px solid #e2e8f0;\n text-align: left;\n }\n .${prefix}-section-content th {\n background: #f8fafc;\n font-weight: 600;\n }\n .${prefix}-section-content img {\n max-width: 100%;\n height: auto;\n }\n .${prefix}-back-to-top {\n font-size: 13px;\n margin-top: 1.5rem;\n }\n .${prefix}-back-to-top a {\n color: #3b82f6;\n text-decoration: none;\n }\n .${prefix}-footer {\n margin-top: 3rem;\n padding-top: 1rem;\n border-top: 1px solid #e2e8f0;\n color: #94a3b8;\n font-size: 13px;\n text-align: center;\n }\n .${prefix}-js-notice {\n background: #fef3c7;\n border: 1px solid #f59e0b;\n border-radius: 6px;\n padding: 12px 16px;\n margin-bottom: 1.5rem;\n font-size: 14px;\n color: #92400e;\n }\n </style>\n <div id=\"${prefix}-top\" class=\"${prefix}-container\">\n ${title}\n ${desc}\n <div class=\"${prefix}-js-notice\">\n This page works best with JavaScript enabled. You are viewing a\n static version of the content.\n </div>\n <nav class=\"${prefix}-nav\" aria-label=\"Section navigation\">\n ${navLinks}\n </nav>\n ${sectionBlocks}\n ${copyright}\n </div>\n </noscript>`;\n}\n\n// ---------------------------------------------------------------------------\n// Helpers\n// ---------------------------------------------------------------------------\n\nfunction escapeHtml(str: string): string {\n return str\n .replace(/&/g, '&')\n .replace(/</g, '<')\n .replace(/>/g, '>')\n .replace(/\"/g, '"');\n}\n\n// ---------------------------------------------------------------------------\n// Vite Plugin\n// ---------------------------------------------------------------------------\n\nexport function specifyJsNoscriptPlugin(config: NoscriptPluginConfig): Plugin {\n return {\n name: 'specifyjs-noscript',\n /* v8 ignore start -- Vite closeBundle hook runs at build time, not in jsdom tests */\n closeBundle() {\n const distDir = path.resolve(process.cwd(), 'dist');\n const indexPath = path.join(distDir, 'index.html');\n\n if (!fs.existsSync(indexPath)) {\n console.warn('[specifyjs-noscript] index.html not found in dist/');\n return;\n }\n\n const noscriptHtml = generateNoscriptHtml(config);\n\n if (!noscriptHtml) {\n console.warn('[specifyjs-noscript] No sections provided, skipping.');\n return;\n }\n\n // Check content size\n const maxSize = config.maxContentSize ?? 512 * 1024;\n const noscriptSize = Buffer.byteLength(noscriptHtml, 'utf-8');\n if (noscriptSize > maxSize) {\n console.warn(\n `[specifyjs-noscript] Noscript content is ${(noscriptSize / 1024).toFixed(0)}KB ` +\n `(limit: ${(maxSize / 1024).toFixed(0)}KB). Consider reducing section content.`,\n );\n }\n\n // Inject before </body>\n let html = fs.readFileSync(indexPath, 'utf-8');\n html = html.replace('</body>', `${noscriptHtml}\\n</body>`);\n fs.writeFileSync(indexPath, html, 'utf-8');\n\n console.log(\n `Generated: noscript fallback (${config.sections.length} sections, ` +\n `${(noscriptSize / 1024).toFixed(1)}KB)`,\n );\n },\n /* v8 ignore stop */\n };\n}\n"],
|
|
5
|
+
"mappings": ";0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,0BAAAE,EAAA,4BAAAC,EAAA,uBAAAC,EAAA,6BAAAC,IAAA,eAAAC,EAAAN,GCaA,IAAAO,EAAe,mBACfC,EAAiB,qBAiCjB,SAASC,EA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D,GAAI,CAACiB,EAAc,CACjB,QAAQ,KAAK,sDAAsD,EACnE,MACF,CAGA,IAAMC,EAAUlB,EAAO,gBAAkB,IAAM,KACzCmB,EAAe,OAAO,WAAWF,EAAc,OAAO,EACxDE,EAAeD,GACjB,QAAQ,KACN,6CAA6CC,EAAe,MAAM,QAAQ,CAAC,CAAC,eAC9DD,EAAU,MAAM,QAAQ,CAAC,CAAC,yCAC1C,EAIF,IAAI7C,EAAO,EAAA2C,QAAG,aAAaD,EAAW,OAAO,EAC7C1C,EAAOA,EAAK,QAAQ,UAAW,GAAG4C,CAAY;AAAA,QAAW,EACzD,EAAAD,QAAG,cAAcD,EAAW1C,EAAM,OAAO,EAEzC,QAAQ,IACN,iCAAiC2B,EAAO,SAAS,MAAM,eACjDmB,EAAe,MAAM,QAAQ,CAAC,CAAC,KACvC,CACF,CAEF,CACF",
|
|
6
|
+
"names": ["index_exports", "__export", "generateNoscriptHtml", "specifyJsNoscriptPlugin", "specifyJsSeoPlugin", "stripInteractiveElements", "__toCommonJS", "import_fs", "import_path", "walkDocs", "rootDir", "results", "stack", "dir", "prefix", "entries", "fs", "entry", "path", "generateSitemap", "siteUrl", "routes", "today", "r", "generateRobots", "extraRules", "lines", "generateLlmsTxt", "config", "docPaths", "descLines", "dl", "guideNames", "p", "apiNames", "g", "a", "specifyJsSeoPlugin", "distDir", "dp", "sitemap", "robots", "llmsTxt", "indexPath", "html", "ldBlocks", "s", "extras", "import_fs", "import_path", "ALLOWED_TAGS", "CONTENT_BLOCK_TAGS", "ALLOWED_ATTRS", "stripInteractiveElements", "html", "out", "i", "len", "ltIdx", "gtIdx", "tagContent", "isClosing", "tagBody", "spaceIdx", "tagName", "attrStr", "safeAttrs", "filterAttributes", "selfClose", "closeTag", "closeIdx", "closeGt", "attrString", "result", "attrRegex", "match", "name", "value", "escapeAttrValue", "val", "generateNoscriptHtml", "config", "prefix", "sections", "navLinks", "s", "escapeHtml", "sectionBlocks", "cleanHtml", "title", "desc", "copyright", "str", "specifyJsNoscriptPlugin", "distDir", "path", "indexPath", "fs", "noscriptHtml", "maxSize", "noscriptSize"]
|
|
7
|
+
}
|
|
@@ -1,110 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* SpecifyJS SEO Plugin for Vite
|
|
5
|
-
* Auto-generates sitemap.xml, robots.txt, and llms.txt at build time.
|
|
6
|
-
*
|
|
7
|
-
* Usage in vite.config.ts:
|
|
8
|
-
* import { specifyJsSeoPlugin } from '@asymmetric-effort/specifyjs/build';
|
|
9
|
-
* export default defineConfig({ plugins: [specifyJsSeoPlugin({ ... })] });
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
interface SeoPluginConfig {
|
|
13
|
-
/** Base URL of the site (e.g., 'https://example.com') */
|
|
14
|
-
siteUrl: string;
|
|
15
|
-
/** Site title for llms.txt */
|
|
16
|
-
title?: string;
|
|
17
|
-
/** Site description for llms.txt */
|
|
18
|
-
description?: string;
|
|
19
|
-
/** Hash-based routes to include in sitemap */
|
|
20
|
-
routes?: string[];
|
|
21
|
-
/** Path to docs directory (generates doc routes in sitemap) */
|
|
22
|
-
docsDir?: string;
|
|
23
|
-
/** npm package name for llms.txt install instructions */
|
|
24
|
-
npmPackage?: string;
|
|
25
|
-
/** Author name for llms.txt */
|
|
26
|
-
author?: string;
|
|
27
|
-
/** License for llms.txt */
|
|
28
|
-
license?: string;
|
|
29
|
-
/** Additional robots.txt rules */
|
|
30
|
-
robotsRules?: string[];
|
|
31
|
-
/** Repository URL for llms.txt */
|
|
32
|
-
repository?: string;
|
|
33
|
-
/** Schema.org structured data (JSON-LD). When provided, a
|
|
34
|
-
* `<script type="application/ld+json">` block is injected into index.html.
|
|
35
|
-
* Can be a plain object or an array of objects for multiple schemas. */
|
|
36
|
-
jsonLd?: Record<string, unknown> | Record<string, unknown>[];
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Create the SpecifyJS SEO Vite plugin.
|
|
40
|
-
*
|
|
41
|
-
* Generates sitemap.xml, robots.txt, and llms.txt in the build output directory
|
|
42
|
-
* during the closeBundle hook.
|
|
43
|
-
*/
|
|
44
|
-
declare function specifyJsSeoPlugin(config: SeoPluginConfig): Plugin;
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* SpecifyJS Noscript Plugin for Vite
|
|
48
|
-
*
|
|
49
|
-
* Generates a `<noscript>` fallback block inside the built index.html,
|
|
50
|
-
* providing a fully navigable static HTML document for environments
|
|
51
|
-
* where JavaScript is disabled (accessibility) or not executed
|
|
52
|
-
* (search engine crawlers).
|
|
53
|
-
*
|
|
54
|
-
* The noscript content is a single long-form document with:
|
|
55
|
-
* - A navigation bar with anchor links to each section
|
|
56
|
-
* - Each section rendered as semantic HTML (headings, paragraphs, lists)
|
|
57
|
-
* - Internal links mapped to `#section-id` anchors
|
|
58
|
-
*
|
|
59
|
-
* Usage in vite.config.ts:
|
|
60
|
-
* import { specifyJsNoscriptPlugin } from 'specifyjs/build';
|
|
61
|
-
* export default defineConfig({
|
|
62
|
-
* plugins: [
|
|
63
|
-
* specifyJsNoscriptPlugin({
|
|
64
|
-
* title: 'My App',
|
|
65
|
-
* sections: [
|
|
66
|
-
* { id: 'home', title: 'Home', html: '<h1>Welcome</h1><p>...</p>' },
|
|
67
|
-
* { id: 'docs', title: 'Docs', html: '<h2>Getting Started</h2>...' },
|
|
68
|
-
* ],
|
|
69
|
-
* }),
|
|
70
|
-
* ],
|
|
71
|
-
* });
|
|
72
|
-
*/
|
|
73
|
-
|
|
74
|
-
interface NoscriptSection {
|
|
75
|
-
/** Anchor ID (used in href="#id" links) */
|
|
76
|
-
id: string;
|
|
77
|
-
/** Display title in the navigation bar */
|
|
78
|
-
title: string;
|
|
79
|
-
/** Static HTML content for this section.
|
|
80
|
-
* Can include headings, paragraphs, lists, tables, code blocks, images.
|
|
81
|
-
* Interactive elements (buttons, inputs) are stripped automatically. */
|
|
82
|
-
html: string;
|
|
83
|
-
}
|
|
84
|
-
interface NoscriptPluginConfig {
|
|
85
|
-
/** Page title shown at the top of the noscript document */
|
|
86
|
-
title?: string;
|
|
87
|
-
/** Subtitle / description shown below the title */
|
|
88
|
-
description?: string;
|
|
89
|
-
/** Sections to render in the noscript block */
|
|
90
|
-
sections: NoscriptSection[];
|
|
91
|
-
/** Copyright notice shown at the bottom */
|
|
92
|
-
copyright?: string;
|
|
93
|
-
/** CSS class prefix for noscript elements (default: 'ns') */
|
|
94
|
-
classPrefix?: string;
|
|
95
|
-
/** Maximum content length in bytes before truncation warning (default: 512KB) */
|
|
96
|
-
maxContentSize?: number;
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* Strip interactive elements from HTML using a whitelist approach.
|
|
100
|
-
* Only allowed tags with allowed attributes are kept. All other
|
|
101
|
-
* tags are removed (their text content is preserved). This is
|
|
102
|
-
* immune to regex bypass attacks because unknown tags are never
|
|
103
|
-
* emitted — they're simply not in the whitelist.
|
|
104
|
-
*/
|
|
105
|
-
declare function stripInteractiveElements(html: string): string;
|
|
106
|
-
declare function generateNoscriptHtml(config: NoscriptPluginConfig): string;
|
|
107
|
-
declare function specifyJsNoscriptPlugin(config: NoscriptPluginConfig): Plugin;
|
|
108
|
-
|
|
109
|
-
export { generateNoscriptHtml, specifyJsNoscriptPlugin, specifyJsSeoPlugin, stripInteractiveElements };
|
|
110
|
-
export type { NoscriptPluginConfig, NoscriptSection, SeoPluginConfig };
|
|
1
|
+
export * from "./types/build/index";
|
|
@@ -1,2 +1,161 @@
|
|
|
1
|
-
|
|
1
|
+
/* (c) 2025-2026 Asymmetric Effort, LLC. MIT LICENSE */
|
|
2
|
+
import d from"fs";import u from"path";function w(t,e){let n=[{dir:t,prefix:""}];for(;n.length>0;){let{dir:s,prefix:o}=n.pop(),r=d.readdirSync(s,{withFileTypes:!0});for(let i of r)i.isDirectory()?n.push({dir:u.join(s,i.name),prefix:o+i.name+"/"}):i.name.endsWith(".md")&&e.push(o+i.name.replace(".md",""))}}function S(t,e,n){return['<?xml version="1.0" encoding="UTF-8"?>','<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">',...e.map(o=>` <url><loc>${t}${o}</loc><lastmod>${n}</lastmod></url>`),"</urlset>"].join(`
|
|
3
|
+
`)}function k(t,e){let n=["User-agent: *","Allow: /"];return e&&n.push(...e),n.push("",`Sitemap: ${t}/sitemap.xml`),n.join(`
|
|
4
|
+
`)}function v(t,e){let s=[`# ${t.title??"Site"}`];if(t.description){s.push("");let i=t.description.split(`
|
|
5
|
+
`);for(let p of i)s.push(`> ${p}`)}s.push(""),s.push(`## Website: ${t.siteUrl}`),t.repository&&s.push(`## Repository: ${t.repository}`),t.npmPackage&&s.push(`## npm: https://www.npmjs.com/package/${t.npmPackage}`);let o=e.filter(i=>i.startsWith("guides/")).map(i=>i.replace("guides/","")),r=e.filter(i=>i.startsWith("api/")).map(i=>i.replace("api/",""));if(o.length>0){s.push("","## Documentation","");for(let i of o)s.push(`- ${i}: ${t.siteUrl}/#/docs/guides/${i}`)}if(r.length>0){s.push("","## API Reference","");for(let i of r)s.push(`- ${i}: ${t.siteUrl}/#/docs/api/${i}`)}return t.npmPackage&&s.push("","## Install","","```",`npm install ${t.npmPackage}`,"```"),t.license&&s.push("",`## License: ${t.license}`),t.author&&s.push(`## Author: ${t.author}`),s.join(`
|
|
6
|
+
`)}function j(t){return{name:"specifyjs-seo",closeBundle(){let e=u.resolve(process.cwd(),"dist"),n=new Date().toISOString().split("T")[0]??"",s=[...t.routes??["/"]],o=[];if(t.docsDir&&d.existsSync(t.docsDir)){w(t.docsDir,o);for(let a of o)s.push(`/#/docs/${a}`)}let r=S(t.siteUrl,s,n);d.writeFileSync(u.join(e,"sitemap.xml"),r);let i=k(t.siteUrl,t.robotsRules);d.writeFileSync(u.join(e,"robots.txt"),i);let p=v(t,o);if(d.writeFileSync(u.join(e,"llms.txt"),p),t.jsonLd){let a=u.join(e,"index.html");if(d.existsSync(a)){let l=d.readFileSync(a,"utf-8"),g=(Array.isArray(t.jsonLd)?t.jsonLd:[t.jsonLd]).map(m=>`<script type="application/ld+json">${JSON.stringify(m)}<\/script>`).join(`
|
|
7
|
+
`);l=l.replace("</head>",` ${g}
|
|
8
|
+
</head>`),d.writeFileSync(a,l,"utf-8")}}let c=t.jsonLd?", JSON-LD":"";console.log(`Generated: sitemap.xml (${s.length} URLs), robots.txt, llms.txt${c}`)}}}import x from"fs";import $ from"path";var P=new Set(["h1","h2","h3","h4","h5","h6","p","br","hr","blockquote","ul","ol","li","dl","dt","dd","table","thead","tbody","tfoot","tr","th","td","caption","a","strong","em","b","i","u","s","code","pre","kbd","samp","span","div","section","article","aside","header","footer","nav","img","figure","figcaption","picture","source","details","summary","mark","small","sub","sup","abbr","time"]),L=new Set(["script","style","textarea","select","noscript","iframe","object","embed","applet"]),N=new Set(["href","src","alt","title","width","height","class","id","name","colspan","rowspan","scope","rel","target","lang","dir","role","aria-label","aria-describedby","aria-hidden","style"]);function b(t){let e=[],n=0,s=t.length;for(;n<s;){let o=t.indexOf("<",n);if(o===-1){e.push(t.slice(n));break}o>n&&e.push(t.slice(n,o));let r=t.indexOf(">",o);if(r===-1){e.push(t.slice(o));break}let i=t.slice(o+1,r),p=i.startsWith("/"),c=p?i.slice(1).trim():i.trim(),a=c.search(/[\s/]/),l=(a===-1?c:c.slice(0,a)).toLowerCase();if(P.has(l))if(p)e.push(`</${l}>`);else{let h=a===-1?"":c.slice(a),g=C(h),m=i.trimEnd().endsWith("/")?" /":"";e.push(`<${l}${g}${m}>`)}else if(!p&&L.has(l)){let h=`</${l}`,g=t.toLowerCase().indexOf(h,r+1);if(g!==-1){let m=t.indexOf(">",g);n=m!==-1?m+1:r+1;continue}}n=r+1}return e.join("")}function C(t){let e=[],n=/([a-z][a-z0-9-]*)\s*(?:=\s*(?:"([^"]*)"|'([^']*)'|(\S+)))?/gi,s;for(;(s=n.exec(t))!==null;){let o=s[1].toLowerCase(),r=s[2]??s[3]??s[4]??"";N.has(o)&&(/javascript\s*:/i.test(r)||e.push(` ${o}="${z(r)}"`))}return e.join("")}function z(t){return t.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}function y(t){let e=t.classPrefix??"ns",n=t.sections;if(n.length===0)return"";let s=n.map(c=>`<a href="#${c.id}" class="${e}-nav-link">${f(c.title)}</a>`).join(`
|
|
9
|
+
`),o=n.map(c=>{let a=b(c.html);return`
|
|
10
|
+
<section id="${c.id}" class="${e}-section">
|
|
11
|
+
<h2 class="${e}-section-title">${f(c.title)}</h2>
|
|
12
|
+
<div class="${e}-section-content">
|
|
13
|
+
${a}
|
|
14
|
+
</div>
|
|
15
|
+
<p class="${e}-back-to-top"><a href="#${e}-top">Back to top</a></p>
|
|
16
|
+
</section>`}).join(`
|
|
17
|
+
`),r=t.title?`<h1 class="${e}-title">${f(t.title)}</h1>`:"",i=t.description?`<p class="${e}-desc">${f(t.description)}</p>`:"",p=t.copyright?`<footer class="${e}-footer"><p>${f(t.copyright)}</p></footer>`:"";return`
|
|
18
|
+
<noscript>
|
|
19
|
+
<style>
|
|
20
|
+
.${e}-container {
|
|
21
|
+
max-width: 900px;
|
|
22
|
+
margin: 0 auto;
|
|
23
|
+
padding: 20px;
|
|
24
|
+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
25
|
+
line-height: 1.6;
|
|
26
|
+
color: #1f2937;
|
|
27
|
+
}
|
|
28
|
+
.${e}-title {
|
|
29
|
+
font-size: 2rem;
|
|
30
|
+
margin-bottom: 0.5rem;
|
|
31
|
+
color: #0f172a;
|
|
32
|
+
}
|
|
33
|
+
.${e}-desc {
|
|
34
|
+
font-size: 1.1rem;
|
|
35
|
+
color: #64748b;
|
|
36
|
+
margin-bottom: 1.5rem;
|
|
37
|
+
}
|
|
38
|
+
.${e}-nav {
|
|
39
|
+
display: flex;
|
|
40
|
+
flex-wrap: wrap;
|
|
41
|
+
gap: 8px;
|
|
42
|
+
padding: 12px 0;
|
|
43
|
+
border-bottom: 1px solid #e2e8f0;
|
|
44
|
+
margin-bottom: 2rem;
|
|
45
|
+
position: sticky;
|
|
46
|
+
top: 0;
|
|
47
|
+
background: white;
|
|
48
|
+
z-index: 10;
|
|
49
|
+
}
|
|
50
|
+
.${e}-nav-link {
|
|
51
|
+
padding: 6px 14px;
|
|
52
|
+
border-radius: 6px;
|
|
53
|
+
background: #f1f5f9;
|
|
54
|
+
color: #3b82f6;
|
|
55
|
+
text-decoration: none;
|
|
56
|
+
font-size: 14px;
|
|
57
|
+
font-weight: 500;
|
|
58
|
+
}
|
|
59
|
+
.${e}-nav-link:hover {
|
|
60
|
+
background: #3b82f6;
|
|
61
|
+
color: white;
|
|
62
|
+
}
|
|
63
|
+
.${e}-section {
|
|
64
|
+
margin-bottom: 3rem;
|
|
65
|
+
padding-bottom: 2rem;
|
|
66
|
+
border-bottom: 1px solid #f1f5f9;
|
|
67
|
+
}
|
|
68
|
+
.${e}-section-title {
|
|
69
|
+
font-size: 1.5rem;
|
|
70
|
+
color: #1e293b;
|
|
71
|
+
margin-bottom: 1rem;
|
|
72
|
+
padding-top: 1rem;
|
|
73
|
+
}
|
|
74
|
+
.${e}-section-content h3 {
|
|
75
|
+
font-size: 1.2rem;
|
|
76
|
+
margin-top: 1.5rem;
|
|
77
|
+
color: #334155;
|
|
78
|
+
}
|
|
79
|
+
.${e}-section-content p {
|
|
80
|
+
margin: 0.5rem 0;
|
|
81
|
+
}
|
|
82
|
+
.${e}-section-content pre {
|
|
83
|
+
background: #1e293b;
|
|
84
|
+
color: #e2e8f0;
|
|
85
|
+
padding: 12px 16px;
|
|
86
|
+
border-radius: 6px;
|
|
87
|
+
overflow-x: auto;
|
|
88
|
+
font-size: 13px;
|
|
89
|
+
line-height: 1.5;
|
|
90
|
+
}
|
|
91
|
+
.${e}-section-content code {
|
|
92
|
+
background: #f1f5f9;
|
|
93
|
+
padding: 2px 6px;
|
|
94
|
+
border-radius: 3px;
|
|
95
|
+
font-size: 0.9em;
|
|
96
|
+
}
|
|
97
|
+
.${e}-section-content pre code {
|
|
98
|
+
background: none;
|
|
99
|
+
padding: 0;
|
|
100
|
+
}
|
|
101
|
+
.${e}-section-content table {
|
|
102
|
+
width: 100%;
|
|
103
|
+
border-collapse: collapse;
|
|
104
|
+
margin: 1rem 0;
|
|
105
|
+
}
|
|
106
|
+
.${e}-section-content th,
|
|
107
|
+
.${e}-section-content td {
|
|
108
|
+
padding: 8px 12px;
|
|
109
|
+
border: 1px solid #e2e8f0;
|
|
110
|
+
text-align: left;
|
|
111
|
+
}
|
|
112
|
+
.${e}-section-content th {
|
|
113
|
+
background: #f8fafc;
|
|
114
|
+
font-weight: 600;
|
|
115
|
+
}
|
|
116
|
+
.${e}-section-content img {
|
|
117
|
+
max-width: 100%;
|
|
118
|
+
height: auto;
|
|
119
|
+
}
|
|
120
|
+
.${e}-back-to-top {
|
|
121
|
+
font-size: 13px;
|
|
122
|
+
margin-top: 1.5rem;
|
|
123
|
+
}
|
|
124
|
+
.${e}-back-to-top a {
|
|
125
|
+
color: #3b82f6;
|
|
126
|
+
text-decoration: none;
|
|
127
|
+
}
|
|
128
|
+
.${e}-footer {
|
|
129
|
+
margin-top: 3rem;
|
|
130
|
+
padding-top: 1rem;
|
|
131
|
+
border-top: 1px solid #e2e8f0;
|
|
132
|
+
color: #94a3b8;
|
|
133
|
+
font-size: 13px;
|
|
134
|
+
text-align: center;
|
|
135
|
+
}
|
|
136
|
+
.${e}-js-notice {
|
|
137
|
+
background: #fef3c7;
|
|
138
|
+
border: 1px solid #f59e0b;
|
|
139
|
+
border-radius: 6px;
|
|
140
|
+
padding: 12px 16px;
|
|
141
|
+
margin-bottom: 1.5rem;
|
|
142
|
+
font-size: 14px;
|
|
143
|
+
color: #92400e;
|
|
144
|
+
}
|
|
145
|
+
</style>
|
|
146
|
+
<div id="${e}-top" class="${e}-container">
|
|
147
|
+
${r}
|
|
148
|
+
${i}
|
|
149
|
+
<div class="${e}-js-notice">
|
|
150
|
+
This page works best with JavaScript enabled. You are viewing a
|
|
151
|
+
static version of the content.
|
|
152
|
+
</div>
|
|
153
|
+
<nav class="${e}-nav" aria-label="Section navigation">
|
|
154
|
+
${s}
|
|
155
|
+
</nav>
|
|
156
|
+
${o}
|
|
157
|
+
${p}
|
|
158
|
+
</div>
|
|
159
|
+
</noscript>`}function f(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}function A(t){return{name:"specifyjs-noscript",closeBundle(){let e=$.resolve(process.cwd(),"dist"),n=$.join(e,"index.html");if(!x.existsSync(n)){console.warn("[specifyjs-noscript] index.html not found in dist/");return}let s=y(t);if(!s){console.warn("[specifyjs-noscript] No sections provided, skipping.");return}let o=t.maxContentSize??512*1024,r=Buffer.byteLength(s,"utf-8");r>o&&console.warn(`[specifyjs-noscript] Noscript content is ${(r/1024).toFixed(0)}KB (limit: ${(o/1024).toFixed(0)}KB). Consider reducing section content.`);let i=x.readFileSync(n,"utf-8");i=i.replace("</body>",`${s}
|
|
160
|
+
</body>`),x.writeFileSync(n,i,"utf-8"),console.log(`Generated: noscript fallback (${t.sections.length} sections, ${(r/1024).toFixed(1)}KB)`)}}}export{y as generateNoscriptHtml,A as specifyJsNoscriptPlugin,j as specifyJsSeoPlugin,b as stripInteractiveElements};
|
|
2
161
|
//# sourceMappingURL=specifyjs-build.esm.js.map
|