├── src ├── tooling │ ├── piral-cli │ │ ├── utils.d.ts │ │ ├── utils.js │ │ ├── src │ │ │ ├── common │ │ │ │ ├── enums.ts │ │ │ │ ├── url.ts │ │ │ │ ├── MemoryStream.ts │ │ │ │ ├── hash.ts │ │ │ │ ├── info.test.ts │ │ │ │ ├── patches.ts │ │ │ │ ├── validate.ts │ │ │ │ ├── patches.test.ts │ │ │ │ ├── parallel.ts │ │ │ │ └── browser.ts │ │ │ ├── types │ │ │ │ └── index.ts │ │ │ ├── pb-cli.ts │ │ │ ├── pilet-cli.ts │ │ │ ├── piral-cli.ts │ │ │ ├── shared-dependencies.ts │ │ │ ├── index.ts │ │ │ ├── start.ts │ │ │ ├── runner.ts │ │ │ ├── platforms │ │ │ │ └── node.ts │ │ │ ├── inject.ts │ │ │ └── rules │ │ │ │ ├── piral-entry-ends-with-html.ts │ │ │ │ ├── piral-depends-on-piral.ts │ │ │ │ └── pilet-has-no-third-party-dependency.ts │ │ └── tsconfig.json │ ├── piral-cli-webpack5 │ │ ├── src │ │ │ ├── constants.ts │ │ │ ├── index.ts │ │ │ ├── webpack-hot-middleware │ │ │ │ └── helpers.js │ │ │ ├── plugins │ │ │ │ ├── StylesLoader.ts │ │ │ │ └── SheetLoader.ts │ │ │ ├── enhancers │ │ │ │ └── hmr-webpack-config-enhancer │ │ │ │ │ └── HotModuleServerPlugin.ts │ │ │ └── set-path.ts │ │ └── tsconfig.json │ ├── publish-microfrontend │ │ ├── tsconfig.json │ │ └── src │ │ │ ├── common.ts │ │ │ ├── browser.ts │ │ │ └── io.ts │ └── README.md ├── converters │ ├── piral-ng │ │ ├── common.d.ts │ │ ├── common.js │ │ ├── core-dynamic.js │ │ ├── src │ │ │ ├── index.ts │ │ │ ├── constants.ts │ │ │ ├── queue.ts │ │ │ ├── injection.ts │ │ │ └── queue.test.ts │ │ └── tsconfig.json │ ├── piral-cycle │ │ ├── src │ │ │ └── index.ts │ │ └── tsconfig.json │ ├── piral-elm │ │ ├── src │ │ │ ├── index.ts │ │ │ └── extension.ts │ │ └── tsconfig.json │ ├── piral-ember │ │ ├── src │ │ │ ├── index.ts │ │ │ └── extension.ts │ │ └── tsconfig.json │ ├── piral-litel │ │ ├── src │ │ │ └── index.ts │ │ └── tsconfig.json │ ├── piral-ngjs │ │ ├── src │ │ │ └── index.ts │ │ └── tsconfig.json │ ├── piral-react │ │ ├── src │ │ │ └── index.ts │ │ └── tsconfig.json │ ├── piral-riot │ │ ├── src │ │ │ └── index.ts │ │ └── tsconfig.json │ ├── piral-solid │ │ ├── src │ │ │ └── index.ts │ │ └── tsconfig.json │ ├── piral-vue-3 │ │ ├── src │ │ │ ├── index.ts │ │ │ └── mount.ts │ │ ├── tsconfig.json │ │ └── extend-webpack.js │ ├── piral-vue │ │ ├── src │ │ │ └── index.ts │ │ ├── tsconfig.json │ │ └── extend-webpack.js │ ├── piral-aurelia │ │ ├── src │ │ │ └── index.ts │ │ └── tsconfig.json │ ├── piral-blazor │ │ ├── src │ │ │ └── index.ts │ │ ├── infra.codegen.d.ts │ │ └── tsconfig.json │ ├── piral-hyperapp │ │ ├── src │ │ │ ├── index.ts │ │ │ ├── mount.ts │ │ │ └── extension.ts │ │ └── tsconfig.json │ ├── piral-inferno │ │ ├── src │ │ │ └── index.ts │ │ └── tsconfig.json │ ├── piral-million │ │ ├── src │ │ │ ├── index.ts │ │ │ ├── extension.ts │ │ │ ├── mount.ts │ │ │ └── converter.ts │ │ └── tsconfig.json │ ├── piral-mithril │ │ ├── src │ │ │ ├── index.ts │ │ │ └── extension.ts │ │ └── tsconfig.json │ ├── piral-preact │ │ ├── src │ │ │ └── index.ts │ │ └── tsconfig.json │ ├── piral-react-15 │ │ ├── src │ │ │ ├── index.ts │ │ │ └── react15.d.ts │ │ └── tsconfig.json │ └── piral-svelte │ │ ├── src │ │ ├── index.ts │ │ └── extension.ts │ │ └── tsconfig.json ├── framework │ ├── piral-base │ │ ├── full.d.ts │ │ ├── node.d.ts │ │ ├── minimal.d.ts │ │ ├── src │ │ │ ├── lifecycle │ │ │ │ └── index.ts │ │ │ ├── types │ │ │ │ └── index.ts │ │ │ ├── utils │ │ │ │ ├── index.ts │ │ │ │ ├── empty.ts │ │ │ │ └── helpers.ts │ │ │ ├── index.minimal.ts │ │ │ ├── index.node.ts │ │ │ ├── index.full.ts │ │ │ ├── loaders │ │ │ │ ├── v0 │ │ │ │ │ └── fetch.ts │ │ │ │ ├── bundle │ │ │ │ │ └── dependency.ts │ │ │ │ └── v1 │ │ │ │ │ └── dependency.ts │ │ │ └── api.ts │ │ └── tsconfig.json │ ├── piral │ │ ├── polyfills.js │ │ ├── src │ │ │ ├── index.tsx │ │ │ ├── run.test.ts │ │ │ ├── app.test.ts │ │ │ └── options.ts │ │ └── tsconfig.json │ ├── piral-core │ │ ├── styles │ │ │ ├── package.json │ │ │ └── sheet.css │ │ ├── src │ │ │ ├── modules │ │ │ │ └── index.ts │ │ │ ├── state │ │ │ │ ├── index.ts │ │ │ │ └── stateContext.tsx │ │ │ ├── actions │ │ │ │ ├── index.ts │ │ │ │ ├── define.ts │ │ │ │ └── state.ts │ │ │ ├── utils │ │ │ │ ├── react.tsx │ │ │ │ ├── index.ts │ │ │ │ ├── guid.ts │ │ │ │ └── media-server.test.ts │ │ │ ├── hooks │ │ │ │ ├── index.ts │ │ │ │ ├── actions.ts │ │ │ │ ├── action.ts │ │ │ │ ├── setter.ts │ │ │ │ ├── piletApi.ts │ │ │ │ ├── actions.test.ts │ │ │ │ ├── setter-server.test.ts │ │ │ │ └── setter.test.ts │ │ │ ├── setters │ │ │ │ └── index.ts │ │ │ ├── index.tsx │ │ │ ├── defaults │ │ │ │ ├── DefaultLoadingIndicator.tsx │ │ │ │ ├── DefaultRouter_wouter.tsx │ │ │ │ ├── DefaultRouter_v5.tsx │ │ │ │ ├── DefaultRouter_v6.tsx │ │ │ │ ├── DefaultLayout.tsx │ │ │ │ ├── DefaultRouter_v7.tsx │ │ │ │ ├── DefaultLoadingIndicator.test.tsx │ │ │ │ ├── DefaultRouteSwitch_v5.tsx │ │ │ │ └── DefaultErrorInfo.tsx │ │ │ ├── components │ │ │ │ ├── PortalRenderer.tsx │ │ │ │ ├── index.ts │ │ │ │ ├── PiralGlobals.tsx │ │ │ │ └── PiralSuspense.tsx │ │ │ ├── types │ │ │ │ ├── index.ts │ │ │ │ ├── plugin.ts │ │ │ │ └── layout.ts │ │ │ └── tools │ │ │ │ └── emulator.ts │ │ └── tsconfig.json │ ├── siteless │ │ ├── tsconfig.json │ │ └── src │ │ │ └── index.html │ └── README.md ├── utilities │ ├── piral-debug-utils │ │ ├── debug.d.ts │ │ ├── emulator.d.ts │ │ ├── src │ │ │ ├── index.ts │ │ │ └── routeRefresh.ts │ │ └── tsconfig.json │ ├── piral-hooks-utils │ │ ├── src │ │ │ ├── hocs │ │ │ │ └── index.ts │ │ │ ├── contexts │ │ │ │ ├── index.ts │ │ │ │ └── PiletApiProvider.ts │ │ │ ├── index.ts │ │ │ └── hooks │ │ │ │ ├── index.ts │ │ │ │ ├── piletApi.ts │ │ │ │ └── lockBodyScroll.ts │ │ └── tsconfig.json │ └── README.md ├── initializers │ ├── create-pilet │ │ ├── src │ │ │ ├── cli.ts │ │ │ └── index.ts │ │ └── tsconfig.json │ ├── create-piral-instance │ │ ├── src │ │ │ └── cli.ts │ │ └── tsconfig.json │ └── README.md ├── plugins │ ├── piral-auth │ │ ├── src │ │ │ ├── index.ts │ │ │ └── actions.ts │ │ └── tsconfig.json │ ├── piral-axios │ │ ├── src │ │ │ ├── index.ts │ │ │ └── types.ts │ │ └── tsconfig.json │ ├── piral-configs │ │ ├── src │ │ │ └── index.ts │ │ └── tsconfig.json │ ├── piral-lazy │ │ ├── src │ │ │ └── index.ts │ │ └── tsconfig.json │ ├── piral-redux │ │ ├── src │ │ │ └── index.ts │ │ └── tsconfig.json │ ├── piral-tracking │ │ ├── src │ │ │ └── index.ts │ │ └── tsconfig.json │ ├── piral-containers │ │ ├── src │ │ │ ├── index.ts │ │ │ └── withPiletState.tsx │ │ └── tsconfig.json │ ├── piral-page-layouts │ │ ├── src │ │ │ └── index.ts │ │ └── tsconfig.json │ ├── piral-adal │ │ ├── src │ │ │ ├── index.ts │ │ │ ├── types.ts │ │ │ ├── setup.test.ts │ │ │ └── create.ts │ │ └── tsconfig.json │ ├── piral-ext │ │ ├── src │ │ │ ├── index.ts │ │ │ └── libs.ts │ │ └── tsconfig.json │ ├── piral-oidc │ │ ├── src │ │ │ ├── index.ts │ │ │ └── create.ts │ │ └── tsconfig.json │ ├── piral-tracker │ │ ├── src │ │ │ ├── index.ts │ │ │ └── Tracker.tsx │ │ └── tsconfig.json │ ├── piral-feeds │ │ ├── src │ │ │ └── index.ts │ │ └── tsconfig.json │ ├── piral-fetch │ │ ├── src │ │ │ └── index.ts │ │ └── tsconfig.json │ ├── piral-menu │ │ ├── src │ │ │ ├── index.ts │ │ │ ├── components.tsx │ │ │ └── default.tsx │ │ └── tsconfig.json │ ├── piral-oauth2 │ │ ├── src │ │ │ ├── index.ts │ │ │ └── create.ts │ │ └── tsconfig.json │ ├── piral-modals │ │ ├── src │ │ │ ├── index.ts │ │ │ ├── components.tsx │ │ │ └── default.tsx │ │ └── tsconfig.json │ ├── piral-dashboard │ │ ├── src │ │ │ ├── index.ts │ │ │ ├── components.tsx │ │ │ └── default.tsx │ │ └── tsconfig.json │ ├── piral-update │ │ ├── src │ │ │ ├── components.tsx │ │ │ ├── index.ts │ │ │ └── default.tsx │ │ └── tsconfig.json │ ├── piral-notifications │ │ ├── src │ │ │ ├── index.ts │ │ │ ├── components.tsx │ │ │ ├── default.tsx │ │ │ └── actions.ts │ │ └── tsconfig.json │ ├── piral-translate │ │ ├── src │ │ │ ├── components.tsx │ │ │ ├── index.ts │ │ │ ├── default.tsx │ │ │ └── Languages.tsx │ │ └── tsconfig.json │ ├── piral-urql │ │ ├── src │ │ │ ├── index.ts │ │ │ ├── queries.test.ts │ │ │ ├── pilets.ts │ │ │ └── setup.test.ts │ │ └── tsconfig.json │ ├── piral-forms │ │ ├── src │ │ │ └── index.ts │ │ └── tsconfig.json │ ├── piral-breadcrumbs │ │ ├── src │ │ │ ├── index.ts │ │ │ ├── components.tsx │ │ │ └── default.tsx │ │ └── tsconfig.json │ └── piral-search │ │ ├── src │ │ ├── index.ts │ │ ├── components.tsx │ │ ├── SearchInput.tsx │ │ ├── Search.tsx │ │ └── default.tsx │ │ └── tsconfig.json ├── samples │ ├── sample-piral │ │ ├── src │ │ │ ├── parts │ │ │ │ ├── index.tsx │ │ │ │ └── menu.tsx │ │ │ ├── images │ │ │ │ ├── de.png │ │ │ │ ├── en.png │ │ │ │ ├── male.png │ │ │ │ ├── female.png │ │ │ │ └── close.svg │ │ │ ├── components │ │ │ │ ├── index.ts │ │ │ │ ├── utils.ts │ │ │ │ └── LanguageIcon.tsx │ │ │ ├── utils.ts │ │ │ └── index.html │ │ ├── piral.json │ │ └── tsconfig.json │ ├── empty-piral │ │ ├── piral.json │ │ ├── tsconfig.json │ │ └── src │ │ │ ├── index.tsx │ │ │ └── index.html │ ├── minimal-piral │ │ ├── piral.json │ │ ├── tsconfig.json │ │ └── src │ │ │ ├── index.html │ │ │ └── index.tsx │ ├── sample-cross-fx │ │ ├── piral.json │ │ ├── tsconfig.json │ │ └── src │ │ │ └── index.html │ └── sample-piral-core │ │ ├── piral.json │ │ ├── src │ │ ├── elements.d.ts │ │ ├── index.html │ │ ├── close.svg │ │ └── pilets │ │ │ └── dashboard.tsx │ │ └── tsconfig.json └── pages │ ├── www │ ├── src │ │ ├── assets │ │ │ ├── c_an.png │ │ │ ├── c_at.png │ │ │ ├── c_cc.png │ │ │ ├── c_ch.png │ │ │ ├── c_co.png │ │ │ ├── c_gs.png │ │ │ ├── c_hg.png │ │ │ ├── c_ic.png │ │ │ ├── c_lw.png │ │ │ ├── c_nd.png │ │ │ ├── c_pw.png │ │ │ ├── c_rb.png │ │ │ ├── c_sm.png │ │ │ ├── c_sp.png │ │ │ ├── c_ua.png │ │ │ ├── c_ww.png │ │ │ ├── c_zg.png │ │ │ ├── banner.jpg │ │ │ ├── c_hbhc.png │ │ │ ├── face-0.jpg │ │ │ ├── face-1.jpg │ │ │ ├── face-2.jpg │ │ │ ├── face-3.jpg │ │ │ ├── face-4.jpg │ │ │ ├── face-5.jpg │ │ │ ├── face-6.jpg │ │ │ ├── face-7.jpg │ │ │ ├── face-8.jpg │ │ │ ├── face-9.jpg │ │ │ ├── Company-1.png │ │ │ ├── Company-2.png │ │ │ ├── Company-3.png │ │ │ ├── feature-1.png │ │ │ ├── feature-2.png │ │ │ ├── feature-3.png │ │ │ ├── feature-4.png │ │ │ ├── tech-coverage.png │ │ │ ├── tech-guides.png │ │ │ ├── capability-cloud.png │ │ │ ├── capability-license.png │ │ │ ├── capability-smart.png │ │ │ ├── capability-tooling.png │ │ │ ├── tech-declarations.png │ │ │ ├── capability-convenient.png │ │ │ └── capability-performance.png │ │ ├── fonts │ │ │ ├── Lato_300.woff2 │ │ │ ├── Lato_400.woff2 │ │ │ ├── Lato_600.woff2 │ │ │ ├── Lato_700.woff2 │ │ │ ├── Lato_300_ext.woff2 │ │ │ ├── Lato_400_ext.woff2 │ │ │ ├── Lato_700_ext.woff2 │ │ │ ├── Montserrat_400.woff2 │ │ │ ├── Montserrat_500.woff2 │ │ │ ├── Montserrat_400_ext.woff2 │ │ │ └── Montserrat_500_ext.woff2 │ │ ├── scripts │ │ │ ├── index.tsx │ │ │ ├── pages │ │ │ │ ├── OssFriends.tsx │ │ │ │ └── Home.tsx │ │ │ ├── components │ │ │ │ ├── index.ts │ │ │ │ ├── Capability.tsx │ │ │ │ ├── Status.tsx │ │ │ │ └── Feature.tsx │ │ │ └── App.tsx │ │ ├── codegen │ │ │ ├── friends.codegen.d.ts │ │ │ ├── testiomonials.codegen.d.ts │ │ │ └── friends.codegen │ │ └── style │ │ │ └── site.scss │ └── README.md │ ├── docs │ ├── src │ │ ├── Footer.tsx │ │ ├── assets │ │ │ ├── empty.gif │ │ │ ├── top-docs.png │ │ │ ├── top-specs.png │ │ │ ├── top-tools.png │ │ │ ├── top-types.png │ │ │ ├── extensions │ │ │ │ ├── elm.png │ │ │ │ ├── ng.png │ │ │ │ ├── pwa.png │ │ │ │ ├── vue.png │ │ │ │ ├── adal.png │ │ │ │ ├── auth.png │ │ │ │ ├── axios.png │ │ │ │ ├── blazor.png │ │ │ │ ├── cycle.png │ │ │ │ ├── ember.png │ │ │ │ ├── feeds.png │ │ │ │ ├── fetch.png │ │ │ │ ├── forms.png │ │ │ │ ├── lazy.png │ │ │ │ ├── litel.png │ │ │ │ ├── menu.png │ │ │ │ ├── modals.png │ │ │ │ ├── ngjs.png │ │ │ │ ├── oauth2.png │ │ │ │ ├── oidc.png │ │ │ │ ├── preact.png │ │ │ │ ├── react.png │ │ │ │ ├── redux.png │ │ │ │ ├── riot.png │ │ │ │ ├── search.png │ │ │ │ ├── solid.png │ │ │ │ ├── svelte.png │ │ │ │ ├── update.png │ │ │ │ ├── urql.png │ │ │ │ ├── vue-3.png │ │ │ │ ├── aurelia.png │ │ │ │ ├── configs.png │ │ │ │ ├── hyperapp.png │ │ │ │ ├── inferno.png │ │ │ │ ├── million.png │ │ │ │ ├── mithril.png │ │ │ │ ├── react-15.png │ │ │ │ ├── tracker.png │ │ │ │ ├── tracking.png │ │ │ │ ├── breadcrumbs.png │ │ │ │ ├── containers.png │ │ │ │ ├── dashboard.png │ │ │ │ ├── single-spa.png │ │ │ │ ├── translate.png │ │ │ │ ├── notifications.png │ │ │ │ └── page-layouts.png │ │ │ └── top-extensions.png │ │ ├── Logo.tsx │ │ └── NotFound.tsx │ ├── tsconfig.json │ └── README.md │ ├── common │ ├── assets │ │ └── noscript-robot.png │ └── components │ │ ├── Loader.tsx │ │ ├── FooterMenu.tsx │ │ ├── ScrollToTop.tsx │ │ └── Page.tsx │ └── README.md ├── docs ├── assets │ ├── logo.png │ └── logo-simple.png ├── diagrams │ ├── kras.png │ ├── all-demos.png │ ├── demo-core.png │ ├── demo-full.png │ ├── demo-mife.png │ ├── modulith.png │ ├── overview.png │ ├── demo-cross.png │ ├── import-maps.png │ ├── new-api-key.png │ ├── creating-feed.png │ ├── csr-sequence.png │ ├── custom-events.png │ ├── feed-overview.png │ ├── generated-key.png │ ├── ssr-sequence.png │ ├── bundle-splitting.png │ ├── extensions-debug.png │ ├── hybrid-sequence.png │ ├── kras-middleware.png │ ├── module-developer.png │ ├── my-app-structure.png │ ├── pilet-api-vscode.png │ ├── published-pilets.png │ ├── api-key-management.png │ ├── blazor-architecture.png │ ├── my-pilet-structure.png │ ├── vscode-cli-commands.png │ ├── architecture-appshell.png │ ├── architecture-modules.png │ ├── architecture-overview.png │ ├── piral-dev-life-cycle.png │ ├── vscode-create-project.png │ ├── vscode-workspace-info.png │ ├── page-transitions-no-ext.png │ ├── page-transitions-with-ext.png │ ├── piralinspector-features-pages.png │ ├── vscode-piral-instance-details.png │ ├── vscode-integration-activity-bar.png │ ├── piralinspector-devtools-overview.png │ ├── piralinspector-feature-events-list.png │ ├── vscode-codegen-syntax-highlighting.png │ ├── vscode-integration-command-palette.png │ ├── piralinspector-feature-appstate-list.png │ ├── piralinspector-feature-pilets-upload.png │ ├── piralinspector-features-pages-custom.png │ ├── piralinspector-extension-toolbar-gray.png │ ├── piralinspector-extension-toolbar-green.png │ ├── piralinspector-feature-events-publish.png │ ├── piralinspector-feature-extensions-list.png │ ├── piralinspector-feature-pilets-add-feed.png │ ├── piralinspector-feature-dependencies-graph.png │ ├── piralinspector-feature-extensions-render.png │ ├── piralinspector-feature-pilets-available-pilets.png │ ├── piralinspector-setting-state-container-logging.png │ ├── piralinspector-setting-visualize-component-origins-button.png │ ├── piralinspector-setting-visualize-component-origins-result.png │ └── vscode-vsx-logo.svg ├── reference │ ├── README.md │ ├── C32-pilet-validation.md │ └── C22-piral-validation.md ├── logos │ ├── vercel.svg │ ├── cloudflare.svg │ ├── heroku.svg │ ├── render.svg │ ├── github.svg │ └── google-cloud.svg ├── messages │ ├── 0000.md │ ├── 0002.md │ ├── 0004.md │ ├── 0001.md │ ├── 0003.md │ ├── README.md │ ├── 0190.md │ ├── 0082.md │ ├── 0114.md │ ├── 0203.md │ ├── 0202.md │ ├── 0201.md │ ├── 0204.md │ ├── 0206.md │ ├── 0207.md │ ├── 0200.md │ ├── 0205.md │ ├── 0031.md │ ├── 0080.md │ ├── 0030.md │ ├── 0102.md │ ├── 0110.md │ └── 0111.md ├── questions │ └── README.md ├── tools │ └── README.md └── deploy │ └── README.md ├── .github ├── FUNDING.yml ├── workflows │ ├── docs.yml │ └── size.yml ├── ISSUE_TEMPLATE.md └── ISSUE_TEMPLATE │ └── feature_request.md ├── .prettierignore ├── lerna.json ├── .editorconfig ├── prettier.config.js ├── tools └── size-reporter.mjs ├── mlc_config.json └── tsconfig.json /src/tooling/piral-cli/utils.d.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/common'; 2 | -------------------------------------------------------------------------------- /src/converters/piral-ng/common.d.ts: -------------------------------------------------------------------------------- 1 | export * from 'piral-ng-common'; 2 | -------------------------------------------------------------------------------- /src/converters/piral-ng/common.js: -------------------------------------------------------------------------------- 1 | export * from 'piral-ng-common'; 2 | -------------------------------------------------------------------------------- /src/converters/piral-ng/core-dynamic.js: -------------------------------------------------------------------------------- 1 | import '@angular/compiler'; 2 | -------------------------------------------------------------------------------- /src/framework/piral-base/full.d.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/index.full'; 2 | -------------------------------------------------------------------------------- /src/framework/piral-base/node.d.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/index.node'; 2 | -------------------------------------------------------------------------------- /src/framework/piral-base/minimal.d.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/index.minimal'; 2 | -------------------------------------------------------------------------------- /src/framework/piral/polyfills.js: -------------------------------------------------------------------------------- 1 | import 'regenerator-runtime/runtime'; 2 | -------------------------------------------------------------------------------- /src/tooling/piral-cli/utils.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./lib/common'); 2 | -------------------------------------------------------------------------------- /src/utilities/piral-debug-utils/debug.d.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/debug'; 2 | -------------------------------------------------------------------------------- /src/utilities/piral-debug-utils/emulator.d.ts: -------------------------------------------------------------------------------- 1 | export * from './lib/emulator'; 2 | -------------------------------------------------------------------------------- /src/framework/piral-core/styles/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "sideEffects": true 3 | } 4 | -------------------------------------------------------------------------------- /src/utilities/piral-hooks-utils/src/hocs/index.ts: -------------------------------------------------------------------------------- 1 | export * from './withProvider'; 2 | -------------------------------------------------------------------------------- /docs/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/docs/assets/logo.png -------------------------------------------------------------------------------- /docs/diagrams/kras.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/docs/diagrams/kras.png -------------------------------------------------------------------------------- /src/initializers/create-pilet/src/cli.ts: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | require('./index'); 4 | -------------------------------------------------------------------------------- /src/utilities/piral-hooks-utils/src/contexts/index.ts: -------------------------------------------------------------------------------- 1 | export * from './PiletApiProvider'; 2 | -------------------------------------------------------------------------------- /src/converters/piral-cycle/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create'; 2 | export * from './types'; 3 | -------------------------------------------------------------------------------- /src/converters/piral-elm/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create'; 2 | export * from './types'; 3 | -------------------------------------------------------------------------------- /src/converters/piral-ember/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create'; 2 | export * from './types'; 3 | -------------------------------------------------------------------------------- /src/converters/piral-litel/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create'; 2 | export * from './types'; 3 | -------------------------------------------------------------------------------- /src/converters/piral-ngjs/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create'; 2 | export * from './types'; 3 | -------------------------------------------------------------------------------- /src/converters/piral-react/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create'; 2 | export * from './types'; 3 | -------------------------------------------------------------------------------- /src/converters/piral-riot/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create'; 2 | export * from './types'; 3 | -------------------------------------------------------------------------------- /src/converters/piral-solid/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create'; 2 | export * from './types'; 3 | -------------------------------------------------------------------------------- /src/converters/piral-vue-3/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create'; 2 | export * from './types'; 3 | -------------------------------------------------------------------------------- /src/converters/piral-vue/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create'; 2 | export * from './types'; 3 | -------------------------------------------------------------------------------- /src/plugins/piral-auth/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create'; 2 | export * from './types'; 3 | -------------------------------------------------------------------------------- /src/plugins/piral-axios/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create'; 2 | export * from './types'; 3 | -------------------------------------------------------------------------------- /src/plugins/piral-configs/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create'; 2 | export * from './types'; 3 | -------------------------------------------------------------------------------- /src/plugins/piral-lazy/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create'; 2 | export * from './types'; 3 | -------------------------------------------------------------------------------- /src/plugins/piral-redux/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create'; 2 | export * from './types'; 3 | -------------------------------------------------------------------------------- /src/plugins/piral-tracking/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create'; 2 | export * from './types'; 3 | -------------------------------------------------------------------------------- /docs/assets/logo-simple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/docs/assets/logo-simple.png -------------------------------------------------------------------------------- /docs/diagrams/all-demos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/docs/diagrams/all-demos.png -------------------------------------------------------------------------------- /docs/diagrams/demo-core.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/docs/diagrams/demo-core.png -------------------------------------------------------------------------------- /docs/diagrams/demo-full.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/docs/diagrams/demo-full.png -------------------------------------------------------------------------------- /docs/diagrams/demo-mife.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/docs/diagrams/demo-mife.png -------------------------------------------------------------------------------- /docs/diagrams/modulith.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/docs/diagrams/modulith.png -------------------------------------------------------------------------------- /docs/diagrams/overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/docs/diagrams/overview.png -------------------------------------------------------------------------------- /src/converters/piral-aurelia/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create'; 2 | export * from './types'; 3 | -------------------------------------------------------------------------------- /src/converters/piral-blazor/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create'; 2 | export * from './types'; 3 | -------------------------------------------------------------------------------- /src/converters/piral-hyperapp/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create'; 2 | export * from './types'; 3 | -------------------------------------------------------------------------------- /src/converters/piral-inferno/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create'; 2 | export * from './types'; 3 | -------------------------------------------------------------------------------- /src/converters/piral-million/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create'; 2 | export * from './types'; 3 | -------------------------------------------------------------------------------- /src/converters/piral-mithril/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create'; 2 | export * from './types'; 3 | -------------------------------------------------------------------------------- /src/converters/piral-preact/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create'; 2 | export * from './types'; 3 | -------------------------------------------------------------------------------- /src/converters/piral-react-15/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create'; 2 | export * from './types'; 3 | -------------------------------------------------------------------------------- /src/converters/piral-svelte/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create'; 2 | export * from './types'; 3 | -------------------------------------------------------------------------------- /src/initializers/create-piral-instance/src/cli.ts: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | require('./index'); 4 | -------------------------------------------------------------------------------- /src/plugins/piral-containers/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create'; 2 | export * from './types'; 3 | -------------------------------------------------------------------------------- /src/plugins/piral-page-layouts/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create'; 2 | export * from './types'; 3 | -------------------------------------------------------------------------------- /src/samples/sample-piral/src/parts/index.tsx: -------------------------------------------------------------------------------- 1 | export * from './footer'; 2 | export * from './menu'; 3 | -------------------------------------------------------------------------------- /docs/diagrams/demo-cross.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/docs/diagrams/demo-cross.png -------------------------------------------------------------------------------- /docs/diagrams/import-maps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/docs/diagrams/import-maps.png -------------------------------------------------------------------------------- /docs/diagrams/new-api-key.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/docs/diagrams/new-api-key.png -------------------------------------------------------------------------------- /src/framework/piral-base/src/lifecycle/index.ts: -------------------------------------------------------------------------------- 1 | export * from './cleanup'; 2 | export * from './setup'; 3 | -------------------------------------------------------------------------------- /src/tooling/piral-cli-webpack5/src/constants.ts: -------------------------------------------------------------------------------- 1 | export const defaultWebpackConfig = 'webpack.config.js'; 2 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: [smapiot, FlorianRappl] 4 | -------------------------------------------------------------------------------- /docs/diagrams/creating-feed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/docs/diagrams/creating-feed.png -------------------------------------------------------------------------------- /docs/diagrams/csr-sequence.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/docs/diagrams/csr-sequence.png -------------------------------------------------------------------------------- /docs/diagrams/custom-events.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/docs/diagrams/custom-events.png -------------------------------------------------------------------------------- /docs/diagrams/feed-overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/docs/diagrams/feed-overview.png -------------------------------------------------------------------------------- /docs/diagrams/generated-key.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/docs/diagrams/generated-key.png -------------------------------------------------------------------------------- /docs/diagrams/ssr-sequence.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/docs/diagrams/ssr-sequence.png -------------------------------------------------------------------------------- /docs/diagrams/bundle-splitting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/docs/diagrams/bundle-splitting.png -------------------------------------------------------------------------------- /docs/diagrams/extensions-debug.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/docs/diagrams/extensions-debug.png -------------------------------------------------------------------------------- /docs/diagrams/hybrid-sequence.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/docs/diagrams/hybrid-sequence.png -------------------------------------------------------------------------------- /docs/diagrams/kras-middleware.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/docs/diagrams/kras-middleware.png -------------------------------------------------------------------------------- /docs/diagrams/module-developer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/docs/diagrams/module-developer.png -------------------------------------------------------------------------------- /docs/diagrams/my-app-structure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/docs/diagrams/my-app-structure.png -------------------------------------------------------------------------------- /docs/diagrams/pilet-api-vscode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/docs/diagrams/pilet-api-vscode.png -------------------------------------------------------------------------------- /docs/diagrams/published-pilets.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/docs/diagrams/published-pilets.png -------------------------------------------------------------------------------- /src/pages/www/src/assets/c_an.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/www/src/assets/c_an.png -------------------------------------------------------------------------------- /src/pages/www/src/assets/c_at.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/www/src/assets/c_at.png -------------------------------------------------------------------------------- /src/pages/www/src/assets/c_cc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/www/src/assets/c_cc.png -------------------------------------------------------------------------------- /src/pages/www/src/assets/c_ch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/www/src/assets/c_ch.png -------------------------------------------------------------------------------- /src/pages/www/src/assets/c_co.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/www/src/assets/c_co.png -------------------------------------------------------------------------------- /src/pages/www/src/assets/c_gs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/www/src/assets/c_gs.png -------------------------------------------------------------------------------- /src/pages/www/src/assets/c_hg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/www/src/assets/c_hg.png -------------------------------------------------------------------------------- /src/pages/www/src/assets/c_ic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/www/src/assets/c_ic.png -------------------------------------------------------------------------------- /src/pages/www/src/assets/c_lw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/www/src/assets/c_lw.png -------------------------------------------------------------------------------- /src/pages/www/src/assets/c_nd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/www/src/assets/c_nd.png -------------------------------------------------------------------------------- /src/pages/www/src/assets/c_pw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/www/src/assets/c_pw.png -------------------------------------------------------------------------------- /src/pages/www/src/assets/c_rb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/www/src/assets/c_rb.png -------------------------------------------------------------------------------- /src/pages/www/src/assets/c_sm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/www/src/assets/c_sm.png -------------------------------------------------------------------------------- /src/pages/www/src/assets/c_sp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/www/src/assets/c_sp.png -------------------------------------------------------------------------------- /src/pages/www/src/assets/c_ua.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/www/src/assets/c_ua.png -------------------------------------------------------------------------------- /src/pages/www/src/assets/c_ww.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/www/src/assets/c_ww.png -------------------------------------------------------------------------------- /src/pages/www/src/assets/c_zg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/www/src/assets/c_zg.png -------------------------------------------------------------------------------- /src/tooling/piral-cli/src/common/enums.ts: -------------------------------------------------------------------------------- 1 | export enum ForceOverwrite { 2 | no, 3 | prompt, 4 | yes, 5 | } 6 | -------------------------------------------------------------------------------- /docs/diagrams/api-key-management.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/docs/diagrams/api-key-management.png -------------------------------------------------------------------------------- /docs/diagrams/blazor-architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/docs/diagrams/blazor-architecture.png -------------------------------------------------------------------------------- /docs/diagrams/my-pilet-structure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/docs/diagrams/my-pilet-structure.png -------------------------------------------------------------------------------- /docs/diagrams/vscode-cli-commands.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/docs/diagrams/vscode-cli-commands.png -------------------------------------------------------------------------------- /src/pages/docs/src/Footer.tsx: -------------------------------------------------------------------------------- 1 | import { Footer } from '../../common/components/Footer'; 2 | 3 | export default Footer; 4 | -------------------------------------------------------------------------------- /src/pages/docs/src/assets/empty.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/docs/src/assets/empty.gif -------------------------------------------------------------------------------- /src/pages/www/src/assets/banner.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/www/src/assets/banner.jpg -------------------------------------------------------------------------------- /src/pages/www/src/assets/c_hbhc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/www/src/assets/c_hbhc.png -------------------------------------------------------------------------------- /src/pages/www/src/assets/face-0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/www/src/assets/face-0.jpg -------------------------------------------------------------------------------- /src/pages/www/src/assets/face-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/www/src/assets/face-1.jpg -------------------------------------------------------------------------------- /src/pages/www/src/assets/face-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/www/src/assets/face-2.jpg -------------------------------------------------------------------------------- /src/pages/www/src/assets/face-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/www/src/assets/face-3.jpg -------------------------------------------------------------------------------- /src/pages/www/src/assets/face-4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/www/src/assets/face-4.jpg -------------------------------------------------------------------------------- /src/pages/www/src/assets/face-5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/www/src/assets/face-5.jpg -------------------------------------------------------------------------------- /src/pages/www/src/assets/face-6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/www/src/assets/face-6.jpg -------------------------------------------------------------------------------- /src/pages/www/src/assets/face-7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/www/src/assets/face-7.jpg -------------------------------------------------------------------------------- /src/pages/www/src/assets/face-8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/www/src/assets/face-8.jpg -------------------------------------------------------------------------------- /src/pages/www/src/assets/face-9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/www/src/assets/face-9.jpg -------------------------------------------------------------------------------- /src/plugins/piral-adal/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create'; 2 | export * from './setup'; 3 | export * from './types'; 4 | -------------------------------------------------------------------------------- /src/plugins/piral-ext/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create'; 2 | export * from './libs'; 3 | export * from './types'; 4 | -------------------------------------------------------------------------------- /src/plugins/piral-oidc/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create'; 2 | export * from './setup'; 3 | export * from './types'; 4 | -------------------------------------------------------------------------------- /docs/diagrams/architecture-appshell.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/docs/diagrams/architecture-appshell.png -------------------------------------------------------------------------------- /docs/diagrams/architecture-modules.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/docs/diagrams/architecture-modules.png -------------------------------------------------------------------------------- /docs/diagrams/architecture-overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/docs/diagrams/architecture-overview.png -------------------------------------------------------------------------------- /docs/diagrams/piral-dev-life-cycle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/docs/diagrams/piral-dev-life-cycle.png -------------------------------------------------------------------------------- /docs/diagrams/vscode-create-project.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/docs/diagrams/vscode-create-project.png -------------------------------------------------------------------------------- /docs/diagrams/vscode-workspace-info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/docs/diagrams/vscode-workspace-info.png -------------------------------------------------------------------------------- /src/converters/piral-ng/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create'; 2 | export * from './types'; 3 | export * from './injection'; 4 | -------------------------------------------------------------------------------- /src/pages/docs/src/assets/top-docs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/docs/src/assets/top-docs.png -------------------------------------------------------------------------------- /src/pages/docs/src/assets/top-specs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/docs/src/assets/top-specs.png -------------------------------------------------------------------------------- /src/pages/docs/src/assets/top-tools.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/docs/src/assets/top-tools.png -------------------------------------------------------------------------------- /src/pages/docs/src/assets/top-types.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/docs/src/assets/top-types.png -------------------------------------------------------------------------------- /src/pages/www/src/assets/Company-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/www/src/assets/Company-1.png -------------------------------------------------------------------------------- /src/pages/www/src/assets/Company-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/www/src/assets/Company-2.png -------------------------------------------------------------------------------- /src/pages/www/src/assets/Company-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/www/src/assets/Company-3.png -------------------------------------------------------------------------------- /src/pages/www/src/assets/feature-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/www/src/assets/feature-1.png -------------------------------------------------------------------------------- /src/pages/www/src/assets/feature-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/www/src/assets/feature-2.png -------------------------------------------------------------------------------- /src/pages/www/src/assets/feature-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/www/src/assets/feature-3.png -------------------------------------------------------------------------------- /src/pages/www/src/assets/feature-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/www/src/assets/feature-4.png -------------------------------------------------------------------------------- /src/pages/www/src/fonts/Lato_300.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/www/src/fonts/Lato_300.woff2 -------------------------------------------------------------------------------- /src/pages/www/src/fonts/Lato_400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/www/src/fonts/Lato_400.woff2 -------------------------------------------------------------------------------- /src/pages/www/src/fonts/Lato_600.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/www/src/fonts/Lato_600.woff2 -------------------------------------------------------------------------------- /src/pages/www/src/fonts/Lato_700.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/www/src/fonts/Lato_700.woff2 -------------------------------------------------------------------------------- /src/plugins/piral-tracker/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create'; 2 | export * from './Tracker'; 3 | export * from './types'; 4 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | package.json 2 | package-lock.json 3 | src/**/node_modules 4 | src/**/lib 5 | 6 | /.nx/cache 7 | /.nx/workspace-data -------------------------------------------------------------------------------- /docs/diagrams/page-transitions-no-ext.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/docs/diagrams/page-transitions-no-ext.png -------------------------------------------------------------------------------- /src/pages/common/assets/noscript-robot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/common/assets/noscript-robot.png -------------------------------------------------------------------------------- /src/pages/www/src/assets/tech-coverage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/www/src/assets/tech-coverage.png -------------------------------------------------------------------------------- /src/pages/www/src/assets/tech-guides.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/www/src/assets/tech-guides.png -------------------------------------------------------------------------------- /src/pages/www/src/fonts/Lato_300_ext.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/www/src/fonts/Lato_300_ext.woff2 -------------------------------------------------------------------------------- /src/pages/www/src/fonts/Lato_400_ext.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/www/src/fonts/Lato_400_ext.woff2 -------------------------------------------------------------------------------- /src/pages/www/src/fonts/Lato_700_ext.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/www/src/fonts/Lato_700_ext.woff2 -------------------------------------------------------------------------------- /src/samples/sample-piral/src/images/de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/samples/sample-piral/src/images/de.png -------------------------------------------------------------------------------- /src/samples/sample-piral/src/images/en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/samples/sample-piral/src/images/en.png -------------------------------------------------------------------------------- /src/tooling/piral-cli/src/types/index.ts: -------------------------------------------------------------------------------- 1 | export * from './common'; 2 | export * from './internal'; 3 | export * from './public'; 4 | -------------------------------------------------------------------------------- /src/utilities/piral-hooks-utils/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './contexts'; 2 | export * from './hooks'; 3 | export * from './hocs'; 4 | -------------------------------------------------------------------------------- /docs/diagrams/page-transitions-with-ext.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/docs/diagrams/page-transitions-with-ext.png -------------------------------------------------------------------------------- /lerna.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "node_modules/lerna/schemas/lerna-schema.json", 3 | "npmClient": "yarn", 4 | "version": "1.9.2" 5 | } -------------------------------------------------------------------------------- /src/pages/docs/src/assets/extensions/elm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/docs/src/assets/extensions/elm.png -------------------------------------------------------------------------------- /src/pages/docs/src/assets/extensions/ng.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/docs/src/assets/extensions/ng.png -------------------------------------------------------------------------------- /src/pages/docs/src/assets/extensions/pwa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/docs/src/assets/extensions/pwa.png -------------------------------------------------------------------------------- /src/pages/docs/src/assets/extensions/vue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/docs/src/assets/extensions/vue.png -------------------------------------------------------------------------------- /src/pages/docs/src/assets/top-extensions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/docs/src/assets/top-extensions.png -------------------------------------------------------------------------------- /src/pages/www/src/fonts/Montserrat_400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/www/src/fonts/Montserrat_400.woff2 -------------------------------------------------------------------------------- /src/pages/www/src/fonts/Montserrat_500.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/www/src/fonts/Montserrat_500.woff2 -------------------------------------------------------------------------------- /src/samples/empty-piral/piral.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://docs.piral.io/schemas/piral-v0.json", 3 | "isolation": "modern" 4 | } 5 | -------------------------------------------------------------------------------- /src/samples/sample-piral/src/images/male.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/samples/sample-piral/src/images/male.png -------------------------------------------------------------------------------- /docs/diagrams/piralinspector-features-pages.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/docs/diagrams/piralinspector-features-pages.png -------------------------------------------------------------------------------- /docs/diagrams/vscode-piral-instance-details.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/docs/diagrams/vscode-piral-instance-details.png -------------------------------------------------------------------------------- /src/pages/docs/src/assets/extensions/adal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/docs/src/assets/extensions/adal.png -------------------------------------------------------------------------------- /src/pages/docs/src/assets/extensions/auth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/docs/src/assets/extensions/auth.png -------------------------------------------------------------------------------- /src/pages/docs/src/assets/extensions/axios.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/docs/src/assets/extensions/axios.png -------------------------------------------------------------------------------- /src/pages/docs/src/assets/extensions/blazor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/docs/src/assets/extensions/blazor.png -------------------------------------------------------------------------------- /src/pages/docs/src/assets/extensions/cycle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/docs/src/assets/extensions/cycle.png -------------------------------------------------------------------------------- /src/pages/docs/src/assets/extensions/ember.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/docs/src/assets/extensions/ember.png -------------------------------------------------------------------------------- /src/pages/docs/src/assets/extensions/feeds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/docs/src/assets/extensions/feeds.png -------------------------------------------------------------------------------- /src/pages/docs/src/assets/extensions/fetch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/docs/src/assets/extensions/fetch.png -------------------------------------------------------------------------------- /src/pages/docs/src/assets/extensions/forms.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/docs/src/assets/extensions/forms.png -------------------------------------------------------------------------------- /src/pages/docs/src/assets/extensions/lazy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/docs/src/assets/extensions/lazy.png -------------------------------------------------------------------------------- /src/pages/docs/src/assets/extensions/litel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/docs/src/assets/extensions/litel.png -------------------------------------------------------------------------------- /src/pages/docs/src/assets/extensions/menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/docs/src/assets/extensions/menu.png -------------------------------------------------------------------------------- /src/pages/docs/src/assets/extensions/modals.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/docs/src/assets/extensions/modals.png -------------------------------------------------------------------------------- /src/pages/docs/src/assets/extensions/ngjs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/docs/src/assets/extensions/ngjs.png -------------------------------------------------------------------------------- /src/pages/docs/src/assets/extensions/oauth2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/docs/src/assets/extensions/oauth2.png -------------------------------------------------------------------------------- /src/pages/docs/src/assets/extensions/oidc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/docs/src/assets/extensions/oidc.png -------------------------------------------------------------------------------- /src/pages/docs/src/assets/extensions/preact.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/docs/src/assets/extensions/preact.png -------------------------------------------------------------------------------- /src/pages/docs/src/assets/extensions/react.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/docs/src/assets/extensions/react.png -------------------------------------------------------------------------------- /src/pages/docs/src/assets/extensions/redux.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/docs/src/assets/extensions/redux.png -------------------------------------------------------------------------------- /src/pages/docs/src/assets/extensions/riot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/docs/src/assets/extensions/riot.png -------------------------------------------------------------------------------- /src/pages/docs/src/assets/extensions/search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/docs/src/assets/extensions/search.png -------------------------------------------------------------------------------- /src/pages/docs/src/assets/extensions/solid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/docs/src/assets/extensions/solid.png -------------------------------------------------------------------------------- /src/pages/docs/src/assets/extensions/svelte.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/docs/src/assets/extensions/svelte.png -------------------------------------------------------------------------------- /src/pages/docs/src/assets/extensions/update.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/docs/src/assets/extensions/update.png -------------------------------------------------------------------------------- /src/pages/docs/src/assets/extensions/urql.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/docs/src/assets/extensions/urql.png -------------------------------------------------------------------------------- /src/pages/docs/src/assets/extensions/vue-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/docs/src/assets/extensions/vue-3.png -------------------------------------------------------------------------------- /src/pages/www/src/assets/capability-cloud.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/www/src/assets/capability-cloud.png -------------------------------------------------------------------------------- /src/pages/www/src/assets/capability-license.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/www/src/assets/capability-license.png -------------------------------------------------------------------------------- /src/pages/www/src/assets/capability-smart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/www/src/assets/capability-smart.png -------------------------------------------------------------------------------- /src/pages/www/src/assets/capability-tooling.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/www/src/assets/capability-tooling.png -------------------------------------------------------------------------------- /src/pages/www/src/assets/tech-declarations.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/www/src/assets/tech-declarations.png -------------------------------------------------------------------------------- /src/samples/minimal-piral/piral.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://docs.piral.io/schemas/piral-v0.json", 3 | "isolation": "modern" 4 | } 5 | -------------------------------------------------------------------------------- /src/samples/sample-cross-fx/piral.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://docs.piral.io/schemas/piral-v0.json", 3 | "isolation": "modern" 4 | } 5 | -------------------------------------------------------------------------------- /src/samples/sample-piral/piral.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://docs.piral.io/schemas/piral-v0.json", 3 | "isolation": "modern" 4 | } 5 | -------------------------------------------------------------------------------- /src/samples/sample-piral/src/images/female.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/samples/sample-piral/src/images/female.png -------------------------------------------------------------------------------- /docs/diagrams/vscode-integration-activity-bar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/docs/diagrams/vscode-integration-activity-bar.png -------------------------------------------------------------------------------- /src/pages/docs/src/assets/extensions/aurelia.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/docs/src/assets/extensions/aurelia.png -------------------------------------------------------------------------------- /src/pages/docs/src/assets/extensions/configs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/docs/src/assets/extensions/configs.png -------------------------------------------------------------------------------- /src/pages/docs/src/assets/extensions/hyperapp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/docs/src/assets/extensions/hyperapp.png -------------------------------------------------------------------------------- /src/pages/docs/src/assets/extensions/inferno.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/docs/src/assets/extensions/inferno.png -------------------------------------------------------------------------------- /src/pages/docs/src/assets/extensions/million.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/docs/src/assets/extensions/million.png -------------------------------------------------------------------------------- /src/pages/docs/src/assets/extensions/mithril.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/docs/src/assets/extensions/mithril.png -------------------------------------------------------------------------------- /src/pages/docs/src/assets/extensions/react-15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/docs/src/assets/extensions/react-15.png -------------------------------------------------------------------------------- /src/pages/docs/src/assets/extensions/tracker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/docs/src/assets/extensions/tracker.png -------------------------------------------------------------------------------- /src/pages/docs/src/assets/extensions/tracking.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/docs/src/assets/extensions/tracking.png -------------------------------------------------------------------------------- /src/pages/www/src/fonts/Montserrat_400_ext.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/www/src/fonts/Montserrat_400_ext.woff2 -------------------------------------------------------------------------------- /src/pages/www/src/fonts/Montserrat_500_ext.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/www/src/fonts/Montserrat_500_ext.woff2 -------------------------------------------------------------------------------- /src/samples/sample-piral-core/piral.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://docs.piral.io/schemas/piral-v0.json", 3 | "isolation": "modern" 4 | } 5 | -------------------------------------------------------------------------------- /src/tooling/piral-cli/src/pb-cli.ts: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | import { select } from './select'; 4 | 5 | select((commands) => commands.all); 6 | -------------------------------------------------------------------------------- /docs/diagrams/piralinspector-devtools-overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/docs/diagrams/piralinspector-devtools-overview.png -------------------------------------------------------------------------------- /docs/diagrams/piralinspector-feature-events-list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/docs/diagrams/piralinspector-feature-events-list.png -------------------------------------------------------------------------------- /docs/diagrams/vscode-codegen-syntax-highlighting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/docs/diagrams/vscode-codegen-syntax-highlighting.png -------------------------------------------------------------------------------- /docs/diagrams/vscode-integration-command-palette.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/docs/diagrams/vscode-integration-command-palette.png -------------------------------------------------------------------------------- /docs/reference/README.md: -------------------------------------------------------------------------------- 1 | # Reference 2 | 3 | We provide a detailed reference documentation incl. architecture details and further articles on Piral. 4 | -------------------------------------------------------------------------------- /src/framework/piral-core/styles/sheet.css: -------------------------------------------------------------------------------- 1 | piral-extension, piral-component, piral-content, piral-portal, piral-slot { 2 | display: contents; 3 | } 4 | -------------------------------------------------------------------------------- /src/pages/docs/src/assets/extensions/breadcrumbs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/docs/src/assets/extensions/breadcrumbs.png -------------------------------------------------------------------------------- /src/pages/docs/src/assets/extensions/containers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/docs/src/assets/extensions/containers.png -------------------------------------------------------------------------------- /src/pages/docs/src/assets/extensions/dashboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/docs/src/assets/extensions/dashboard.png -------------------------------------------------------------------------------- /src/pages/docs/src/assets/extensions/single-spa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/docs/src/assets/extensions/single-spa.png -------------------------------------------------------------------------------- /src/pages/docs/src/assets/extensions/translate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/docs/src/assets/extensions/translate.png -------------------------------------------------------------------------------- /src/pages/www/src/assets/capability-convenient.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/www/src/assets/capability-convenient.png -------------------------------------------------------------------------------- /src/pages/www/src/assets/capability-performance.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/www/src/assets/capability-performance.png -------------------------------------------------------------------------------- /src/tooling/piral-cli/src/pilet-cli.ts: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | import { select } from './select'; 4 | 5 | select((commands) => commands.pilet); 6 | -------------------------------------------------------------------------------- /src/tooling/piral-cli/src/piral-cli.ts: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | import { select } from './select'; 4 | 5 | select((commands) => commands.piral); 6 | -------------------------------------------------------------------------------- /src/tooling/piral-cli/src/shared-dependencies.ts: -------------------------------------------------------------------------------- 1 | module.exports = function () { 2 | console.error('Empty stub - should not be called.'); 3 | }; 4 | -------------------------------------------------------------------------------- /docs/diagrams/piralinspector-feature-appstate-list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/docs/diagrams/piralinspector-feature-appstate-list.png -------------------------------------------------------------------------------- /docs/diagrams/piralinspector-feature-pilets-upload.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/docs/diagrams/piralinspector-feature-pilets-upload.png -------------------------------------------------------------------------------- /docs/diagrams/piralinspector-features-pages-custom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/docs/diagrams/piralinspector-features-pages-custom.png -------------------------------------------------------------------------------- /src/converters/piral-ng/src/constants.ts: -------------------------------------------------------------------------------- 1 | export const propsName = 'Props'; 2 | export const piralName = 'piral'; 3 | export const contextName = 'Context'; 4 | -------------------------------------------------------------------------------- /src/pages/docs/src/assets/extensions/notifications.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/docs/src/assets/extensions/notifications.png -------------------------------------------------------------------------------- /src/pages/docs/src/assets/extensions/page-layouts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/src/pages/docs/src/assets/extensions/page-layouts.png -------------------------------------------------------------------------------- /src/plugins/piral-feeds/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create'; 2 | export * from './types'; 3 | export * from './useFeed'; 4 | export * from './withFeed'; 5 | -------------------------------------------------------------------------------- /src/plugins/piral-fetch/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './config'; 2 | export * from './create'; 3 | export * from './fetch'; 4 | export * from './types'; 5 | -------------------------------------------------------------------------------- /src/plugins/piral-menu/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create'; 2 | export * from './components'; 3 | export * from './Menu'; 4 | export * from './types'; 5 | -------------------------------------------------------------------------------- /src/plugins/piral-oauth2/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create'; 2 | export * from './setup'; 3 | export * from './types'; 4 | export * from './utils'; 5 | -------------------------------------------------------------------------------- /docs/diagrams/piralinspector-extension-toolbar-gray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/docs/diagrams/piralinspector-extension-toolbar-gray.png -------------------------------------------------------------------------------- /docs/diagrams/piralinspector-extension-toolbar-green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/docs/diagrams/piralinspector-extension-toolbar-green.png -------------------------------------------------------------------------------- /docs/diagrams/piralinspector-feature-events-publish.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/docs/diagrams/piralinspector-feature-events-publish.png -------------------------------------------------------------------------------- /docs/diagrams/piralinspector-feature-extensions-list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/docs/diagrams/piralinspector-feature-extensions-list.png -------------------------------------------------------------------------------- /docs/diagrams/piralinspector-feature-pilets-add-feed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/docs/diagrams/piralinspector-feature-pilets-add-feed.png -------------------------------------------------------------------------------- /docs/logos/vercel.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /src/framework/piral-base/src/types/index.ts: -------------------------------------------------------------------------------- 1 | export * from './api'; 2 | export * from './lib'; 3 | export * from './runtime'; 4 | export * from './service'; 5 | -------------------------------------------------------------------------------- /src/plugins/piral-modals/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create'; 2 | export * from './components'; 3 | export * from './Modals'; 4 | export * from './types'; 5 | -------------------------------------------------------------------------------- /docs/diagrams/piralinspector-feature-dependencies-graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/docs/diagrams/piralinspector-feature-dependencies-graph.png -------------------------------------------------------------------------------- /docs/diagrams/piralinspector-feature-extensions-render.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/docs/diagrams/piralinspector-feature-extensions-render.png -------------------------------------------------------------------------------- /src/framework/piral-core/src/modules/index.ts: -------------------------------------------------------------------------------- 1 | export * from './api'; 2 | export * from './core'; 3 | export * from './dependencies'; 4 | export * from './element'; 5 | -------------------------------------------------------------------------------- /src/plugins/piral-dashboard/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create'; 2 | export * from './components'; 3 | export * from './Dashboard'; 4 | export * from './types'; 5 | -------------------------------------------------------------------------------- /src/plugins/piral-update/src/components.tsx: -------------------------------------------------------------------------------- 1 | import { getPiralComponent } from 'piral-core'; 2 | 3 | export const PiralUpdateDialog = getPiralComponent('UpdateDialog'); 4 | -------------------------------------------------------------------------------- /docs/diagrams/piralinspector-feature-pilets-available-pilets.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/docs/diagrams/piralinspector-feature-pilets-available-pilets.png -------------------------------------------------------------------------------- /docs/diagrams/piralinspector-setting-state-container-logging.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/docs/diagrams/piralinspector-setting-state-container-logging.png -------------------------------------------------------------------------------- /src/plugins/piral-notifications/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create'; 2 | export * from './components'; 3 | export * from './Notifications'; 4 | export * from './types'; 5 | -------------------------------------------------------------------------------- /src/utilities/piral-debug-utils/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './debug'; 2 | export * from './emulator'; 3 | export * from './types'; 4 | export * from './useDebugRouteFilter'; 5 | -------------------------------------------------------------------------------- /src/utilities/piral-hooks-utils/src/contexts/PiletApiProvider.ts: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | 3 | export const PiletApiProvider = React.createContext(undefined); 4 | -------------------------------------------------------------------------------- /src/plugins/piral-translate/src/components.tsx: -------------------------------------------------------------------------------- 1 | import { getPiralComponent } from 'piral-core'; 2 | 3 | export const PiralLanguagesPicker = getPiralComponent('LanguagesPicker'); 4 | -------------------------------------------------------------------------------- /src/framework/piral-core/src/state/index.ts: -------------------------------------------------------------------------------- 1 | export * from './createActions'; 2 | export * from './createGlobalState'; 3 | export * from './stateContext'; 4 | export * from './withApi'; 5 | -------------------------------------------------------------------------------- /src/plugins/piral-urql/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create'; 2 | export * from './pilets'; 3 | export * from './queries'; 4 | export * from './setup'; 5 | export * from './types'; 6 | -------------------------------------------------------------------------------- /src/plugins/piral-forms/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create'; 2 | export * from './types'; 3 | export * from './useForm'; 4 | export * from './usePrompt'; 5 | export * from './withForm'; 6 | -------------------------------------------------------------------------------- /src/framework/piral-base/src/utils/index.ts: -------------------------------------------------------------------------------- 1 | export * from './dependency'; 2 | export * from './empty'; 3 | export * from './helpers'; 4 | export * from './load'; 5 | export * from './system'; 6 | -------------------------------------------------------------------------------- /src/plugins/piral-update/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './components'; 2 | export * from './create'; 3 | export * from './helpers'; 4 | export * from './types'; 5 | export * from './UpdateDialog'; 6 | -------------------------------------------------------------------------------- /docs/diagrams/piralinspector-setting-visualize-component-origins-button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/docs/diagrams/piralinspector-setting-visualize-component-origins-button.png -------------------------------------------------------------------------------- /docs/diagrams/piralinspector-setting-visualize-component-origins-result.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/smapiot/piral/HEAD/docs/diagrams/piralinspector-setting-visualize-component-origins-result.png -------------------------------------------------------------------------------- /src/pages/www/src/scripts/index.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { render } from 'react-dom'; 3 | import { App } from './App'; 4 | 5 | render(, document.querySelector('#app')); 6 | -------------------------------------------------------------------------------- /src/pages/docs/src/Logo.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | 3 | const Logo = () => Piral Logo; 4 | 5 | export default Logo; 6 | -------------------------------------------------------------------------------- /src/plugins/piral-breadcrumbs/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './Breadcrumbs'; 2 | export * from './create'; 3 | export * from './components'; 4 | export * from './types'; 5 | export * from './useBreadcrumbs'; 6 | -------------------------------------------------------------------------------- /src/tooling/piral-cli/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './helpers'; 2 | export * from './commands'; 3 | export * from './questionnaire'; 4 | export * from './types/common'; 5 | export * from './types/public'; 6 | -------------------------------------------------------------------------------- /src/framework/piral/src/index.tsx: -------------------------------------------------------------------------------- 1 | export * from 'piral-core'; 2 | export * from 'piral-ext'; 3 | 4 | export * from './api'; 5 | export * from './hydrate'; 6 | export * from './render'; 7 | export * from './types'; 8 | -------------------------------------------------------------------------------- /src/initializers/create-pilet/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "./lib" 5 | }, 6 | "include": [ 7 | "./src" 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /src/samples/sample-piral/src/components/index.ts: -------------------------------------------------------------------------------- 1 | export * from './MenuToggle'; 2 | export * from './User'; 3 | export * from './LanguageIcon'; 4 | export * from './LanguagePicker'; 5 | export * from './Layout'; 6 | -------------------------------------------------------------------------------- /src/tooling/piral-cli-webpack5/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "./lib" 5 | }, 6 | "include": [ 7 | "./src" 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /src/framework/piral-core/src/actions/index.ts: -------------------------------------------------------------------------------- 1 | export * from './app'; 2 | export * from './components'; 3 | export * from './data'; 4 | export * from './define'; 5 | export * from './portal'; 6 | export * from './state'; 7 | -------------------------------------------------------------------------------- /src/initializers/create-piral-instance/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "./lib" 5 | }, 6 | "include": [ 7 | "./src" 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /src/samples/sample-piral-core/src/elements.d.ts: -------------------------------------------------------------------------------- 1 | declare module JSX { 2 | interface IntrinsicElements { 3 | 'pi-spinner': React.DetailedHTMLProps, HTMLDivElement>; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /src/framework/piral-base/src/utils/empty.ts: -------------------------------------------------------------------------------- 1 | import type { SinglePiletApp } from '../types'; 2 | 3 | /** 4 | * Represents an empty pilet app. 5 | */ 6 | export const emptyApp: SinglePiletApp = { 7 | setup() {}, 8 | }; 9 | -------------------------------------------------------------------------------- /src/plugins/piral-search/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './create'; 2 | export * from './components'; 3 | export * from './SearchInput'; 4 | export * from './Search'; 5 | export * from './types'; 6 | export * from './useSearch'; 7 | -------------------------------------------------------------------------------- /src/plugins/piral-translate/src/index.ts: -------------------------------------------------------------------------------- 1 | export * from './components'; 2 | export * from './create'; 3 | export * from './current'; 4 | export * from './hooks'; 5 | export * from './Languages'; 6 | export * from './types'; 7 | -------------------------------------------------------------------------------- /src/converters/piral-million/src/extension.ts: -------------------------------------------------------------------------------- 1 | import type { ExtensionSlotProps } from 'piral-core'; 2 | import { m } from 'million'; 3 | 4 | export const Extension = (props: ExtensionSlotProps) => m('piral-extension', props); 5 | -------------------------------------------------------------------------------- /src/framework/piral/src/run.test.ts: -------------------------------------------------------------------------------- 1 | import { describe, it } from 'vitest'; 2 | import { runInstance } from './run'; 3 | 4 | describe('Piral run module', () => { 5 | it('runInstance renders the application', () => {}); 6 | }); 7 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 2 6 | charset = utf-8 7 | trim_trailing_whitespace = true 8 | insert_final_newline = true 9 | end_of_line = lf 10 | max_line_length = null 11 | -------------------------------------------------------------------------------- /src/framework/piral-base/src/index.minimal.ts: -------------------------------------------------------------------------------- 1 | import 'systemjs/dist/system.js'; 2 | import 'systemjs/dist/extras/named-register.js'; 3 | 4 | export * from './events'; 5 | export * from './types'; 6 | export * from './utils/system'; 7 | -------------------------------------------------------------------------------- /src/framework/piral-core/src/utils/react.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | 3 | export function defaultRender(children: React.ReactNode, key?: string) { 4 | return {children}; 5 | } 6 | -------------------------------------------------------------------------------- /src/pages/www/src/codegen/friends.codegen.d.ts: -------------------------------------------------------------------------------- 1 | interface OssFriend { 2 | href: string; 3 | name: string; 4 | description: string; 5 | } 6 | 7 | declare const friends: Array; 8 | 9 | export default friends; 10 | -------------------------------------------------------------------------------- /src/plugins/piral-menu/src/components.tsx: -------------------------------------------------------------------------------- 1 | import { getPiralComponent } from 'piral-core'; 2 | 3 | export const PiralMenuContainer = getPiralComponent('MenuContainer'); 4 | export const PiralMenuItem = getPiralComponent('MenuItem'); 5 | -------------------------------------------------------------------------------- /prettier.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | printWidth: 120, 3 | singleQuote: true, 4 | trailingComma: 'all', 5 | bracketSpacing: true, 6 | parser: 'typescript', 7 | semi: true, 8 | jsxBracketSameLine: true, 9 | }; 10 | -------------------------------------------------------------------------------- /src/converters/piral-ng/src/queue.ts: -------------------------------------------------------------------------------- 1 | let queue = Promise.resolve(); 2 | 3 | export function enqueue(callback: () => T | Promise) { 4 | const next = queue.then(callback); 5 | queue = next.then(() => {}); 6 | return next; 7 | } 8 | -------------------------------------------------------------------------------- /src/plugins/piral-modals/src/components.tsx: -------------------------------------------------------------------------------- 1 | import { getPiralComponent } from 'piral-core'; 2 | 3 | export const PiralModalsHost = getPiralComponent('ModalsHost'); 4 | export const PiralModalsDialog = getPiralComponent('ModalsDialog'); 5 | -------------------------------------------------------------------------------- /src/plugins/piral-ext/src/libs.ts: -------------------------------------------------------------------------------- 1 | export * from 'piral-translate'; 2 | export * from 'piral-dashboard'; 3 | export * from 'piral-feeds'; 4 | export * from 'piral-menu'; 5 | export * from 'piral-modals'; 6 | export * from 'piral-notifications'; 7 | -------------------------------------------------------------------------------- /src/framework/piral/src/app.test.ts: -------------------------------------------------------------------------------- 1 | import { describe, it } from 'vitest'; 2 | import { getAppInstance } from './app'; 3 | 4 | describe('Piral app module', () => { 5 | it('getAppInstance creates a new React child and Piral instance', () => {}); 6 | }); 7 | -------------------------------------------------------------------------------- /src/plugins/piral-dashboard/src/components.tsx: -------------------------------------------------------------------------------- 1 | import { getPiralComponent } from 'piral-core'; 2 | 3 | export const PiralDashboardContainer = getPiralComponent('DashboardContainer'); 4 | export const PiralDashboardTile = getPiralComponent('DashboardTile'); 5 | -------------------------------------------------------------------------------- /src/tooling/piral-cli-webpack5/src/index.ts: -------------------------------------------------------------------------------- 1 | import * as actions from './actions'; 2 | import { CliPlugin } from 'piral-cli'; 3 | 4 | const plugin: CliPlugin = (cli) => { 5 | cli.withBundler('webpack5', actions); 6 | }; 7 | 8 | module.exports = plugin; 9 | -------------------------------------------------------------------------------- /src/framework/piral-core/src/hooks/index.ts: -------------------------------------------------------------------------------- 1 | export * from './action'; 2 | export * from './actions'; 3 | export * from './globalState'; 4 | export * from './piletApi'; 5 | export * from './media'; 6 | export * from './setter'; 7 | export * from './sharedData'; 8 | -------------------------------------------------------------------------------- /src/framework/piral-core/src/state/stateContext.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { GlobalStateContext } from '../types'; 3 | 4 | export const StateContext = React.createContext(undefined); 5 | 6 | export default StateContext; 7 | -------------------------------------------------------------------------------- /src/samples/sample-piral/src/components/utils.ts: -------------------------------------------------------------------------------- 1 | export function withClass(baseClass: string, optional: boolean | string) { 2 | if (!optional || typeof optional !== 'string') { 3 | return baseClass; 4 | } 5 | 6 | return `${baseClass} ${optional}`; 7 | } 8 | -------------------------------------------------------------------------------- /src/converters/piral-cycle/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "skipLibCheck": true, 5 | "jsx": "react", 6 | "importHelpers": true 7 | }, 8 | "include": [ 9 | "./src" 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /src/converters/piral-litel/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "skipLibCheck": true, 5 | "jsx": "react", 6 | "importHelpers": true 7 | }, 8 | "include": [ 9 | "./src" 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /src/converters/piral-solid/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "skipLibCheck": true, 5 | "jsx": "react", 6 | "importHelpers": true 7 | }, 8 | "include": [ 9 | "./src" 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /src/plugins/piral-breadcrumbs/src/components.tsx: -------------------------------------------------------------------------------- 1 | import { getPiralComponent } from 'piral-core'; 2 | 3 | export const PiralBreadcrumbsContainer = getPiralComponent('BreadcrumbsContainer'); 4 | export const PiralBreadcrumbItem = getPiralComponent('BreadcrumbItem'); 5 | -------------------------------------------------------------------------------- /src/plugins/piral-notifications/src/components.tsx: -------------------------------------------------------------------------------- 1 | import { getPiralComponent } from 'piral-core'; 2 | 3 | export const PiralNotificationsHost = getPiralComponent('NotificationsHost'); 4 | export const PiralNotificationsToast = getPiralComponent('NotificationsToast'); 5 | -------------------------------------------------------------------------------- /src/tooling/piral-cli/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "./lib", 5 | "esModuleInterop": true, 6 | "declaration": false 7 | }, 8 | "include": [ 9 | "./src" 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /src/plugins/piral-update/src/default.tsx: -------------------------------------------------------------------------------- 1 | import { FC } from 'react'; 2 | import { defaultRender } from 'piral-core'; 3 | import { UpdateDialogProps } from './types'; 4 | 5 | export const DefaultUpdateDialog: FC = (props) => defaultRender(props.children); 6 | -------------------------------------------------------------------------------- /src/utilities/piral-debug-utils/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "skipLibCheck": true, 5 | "jsx": "react", 6 | "importHelpers": true 7 | }, 8 | "include": [ 9 | "./src" 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /src/utilities/piral-hooks-utils/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "skipLibCheck": true, 5 | "jsx": "react", 6 | "importHelpers": true 7 | }, 8 | "include": [ 9 | "./src" 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /src/framework/piral-core/src/setters/index.ts: -------------------------------------------------------------------------------- 1 | export * from './SetComponent'; 2 | export * from './SetError'; 3 | export * from './SetErrors'; 4 | export * from './SetLayout'; 5 | export * from './SetProvider'; 6 | export * from './SetRedirect'; 7 | export * from './SetRoute'; 8 | -------------------------------------------------------------------------------- /src/plugins/piral-translate/src/default.tsx: -------------------------------------------------------------------------------- 1 | import type { FC } from 'react'; 2 | import { defaultRender } from 'piral-core'; 3 | import { LanguagesPickerProps } from './types'; 4 | 5 | export const DefaultPicker: FC = (props) => defaultRender(undefined); 6 | -------------------------------------------------------------------------------- /src/tooling/piral-cli-webpack5/src/webpack-hot-middleware/helpers.js: -------------------------------------------------------------------------------- 1 | var parse = require('url').parse; 2 | 3 | exports.pathMatch = function(url, path) { 4 | try { 5 | return parse(url).pathname === path; 6 | } catch (e) { 7 | return false; 8 | } 9 | }; 10 | -------------------------------------------------------------------------------- /src/tooling/publish-microfrontend/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "./lib", 5 | "esModuleInterop": true, 6 | "declaration": false 7 | }, 8 | "include": [ 9 | "./src" 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /src/pages/README.md: -------------------------------------------------------------------------------- 1 | # Piral Pages 2 | 3 | Piral is developed as a monorepo. 4 | 5 | ## Available Pages 6 | 7 | - [www](./www/README.md) is the landing page ([piral.io](https://piral.io)) 8 | - [docs](./docs/README.md) is the documentation page ([docs.piral.io](https://docs.piral.io)) 9 | -------------------------------------------------------------------------------- /src/pages/www/src/scripts/pages/OssFriends.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { Banner, Friends } from '../components'; 3 | 4 | export const OssFriends = () => ( 5 | <> 6 | 7 | 8 | 9 | ); 10 | 11 | export default OssFriends; 12 | -------------------------------------------------------------------------------- /src/pages/www/src/style/site.scss: -------------------------------------------------------------------------------- 1 | @import "../../../../../node_modules/@pidoc/core/src/styles/variables"; 2 | @import "../../../../../node_modules/@pidoc/core/src/styles/fonts"; 3 | @import "../../../../../node_modules/@pidoc/core/src/styles/body"; 4 | @import "custom"; 5 | @import "spinner"; 6 | -------------------------------------------------------------------------------- /src/plugins/piral-urql/src/queries.test.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @vitest-environment jsdom 3 | */ 4 | import { describe, it } from 'vitest'; 5 | import { gqlQuery } from './queries'; 6 | 7 | describe('Piral-Urql queries module', () => { 8 | it('runs a successful query', () => {}); 9 | }); 10 | -------------------------------------------------------------------------------- /src/tooling/publish-microfrontend/src/common.ts: -------------------------------------------------------------------------------- 1 | import { platform } from 'os'; 2 | 3 | const os = platform(); 4 | 5 | export const standardHeaders = { 6 | 'user-agent': `publish-microfrontend/http.node-${os}`, 7 | }; 8 | 9 | export const isWindows = process.platform === 'win32'; 10 | -------------------------------------------------------------------------------- /src/pages/common/components/Loader.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | 3 | export interface LoaderProps {} 4 | 5 | export const Loader: React.FC = () => ( 6 |
7 |
Loading ...
8 |
9 | ); 10 | -------------------------------------------------------------------------------- /src/pages/www/src/codegen/testiomonials.codegen.d.ts: -------------------------------------------------------------------------------- 1 | interface Testimonial { 2 | id: string; 3 | phrase: string; 4 | lastName: string; 5 | firstName: string; 6 | face: string; 7 | } 8 | 9 | declare const testimonials: Array; 10 | 11 | export default testimonials; 12 | -------------------------------------------------------------------------------- /src/utilities/piral-hooks-utils/src/hooks/index.ts: -------------------------------------------------------------------------------- 1 | export * from './afterVisible'; 2 | export * from './asyncReplace'; 3 | export * from './lockBodyScroll'; 4 | export * from './onClickOutside'; 5 | export * from './onScreenVisible'; 6 | export * from './piletApi'; 7 | export * from './prompt'; 8 | -------------------------------------------------------------------------------- /src/converters/piral-blazor/infra.codegen.d.ts: -------------------------------------------------------------------------------- 1 | declare const config: BlazorBootConfig; 2 | 3 | interface BlazorBootConfig { 4 | url: string; 5 | satellites: Array; 6 | noMutation: boolean; 7 | renderMode: 'webcomponent' | 'projection'; 8 | } 9 | 10 | export default config; 11 | -------------------------------------------------------------------------------- /src/framework/piral/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "skipLibCheck": true, 5 | "lib": ["dom", "es2015", "es2018"], 6 | "jsx": "react", 7 | "importHelpers": true 8 | }, 9 | "include": [ 10 | "./src" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /src/plugins/piral-adal/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "skipLibCheck": true, 5 | "lib": ["dom", "es2015", "es2018"], 6 | "jsx": "react", 7 | "importHelpers": true 8 | }, 9 | "include": [ 10 | "./src" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /src/plugins/piral-auth/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "skipLibCheck": true, 5 | "lib": ["dom", "es2015", "es2018"], 6 | "jsx": "react", 7 | "importHelpers": true 8 | }, 9 | "include": [ 10 | "./src" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /src/plugins/piral-axios/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "skipLibCheck": true, 5 | "lib": ["dom", "es2015", "es2018"], 6 | "jsx": "react", 7 | "importHelpers": true 8 | }, 9 | "include": [ 10 | "./src" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /src/plugins/piral-ext/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "skipLibCheck": true, 5 | "lib": ["dom", "es2015", "es2018"], 6 | "jsx": "react", 7 | "importHelpers": true 8 | }, 9 | "include": [ 10 | "./src" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /src/plugins/piral-feeds/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "skipLibCheck": true, 5 | "lib": ["dom", "es2015", "es2018"], 6 | "jsx": "react", 7 | "importHelpers": true 8 | }, 9 | "include": [ 10 | "./src" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /src/plugins/piral-fetch/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "skipLibCheck": true, 5 | "lib": ["dom", "es2015", "es2018"], 6 | "jsx": "react", 7 | "importHelpers": true 8 | }, 9 | "include": [ 10 | "./src" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /src/plugins/piral-forms/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "skipLibCheck": true, 5 | "lib": ["dom", "es2015", "es2018"], 6 | "jsx": "react", 7 | "importHelpers": true 8 | }, 9 | "include": [ 10 | "./src" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /src/plugins/piral-lazy/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "skipLibCheck": true, 5 | "lib": ["dom", "es2015", "es2018"], 6 | "jsx": "react", 7 | "importHelpers": true 8 | }, 9 | "include": [ 10 | "./src" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /src/plugins/piral-menu/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "skipLibCheck": true, 5 | "lib": ["dom", "es2015", "es2018"], 6 | "jsx": "react", 7 | "importHelpers": true 8 | }, 9 | "include": [ 10 | "./src" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /src/plugins/piral-oidc/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "skipLibCheck": true, 5 | "lib": ["dom", "es2015", "es2018"], 6 | "jsx": "react", 7 | "importHelpers": true 8 | }, 9 | "include": [ 10 | "./src" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /src/plugins/piral-redux/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "skipLibCheck": true, 5 | "lib": ["dom", "es2015", "es2018"], 6 | "jsx": "react", 7 | "importHelpers": true 8 | }, 9 | "include": [ 10 | "./src" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /src/plugins/piral-urql/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "skipLibCheck": true, 5 | "lib": ["dom", "es2015", "es2018"], 6 | "jsx": "react", 7 | "importHelpers": true 8 | }, 9 | "include": [ 10 | "./src" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /src/converters/piral-aurelia/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "skipLibCheck": true, 5 | "lib": ["dom", "es2015", "es2018"], 6 | "jsx": "react", 7 | "importHelpers": true 8 | }, 9 | "include": [ 10 | "./src" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /src/converters/piral-elm/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "skipLibCheck": true, 5 | "lib": ["dom", "es2015", "es2018"], 6 | "jsx": "react", 7 | "importHelpers": true 8 | }, 9 | "include": [ 10 | "./src" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /src/converters/piral-ember/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "skipLibCheck": true, 5 | "lib": ["dom", "es2015", "es2018"], 6 | "jsx": "react", 7 | "importHelpers": true 8 | }, 9 | "include": [ 10 | "./src" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /src/converters/piral-inferno/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "skipLibCheck": true, 5 | "lib": ["dom", "es2015", "es2018"], 6 | "jsx": "react", 7 | "importHelpers": true 8 | }, 9 | "include": [ 10 | "./src" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /src/converters/piral-million/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "skipLibCheck": true, 5 | "lib": ["dom", "es2015", "es2018"], 6 | "jsx": "react", 7 | "importHelpers": true 8 | }, 9 | "include": [ 10 | "./src" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /src/converters/piral-mithril/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "skipLibCheck": true, 5 | "lib": ["dom", "es2015", "es2018"], 6 | "jsx": "react", 7 | "importHelpers": true 8 | }, 9 | "include": [ 10 | "./src" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /src/converters/piral-ngjs/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "skipLibCheck": true, 5 | "lib": ["dom", "es2015", "es2018"], 6 | "jsx": "react", 7 | "importHelpers": true 8 | }, 9 | "include": [ 10 | "./src" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /src/converters/piral-preact/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "skipLibCheck": true, 5 | "lib": ["dom", "es2015", "es2018"], 6 | "jsx": "react", 7 | "importHelpers": true 8 | }, 9 | "include": [ 10 | "./src" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /src/converters/piral-react/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "skipLibCheck": true, 5 | "lib": ["dom", "es2015", "es2018"], 6 | "jsx": "react", 7 | "importHelpers": true 8 | }, 9 | "include": [ 10 | "./src" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /src/converters/piral-riot/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "skipLibCheck": true, 5 | "lib": ["dom", "es2015", "es2018"], 6 | "jsx": "react", 7 | "importHelpers": true 8 | }, 9 | "include": [ 10 | "./src" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /src/converters/piral-svelte/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "skipLibCheck": true, 5 | "lib": ["dom", "es2015", "es2018"], 6 | "jsx": "react", 7 | "importHelpers": true 8 | }, 9 | "include": [ 10 | "./src" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /src/converters/piral-vue-3/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "skipLibCheck": true, 5 | "lib": ["dom", "es2015", "es2018"], 6 | "jsx": "react", 7 | "importHelpers": true 8 | }, 9 | "include": [ 10 | "./src" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /src/converters/piral-vue/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "skipLibCheck": true, 5 | "lib": ["dom", "es2015", "es2018"], 6 | "jsx": "react", 7 | "importHelpers": true 8 | }, 9 | "include": [ 10 | "./src" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /src/framework/piral-core/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "jsx": "react", 5 | "lib": ["dom", "es2015", "es2018"], 6 | "esModuleInterop": true, 7 | "importHelpers": true 8 | }, 9 | "include": [ 10 | "./src" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /src/plugins/piral-configs/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "skipLibCheck": true, 5 | "lib": ["dom", "es2015", "es2018"], 6 | "jsx": "react", 7 | "importHelpers": true 8 | }, 9 | "include": [ 10 | "./src" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /src/plugins/piral-containers/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "skipLibCheck": true, 5 | "lib": ["dom", "es2015", "es2018"], 6 | "jsx": "react", 7 | "importHelpers": true 8 | }, 9 | "include": [ 10 | "./src" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /src/plugins/piral-dashboard/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "skipLibCheck": true, 5 | "lib": ["dom", "es2015", "es2018"], 6 | "jsx": "react", 7 | "importHelpers": true 8 | }, 9 | "include": [ 10 | "./src" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /src/plugins/piral-modals/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "skipLibCheck": true, 5 | "lib": ["dom", "es2015", "es2018"], 6 | "jsx": "react", 7 | "importHelpers": true 8 | }, 9 | "include": [ 10 | "./src" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /src/plugins/piral-search/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "skipLibCheck": true, 5 | "lib": ["dom", "es2015", "es2018"], 6 | "jsx": "react", 7 | "importHelpers": true 8 | }, 9 | "include": [ 10 | "./src" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /src/plugins/piral-tracker/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "skipLibCheck": true, 5 | "lib": ["dom", "es2015", "es2018"], 6 | "jsx": "react", 7 | "importHelpers": true 8 | }, 9 | "include": [ 10 | "./src" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /src/plugins/piral-tracking/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "skipLibCheck": true, 5 | "lib": ["dom", "es2015", "es2018"], 6 | "jsx": "react", 7 | "importHelpers": true 8 | }, 9 | "include": [ 10 | "./src" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /src/plugins/piral-translate/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "skipLibCheck": true, 5 | "lib": ["dom", "es2015", "es2018"], 6 | "jsx": "react", 7 | "importHelpers": true 8 | }, 9 | "include": [ 10 | "./src" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /src/plugins/piral-update/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "skipLibCheck": true, 5 | "lib": ["dom", "es2015", "es2018"], 6 | "jsx": "react", 7 | "importHelpers": true 8 | }, 9 | "include": [ 10 | "./src" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /src/tooling/README.md: -------------------------------------------------------------------------------- 1 | # Piral Tooling Packages 2 | 3 | Piral is developed as a monorepo. 4 | 5 | ## Available Tooling Packages 6 | 7 | - [piral-cli](./piral-cli/README.md) provides some command line tooling 8 | - [piral-cli-webpack5](./piral-cli-webpack5/README.md) enables using Webpack 5.x as standard bundler 9 | -------------------------------------------------------------------------------- /src/converters/piral-hyperapp/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "skipLibCheck": true, 5 | "lib": ["dom", "es2015", "es2018"], 6 | "jsx": "react", 7 | "importHelpers": true 8 | }, 9 | "include": [ 10 | "./src" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /src/converters/piral-react-15/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "skipLibCheck": true, 5 | "lib": ["dom", "es2015", "es2018"], 6 | "jsx": "react", 7 | "importHelpers": true 8 | }, 9 | "include": [ 10 | "./src" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /src/plugins/piral-breadcrumbs/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "skipLibCheck": true, 5 | "lib": ["dom", "es2015", "es2018"], 6 | "jsx": "react", 7 | "importHelpers": true 8 | }, 9 | "include": [ 10 | "./src" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /src/plugins/piral-notifications/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "skipLibCheck": true, 5 | "lib": ["dom", "es2015", "es2018"], 6 | "jsx": "react", 7 | "importHelpers": true 8 | }, 9 | "include": [ 10 | "./src" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /src/plugins/piral-page-layouts/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "skipLibCheck": true, 5 | "lib": ["dom", "es2015", "es2018"], 6 | "jsx": "react", 7 | "importHelpers": true 8 | }, 9 | "include": [ 10 | "./src" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /src/plugins/piral-search/src/components.tsx: -------------------------------------------------------------------------------- 1 | import { getPiralComponent } from 'piral-core'; 2 | 3 | export const PiralSearchContainer = getPiralComponent('SearchContainer'); 4 | export const PiralSearchInput = getPiralComponent('SearchInput'); 5 | export const PiralSearchResult = getPiralComponent('SearchResult'); 6 | -------------------------------------------------------------------------------- /src/framework/siteless/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "./lib", 5 | "skipLibCheck": true, 6 | "module": "ESNext", 7 | "jsx": "react", 8 | "importHelpers": true 9 | }, 10 | "include": [ 11 | "./src" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /src/samples/empty-piral/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "./lib", 5 | "module": "ESNext", 6 | "skipLibCheck": true, 7 | "jsx": "react", 8 | "importHelpers": true 9 | }, 10 | "include": [ 11 | "./src" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /src/samples/minimal-piral/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "./lib", 5 | "module": "ESNext", 6 | "skipLibCheck": true, 7 | "jsx": "react", 8 | "importHelpers": true 9 | }, 10 | "include": [ 11 | "./src" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /src/samples/sample-piral/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "./lib", 5 | "module": "ESNext", 6 | "skipLibCheck": true, 7 | "jsx": "react", 8 | "importHelpers": true 9 | }, 10 | "include": [ 11 | "./src" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /src/tooling/piral-cli/src/common/url.ts: -------------------------------------------------------------------------------- 1 | export function normalizePublicUrl(url: string) { 2 | if (!url) { 3 | return '/'; 4 | } 5 | 6 | if (!url.endsWith('/')) { 7 | url = `${url}/`; 8 | } 9 | 10 | if (!url.startsWith('/')) { 11 | url = `/${url}`; 12 | } 13 | 14 | return url; 15 | } 16 | -------------------------------------------------------------------------------- /src/pages/docs/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "./lib", 5 | "skipLibCheck": true, 6 | "lib": ["dom", "es2015", "es2018"], 7 | "module": "esnext", 8 | "jsx": "react" 9 | }, 10 | "include": [ 11 | "./src" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /src/pages/www/src/codegen/friends.codegen: -------------------------------------------------------------------------------- 1 | module.exports = async function () { 2 | const friends = await fetch('https://formbricks.com/api/oss-friends') 3 | .then(async (res) => res.json()) 4 | .then(({ data }) => data) 5 | .catch(() => []); 6 | 7 | return `export default ${JSON.stringify(friends)}`; 8 | }; 9 | -------------------------------------------------------------------------------- /src/samples/sample-cross-fx/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "./lib", 5 | "module": "ESNext", 6 | "skipLibCheck": true, 7 | "jsx": "react", 8 | "importHelpers": true 9 | }, 10 | "include": [ 11 | "./src" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /src/samples/sample-piral-core/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "./lib", 5 | "module": "ESNext", 6 | "skipLibCheck": true, 7 | "jsx": "react", 8 | "importHelpers": true 9 | }, 10 | "include": [ 11 | "./src" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /src/converters/piral-react-15/src/react15.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'react-15' { 2 | import { ComponentType, Component, createElement } from 'react'; 3 | export { ComponentType, Component, createElement }; 4 | } 5 | 6 | declare module 'react-dom-15' { 7 | import { render } from 'react-dom'; 8 | export { render }; 9 | } 10 | -------------------------------------------------------------------------------- /src/plugins/piral-adal/src/types.ts: -------------------------------------------------------------------------------- 1 | declare module 'piral-core/lib/types/custom' { 2 | interface PiletCustomApi extends PiletAdalApi {} 3 | } 4 | 5 | export interface PiletAdalApi { 6 | /** 7 | * Gets the currently valid access token, if any. 8 | */ 9 | getAccessToken(): Promise; 10 | } 11 | -------------------------------------------------------------------------------- /src/plugins/piral-oauth2/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "skipLibCheck": true, 5 | "esModuleInterop": true, 6 | "lib": ["dom", "es2015", "es2018"], 7 | "jsx": "react", 8 | "importHelpers": true 9 | }, 10 | "include": [ 11 | "./src" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /src/converters/piral-ng/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "skipLibCheck": true, 5 | "experimentalDecorators": true, 6 | "lib": ["dom", "es2015", "es2018"], 7 | "jsx": "react", 8 | "importHelpers": true 9 | }, 10 | "include": [ 11 | "./src" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /src/initializers/README.md: -------------------------------------------------------------------------------- 1 | # Piral Initializers 2 | 3 | Piral is developed as a monorepo. 4 | 5 | ## Available Initializers 6 | 7 | - [create-pilet](./create-pilet/README.md) provides assistance when scaffolding a new pilet 8 | - [create-piral-instance](./create-piral-instance/README.md) provides assistance when scaffolding a new Piral instance 9 | -------------------------------------------------------------------------------- /src/plugins/piral-search/src/SearchInput.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { useSearch } from './useSearch'; 3 | import { PiralSearchInput } from './components'; 4 | 5 | export const SearchInput: React.FC = () => { 6 | const [value, setValue] = useSearch(); 7 | return ; 8 | }; 9 | -------------------------------------------------------------------------------- /docs/messages/0000.md: -------------------------------------------------------------------------------- 1 | # Info: 0000 2 | 3 | General information without further content. 4 | 5 | ## Description 6 | 7 | Printed to inform you about certain progress in the current command. 8 | 9 | ## Example 10 | 11 | Nothing of interest yet. 12 | 13 | ## Further Reading 14 | 15 | - [Node Console](https://nodejs.org/api/console.html) 16 | -------------------------------------------------------------------------------- /src/converters/piral-blazor/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "skipLibCheck": true, 5 | "lib": ["dom", "es2015", "es2018"], 6 | "jsx": "react", 7 | "downlevelIteration": true, 8 | "importHelpers": true 9 | }, 10 | "include": [ 11 | "./src" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /src/samples/empty-piral/src/index.tsx: -------------------------------------------------------------------------------- 1 | import { startLoadingPilets, initializeApi, createListener } from 'piral-base'; 2 | 3 | const events = createListener(); 4 | 5 | startLoadingPilets({ 6 | createApi(target) { 7 | return initializeApi(target, events); 8 | }, 9 | fetchPilets() { 10 | return Promise.resolve([]); 11 | }, 12 | }); 13 | -------------------------------------------------------------------------------- /docs/messages/0002.md: -------------------------------------------------------------------------------- 1 | # Error: 0002 2 | 3 | General error without further content. 4 | 5 | ## Description 6 | 7 | Printed to inform you about a problem that requires changes to 8 | your project. 9 | 10 | ## Example 11 | 12 | Nothing of interest yet. 13 | 14 | ## Further Reading 15 | 16 | - [Node Console](https://nodejs.org/api/console.html) 17 | -------------------------------------------------------------------------------- /docs/questions/README.md: -------------------------------------------------------------------------------- 1 | # Frequently Asked Questions 2 | 3 | We have grouped the different questions and their answers into the following categories. 4 | 5 | - [General](./general.md) 6 | - [Infrastructure](./infrastructure.md) 7 | - [Plugins](./plugins.md) 8 | - [Pilets](./pilets.md) 9 | - [Pilet API](./pilet-api.md) 10 | - [Tooling](./tooling.md) 11 | -------------------------------------------------------------------------------- /src/initializers/create-pilet/src/index.ts: -------------------------------------------------------------------------------- 1 | import { runQuestionnaire } from 'piral-cli'; 2 | 3 | runQuestionnaire('new-pilet').then( 4 | () => process.exit(0), 5 | (err) => { 6 | err && !err.logged && console.error(err.message); 7 | console.log('Codes Reference: https://docs.piral.io/code/search'); 8 | process.exit(1); 9 | }, 10 | ); 11 | -------------------------------------------------------------------------------- /src/tooling/piral-cli/src/start.ts: -------------------------------------------------------------------------------- 1 | import { SelectCommands } from './types'; 2 | 3 | export async function start(from: SelectCommands) { 4 | const { loadPlugins } = require('./plugin'); 5 | const { commands } = require('./commands'); 6 | const { setupCli } = require('./cli'); 7 | await loadPlugins(); 8 | await setupCli(from(commands)); 9 | } 10 | -------------------------------------------------------------------------------- /docs/messages/0004.md: -------------------------------------------------------------------------------- 1 | # Verbose: 0004 2 | 3 | General info message without further content. 4 | 5 | ## Description 6 | 7 | Printed to inform you about some more detailed progress in the 8 | application. 9 | 10 | ## Example 11 | 12 | Nothing of interest yet. 13 | 14 | ## Further Reading 15 | 16 | - [Node Console](https://nodejs.org/api/console.html) 17 | -------------------------------------------------------------------------------- /src/utilities/README.md: -------------------------------------------------------------------------------- 1 | # Piral Utility Packages 2 | 3 | Piral is developed as a monorepo. 4 | 5 | ## Available Utility Packages 6 | 7 | - [piral-debug-utils](./piral-debug-utils/README.md) provides the debug tooling integrated in `piral-core` 8 | - [piral-hooks-utils](./piral-hooks-utils/README.md) provides useful hooks and HOCs for Piral instances and pilets 9 | -------------------------------------------------------------------------------- /src/framework/piral-base/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../../tsconfig.json", 3 | "compilerOptions": { 4 | "jsx": "react", 5 | "lib": ["dom", "es2015", "es2018"], 6 | "module": "ESNext", 7 | "outDir": "lib", 8 | "emitDeclarationOnly": true, 9 | "importHelpers": true 10 | }, 11 | "include": [ 12 | "./src" 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /docs/messages/0001.md: -------------------------------------------------------------------------------- 1 | # Warning: 0001 2 | 3 | General warning without further content. 4 | 5 | ## Description 6 | 7 | Printed to inform you about a potential problem that may require 8 | changes to your project. 9 | 10 | ## Example 11 | 12 | Nothing of interest yet. 13 | 14 | ## Further Reading 15 | 16 | - [Node Console](https://nodejs.org/api/console.html) 17 | -------------------------------------------------------------------------------- /docs/messages/0003.md: -------------------------------------------------------------------------------- 1 | # Debug: 0003 2 | 3 | General debug message without further content. 4 | 5 | ## Description 6 | 7 | Printed to give some indication about the application's current 8 | progress and state. 9 | 10 | ## Example 11 | 12 | Nothing of interest yet. 13 | 14 | ## Further Reading 15 | 16 | - [Node Console](https://nodejs.org/api/console.html) 17 | -------------------------------------------------------------------------------- /src/framework/piral/src/options.ts: -------------------------------------------------------------------------------- 1 | export function getContainer(selector?: string | Element) { 2 | if (typeof selector === 'string') { 3 | return document.querySelector(selector); 4 | } else if (selector && selector instanceof Element) { 5 | return selector; 6 | } else { 7 | return document.body.appendChild(document.createElement('div')); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/pages/www/src/scripts/components/index.ts: -------------------------------------------------------------------------------- 1 | export * from './Banner'; 2 | export * from './Capabilities'; 3 | export * from './Capability'; 4 | export * from './Companies'; 5 | export * from './Feature'; 6 | export * from './Friends'; 7 | export * from './Features'; 8 | export * from './GitHubCat'; 9 | export * from './Technologies'; 10 | export * from './Testimonials'; 11 | -------------------------------------------------------------------------------- /src/framework/piral-core/src/index.tsx: -------------------------------------------------------------------------------- 1 | export * from './createInstance'; 2 | export * from './helpers'; 3 | export * from './components'; 4 | export * from './hooks'; 5 | export * from './modules'; 6 | export * from './setters'; 7 | export * from './state'; 8 | export * from './utils'; 9 | export * from './Piral'; 10 | export * from './PiralContext'; 11 | export * from './types'; 12 | -------------------------------------------------------------------------------- /src/pages/common/components/FooterMenu.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | 3 | export interface FooterMenuProps { 4 | title: string; 5 | children: React.ReactNode; 6 | } 7 | 8 | export const FooterMenu: React.FC = ({ title, children }) => ( 9 |
10 |

{title}

11 |
    {children}
12 |
13 | ); 14 | -------------------------------------------------------------------------------- /src/plugins/piral-axios/src/types.ts: -------------------------------------------------------------------------------- 1 | import type {} from 'piral-core'; 2 | import type { AxiosInstance } from 'axios'; 3 | 4 | declare module 'piral-core/lib/types/custom' { 5 | interface PiletCustomApi extends PiletAxiosApi {} 6 | } 7 | 8 | export interface PiletAxiosApi { 9 | /** 10 | * Gets the associated axios instance. 11 | */ 12 | axios: AxiosInstance; 13 | } 14 | -------------------------------------------------------------------------------- /src/tooling/publish-microfrontend/src/browser.ts: -------------------------------------------------------------------------------- 1 | import { logFail } from './log'; 2 | 3 | export async function openBrowserAt(address: string) { 4 | try { 5 | const name = 'open'; 6 | const open = await import(name).then((c) => c.default); 7 | await open(address, undefined); 8 | } catch (err) { 9 | logFail('Failed to open the browser: %s', err); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/framework/siteless/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Siteless 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/plugins/piral-translate/src/Languages.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { useGlobalState } from 'piral-core'; 3 | import { PiralLanguagesPicker } from './components'; 4 | 5 | export const Languages: React.FC = () => { 6 | const { available, selected } = useGlobalState((m) => m.language); 7 | return ; 8 | }; 9 | -------------------------------------------------------------------------------- /docs/tools/README.md: -------------------------------------------------------------------------------- 1 | # Tools 2 | 3 | Piral is an end-to-end solution for creating large-scale web applications using micro frontends. As such we also try to create an ecosystem of tools that is helpful. 4 | 5 | ## Available Tooling 6 | 7 | The following tooling documentation is available right now: 8 | 9 | - [Piral Inspector](./piral-inspector.md) 10 | - [VSCode Piral](./vscode-piral.md) 11 | -------------------------------------------------------------------------------- /docs/diagrams/vscode-vsx-logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | -------------------------------------------------------------------------------- /docs/messages/README.md: -------------------------------------------------------------------------------- 1 | # Logging Message Codes 2 | 3 | In this folder, you'll find all the available logging message codes with some detailed explanations. 4 | 5 | > **:warning: Important:**
6 | > The messages in this folder are auto-generated. 7 | > Changes made to any of the `*.md` files will be lost. 8 | > To update the messages, change the JSDoc in the `piral-cli` package's `message.ts` file. 9 | -------------------------------------------------------------------------------- /src/framework/piral-core/src/defaults/DefaultLoadingIndicator.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { LoadingIndicatorProps } from '../types'; 3 | 4 | /** 5 | * The default loading indicator only displaying "Loading". 6 | */ 7 | export const DefaultLoadingIndicator: React.FC = () =>
Loading
; 8 | DefaultLoadingIndicator.displayName = 'DefaultLoadingIndicator'; 9 | -------------------------------------------------------------------------------- /tools/size-reporter.mjs: -------------------------------------------------------------------------------- 1 | import { reportFileSizeImpactInGitHubPullRequest, readGitHubWorkflowEnv } from '@jsenv/file-size-impact'; 2 | 3 | await reportFileSizeImpactInGitHubPullRequest({ 4 | ...readGitHubWorkflowEnv(), 5 | buildCommand: 'npx lerna run build:release', 6 | installCommand: 'yarn setup', 7 | fileSizeReportUrl: new URL("./size-generator.mjs#fileSizeReport", import.meta.url), 8 | }); 9 | -------------------------------------------------------------------------------- /src/framework/piral-core/src/defaults/DefaultRouter_wouter.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | //@ts-ignore 3 | import { Router } from 'wouter'; 4 | import { RouterProps } from '../types'; 5 | 6 | export const DefaultRouter: React.FC = ({ children, publicPath }) => { 7 | return {children}; 8 | }; 9 | DefaultRouter.displayName = 'DefaultRouter'; 10 | -------------------------------------------------------------------------------- /src/framework/piral-core/src/defaults/DefaultRouter_v5.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { BrowserRouter } from 'react-router-dom'; 3 | import { RouterProps } from '../types'; 4 | 5 | export const DefaultRouter: React.FC = ({ children, publicPath }) => { 6 | return {children}; 7 | }; 8 | DefaultRouter.displayName = 'DefaultRouter'; 9 | -------------------------------------------------------------------------------- /src/framework/piral-core/src/defaults/DefaultRouter_v6.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { BrowserRouter } from 'react-router-dom'; 3 | import { RouterProps } from '../types'; 4 | 5 | export const DefaultRouter: React.FC = ({ children, publicPath }) => { 6 | return {children}; 7 | }; 8 | DefaultRouter.displayName = 'DefaultRouter'; 9 | -------------------------------------------------------------------------------- /src/pages/www/src/scripts/pages/Home.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { Banner, Capabilities, Features, Technologies, Testimonials, Companies } from '../components'; 3 | 4 | const Home = () => ( 5 | <> 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | ); 14 | 15 | export default Home; 16 | -------------------------------------------------------------------------------- /src/utilities/piral-debug-utils/src/routeRefresh.ts: -------------------------------------------------------------------------------- 1 | export const debugRouteCache = { 2 | active: 0, 3 | paths: [], 4 | }; 5 | 6 | export function freezeRouteRefresh() { 7 | debugRouteCache.active++; 8 | 9 | return () => { 10 | debugRouteCache.active--; 11 | 12 | if (!debugRouteCache.active) { 13 | window.dispatchEvent(new CustomEvent('pilets-reloaded')); 14 | } 15 | }; 16 | } 17 | -------------------------------------------------------------------------------- /src/framework/piral-core/src/defaults/DefaultLayout.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { defaultRender } from '../utils'; 3 | import { LayoutProps } from '../types'; 4 | 5 | /** 6 | * The default layout only rendering the provided children. 7 | */ 8 | export const DefaultLayout: React.FC = ({ children }) => defaultRender(children); 9 | DefaultLayout.displayName = 'DefaultLayout'; 10 | -------------------------------------------------------------------------------- /src/samples/empty-piral/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Empty Piral Instance 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/samples/minimal-piral/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Minimal Piral Sample 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/tooling/piral-cli/src/runner.ts: -------------------------------------------------------------------------------- 1 | import { start } from './start'; 2 | 3 | interface RunnerArgs { 4 | type: string; 5 | select: string; 6 | args: Array; 7 | } 8 | 9 | process.on('message', async ({ type, select, args }: RunnerArgs) => { 10 | if (type === 'start') { 11 | const from = eval(select); 12 | process.argv.splice(2, 0, ...args); 13 | await start(from); 14 | } 15 | }); 16 | -------------------------------------------------------------------------------- /docs/messages/0190.md: -------------------------------------------------------------------------------- 1 | # Error: 0190 2 | 3 | Using the given platform is not supported. 4 | 5 | ## Description 6 | 7 | The Piral instance can run on multiple platforms. The platform is specified via 8 | the piral.json file. 9 | 10 | The standard platform is "web", which starts a web server using the server 11 | proxy kras. 12 | 13 | ## Example 14 | 15 | (tbd) 16 | 17 | ## Further Reading 18 | 19 | undefined 20 | -------------------------------------------------------------------------------- /src/converters/piral-ng/src/injection.ts: -------------------------------------------------------------------------------- 1 | import { InjectionToken } from '@angular/core'; 2 | import type { ComponentContext, PiletApi } from 'piral-core'; 3 | import { contextName, piralName, propsName } from './constants'; 4 | 5 | export const PROPS = new InjectionToken(propsName); 6 | export const PIRAL = new InjectionToken(piralName); 7 | export const CONTEXT = new InjectionToken(contextName); 8 | -------------------------------------------------------------------------------- /src/tooling/piral-cli/src/platforms/node.ts: -------------------------------------------------------------------------------- 1 | import { PlatformStartShellOptions, PlatformStartModuleOptions } from '../types'; 2 | 3 | async function startModule(options: PlatformStartModuleOptions) { 4 | //TODO 5 | } 6 | 7 | async function startShell(options: PlatformStartShellOptions) { 8 | //TODO 9 | } 10 | 11 | export function setup() { 12 | return { 13 | startModule, 14 | startShell, 15 | }; 16 | } 17 | -------------------------------------------------------------------------------- /src/framework/piral-core/src/defaults/DefaultRouter_v7.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | //@ts-ignore 3 | import { BrowserRouter } from 'react-router'; 4 | import { RouterProps } from '../types'; 5 | 6 | export const DefaultRouter: React.FC = ({ children, publicPath }) => { 7 | return {children}; 8 | }; 9 | DefaultRouter.displayName = 'DefaultRouter'; 10 | -------------------------------------------------------------------------------- /src/plugins/piral-auth/src/actions.ts: -------------------------------------------------------------------------------- 1 | import type { GlobalStateContext } from 'piral-core'; 2 | import { UserInfo } from './types'; 3 | 4 | export function setUser(ctx: GlobalStateContext, user: UserInfo) { 5 | ctx.dispatch((state) => { 6 | ctx.emit('change-user', { 7 | current: user, 8 | previous: state.user, 9 | }); 10 | return { 11 | ...state, 12 | user, 13 | }; 14 | }); 15 | } 16 | -------------------------------------------------------------------------------- /src/samples/minimal-piral/src/index.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { createRoot } from 'react-dom/client'; 3 | import { createInstance, Piral } from 'piral-core'; 4 | 5 | const instance = createInstance({ 6 | plugins: [], 7 | state: {}, 8 | requestPilets() { 9 | return Promise.resolve([]); 10 | }, 11 | }); 12 | 13 | createRoot(document.querySelector('#app')).render(); 14 | -------------------------------------------------------------------------------- /src/framework/piral-core/src/utils/index.ts: -------------------------------------------------------------------------------- 1 | export { isfunc, requireModule } from 'piral-base'; 2 | 3 | export * from './compare'; 4 | export * from './data'; 5 | export * from './extension'; 6 | export * from './foreign'; 7 | export * from './guid'; 8 | export * from './helpers'; 9 | export * from './media'; 10 | export * from './react'; 11 | export * from './routes'; 12 | export * from './state'; 13 | export * from './storage'; 14 | -------------------------------------------------------------------------------- /docs/logos/cloudflare.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/framework/piral-core/src/utils/guid.ts: -------------------------------------------------------------------------------- 1 | function rand(c: 'x' | 'y') { 2 | const r = (Math.random() * 16) | 0; 3 | const v = c === 'x' ? r : (r & 0x3) | 0x8; 4 | return v.toString(16); 5 | } 6 | 7 | export function generateId() { 8 | return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, rand); 9 | } 10 | 11 | export function buildName(prefix: string, name: string | number) { 12 | return `${prefix}://${name}`; 13 | } 14 | -------------------------------------------------------------------------------- /.github/workflows/docs.yml: -------------------------------------------------------------------------------- 1 | name: check-documentation 2 | 3 | on: 4 | schedule: 5 | - cron: "0 9 * * *" 6 | 7 | jobs: 8 | markdown-link-check: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - uses: actions/checkout@v2 12 | with: 13 | ref: documentation 14 | - uses: gaurav-nelson/github-action-markdown-link-check@v1 15 | with: 16 | max-depth: 4 # exclude the API docs 17 | use-quiet-mode: 'yes' 18 | -------------------------------------------------------------------------------- /src/converters/piral-million/src/mount.ts: -------------------------------------------------------------------------------- 1 | import type { BaseComponentProps } from 'piral-core'; 2 | import { render, createElement } from 'million/react'; 3 | 4 | export function mountMillion(el: HTMLElement, root: any, props: T) { 5 | const m = createElement as any; 6 | const node = m(root, props); 7 | render(node, el); 8 | } 9 | 10 | export function unmountMillion(el: HTMLElement) { 11 | render('', el); 12 | } 13 | -------------------------------------------------------------------------------- /src/framework/piral-base/src/index.node.ts: -------------------------------------------------------------------------------- 1 | import 'systemjs'; 2 | import 'systemjs/dist/extras/named-register.js'; 3 | 4 | export * from './aggregate'; 5 | export * from './api'; 6 | export * from './create'; 7 | export * from './events'; 8 | export * from './inspect'; 9 | export * from './lifecycle'; 10 | export * from './load'; 11 | export * from './loader'; 12 | export * from './strategies'; 13 | export * from './types'; 14 | export * from './utils'; 15 | -------------------------------------------------------------------------------- /src/framework/piral-core/src/hooks/actions.ts: -------------------------------------------------------------------------------- 1 | import { useContext } from 'react'; 2 | import { StateContext } from '../state/stateContext'; 3 | import { PiralActions, GlobalStateContext } from '../types'; 4 | 5 | /** 6 | * Hook that gets the actions for manipulating the global state. 7 | */ 8 | export function useActions() { 9 | const { state, ...actions } = useContext(StateContext); 10 | return actions as PiralActions; 11 | } 12 | -------------------------------------------------------------------------------- /src/framework/piral-core/src/components/PortalRenderer.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { useGlobalState } from '../hooks'; 3 | import { defaultRender, none } from '../utils'; 4 | 5 | export interface PortalRendererProps { 6 | id: string; 7 | } 8 | 9 | export const PortalRenderer: React.FC = ({ id }) => { 10 | const children = useGlobalState((m) => m.portals[id]) || none; 11 | return defaultRender(children); 12 | }; 13 | -------------------------------------------------------------------------------- /src/pages/common/components/ScrollToTop.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { RouteComponentProps } from 'react-router-dom'; 3 | 4 | export const ScrollToTop: React.FC = ({ history, location }) => { 5 | React.useEffect(() => { 6 | if (history.action === 'PUSH') { 7 | window.scrollTo(0, 0); 8 | } 9 | }, [location.pathname]); 10 | 11 | // tslint:disable-next-line:no-null-keyword 12 | return null; 13 | }; 14 | -------------------------------------------------------------------------------- /src/framework/README.md: -------------------------------------------------------------------------------- 1 | # Piral Framework Packages 2 | 3 | Piral is developed as a monorepo. 4 | 5 | ## Available Framework Packages 6 | 7 | - [piral](./piral/README.md) is the standard library 8 | - [piral-base](./piral-base/README.md) represents the framework independent base library 9 | - [piral-core](./piral-core/README.md) represents the React-dependent core library 10 | - [siteless](./siteless/README.md) is a predefined app shell for building siteless UIs 11 | -------------------------------------------------------------------------------- /src/framework/piral-core/src/types/index.ts: -------------------------------------------------------------------------------- 1 | export * from './api'; 2 | export * from './common'; 3 | export * from './components'; 4 | export * from './config'; 5 | export * from './custom'; 6 | export * from './data'; 7 | export * from './extension'; 8 | export * from './instance'; 9 | export * from './layout'; 10 | export * from './navigation'; 11 | export * from './plugin'; 12 | export * from './state'; 13 | export * from './utils'; 14 | export * from './web'; 15 | -------------------------------------------------------------------------------- /src/framework/piral-base/src/index.full.ts: -------------------------------------------------------------------------------- 1 | import 'systemjs/dist/system.js'; 2 | import 'systemjs/dist/extras/named-register.js'; 3 | 4 | export * from './aggregate'; 5 | export * from './api'; 6 | export * from './create'; 7 | export * from './events'; 8 | export * from './inspect'; 9 | export * from './lifecycle'; 10 | export * from './load'; 11 | export * from './loader'; 12 | export * from './strategies'; 13 | export * from './types'; 14 | export * from './utils'; 15 | -------------------------------------------------------------------------------- /src/samples/sample-piral/src/utils.ts: -------------------------------------------------------------------------------- 1 | export function getTileClass(cols: number, rows: number) { 2 | const baseCls = 'pi-tile'; 3 | 4 | if (cols > 3 && rows > 3) { 5 | return `${baseCls} large`; 6 | } else if (cols > 3) { 7 | return `${baseCls} wide`; 8 | } else if (cols > 1 && rows > 1) { 9 | return `${baseCls} medium`; 10 | } else if (cols === 1 || rows === 1) { 11 | return `${baseCls} small`; 12 | } 13 | 14 | return baseCls; 15 | } 16 | -------------------------------------------------------------------------------- /src/converters/piral-ng/src/queue.test.ts: -------------------------------------------------------------------------------- 1 | import { describe, it, expect } from 'vitest'; 2 | import { enqueue } from './queue'; 3 | 4 | describe('queue', () => { 5 | it('queueing works', async () => { 6 | const elements = []; 7 | await new Promise((resolve) => { 8 | enqueue(() => elements.push('ho')); 9 | enqueue(() => elements.push('hop')); 10 | enqueue(resolve); 11 | }); 12 | expect(elements).toEqual(['ho', 'hop']); 13 | }); 14 | }); 15 | -------------------------------------------------------------------------------- /src/plugins/piral-adal/src/setup.test.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @vitest-environment jsdom 3 | */ 4 | import { describe, it, expect } from 'vitest'; 5 | import { setupAdalClient } from './setup'; 6 | 7 | describe('Piral-Adal setup module', () => { 8 | it('created ADAL client is not logged in', () => { 9 | const client = setupAdalClient({ 10 | clientId: '123', 11 | }); 12 | const account = client.account(); 13 | expect(account).toBeNull(); 14 | }); 15 | }); 16 | -------------------------------------------------------------------------------- /src/converters/piral-vue/extend-webpack.js: -------------------------------------------------------------------------------- 1 | const { VueLoaderPlugin } = require('vue-loader'); 2 | 3 | const vueLoader = require.resolve('vue-loader'); 4 | 5 | module.exports = 6 | (options = {}) => 7 | (config) => { 8 | config.plugins.push(new VueLoaderPlugin()); 9 | 10 | config.module.rules.unshift({ 11 | test: /\.vue$/, 12 | use: { 13 | loader: vueLoader, 14 | options, 15 | }, 16 | }); 17 | 18 | return config; 19 | }; 20 | -------------------------------------------------------------------------------- /src/framework/piral-core/src/components/index.ts: -------------------------------------------------------------------------------- 1 | export * from './components'; 2 | export * from './ErrorBoundary'; 3 | export * from './ExtensionSlot'; 4 | export * from './Mediator'; 5 | export * from './PiralGlobals'; 6 | export * from './PiralRoutes'; 7 | export * from './PiralSuspense'; 8 | export * from './PiralView'; 9 | export * from './PortalRenderer'; 10 | export * from './ResponsiveLayout'; 11 | export * from './SwitchErrorInfo'; 12 | export * from './wrapComponent'; 13 | -------------------------------------------------------------------------------- /src/framework/piral-core/src/hooks/action.ts: -------------------------------------------------------------------------------- 1 | import { useGlobalStateContext } from './globalState'; 2 | import { PiralActions, GlobalStateContext } from '../types'; 3 | 4 | /** 5 | * Hook that gets an action for manipulating the global state. 6 | * @param action The name of the action to retrieve. 7 | */ 8 | export function useAction(action: T): GlobalStateContext[T] { 9 | const ctx = useGlobalStateContext(); 10 | return ctx[action]; 11 | } 12 | -------------------------------------------------------------------------------- /src/tooling/piral-cli/src/common/MemoryStream.ts: -------------------------------------------------------------------------------- 1 | import { Writable } from 'stream'; 2 | 3 | export class MemoryStream extends Writable { 4 | private _buffers: Array = []; 5 | 6 | _write(chunk, enc, cb) { 7 | const buffer = Buffer.isBuffer(chunk) ? chunk : new Buffer(chunk, enc); 8 | this._buffers.push(buffer); 9 | cb(); 10 | } 11 | 12 | get value() { 13 | return Buffer.concat(this._buffers).toString('utf8').replace(/\s+$/, ''); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/converters/piral-vue-3/extend-webpack.js: -------------------------------------------------------------------------------- 1 | const { VueLoaderPlugin } = require('vue-loader'); 2 | 3 | const vueLoader = require.resolve('vue-loader'); 4 | 5 | module.exports = 6 | (options = {}) => 7 | (config) => { 8 | config.plugins.push(new VueLoaderPlugin()); 9 | 10 | config.module.rules.unshift({ 11 | test: /\.vue$/, 12 | use: { 13 | loader: vueLoader, 14 | options, 15 | }, 16 | }); 17 | 18 | return config; 19 | }; 20 | -------------------------------------------------------------------------------- /src/framework/piral-core/src/actions/define.ts: -------------------------------------------------------------------------------- 1 | import { GlobalStateContext } from '../types'; 2 | 3 | export function defineAction(ctx: GlobalStateContext, actionName: string, action: any) { 4 | ctx[actionName] = action.bind(ctx, ctx); 5 | } 6 | 7 | export function defineActions(ctx: GlobalStateContext, actions: any) { 8 | for (const actionName of Object.keys(actions)) { 9 | const action = actions[actionName]; 10 | defineAction(ctx, actionName, action); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/framework/piral-core/src/components/PiralGlobals.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { PortalRenderer } from './PortalRenderer'; 3 | import { RegisteredDebug } from './components'; 4 | 5 | /** 6 | * Integrates the global portal renderer and the debug utilities 7 | * (if registered). 8 | */ 9 | export const PiralGlobals: React.FC = () => { 10 | return ( 11 | <> 12 | 13 | 14 | 15 | ); 16 | }; 17 | -------------------------------------------------------------------------------- /docs/messages/0082.md: -------------------------------------------------------------------------------- 1 | # Info: 0082 2 | 3 | The validation process succeeded. 4 | 5 | ## Description 6 | 7 | The validation found no warnings or errors. 8 | 9 | If the performed validations are incorrectly placed or inappropriate for the 10 | current project then change the settings in your Piral instance configuration. 11 | 12 | ## Example 13 | 14 | ... 15 | 16 | ## Further Reading 17 | 18 | - [Validation](https://docs.piral.io/guidelines/tutorials/08-the-piral-cli#validations) 19 | -------------------------------------------------------------------------------- /src/utilities/piral-hooks-utils/src/hooks/piletApi.ts: -------------------------------------------------------------------------------- 1 | import { useContext } from 'react'; 2 | import { PiletApiProvider } from '../contexts'; 3 | 4 | /** 5 | * Retrieves the Pilet API stored in the provider. 6 | * The component must be somewhat wrapped in the 7 | * PiletApiProvider, e.g., via withPiletApi wrapper. 8 | * @returns The Pilet API for this component. 9 | */ 10 | export function usePiletApi(): TPiletApi { 11 | return useContext(PiletApiProvider); 12 | } 13 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | # Issue Templates 2 | 3 | Please use one of the following templates to create your issue: 4 | 5 | - [Bug report](https://github.com/smapiot/piral/issues/new?template=bug_report.md) 6 | - [Feature proposal](https://github.com/smapiot/piral/issues/new?template=feature_request.md) 7 | 8 | In case of questions please either use [our Discord server](https://discord.gg/kKJ2FZmK8t) or (preferably) [the Piral tag on StackOverflow](https://stackoverflow.com/questions/tagged/piral). 9 | -------------------------------------------------------------------------------- /src/pages/docs/src/NotFound.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | 3 | export default () => ( 4 |
5 | Not Found 6 |

Page Not Found

7 |

The page you are looking for has not been found here. Maybe start a search?

8 |

The search is located on the top right corner. You can just click on the magnifier symbol.

9 |
10 | ); 11 | -------------------------------------------------------------------------------- /src/utilities/piral-hooks-utils/src/hooks/lockBodyScroll.ts: -------------------------------------------------------------------------------- 1 | import { useLayoutEffect } from 'react'; 2 | 3 | /** 4 | * Hook that locks scrolling on the main document. 5 | * Useful for preventing the standard scrolling in context of 6 | * a modal dialog. 7 | */ 8 | export function useLockBodyScroll() { 9 | useLayoutEffect(() => { 10 | document.body.style.overflow = 'hidden'; 11 | return () => { 12 | document.body.style.overflow = 'visible'; 13 | }; 14 | }, []); 15 | } 16 | -------------------------------------------------------------------------------- /src/framework/piral-base/src/loaders/v0/fetch.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Uses the `fetch` function (must be available). If you 3 | * use this function make sure to use, e.g., `whatwg-fetch` 4 | * which comes with polyfills for older browsers. 5 | * @param url The URL to GET. 6 | * @returns A promise leading to the raw text content. 7 | */ 8 | export function fetchDependency(url: string) { 9 | return fetch(url, { 10 | method: 'GET', 11 | cache: 'force-cache', 12 | }).then((m) => m.text()); 13 | } 14 | -------------------------------------------------------------------------------- /src/plugins/piral-modals/src/default.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { defaultRender } from 'piral-core'; 3 | import { ModalsHostProps, ModalsDialogProps } from './types'; 4 | 5 | export const DefaultHost: React.FC = (props) => ( 6 |
{props.open &&
{props.children}
}
7 | ); 8 | 9 | export const DefaultDialog: React.FC = (props) => defaultRender(props.children); 10 | -------------------------------------------------------------------------------- /src/converters/piral-elm/src/extension.ts: -------------------------------------------------------------------------------- 1 | export function createExtension(selector: string) { 2 | const defaultExtensionSelector = 'piral-extension'; 3 | 4 | if ('customElements' in window && selector && selector !== defaultExtensionSelector) { 5 | const ExtensionBase = customElements.get(defaultExtensionSelector); 6 | class AliasExtension extends ExtensionBase {} 7 | customElements.define(selector, AliasExtension); 8 | } 9 | 10 | return selector || defaultExtensionSelector; 11 | } 12 | -------------------------------------------------------------------------------- /src/samples/sample-piral/src/parts/menu.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { InitialMenuItem } from 'piral'; 3 | import { Link } from 'react-router-dom'; 4 | 5 | function attach(element: React.ReactElement): InitialMenuItem { 6 | return { 7 | settings: { 8 | type: 'general', 9 | }, 10 | component: () => element, 11 | }; 12 | } 13 | 14 | export function setupMenu() { 15 | return [attach(Home), attach(Not Found)]; 16 | } 17 | -------------------------------------------------------------------------------- /src/converters/piral-ember/src/extension.ts: -------------------------------------------------------------------------------- 1 | export function createExtension(selector: string) { 2 | const defaultExtensionSelector = 'piral-extension'; 3 | 4 | if ('customElements' in window && selector && selector !== defaultExtensionSelector) { 5 | const ExtensionBase = customElements.get(defaultExtensionSelector); 6 | class AliasExtension extends ExtensionBase {} 7 | customElements.define(selector, AliasExtension); 8 | } 9 | 10 | return selector || defaultExtensionSelector; 11 | } 12 | -------------------------------------------------------------------------------- /src/converters/piral-svelte/src/extension.ts: -------------------------------------------------------------------------------- 1 | export function createExtension(selector: string) { 2 | const defaultExtensionSelector = 'piral-extension'; 3 | 4 | if ('customElements' in window && selector && selector !== defaultExtensionSelector) { 5 | const ExtensionBase = customElements.get(defaultExtensionSelector); 6 | class AliasExtension extends ExtensionBase {} 7 | customElements.define(selector, AliasExtension); 8 | } 9 | 10 | return selector || defaultExtensionSelector; 11 | } 12 | -------------------------------------------------------------------------------- /src/pages/www/src/scripts/components/Capability.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | 3 | export interface CapabilityProps { 4 | image?: string; 5 | title: string; 6 | children: React.ReactNode; 7 | cta?: React.ReactNode; 8 | } 9 | 10 | export const Capability: React.FC = ({ image, title, cta, children }) => ( 11 |
12 | {image && {title}} 13 |

{title}

14 |

{children}

15 | {cta} 16 |
17 | ); 18 | -------------------------------------------------------------------------------- /src/pages/www/src/scripts/components/Status.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | 3 | export const Status: React.FC = () => ( 4 | 5 | 6 | npm version 7 | 8 | 9 | GitHub tag 10 | 11 | 12 | ); 13 | -------------------------------------------------------------------------------- /src/framework/piral-core/src/hooks/setter.ts: -------------------------------------------------------------------------------- 1 | import { useEffect as useSideEffect } from 'react'; 2 | import { none } from '../utils/helpers'; 3 | 4 | function useMainEffect(cb: () => void) { 5 | cb(); 6 | } 7 | 8 | const useEffect = typeof window !== 'undefined' ? useSideEffect : useMainEffect; 9 | 10 | /** 11 | * Hook for running the callback once on mount. 12 | * @param cb The callback to be invoked on mounting. 13 | */ 14 | export function useSetter(cb: () => void) { 15 | useEffect(cb, none); 16 | } 17 | -------------------------------------------------------------------------------- /src/converters/piral-mithril/src/extension.ts: -------------------------------------------------------------------------------- 1 | import { m } from 'mithril'; 2 | 3 | export function createExtension(rootName: string) { 4 | return { 5 | oncreate(vnode) { 6 | vnode.dom.dispatchEvent( 7 | new CustomEvent('render-html', { 8 | bubbles: true, 9 | detail: { 10 | target: vnode.dom, 11 | props: vnode.attrs, 12 | }, 13 | }), 14 | ); 15 | }, 16 | view() { 17 | return m(rootName); 18 | }, 19 | }; 20 | } 21 | -------------------------------------------------------------------------------- /src/converters/piral-vue-3/src/mount.ts: -------------------------------------------------------------------------------- 1 | import type { BaseComponentProps, ComponentContext } from 'piral-core'; 2 | import { createApp, Component, h } from 'vue'; 3 | 4 | export function mountVue(component: Component, props: T, ctx: ComponentContext) { 5 | const root: Component = { 6 | provide: { 7 | piral: props.piral, 8 | ...ctx, 9 | }, 10 | render() { 11 | return h(component, props); 12 | }, 13 | }; 14 | 15 | return createApp(root); 16 | } 17 | -------------------------------------------------------------------------------- /src/pages/www/README.md: -------------------------------------------------------------------------------- 1 | [![Piral Logo](https://github.com/smapiot/piral/raw/main/docs/assets/logo.png)](https://piral.io) 2 | 3 | # [Piral Landing Page](https://piral.io) · [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/smapiot/piral/blob/main/LICENSE) 4 | 5 | The landing page for the Piral project. You can find it at [piral.io](https://piral.io). 6 | 7 | ## License 8 | 9 | Piral is released using the MIT license. For more information see the [license file](./LICENSE). 10 | -------------------------------------------------------------------------------- /src/plugins/piral-notifications/src/default.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { defaultRender } from 'piral-core'; 3 | import { NotificationsHostProps, NotificationsToastProps } from './types'; 4 | 5 | export const DefaultHost: React.FC = (props) => ( 6 |
7 | {props.children} 8 |
9 | ); 10 | 11 | export const DefaultToast: React.FC = ({ children }) => defaultRender(children); 12 | -------------------------------------------------------------------------------- /src/tooling/piral-cli/src/common/hash.ts: -------------------------------------------------------------------------------- 1 | import { createHash } from 'crypto'; 2 | 3 | export function computeHash(content: string | Buffer = '') { 4 | return createHash('sha1').update(content).digest('hex'); 5 | } 6 | 7 | export function computeMd5(content: string | Buffer = '') { 8 | return createHash('md5').update(content).digest('hex'); 9 | } 10 | 11 | export function computeIntegrity(content: string) { 12 | const sum = createHash('sha256').update(content).digest('base64'); 13 | return `sha256-${sum}`; 14 | } 15 | -------------------------------------------------------------------------------- /docs/messages/0114.md: -------------------------------------------------------------------------------- 1 | # Error: 0114 2 | 3 | The "emulator-sources" type is not supported for publishing. 4 | 5 | ## Description 6 | 7 | The `piral publish` command only works with the emulator or release output types. 8 | 9 | ## Example 10 | 11 | The following command uses the in-built "xcopy" provider for releasing to a local directory. 12 | 13 | ```sh 14 | piral publish --type release --provider xcopy --opts.target "/temp/dest" 15 | ``` 16 | 17 | The type is "release". 18 | 19 | ## Further Reading 20 | 21 | undefined 22 | -------------------------------------------------------------------------------- /src/pages/docs/README.md: -------------------------------------------------------------------------------- 1 | [![Piral Logo](https://github.com/smapiot/piral/raw/main/docs/assets/logo.png)](https://piral.io) 2 | 3 | # [Piral Documentation Page](https://piral.io) · [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/smapiot/piral/blob/main/LICENSE) 4 | 5 | The landing page for the Piral project. You can find it at [piral.io](https://docs.piral.io). 6 | 7 | ## License 8 | 9 | Piral is released using the MIT license. For more information see the [license file](./LICENSE). 10 | -------------------------------------------------------------------------------- /src/plugins/piral-dashboard/src/default.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { ExtensionSlot, defaultRender } from 'piral-core'; 3 | import { DashboardContainerProps, DashboardTileProps } from './types'; 4 | 5 | export const DefaultContainer: React.FC = (props) => ( 6 | defaultRender(props.children, 'default_dashboard')} /> 7 | ); 8 | 9 | export const DefaultTile: React.FC = (props) => defaultRender(props.children); 10 | -------------------------------------------------------------------------------- /docs/logos/heroku.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/plugins/piral-oauth2/src/create.ts: -------------------------------------------------------------------------------- 1 | import { PiralPlugin } from 'piral-core'; 2 | import { OAuth2Client, PiralOAuth2Api } from './types'; 3 | 4 | /** 5 | * Creates new Pilet API extensions for the integration of OAuth 2.0. 6 | */ 7 | export function createOAuth2Api(client: OAuth2Client): PiralPlugin { 8 | return (context) => { 9 | context.on('before-fetch', client.extendHeaders); 10 | 11 | return { 12 | getAccessToken() { 13 | return client.token(); 14 | }, 15 | }; 16 | }; 17 | } 18 | -------------------------------------------------------------------------------- /src/tooling/piral-cli-webpack5/src/plugins/StylesLoader.ts: -------------------------------------------------------------------------------- 1 | import { getOptions } from 'loader-utils'; 2 | 3 | export default function stylesLoader() { 4 | const { cssName, entries } = getOptions(this) as Record; 5 | const debug = process.env.NODE_ENV === 'development'; 6 | return [ 7 | `const u = ${JSON.stringify(cssName)}`, 8 | `export const styles = [${debug ? 'u+"?_="+Math.random()' : 'u'}]`, 9 | ...entries.split(',').map((entry) => `export * from ${JSON.stringify(entry)}`), 10 | ].join(';'); 11 | } 12 | -------------------------------------------------------------------------------- /src/samples/sample-piral-core/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Piral Core Sample 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/tooling/piral-cli-webpack5/src/enhancers/hmr-webpack-config-enhancer/HotModuleServerPlugin.ts: -------------------------------------------------------------------------------- 1 | import type { Compiler, WebpackPluginInstance } from 'webpack'; 2 | 3 | export class HotModuleServerPlugin implements WebpackPluginInstance { 4 | constructor(private hmrPort: number) {} 5 | 6 | apply(compiler: Compiler) { 7 | const express = require('express'); 8 | const app = express(); 9 | app.use(require('../../../src/webpack-hot-middleware/middleware')(compiler)); 10 | app.listen(this.hmrPort, () => {}); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/framework/piral-core/src/utils/media-server.test.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @vitest-environment node 3 | */ 4 | import { describe, it, expect } from 'vitest'; 5 | import { getCurrentLayout } from './media'; 6 | 7 | describe('Media Module', () => { 8 | it('in here window should be undefined', () => { 9 | expect(typeof window).toBe('undefined'); 10 | const breakpoints = ['min-width: 200px', 'max-width: 199px']; 11 | const result = getCurrentLayout(breakpoints, ['foo', 'bar'], 'qxz'); 12 | expect(result).toBe('qxz'); 13 | }); 14 | }); 15 | -------------------------------------------------------------------------------- /src/plugins/piral-menu/src/default.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { defaultRender, ExtensionSlot } from 'piral-core'; 3 | import { MenuContainerProps, MenuItemProps } from './types'; 4 | 5 | export const DefaultContainer: React.FC = (props) => ( 6 | defaultRender(props.children, 'default_menu')} 10 | /> 11 | ); 12 | 13 | export const DefaultItem: React.FC = (props) => defaultRender(props.children); 14 | -------------------------------------------------------------------------------- /src/tooling/piral-cli/src/common/info.test.ts: -------------------------------------------------------------------------------- 1 | import { describe, it, expect } from 'vitest'; 2 | import { findCompatVersion } from './info'; 3 | 4 | describe('CLI info module', () => { 5 | it('findCompatVersion identifies the pre v1 version correcty', () => { 6 | const result = findCompatVersion('0.10.2'); 7 | expect(result).toBe('0.10'); 8 | }); 9 | 10 | it('findCompatVersion identifies the post v1 version correcty', () => { 11 | const result = findCompatVersion('2.10.2'); 12 | expect(result).toBe('2'); 13 | }); 14 | }); 15 | -------------------------------------------------------------------------------- /src/plugins/piral-adal/src/create.ts: -------------------------------------------------------------------------------- 1 | import { PiralPlugin } from 'piral-core'; 2 | import { AdalClient } from './setup'; 3 | import { PiletAdalApi } from './types'; 4 | 5 | /** 6 | * Creates new Pilet API extensions for the integration of MSAL. 7 | */ 8 | export function createAdalApi(client: AdalClient): PiralPlugin { 9 | return (context) => { 10 | context.on('before-fetch', client.extendHeaders); 11 | 12 | return { 13 | getAccessToken() { 14 | return client.token(); 15 | }, 16 | }; 17 | }; 18 | } 19 | -------------------------------------------------------------------------------- /src/plugins/piral-search/src/Search.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { useGlobalState } from 'piral-core'; 3 | import { PiralSearchContainer, PiralSearchResult } from './components'; 4 | 5 | export const Search: React.FC = () => { 6 | const { loading, items } = useGlobalState((m) => m.search.results); 7 | 8 | return ( 9 | 10 | {items.map((item, i) => ( 11 | {item} 12 | ))} 13 | 14 | ); 15 | }; 16 | -------------------------------------------------------------------------------- /src/samples/sample-cross-fx/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Sample - Cross Framework with Piral 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /src/framework/piral-core/src/hooks/piletApi.ts: -------------------------------------------------------------------------------- 1 | import { useState } from 'react'; 2 | import { useGlobalStateContext } from './globalState'; 3 | 4 | /** 5 | * Uses the global state context to retrieve the pilet API stored 6 | * for the root pilet. This allows interaction with the pilet API 7 | * from the app shell. 8 | * @returns The pilet API object of the root pilet. 9 | */ 10 | export function usePiletApi() { 11 | const context = useGlobalStateContext(); 12 | const [api] = useState(() => Object.values(context.apis).shift()); 13 | return api; 14 | } 15 | -------------------------------------------------------------------------------- /src/tooling/piral-cli/src/inject.ts: -------------------------------------------------------------------------------- 1 | import * as api from './api'; 2 | import { log } from './common'; 3 | import { CliPlugin } from './types'; 4 | 5 | export function inject(pluginPath: string) { 6 | try { 7 | const plugin: CliPlugin = require(pluginPath); 8 | 9 | if (typeof plugin === 'function') { 10 | plugin(api); 11 | } else { 12 | log('generalDebug_0003', `Skipping plugin from "${pluginPath}". Did not export a function.`); 13 | } 14 | } catch (ex) { 15 | log('pluginCouldNotBeLoaded_0205', pluginPath, ex); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/plugins/piral-breadcrumbs/src/default.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { ExtensionSlot, defaultRender } from 'piral-core'; 3 | import { BreadcrumbsContainerProps, BreadcrumbItemProps } from './types'; 4 | 5 | export const DefaultBreadcrumbsContainer: React.FC = (props) => ( 6 | defaultRender(props.children, 'default_breadcrumbs')} /> 7 | ); 8 | 9 | export const DefaultBreadbrumbItem: React.FC = (props) => defaultRender(props.children); 10 | -------------------------------------------------------------------------------- /src/plugins/piral-urql/src/pilets.ts: -------------------------------------------------------------------------------- 1 | import type { PiletMetadata } from 'piral-core'; 2 | import { gqlQuery } from './queries'; 3 | import { UrqlClient } from './types'; 4 | 5 | export interface PiletQueryResult { 6 | pilets: Array; 7 | } 8 | 9 | const piletsQuery = `query initialData { 10 | pilets { 11 | hash 12 | link 13 | name 14 | version 15 | } 16 | }`; 17 | 18 | export function requestPiletsFromGraphQL(client: UrqlClient) { 19 | return gqlQuery(client, piletsQuery).then(({ pilets }) => pilets); 20 | } 21 | -------------------------------------------------------------------------------- /docs/messages/0203.md: -------------------------------------------------------------------------------- 1 | # Warning: 0203 2 | 3 | An invalid argument for "run" was supplied. 4 | 5 | ## Description 6 | 7 | This warning indicates that a Piral CLI plugin is not working as intended. Usually, 8 | you should not see this as a user, but rather as a developer testing a Piral CLI 9 | plugin before publishing it. 10 | 11 | If you see this warning as a user make sure to file an issue at the relevant plugin's 12 | repository or issue tracker. 13 | 14 | ## Example 15 | 16 | ... 17 | 18 | ## Further Reading 19 | 20 | - [Semantic Versioning](https://semver.org) 21 | -------------------------------------------------------------------------------- /src/tooling/piral-cli/src/common/patches.ts: -------------------------------------------------------------------------------- 1 | const patchMap: Record Promise> = {}; 2 | 3 | export function getPatch(packageName: string) { 4 | return patchMap[packageName]; 5 | } 6 | 7 | export function installPatch(packageName: string, patch: (rootDir: string) => Promise) { 8 | if (packageName in patchMap) { 9 | const newPatch = patch; 10 | const oldPatch = patchMap[packageName]; 11 | patch = (rootDir) => oldPatch(rootDir).then(() => newPatch(rootDir)); 12 | } 13 | 14 | patchMap[packageName] = patch; 15 | } 16 | -------------------------------------------------------------------------------- /docs/messages/0202.md: -------------------------------------------------------------------------------- 1 | # Warning: 0202 2 | 3 | An invalid argument for "name" was supplied. 4 | 5 | ## Description 6 | 7 | This warning indicates that a Piral CLI plugin is not working as intended. Usually, 8 | you should not see this as a user, but rather as a developer testing a Piral CLI 9 | plugin before publishing it. 10 | 11 | If you see this warning as a user make sure to file an issue at the relevant plugin's 12 | repository or issue tracker. 13 | 14 | ## Example 15 | 16 | ... 17 | 18 | ## Further Reading 19 | 20 | - [Semantic Versioning](https://semver.org) 21 | -------------------------------------------------------------------------------- /src/framework/piral-core/src/defaults/DefaultLoadingIndicator.test.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * @vitest-environment jsdom 3 | */ 4 | import * as React from 'react'; 5 | import { describe, it, expect } from 'vitest'; 6 | import { render } from '@testing-library/react'; 7 | import { DefaultLoadingIndicator } from './DefaultLoadingIndicator'; 8 | 9 | describe('Default Loading Indicator Component', () => { 10 | it('renders correctly', () => { 11 | const node = render(); 12 | expect(node.container.querySelectorAll('div').length).toBe(1); 13 | }); 14 | }); 15 | -------------------------------------------------------------------------------- /docs/messages/0201.md: -------------------------------------------------------------------------------- 1 | # Warning: 0201 2 | 3 | An invalid value for the given argument was supplied. 4 | 5 | ## Description 6 | 7 | This warning indicates that a Piral CLI plugin is not working as intended. Usually, 8 | you should not see this as a user, but rather as a developer testing a Piral CLI 9 | plugin before publishing it. 10 | 11 | If you see this warning as a user make sure to file an issue at the relevant plugin's 12 | repository or issue tracker. 13 | 14 | ## Example 15 | 16 | ... 17 | 18 | ## Further Reading 19 | 20 | - [Semantic Versioning](https://semver.org) 21 | -------------------------------------------------------------------------------- /docs/messages/0204.md: -------------------------------------------------------------------------------- 1 | # Warning: 0204 2 | 3 | An invalid value for the given argument was supplied. 4 | 5 | ## Description 6 | 7 | This warning indicates that a Piral CLI plugin is not working as intended. Usually, 8 | you should not see this as a user, but rather as a developer testing a Piral CLI 9 | plugin before publishing it. 10 | 11 | If you see this warning as a user make sure to file an issue at the relevant plugin's 12 | repository or issue tracker. 13 | 14 | ## Example 15 | 16 | ... 17 | 18 | ## Further Reading 19 | 20 | - [Semantic Versioning](https://semver.org) 21 | -------------------------------------------------------------------------------- /docs/reference/C32-pilet-validation.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Pilet Validation 3 | description: The validate command with customization possibilities. 4 | section: Customization 5 | --- 6 | 7 | # Pilet Validation 8 | 9 | The `piral-cli` contains a tool that can perform Piral-related validations. 10 | 11 | By default, this tool can provide: 12 | 13 | - check if externals are properly marked/included 14 | - check dependencies for occurrences of the Piral framework 15 | - check third-party dependencies 16 | - check the size of the bundled pilet 17 | - check for outdated Piral instances 18 | -------------------------------------------------------------------------------- /src/framework/piral-core/src/actions/state.ts: -------------------------------------------------------------------------------- 1 | import { isSame } from '../utils'; 2 | import { GlobalState, GlobalStateContext } from '../types'; 3 | 4 | export function dispatch(ctx: GlobalStateContext, update: (state: GlobalState) => GlobalState) { 5 | const oldState = ctx.state.getState(); 6 | const newState = update(oldState); 7 | 8 | if (!isSame(oldState, newState)) { 9 | ctx.state.setState(newState); 10 | } 11 | } 12 | 13 | export function readState(ctx: GlobalStateContext, read: (state: GlobalState) => S) { 14 | return read(ctx.state.getState()); 15 | } 16 | -------------------------------------------------------------------------------- /src/converters/piral-hyperapp/src/mount.ts: -------------------------------------------------------------------------------- 1 | import type { Component } from './types'; 2 | 3 | const { h, app } = require('hyperapp'); 4 | 5 | export function mountHyperapp( 6 | el: HTMLElement, 7 | root: Component, 8 | props: T, 9 | ctx: any, 10 | state: any, 11 | actions: any, 12 | ) { 13 | app( 14 | { 15 | ...ctx, 16 | ...state, 17 | }, 18 | actions, 19 | () => h(root, props), 20 | el, 21 | ); 22 | } 23 | 24 | export function createHyperappElement(name: string, props: any) { 25 | return h(name, props, []); 26 | } 27 | -------------------------------------------------------------------------------- /src/plugins/piral-search/src/default.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { defaultRender } from 'piral-core'; 3 | import { SearchContainerProps, SearchInputProps, SearchResultProps } from './types'; 4 | 5 | export const DefaultContainer: React.FC = (props) => defaultRender(props.children); 6 | export const DefaultResult: React.FC = (props) => defaultRender(props.children); 7 | export const DefaultInput: React.FC = (props) => ( 8 | props.setValue(e.target.value)} value={props.value} /> 9 | ); 10 | -------------------------------------------------------------------------------- /docs/messages/0206.md: -------------------------------------------------------------------------------- 1 | # Warning: 0206 2 | 3 | An invalid value for the given argument was supplied. 4 | 5 | ## Description 6 | 7 | This warning indicates that a Piral CLI bundler plugin is not working as intended. 8 | Usually, you should not see this as a user, but rather as a developer testing a 9 | Piral CLI plugin before publishing it. 10 | 11 | If you see this warning as a user make sure to file an issue at the relevant plugin's 12 | repository or issue tracker. 13 | 14 | ## Example 15 | 16 | ... 17 | 18 | ## Further Reading 19 | 20 | - [Semantic Versioning](https://semver.org) 21 | -------------------------------------------------------------------------------- /mlc_config.json: -------------------------------------------------------------------------------- 1 | { 2 | "ignorePatterns": [ 3 | { 4 | "pattern": "^https://twitter.com/" 5 | }, 6 | { 7 | "pattern": "^https://stackoverflow.com/" 8 | }, 9 | { 10 | "pattern": "^https://docs.github.com/" 11 | }, 12 | { 13 | "pattern": "^https://app.fossa.com/" 14 | }, 15 | { 16 | "pattern": "^https://unpkg.com/" 17 | }, 18 | { 19 | "pattern": "^https://aka.ms/" 20 | }, 21 | { 22 | "pattern": "^https://azure.microsoft.com/" 23 | } 24 | ], 25 | "aliveStatusCodes": [999, 401, 403, 429, 200] 26 | } 27 | -------------------------------------------------------------------------------- /docs/logos/render.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/framework/piral-base/src/loaders/bundle/dependency.ts: -------------------------------------------------------------------------------- 1 | import { includeScript } from '../../utils'; 2 | import type { PiletBundleEntry } from '../../types'; 3 | 4 | /** 5 | * Includes the given bundle script via its URL with a dependency resolution. 6 | * @param meta The meta data of the dependency to include. 7 | * @param crossOrigin The override for the cross-origin attribute. 8 | * @returns The evaluated module. 9 | */ 10 | export function includeBundle(meta: PiletBundleEntry, crossOrigin?: string) { 11 | return includeScript(meta.bundle, meta.link, meta.integrity, crossOrigin); 12 | } 13 | -------------------------------------------------------------------------------- /src/framework/piral-base/src/loaders/v1/dependency.ts: -------------------------------------------------------------------------------- 1 | import { includeScript } from '../../utils'; 2 | import type { PiletV1Entry } from '../../types'; 3 | 4 | /** 5 | * Includes the given single pilet script via its URL with a dependency resolution. 6 | * @param entry The data of the dependency to include. 7 | * @param crossOrigin The override for the cross-origin attribute. 8 | * @returns The evaluated module. 9 | */ 10 | export function includeDependency(entry: PiletV1Entry, crossOrigin?: string) { 11 | return includeScript(entry.requireRef, entry.link, entry.integrity, crossOrigin); 12 | } 13 | -------------------------------------------------------------------------------- /src/framework/piral-base/src/utils/helpers.ts: -------------------------------------------------------------------------------- 1 | export function isfunc(f: any): f is Function { 2 | return typeof f === 'function'; 3 | } 4 | 5 | export function callfunc) => void>(f: T, ...args: Parameters) { 6 | isfunc(f) && f(...args); 7 | } 8 | 9 | export function promisify(value?: T | PromiseLike) { 10 | return Promise.resolve(value); 11 | } 12 | 13 | export function getBasePath(link: string) { 14 | if (link) { 15 | const idx = link.lastIndexOf('/'); 16 | return link.substring(0, idx + 1); 17 | } 18 | 19 | return link; 20 | } 21 | -------------------------------------------------------------------------------- /src/samples/sample-piral/src/components/LanguageIcon.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | 3 | function getLanguageUrl(language: string) { 4 | switch (language) { 5 | case 'de': 6 | return require('../images/de.png'); 7 | default: 8 | return require('../images/en.png'); 9 | } 10 | } 11 | 12 | export interface LanguageIconProps { 13 | language: string; 14 | } 15 | 16 | export const LanguageIcon: React.FC = ({ language }) => { 17 | const url = getLanguageUrl(language); 18 | return ; 19 | }; 20 | -------------------------------------------------------------------------------- /src/tooling/piral-cli/src/common/validate.ts: -------------------------------------------------------------------------------- 1 | import { fail } from './log'; 2 | 3 | export function ensure(name: string, value: any, expectedType: string | Array) { 4 | const actualType = typeof value; 5 | const expectedTypes = Array.isArray(expectedType) ? expectedType : [expectedType]; 6 | 7 | if (!expectedTypes.includes(actualType)) { 8 | const type = expectedTypes.length === 1 ? `"${expectedTypes[0]}"` : `one of "${expectedTypes.join('", "')}"`; 9 | fail('generalError_0002', `The type for "${name}" is invalid - it should be ${type}, but was "${actualType}".`); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/framework/piral-core/src/hooks/actions.test.ts: -------------------------------------------------------------------------------- 1 | import { describe, it, expect, vitest } from 'vitest'; 2 | import { useActions } from './actions'; 3 | 4 | const fn = vitest.fn(); 5 | 6 | vitest.mock('react', () => { 7 | return { 8 | createContext: vitest.fn(), 9 | useContext: () => ({ foo: fn, bar: fn, state: {} }), 10 | }; 11 | }); 12 | 13 | describe('Actions Hook Module', () => { 14 | it('selects all available functions from context', () => { 15 | const result = useActions(); 16 | expect(result).toEqual({ 17 | foo: fn, 18 | bar: fn, 19 | }); 20 | }); 21 | }); 22 | -------------------------------------------------------------------------------- /docs/logos/github.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /docs/messages/0207.md: -------------------------------------------------------------------------------- 1 | # Warning: 0207 2 | 3 | An invalid value for the given argument was supplied. 4 | 5 | ## Description 6 | 7 | This warning indicates that a Piral CLI release provider plugin is not working as 8 | intended. 9 | 10 | Usually, you should not see this as a user, but rather as a developer testing a 11 | Piral CLI plugin before publishing it. 12 | 13 | If you see this warning as a user make sure to file an issue at the relevant plugin's 14 | repository or issue tracker. 15 | 16 | ## Example 17 | 18 | ... 19 | 20 | ## Further Reading 21 | 22 | - [Semantic Versioning](https://semver.org) 23 | -------------------------------------------------------------------------------- /src/tooling/piral-cli-webpack5/src/set-path.ts: -------------------------------------------------------------------------------- 1 | function computePath() { 2 | try { 3 | throw new Error(); 4 | } catch (t) { 5 | const e = ('' + t.stack).match(/(https?|file|ftp|chrome-extension|moz-extension):\/\/[^)\n]+/g); 6 | if (e) { 7 | return e[0].replace(/^((?:https?|file|ftp|chrome-extension|moz-extension):\/\/.+)\/[^\/]+$/, '$1') + '/'; 8 | } 9 | } 10 | 11 | return '/'; 12 | } 13 | 14 | declare let __webpack_public_path__: string; 15 | 16 | // tslint:disable-next-line:variable-name 17 | const __bundleUrl__ = computePath(); 18 | __webpack_public_path__ = __bundleUrl__; 19 | -------------------------------------------------------------------------------- /src/tooling/piral-cli/src/common/patches.test.ts: -------------------------------------------------------------------------------- 1 | import { describe, it, expect } from 'vitest'; 2 | import { getPatch, installPatch } from './patches'; 3 | 4 | const patchName = 'foo'; 5 | const patch = (rootDir) => { 6 | return Promise.resolve(); 7 | }; 8 | 9 | describe('Patch Module', () => { 10 | it('installs and gets a patch', async () => { 11 | installPatch(patchName, patch); 12 | let result = getPatch(patchName); 13 | expect(result).toBe(patch); 14 | result = getPatch('wrongPatch'); 15 | expect(result).toBeUndefined(); 16 | installPatch(patchName, patch); 17 | }); 18 | }); 19 | -------------------------------------------------------------------------------- /docs/deploy/README.md: -------------------------------------------------------------------------------- 1 | # Deployment 2 | 3 | Some guides for a few of the most popular deployment providers out there. 4 | 5 | The available guides: 6 | 7 | - [AWS Amplify](./aws-amplify.md) 8 | - [Buddy](./buddy.md) 9 | - [Cloudflare Pages](./cloudflare.md) 10 | - [Edgio](./edgio.md) 11 | - [GitHub Pages](./github.md) 12 | - [GitLab Pages](./gitlab.md) 13 | - [Google Cloud](./google-cloud.md) 14 | - [Google Firebase](./google-firebase.md) 15 | - [Heroku](./heroku.md) 16 | - [Microsoft Azure Static Web Apps](./ms-azure.md) 17 | - [Netlify](./netlify.md) 18 | - [Render](./render.md) 19 | - [Vercel](./vercel.md) 20 | 21 | -------------------------------------------------------------------------------- /docs/messages/0200.md: -------------------------------------------------------------------------------- 1 | # Warning: 0200 2 | 3 | An invalid argument for "commandName" was supplied. 4 | 5 | ## Description 6 | 7 | This warning indicates that a Piral CLI plugin is not working as intended. Usually, 8 | you should not see this as a user, but rather as a developer testing a Piral CLI 9 | plugin before publishing it. 10 | 11 | If you see this warning as a user make sure to file an issue at the relevant plugin's 12 | repository or issue tracker. 13 | 14 | ## Example 15 | 16 | ... 17 | 18 | ## Further Reading 19 | 20 | - [Invalid Parameter](https://www.pcmag.com/encyclopedia/term/invalid-parameter) 21 | -------------------------------------------------------------------------------- /src/framework/piral-core/src/defaults/DefaultRouteSwitch_v5.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { Switch, Route } from 'react-router'; 3 | import { RouteSwitchProps } from '../types'; 4 | 5 | export const DefaultRouteSwitch: React.FC = ({ paths, NotFound, ...props }) => { 6 | return ( 7 | 8 | {paths.map(({ path, Component }) => ( 9 | 10 | ))} 11 | 12 | 13 | ); 14 | }; 15 | DefaultRouteSwitch.displayName = 'DefaultRouteSwitch'; 16 | -------------------------------------------------------------------------------- /docs/messages/0205.md: -------------------------------------------------------------------------------- 1 | # Warning: 0205 2 | 3 | The plugin could not be loaded. 4 | 5 | ## Description 6 | 7 | This warning is shown when a found plugin could not be loaded during the startup of 8 | the Piral CLI. This could be an incompatible plugin or no plugin at all. 9 | 10 | Make sure that this is a valid plugin. 11 | 12 | Our recommendation is to get in touch with the author of the plugin if you think that 13 | this is a mistake and happened due to regression. 14 | 15 | ## Example 16 | 17 | ... 18 | 19 | ## Further Reading 20 | 21 | - [CLI Plugin Definition](https://www.npmjs.com/package/piral-cli#plugins) 22 | -------------------------------------------------------------------------------- /docs/reference/C22-piral-validation.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Piral Validation 3 | description: The validate command with customization possibilities. 4 | section: Customization 5 | --- 6 | 7 | # Piral Instance Validation 8 | 9 | The `piral-cli` contains a tool that can perform Piral-related validations. 10 | 11 | By default, this tool can provide: 12 | 13 | - check if development dependencies are fine 14 | - check dependencies for occurrences of the Piral framework 15 | - check if declared shared dependencies are fine 16 | - check if the given scaffolding metadata is good 17 | - check if the entry point is acceptable (HTML) 18 | -------------------------------------------------------------------------------- /docs/messages/0031.md: -------------------------------------------------------------------------------- 1 | # Error: 0031 2 | 3 | Cannot not find the given full path to successfully upgrade the pilet. 4 | 5 | ## Description 6 | 7 | The provided Piral instance resolves to a local file, however, this file cannot be found from the 8 | current directory. Either specify an absolute path or make sure that the relative path works for 9 | the current working directory. 10 | 11 | Since no Piral instance can be resolved the upgrade process needs to be stopped. 12 | 13 | ## Example 14 | 15 | ... 16 | 17 | ## Further Reading 18 | 19 | - [Current Working Directory](https://en.wikipedia.org/wiki/Working_directory) 20 | -------------------------------------------------------------------------------- /docs/messages/0080.md: -------------------------------------------------------------------------------- 1 | # Error: 0080 2 | 3 | The validation process failed. 4 | 5 | ## Description 6 | 7 | The validation found errors. For the error details you'll need to check the 8 | console output. Make sure to either follow the individual error codes or 9 | instructions in the console. 10 | 11 | If the performed validations are incorrectly placed or inappropriate for the 12 | current project then change the settings in your Piral instance configuration. 13 | 14 | ## Example 15 | 16 | ... 17 | 18 | ## Further Reading 19 | 20 | - [Validation](https://docs.piral.io/guidelines/tutorials/08-the-piral-cli#validations) 21 | -------------------------------------------------------------------------------- /src/plugins/piral-oidc/src/create.ts: -------------------------------------------------------------------------------- 1 | import { PiralPlugin } from 'piral-core'; 2 | 3 | import type { PiletOidcApi, OidcClient } from './types'; 4 | 5 | /** 6 | * Creates new Pilet API extensions for the integration of OpenID Connect. 7 | */ 8 | export function createOidcApi(client: OidcClient): PiralPlugin { 9 | return (context) => { 10 | context.on('before-fetch', client.extendHeaders); 11 | 12 | return { 13 | getAccessToken() { 14 | return client.token(); 15 | }, 16 | 17 | getProfile() { 18 | return client.account(); 19 | }, 20 | }; 21 | }; 22 | } 23 | -------------------------------------------------------------------------------- /docs/messages/0030.md: -------------------------------------------------------------------------------- 1 | # Error: 0030 2 | 3 | Cannot not find the given full path to successfully scaffold the pilet. 4 | 5 | ## Description 6 | 7 | The provided Piral instance resolves to a local file, however, this file cannot be found from the 8 | current directory. Either specify an absolute path or make sure that the relative path works for 9 | the current working directory. 10 | 11 | Since no Piral instance can be resolved the scaffolding process needs to be stopped. 12 | 13 | ## Example 14 | 15 | ... 16 | 17 | ## Further Reading 18 | 19 | - [Current Working Directory](https://en.wikipedia.org/wiki/Working_directory) 20 | -------------------------------------------------------------------------------- /src/samples/sample-piral/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Piral Sample 8 | 9 | 10 | 11 | 12 |
13 |
14 |
15 |
16 |
17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /.github/workflows/size.yml: -------------------------------------------------------------------------------- 1 | name: check-bundle-size 2 | 3 | on: 4 | pull_request_target: 5 | branches: [develop] 6 | 7 | jobs: 8 | file_size_impact: 9 | runs-on: ubuntu-latest 10 | 11 | steps: 12 | - name: Setup git 13 | uses: actions/checkout@v2 14 | - name: Setup node 15 | uses: actions/setup-node@v1 16 | with: 17 | node-version: "22.12.0" 18 | - run: yarn install 19 | - run: yarn install --ignore-scripts 20 | - name: Report changes 21 | run: node ./tools/size-reporter.mjs 22 | env: 23 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 24 | -------------------------------------------------------------------------------- /docs/messages/0102.md: -------------------------------------------------------------------------------- 1 | # Info: 0102 2 | 3 | The Piral CLI could not detect the tooling version used by the app shell. Therefore, it may be incompatible to the 4 | currently used version of the piral-cli. Keep an eye on weird errors. 5 | 6 | ## Description 7 | 8 | The emulator contains a special section to inform the Piral CLI about the used version of the tooling. This is 9 | important to detect potential alignment or incompatibilities. The used version of the emulator does not contain 10 | this information and therefore may be incompatible. 11 | 12 | ## Example 13 | 14 | undefined 15 | 16 | ## Further Reading 17 | 18 | undefined 19 | -------------------------------------------------------------------------------- /src/tooling/piral-cli/src/common/parallel.ts: -------------------------------------------------------------------------------- 1 | export async function concurrentWorkers( 2 | items: Array, 3 | concurrency: number, 4 | worker: (item: T, index: number) => Promise, 5 | ): Promise> { 6 | const maxItems = items.length; 7 | const results: Array = new Array(maxItems); 8 | let offset = 0; 9 | 10 | await Promise.all( 11 | items.slice(0, concurrency).map(async () => { 12 | while (offset < maxItems) { 13 | const i = offset++; 14 | const item = items[i]; 15 | results[i] = await worker(item, i); 16 | } 17 | }), 18 | ); 19 | 20 | return results; 21 | } 22 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "commonjs", 4 | "declaration": true, 5 | "noImplicitAny": false, 6 | "removeComments": false, 7 | "jsx": "react", 8 | "noLib": false, 9 | "moduleResolution": "node", 10 | "emitDecoratorMetadata": true, 11 | "experimentalDecorators": true, 12 | "skipLibCheck": true, 13 | "target": "ES2020", 14 | "sourceMap": true, 15 | "lib": ["ES2020", "DOM"] 16 | }, 17 | "exclude": [ 18 | "dist", 19 | "node_modules", 20 | "**/*.test.ts", 21 | "**/*.test.tsx", 22 | "src/**/node_modules", 23 | "src/**/lib" 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /src/pages/www/src/scripts/App.tsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | import { GitHubCat } from './components'; 3 | import { Footer } from '../../../common/components/Footer'; 4 | 5 | const Home = React.lazy(() => import('./pages/Home')); 6 | const OssFriends = React.lazy(() => import('./pages/OssFriends')); 7 | const Page = location.pathname === '/oss-friends' ? OssFriends : Home; 8 | 9 | export const App: React.FC = () => ( 10 | <> 11 | 12 | }> 13 | 14 | 15 |