fix: spell check (#3375)
* spell check * auto-gen md file * style(full-repo): spell-check 90% of the repository, without any logical change. en-US was used
This commit is contained in:
305
cspell.json
305
cspell.json
@@ -1,38 +1,291 @@
|
||||
{
|
||||
"words": [
|
||||
"qwik",
|
||||
"qwikloader",
|
||||
"partytown",
|
||||
"Aboutus",
|
||||
"accumsan",
|
||||
"activedescendant",
|
||||
"adipiscing",
|
||||
"alertdialog",
|
||||
"allowpopups",
|
||||
"Almeida",
|
||||
"amet",
|
||||
"antipattern",
|
||||
"Arcrole",
|
||||
"asynchronicity",
|
||||
"basepath",
|
||||
"bbar",
|
||||
"bbox",
|
||||
"bday",
|
||||
"beforeinput",
|
||||
"bgsound",
|
||||
"Bien",
|
||||
"bindgen",
|
||||
"bivariance",
|
||||
"Bivariant",
|
||||
"Bkxp",
|
||||
"blinkfeatures",
|
||||
"Booleanish",
|
||||
"brotli",
|
||||
"browsermain",
|
||||
"builderio",
|
||||
"buildtime",
|
||||
"bunde",
|
||||
"canonicalize",
|
||||
"cdylib",
|
||||
"cjsx",
|
||||
"Clhb",
|
||||
"clic",
|
||||
"cmps",
|
||||
"codegen",
|
||||
"colcount",
|
||||
"colindex",
|
||||
"colspan",
|
||||
"columnheader",
|
||||
"combobox",
|
||||
"complext",
|
||||
"composability",
|
||||
"vite",
|
||||
"consectetur",
|
||||
"contentinfo",
|
||||
"Counteradd",
|
||||
"crossorigin",
|
||||
"ctxt",
|
||||
"datetime",
|
||||
"Dblclick",
|
||||
"Debouncer",
|
||||
"deno",
|
||||
"describedby",
|
||||
"dfdfd",
|
||||
"disableblinkfeatures",
|
||||
"disableguestresize",
|
||||
"disablewebsecurity",
|
||||
"divfixture",
|
||||
"dolor",
|
||||
"dropeffect",
|
||||
"elems",
|
||||
"elit",
|
||||
"elli",
|
||||
"epressed",
|
||||
"errormessage",
|
||||
"espree",
|
||||
"estree",
|
||||
"execa",
|
||||
"extensionless",
|
||||
"extless",
|
||||
"extname",
|
||||
"extnames",
|
||||
"fargs",
|
||||
"Fboth",
|
||||
"flowto",
|
||||
"frontmatter",
|
||||
"gesturechange",
|
||||
"gestureend",
|
||||
"gesturestart",
|
||||
"Gettingstarted",
|
||||
"gmsw",
|
||||
"gridcell",
|
||||
"guestinstance",
|
||||
"hackmd",
|
||||
"Hasher",
|
||||
"haspopup",
|
||||
"Hevery",
|
||||
"hola",
|
||||
"horiz",
|
||||
"hostattrs",
|
||||
"hotspot",
|
||||
"httpreferrer",
|
||||
"idents",
|
||||
"imagesizes",
|
||||
"imagesrcset",
|
||||
"importee",
|
||||
"Indexapi",
|
||||
"inlines",
|
||||
"inlist",
|
||||
"insta",
|
||||
"ipsum",
|
||||
"itemprop",
|
||||
"itsok",
|
||||
"jsxs",
|
||||
"keyof",
|
||||
"keyshortcuts",
|
||||
"Keyup",
|
||||
"kleur",
|
||||
"labelledby",
|
||||
"Layoutapi",
|
||||
"layoutname",
|
||||
"listbox",
|
||||
"listitem",
|
||||
"listitems",
|
||||
"lkei",
|
||||
"Lorem",
|
||||
"manu",
|
||||
"manualmeida",
|
||||
"maxage",
|
||||
"mdast",
|
||||
"mdxjs",
|
||||
"menuitemcheckbox",
|
||||
"menuitemradio",
|
||||
"middlewares",
|
||||
"mimalloc",
|
||||
"misko",
|
||||
"miško",
|
||||
"mjsx",
|
||||
"Mobify",
|
||||
"mondodb",
|
||||
"mpath",
|
||||
"msvc",
|
||||
"msvideo",
|
||||
"mtsx",
|
||||
"multiselectable",
|
||||
"multistatus",
|
||||
"myapp",
|
||||
"napi",
|
||||
"netify",
|
||||
"nodeintegration",
|
||||
"noopen",
|
||||
"noscript",
|
||||
"noserialize",
|
||||
"nosniff",
|
||||
"nothere",
|
||||
"nulll",
|
||||
"objs",
|
||||
"odzdfdfd",
|
||||
"oneline",
|
||||
"onrender",
|
||||
"onscrolling",
|
||||
"onwarn",
|
||||
"outdir",
|
||||
"outfile",
|
||||
"outro",
|
||||
"panose",
|
||||
"partytown",
|
||||
"pathdiff",
|
||||
"pfkgyr",
|
||||
"Pinterest",
|
||||
"posinset",
|
||||
"posix",
|
||||
"prefetching",
|
||||
"prerender",
|
||||
"pretium",
|
||||
"progressbar",
|
||||
"PROPPATCH",
|
||||
"proto",
|
||||
"QACTION",
|
||||
"qcomponent",
|
||||
"Qdata",
|
||||
"qdev",
|
||||
"qerror",
|
||||
"qfunc",
|
||||
"Qhook",
|
||||
"qidle",
|
||||
"qinit",
|
||||
"qkssr",
|
||||
"qprefetch",
|
||||
"qqhook",
|
||||
"qresume",
|
||||
"qrls",
|
||||
"QSLOT",
|
||||
"qsymbol",
|
||||
"quicktime",
|
||||
"qvisible",
|
||||
"qwik",
|
||||
"qwikauth",
|
||||
"qwikcity",
|
||||
"qwikdeps",
|
||||
"qwikdom",
|
||||
"qwikevents",
|
||||
"qwikfy",
|
||||
"qwikify",
|
||||
"qwikjson",
|
||||
"qwikloader",
|
||||
"qwikreact",
|
||||
"radiogroup",
|
||||
"Rctx",
|
||||
"reboostrap",
|
||||
"referrerpolicy",
|
||||
"regs",
|
||||
"rehype",
|
||||
"renderz",
|
||||
"reparse",
|
||||
"replayable",
|
||||
"resumability",
|
||||
"Lorem",
|
||||
"ipsum",
|
||||
"dolor",
|
||||
"revalidates",
|
||||
"rlib",
|
||||
"Roboto",
|
||||
"roledescription",
|
||||
"rowcount",
|
||||
"rowgroup",
|
||||
"rowheader",
|
||||
"rowindex",
|
||||
"rowspan",
|
||||
"rsplitn",
|
||||
"rsps",
|
||||
"SAMEORIGIN",
|
||||
"SAMESITE",
|
||||
"sdfds",
|
||||
"searchbox",
|
||||
"serde",
|
||||
"Serializability",
|
||||
"setsize",
|
||||
"shouldkebab",
|
||||
"signin",
|
||||
"signout",
|
||||
"sit",
|
||||
"amet",
|
||||
"consectetur",
|
||||
"adipiscing",
|
||||
"elit",
|
||||
"Vivamus",
|
||||
"vulputate",
|
||||
"accumsan",
|
||||
"pretium",
|
||||
"slidein",
|
||||
"slotdefault",
|
||||
"typecheck",
|
||||
"prefetching",
|
||||
"onrender",
|
||||
"todos",
|
||||
"todoapp",
|
||||
"asynchronicity",
|
||||
"reboostrap",
|
||||
"prefetching",
|
||||
"somefn",
|
||||
"Mobify",
|
||||
"Pinterest",
|
||||
"Serializability"
|
||||
"somestring",
|
||||
"sourcemaps",
|
||||
"spinbutton",
|
||||
"sref",
|
||||
"sstyle",
|
||||
"stemh",
|
||||
"stemv",
|
||||
"styff",
|
||||
"stylesscopedblue",
|
||||
"stylesscopedgreen",
|
||||
"subdir",
|
||||
"submitcompleted",
|
||||
"svgz",
|
||||
"SWC's",
|
||||
"tablist",
|
||||
"tabpanel",
|
||||
"tagname",
|
||||
"tdblg",
|
||||
"textbox",
|
||||
"Textfromdefault",
|
||||
"threejs",
|
||||
"tlsv",
|
||||
"todoapp",
|
||||
"todos",
|
||||
"treegrid",
|
||||
"treeitem",
|
||||
"treeitems",
|
||||
"treeshake",
|
||||
"treeshaked",
|
||||
"tsdoc",
|
||||
"typecheck",
|
||||
"typeof",
|
||||
"typesafe",
|
||||
"undici",
|
||||
"unist",
|
||||
"unselectable",
|
||||
"unsub",
|
||||
"urlset",
|
||||
"valign",
|
||||
"valuenow",
|
||||
"valuetext",
|
||||
"Vdom",
|
||||
"vfile",
|
||||
"vite",
|
||||
"Vivamus",
|
||||
"Vnode",
|
||||
"Vnodes",
|
||||
"vulputate",
|
||||
"wbmp",
|
||||
"webfont",
|
||||
"webpreferences",
|
||||
"webworker",
|
||||
"wmode",
|
||||
"xlink"
|
||||
],
|
||||
"enableFiletypes": ["mdx"]
|
||||
}
|
||||
|
||||
@@ -7,11 +7,14 @@
|
||||
import { ServerAdapterOptions } from '../../shared/vite';
|
||||
import type { StaticGenerateRenderOptions } from '@builder.io/qwik-city/static';
|
||||
|
||||
// @alpha (undocumented)
|
||||
export function netifyEdgeAdapter(opts?: NetlifyEdgeAdapterOptions): any;
|
||||
// @alpha @deprecated (undocumented)
|
||||
export const netifyEdgeAdapter: typeof netlifyEdgeAdapter;
|
||||
|
||||
// @alpha @deprecated (undocumented)
|
||||
export const netifyEdgeAdaptor: typeof netifyEdgeAdapter;
|
||||
export const netifyEdgeAdaptor: typeof netlifyEdgeAdapter;
|
||||
|
||||
// @alpha (undocumented)
|
||||
export function netlifyEdgeAdapter(opts?: NetlifyEdgeAdapterOptions): any;
|
||||
|
||||
// @alpha (undocumented)
|
||||
export interface NetlifyEdgeAdapterOptions extends ServerAdapterOptions {
|
||||
|
||||
@@ -7,7 +7,7 @@ import { basePathname } from '@qwik-city-plan';
|
||||
/**
|
||||
* @alpha
|
||||
*/
|
||||
export function netifyEdgeAdapter(opts: NetlifyEdgeAdapterOptions = {}): any {
|
||||
export function netlifyEdgeAdapter(opts: NetlifyEdgeAdapterOptions = {}): any {
|
||||
return viteAdapter({
|
||||
name: 'netlify-edge',
|
||||
origin: process?.env?.URL || 'https://yoursitename.netlify.app',
|
||||
@@ -79,9 +79,15 @@ export function netifyEdgeAdapter(opts: NetlifyEdgeAdapterOptions = {}): any {
|
||||
|
||||
/**
|
||||
* @alpha
|
||||
* @deprecated Use `netifyEdgeAdapter` exported from `@builder.io/qwik-city/adapters/netlify-edge/vite` instead.
|
||||
* @deprecated Use `netlifyEdgeAdapter` exported from `@builder.io/qwik-city/adapters/netlify-edge/vite` instead.
|
||||
*/
|
||||
export const netifyEdgeAdaptor = netifyEdgeAdapter;
|
||||
export const netifyEdgeAdapter = netlifyEdgeAdapter;
|
||||
|
||||
/**
|
||||
* @alpha
|
||||
* @deprecated Use `netlifyEdgeAdapter` exported from `@builder.io/qwik-city/adapters/netlify-edge/vite` instead.
|
||||
*/
|
||||
export const netifyEdgeAdaptor = netlifyEdgeAdapter;
|
||||
|
||||
/**
|
||||
* @alpha
|
||||
|
||||
@@ -171,7 +171,7 @@ export function viteAdapter(opts: ViteAdapterPluginOptions) {
|
||||
const staticGenerateResult = await staticGenerate.generate(generateOpts);
|
||||
if (staticGenerateResult.errors > 0) {
|
||||
const err = new Error(
|
||||
`Error while runnning SSG from "${opts.name}" adapter. At least one path failed to render.`
|
||||
`Error while running SSG from "${opts.name}" adapter. At least one path failed to render.`
|
||||
);
|
||||
err.stack = undefined;
|
||||
this.error(err);
|
||||
|
||||
@@ -9,13 +9,13 @@ export async function postBuild(
|
||||
format: string,
|
||||
cleanStatic: boolean
|
||||
) {
|
||||
const ingorePathnames = new Set([basePathname + 'build/', basePathname + 'assets/']);
|
||||
const ignorePathnames = new Set([basePathname + 'build/', basePathname + 'assets/']);
|
||||
|
||||
const staticPaths = new Set(userStaticPaths);
|
||||
const notFounds: string[][] = [];
|
||||
|
||||
const loadItem = async (fsDir: string, fsName: string, pathname: string) => {
|
||||
if (ingorePathnames.has(pathname)) {
|
||||
if (ignorePathnames.has(pathname)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -128,7 +128,7 @@ import { getSourceFile } from './source-file';
|
||||
},
|
||||
},
|
||||
{
|
||||
fileName: 'layou.css',
|
||||
fileName: 'layout.css',
|
||||
expect: null,
|
||||
},
|
||||
{
|
||||
|
||||
@@ -103,9 +103,9 @@ function generateLinkBundles(ctx: BuildContext, appBundles: AppBundle[], manifes
|
||||
if (bundle.origins) {
|
||||
for (const bundleOrigin of bundle.origins) {
|
||||
const srcPath = removeExtension(filePath);
|
||||
const bundleOrginPath = removeExtension(bundleOrigin);
|
||||
const bundleOriginPath = removeExtension(bundleOrigin);
|
||||
|
||||
if (srcPath.endsWith(bundleOrginPath)) {
|
||||
if (srcPath.endsWith(bundleOriginPath)) {
|
||||
if (!linkBundleNames.includes(bundleName)) {
|
||||
linkBundleNames.push(bundleName);
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ export enum HttpStatus {
|
||||
* The HTTP/1.0 specification (RFC 1945) required the client to perform a temporary redirect
|
||||
* (the original describing phrase was "Moved Temporarily"), but popular browsers implemented 302
|
||||
* with the functionality of a 303 See Other. Therefore, HTTP/1.1 added status codes 303 and 307
|
||||
* to distinguish between the two behaviours. However, some Web applications and frameworks
|
||||
* to distinguish between the two behaviors. However, some Web applications and frameworks
|
||||
* use the 302 status code as if it were the 303.
|
||||
*/
|
||||
Found = 302,
|
||||
|
||||
@@ -37,7 +37,7 @@ export interface FormProps<O, I>
|
||||
onSubmit$?: (event: Event, form: HTMLFormElement) => ValueOrPromise<void>;
|
||||
|
||||
/**
|
||||
* Event handler executed right after the action is executed sucesfully and returns some data.
|
||||
* Event handler executed right after the action is executed successfully and returns some data.
|
||||
*/
|
||||
onSubmitCompleted$?: (
|
||||
event: CustomEvent<FormSubmitCompletedDetail<O>>,
|
||||
|
||||
@@ -31,7 +31,7 @@ export const resolveHead = (
|
||||
}
|
||||
const data = endpoint.loaders[id];
|
||||
if (data instanceof Promise) {
|
||||
throw new Error('Loaders returning a function can not be refered to in the head function.');
|
||||
throw new Error('Loaders returning a function can not be referred to in the head function.');
|
||||
}
|
||||
return data;
|
||||
}) as any as ResolveSyncValue;
|
||||
|
||||
@@ -555,7 +555,7 @@ export interface ActionStore<RETURN, INPUT, OPTIONAL extends boolean = true> {
|
||||
readonly actionPath: string;
|
||||
|
||||
/**
|
||||
* Reactive property that becomes `true` only in the browser, when a form is submited and switched back to false when the action finish, ie, it describes if the action is actively running.
|
||||
* Reactive property that becomes `true` only in the browser, when a form is submitted and switched back to false when the action finish, ie, it describes if the action is actively running.
|
||||
*
|
||||
* This property is specially useful to disable the submit button while the action is processing, to prevent multiple submissions, and to inform visually to the user that the action is actively running.
|
||||
*
|
||||
@@ -580,14 +580,14 @@ export interface ActionStore<RETURN, INPUT, OPTIONAL extends boolean = true> {
|
||||
readonly formData: FormData | undefined;
|
||||
|
||||
/**
|
||||
* Returned succesful data of the action. This reactive property will contain the data returned inside the `action$` function.
|
||||
* Returned successful data of the action. This reactive property will contain the data returned inside the `action$` function.
|
||||
*
|
||||
* It's `undefined` before the action is first called.
|
||||
*/
|
||||
readonly value: RETURN | undefined;
|
||||
|
||||
/**
|
||||
* Method to execute the action programatically from the browser. Ie, instead of using a `<form>`, a 'click' handle can call the `run()` method of the action
|
||||
* Method to execute the action programmatically from the browser. Ie, instead of using a `<form>`, a 'click' handle can call the `run()` method of the action
|
||||
* in order to execute the action in the server.
|
||||
*/
|
||||
readonly run: QRL<
|
||||
|
||||
@@ -184,7 +184,7 @@ export function isGroupedLayoutName(dirName: string, warn = true) {
|
||||
console.warn(
|
||||
`Grouped (pathless) layout "${dirName}" should use the "(${dirName.slice(
|
||||
2
|
||||
)})" directory name instead. Prefixing a directory with "__" has been deprecated and will be removed in future verions.`
|
||||
)})" directory name instead. Prefixing a directory with "__" has been deprecated and will be removed in future versions.`
|
||||
);
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -8,7 +8,7 @@ import { useStore } from '../use/use-store.public';
|
||||
import { useLexicalScope } from '../use/use-lexical-scope.public';
|
||||
|
||||
/**
|
||||
* Appling new unit test library/layer
|
||||
* Applying new unit test library/layer
|
||||
* `@builder.io/qwik/testing` ==> ../../testing/library
|
||||
*/
|
||||
const qComponent = suite('q-component');
|
||||
@@ -205,8 +205,8 @@ export const Items = component$((props: { items: ItemsObj }) => {
|
||||
);
|
||||
});
|
||||
|
||||
function delay(miliseconds: number): Promise<void> {
|
||||
return new Promise((res) => setTimeout(res, miliseconds));
|
||||
function delay(milliseconds: number): Promise<void> {
|
||||
return new Promise((res) => setTimeout(res, milliseconds));
|
||||
}
|
||||
|
||||
qComponent.run();
|
||||
|
||||
@@ -247,7 +247,7 @@ export const _pauseFromContexts = async (
|
||||
logWarn('Serializing dirty watch. Looks like an internal error.');
|
||||
}
|
||||
if (!isConnected(watch)) {
|
||||
logWarn('Serializing disconneted watch. Looks like an internal error.');
|
||||
logWarn('Serializing disconnected watch. Looks like an internal error.');
|
||||
}
|
||||
}
|
||||
if (isResourceTask(watch)) {
|
||||
@@ -388,9 +388,9 @@ export const _pauseFromContexts = async (
|
||||
return null;
|
||||
}
|
||||
const flags = getProxyFlags(obj) ?? 0;
|
||||
const convered: (Subscriptions | number)[] = [];
|
||||
const converted: (Subscriptions | number)[] = [];
|
||||
if (flags > 0) {
|
||||
convered.push(flags);
|
||||
converted.push(flags);
|
||||
}
|
||||
for (const sub of subs) {
|
||||
const host = sub[1];
|
||||
@@ -399,10 +399,10 @@ export const _pauseFromContexts = async (
|
||||
continue;
|
||||
}
|
||||
}
|
||||
convered.push(sub);
|
||||
converted.push(sub);
|
||||
}
|
||||
if (convered.length > 0) {
|
||||
subsMap.set(obj, convered);
|
||||
if (converted.length > 0) {
|
||||
subsMap.set(obj, converted);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -279,7 +279,7 @@ const SignalWrapperSerializer: Serializer<SignalWrapper<any, any>> = {
|
||||
collectValue(obj.ref, collector, leaks);
|
||||
if (fastWeakSerialize(obj.ref)) {
|
||||
const localManager = getProxyManager(obj.ref)!;
|
||||
if (isTreeshakeable(collector.$containerState$.$subsManager$, localManager, leaks)) {
|
||||
if (isTreeShakeable(collector.$containerState$.$subsManager$, localManager, leaks)) {
|
||||
collectValue(obj.ref[obj.prop], collector, leaks);
|
||||
}
|
||||
}
|
||||
@@ -457,7 +457,7 @@ export const OBJECT_TRANSFORMS: Record<string, (obj: any, containerState: Contai
|
||||
},
|
||||
};
|
||||
|
||||
const isTreeshakeable = (
|
||||
const isTreeShakeable = (
|
||||
manager: SubscriptionManager,
|
||||
target: LocalSubscriptionManager,
|
||||
leaks: QwikElement | boolean
|
||||
|
||||
@@ -62,7 +62,7 @@ export const codeToText = (code: number): string => {
|
||||
'props are immutable', // 17
|
||||
'<div> component can only be used at the root of a Qwik component$()', // 18
|
||||
'Props are immutable by default.', // 19
|
||||
`Calling a 'use*()' method outside 'component$(() => { HERE })' is not allowed. 'use*()' methods provide hooks to the 'component$' state and lifecycle, ie 'use' hooks can only be called syncronously within the 'component$' function or another 'use' method.
|
||||
`Calling a 'use*()' method outside 'component$(() => { HERE })' is not allowed. 'use*()' methods provide hooks to the 'component$' state and lifecycle, ie 'use' hooks can only be called synchronously within the 'component$' function or another 'use' method.
|
||||
For more information see: https://qwik.builder.io/docs/components/lifecycle/#use-method-rules`, // 20
|
||||
'Container is already paused. Skipping', // 21
|
||||
'Components using useServerMount() can only be mounted in the server, if you need your component to be mounted in the client, use "useMount$()" instead', // 22
|
||||
|
||||
@@ -106,7 +106,7 @@ export const createQRL = <TYPE>(
|
||||
if (beforeFn && beforeFn() === false) {
|
||||
return;
|
||||
}
|
||||
const baseContext = createInvokationContext(currentCtx);
|
||||
const baseContext = createInvocationContext(currentCtx);
|
||||
const context: InvokeContext = {
|
||||
...baseContext,
|
||||
$qrl$: QRL as QRLInternal<any>,
|
||||
@@ -119,7 +119,7 @@ export const createQRL = <TYPE>(
|
||||
}) as any;
|
||||
}
|
||||
|
||||
const createInvokationContext = (invoke: InvokeContext | InvokeTuple | undefined) => {
|
||||
const createInvocationContext = (invoke: InvokeContext | InvokeTuple | undefined) => {
|
||||
if (invoke == null) {
|
||||
return newInvokeContext();
|
||||
} else if (isArray(invoke)) {
|
||||
|
||||
@@ -132,7 +132,7 @@ export interface QRL<TYPE = any> {
|
||||
|
||||
/**
|
||||
* Resolve the QRL of closure and invoke it.
|
||||
* @param args - Clousure arguments.
|
||||
* @param args - Closure arguments.
|
||||
* @returns A promise of the return value of the closure.
|
||||
*/
|
||||
(...args: TYPE extends (...args: infer ARGS) => any ? ARGS : never): Promise<
|
||||
|
||||
@@ -253,7 +253,7 @@ export const resolveSlotProjection = (staticCtx: RenderStaticContext) => {
|
||||
cleanupTree(slotEl, staticCtx, subsManager, false);
|
||||
}
|
||||
} else {
|
||||
// If slot content cannot be relocated, it means it's content is definively removed
|
||||
// If slot content cannot be relocated, it means it's content is definitely removed
|
||||
// Cleanup needs to be executed
|
||||
cleanupTree(slotEl, staticCtx, subsManager, false);
|
||||
}
|
||||
|
||||
@@ -461,7 +461,7 @@ export const patchVnode = (
|
||||
|
||||
// Rendering of children of component is more complicated,
|
||||
// since the children must be projected into the rendered slots
|
||||
// In addition, nested childen might need rerendering, if that's the case
|
||||
// In addition, nested children might need rerendering, if that's the case
|
||||
// we need to render the nested component, and wait before projecting the content
|
||||
// since otherwise we don't know where the slots
|
||||
if (needsRender) {
|
||||
@@ -492,12 +492,12 @@ const renderContentProjection = (
|
||||
}
|
||||
const newChildren = vnode.$children$;
|
||||
const staticCtx = rCtx.$static$;
|
||||
const splittedNewChidren = splitChildren(newChildren);
|
||||
const splittedNewChildren = splitChildren(newChildren);
|
||||
const slotMaps = getSlotMap(hostCtx);
|
||||
|
||||
// Remove content from empty slots
|
||||
for (const key of Object.keys(slotMaps.slots)) {
|
||||
if (!splittedNewChidren[key]) {
|
||||
if (!splittedNewChildren[key]) {
|
||||
const slotEl = slotMaps.slots[key];
|
||||
const oldCh = getChildrenVnodes(slotEl, 'root');
|
||||
if (oldCh.length > 0) {
|
||||
@@ -514,7 +514,7 @@ const renderContentProjection = (
|
||||
// Remove empty templates
|
||||
for (const key of Object.keys(slotMaps.templates)) {
|
||||
const templateEl = slotMaps.templates[key];
|
||||
if (templateEl && !splittedNewChidren[key]) {
|
||||
if (templateEl && !splittedNewChildren[key]) {
|
||||
slotMaps.templates[key] = undefined;
|
||||
removeNode(staticCtx, templateEl);
|
||||
}
|
||||
@@ -522,8 +522,8 @@ const renderContentProjection = (
|
||||
|
||||
// Render into slots
|
||||
return promiseAll(
|
||||
Object.keys(splittedNewChidren).map((slotName) => {
|
||||
const newVdom = splittedNewChidren[slotName];
|
||||
Object.keys(splittedNewChildren).map((slotName) => {
|
||||
const newVdom = splittedNewChildren[slotName];
|
||||
const slotCtx = getSlotCtx(
|
||||
staticCtx,
|
||||
slotMaps,
|
||||
|
||||
@@ -525,7 +525,7 @@ renderSSRSuite('single multiple children', async () => {
|
||||
);
|
||||
});
|
||||
|
||||
renderSSRSuite('sanitazion', async () => {
|
||||
renderSSRSuite('sanity', async () => {
|
||||
await testSSR(
|
||||
<body>
|
||||
<div>{`.rule > thing{}`}</div>
|
||||
|
||||
@@ -34,9 +34,9 @@ export const _createSignal = <T>(
|
||||
value: T,
|
||||
containerState: ContainerState,
|
||||
flags: number,
|
||||
subcriptions?: Subscriptions[]
|
||||
subscriptions?: Subscriptions[]
|
||||
): SignalInternal<T> => {
|
||||
const manager = containerState.$subsManager$.$createManager$(subcriptions);
|
||||
const manager = containerState.$subsManager$.$createManager$(subscriptions);
|
||||
const signal = new SignalImpl<T>(value, manager, flags);
|
||||
return signal;
|
||||
};
|
||||
@@ -46,7 +46,7 @@ export const QObjectSignalFlags = Symbol('proxy manager');
|
||||
export const SIGNAL_IMMUTABLE = 1 << 0;
|
||||
export const SIGNAL_UNASSIGNED = 1 << 1;
|
||||
|
||||
export const SignalUnassignedException = Symbol('unasigned signal');
|
||||
export const SignalUnassignedException = Symbol('unassigned signal');
|
||||
|
||||
export interface SignalInternal<T> extends Signal<T> {
|
||||
untrackedValue: T;
|
||||
|
||||
@@ -257,7 +257,7 @@ export interface UseContext {
|
||||
// !!DO NOT EDIT THIS COMMENT DIRECTLY!!!
|
||||
// (edit ../readme.md#useContext instead)
|
||||
/**
|
||||
* Retrive Context value.
|
||||
* Retrieve Context value.
|
||||
*
|
||||
* Use `useContext()` to retrieve the value of context in a component. To retrieve a value a
|
||||
* parent component needs to invoke `useContextProvider()` to assign a value.
|
||||
|
||||
@@ -173,14 +173,14 @@ export const untrack = <T>(fn: () => T): T => {
|
||||
return invoke(undefined, fn);
|
||||
};
|
||||
|
||||
const trackInvokation = newInvokeContext(undefined, undefined, undefined, RenderEvent);
|
||||
const trackInvocation = newInvokeContext(undefined, undefined, undefined, RenderEvent);
|
||||
|
||||
/**
|
||||
* @alpha
|
||||
*/
|
||||
export const trackSignal = <T>(signal: Signal, sub: Subscriber): T => {
|
||||
trackInvokation.$subscriber$ = sub;
|
||||
return invoke(trackInvokation, () => signal.value);
|
||||
trackInvocation.$subscriber$ = sub;
|
||||
return invoke(trackInvocation, () => signal.value);
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -43,7 +43,7 @@ export interface ResourceOptions {
|
||||
* This method works like an async memoized function that runs whenever some tracked value
|
||||
* changes and returns some data.
|
||||
*
|
||||
* `useResouce` however returns immediate a `ResourceReturn` object that contains the data and a
|
||||
* `useResource` however returns immediate a `ResourceReturn` object that contains the data and a
|
||||
* state that indicates if the data is available or not.
|
||||
*
|
||||
* The status can be one of the following:
|
||||
@@ -132,7 +132,7 @@ export const useResourceQrl = <T>(
|
||||
* This method works like an async memoized function that runs whenever some tracked value
|
||||
* changes and returns some data.
|
||||
*
|
||||
* `useResouce` however returns immediate a `ResourceReturn` object that contains the data and a
|
||||
* `useResource` however returns immediate a `ResourceReturn` object that contains the data and a
|
||||
* state that indicates if the data is available or not.
|
||||
*
|
||||
* The status can be one of the following:
|
||||
@@ -207,7 +207,7 @@ export interface ResourceProps<T> {
|
||||
* This method works like an async memoized function that runs whenever some tracked value
|
||||
* changes and returns some data.
|
||||
*
|
||||
* `useResouce` however returns immediate a `ResourceReturn` object that contains the data and a
|
||||
* `useResource` however returns immediate a `ResourceReturn` object that contains the data and a
|
||||
* state that indicates if the data is available or not.
|
||||
*
|
||||
* The status can be one of the following:
|
||||
|
||||
@@ -656,7 +656,7 @@ export const runResource = <T>(
|
||||
return false;
|
||||
};
|
||||
|
||||
// Execute mutation inside empty invokation
|
||||
// Execute mutation inside empty invocation
|
||||
invoke(invocationContext, () => {
|
||||
resource._state = 'pending';
|
||||
resource.loading = !isServerPlatform();
|
||||
|
||||
@@ -62,7 +62,7 @@ pub fn convert_inlined_fn(
|
||||
let rendered_str =
|
||||
ast::ExprOrSpread::from(ast::Expr::Lit(ast::Lit::Str(ast::Str::from(rendered_expr))));
|
||||
|
||||
// Wrap around arrow fuctions
|
||||
// Wrap around arrow functions
|
||||
let expr = ast::Expr::Arrow(ast::ArrowExpr {
|
||||
body: ast::BlockStmtOrExpr::Expr(Box::new(expr)),
|
||||
is_async: false,
|
||||
|
||||
@@ -10,7 +10,7 @@ use swc_ecmascript::ast;
|
||||
use swc_ecmascript::utils::private_ident;
|
||||
use swc_ecmascript::visit::{VisitMut, VisitMutWith};
|
||||
|
||||
struct PropsDestructuing<'a> {
|
||||
struct PropsDestructuring<'a> {
|
||||
component_ident: Option<Id>,
|
||||
pub identifiers: HashMap<Id, ast::Expr>,
|
||||
pub global_collect: &'a mut GlobalCollect,
|
||||
@@ -22,7 +22,7 @@ pub fn transform_props_destructuring(
|
||||
global_collect: &mut GlobalCollect,
|
||||
core_module: &JsWord,
|
||||
) {
|
||||
main_module.visit_mut_with(&mut PropsDestructuing {
|
||||
main_module.visit_mut_with(&mut PropsDestructuring {
|
||||
component_ident: global_collect.get_imported_local(&COMPONENT, core_module),
|
||||
identifiers: HashMap::new(),
|
||||
global_collect,
|
||||
@@ -46,7 +46,7 @@ macro_rules! id_eq {
|
||||
};
|
||||
}
|
||||
|
||||
impl<'a> VisitMut for PropsDestructuing<'a> {
|
||||
impl<'a> VisitMut for PropsDestructuring<'a> {
|
||||
fn visit_mut_call_expr(&mut self, node: &mut ast::CallExpr) {
|
||||
if let ast::Callee::Expr(box ast::Expr::Ident(ref ident)) = &node.callee {
|
||||
if id_eq!(ident, &self.component_ident) {
|
||||
@@ -86,7 +86,7 @@ impl<'a> VisitMut for PropsDestructuing<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
fn transform_component_props(arrow: &mut ast::ArrowExpr, props_transform: &mut PropsDestructuing) {
|
||||
fn transform_component_props(arrow: &mut ast::ArrowExpr, props_transform: &mut PropsDestructuring) {
|
||||
if let Some(ast::Pat::Object(obj)) = arrow.params.first() {
|
||||
let new_ident = private_ident!("props");
|
||||
if let Some((rest_id, local)) = transform_pat(&new_ident, obj, props_transform) {
|
||||
@@ -109,7 +109,7 @@ fn transform_component_props(arrow: &mut ast::ArrowExpr, props_transform: &mut P
|
||||
}
|
||||
}
|
||||
|
||||
fn transform_component_body(body: &mut ast::BlockStmt, props_transform: &mut PropsDestructuing) {
|
||||
fn transform_component_body(body: &mut ast::BlockStmt, props_transform: &mut PropsDestructuring) {
|
||||
let mut inserts = vec![];
|
||||
for (index, stmt) in body.stmts.iter_mut().enumerate() {
|
||||
if let ast::Stmt::Decl(ast::Decl::Var(var_decl)) = stmt {
|
||||
@@ -171,7 +171,7 @@ type TransformPatReturn = (Option<Id>, Vec<(Id, JsWord, ast::Expr)>);
|
||||
fn transform_pat(
|
||||
new_ident: &ast::Ident,
|
||||
obj: &ast::ObjectPat,
|
||||
props_transform: &mut PropsDestructuing,
|
||||
props_transform: &mut PropsDestructuring,
|
||||
) -> Option<TransformPatReturn> {
|
||||
let mut local = vec![];
|
||||
let mut skip = false;
|
||||
|
||||
@@ -1140,7 +1140,7 @@ impl<'a> QwikTransform<'a> {
|
||||
} else if convert_signal_word(&key_word).is_some() {
|
||||
if matches!(*node.value, ast::Expr::Arrow(_) | ast::Expr::Fn(_))
|
||||
{
|
||||
let (convered_expr, immutable) = self
|
||||
let (converted_expr, immutable) = self
|
||||
._create_synthetic_qhook(
|
||||
*node.value.clone(),
|
||||
if is_fn {
|
||||
@@ -1154,7 +1154,7 @@ impl<'a> QwikTransform<'a> {
|
||||
|
||||
let converted_prop = ast::PropOrSpread::Prop(Box::new(
|
||||
ast::Prop::KeyValue(ast::KeyValueProp {
|
||||
value: Box::new(ast::Expr::Call(convered_expr)),
|
||||
value: Box::new(ast::Expr::Call(converted_expr)),
|
||||
key: node.key.clone(),
|
||||
}),
|
||||
));
|
||||
|
||||
@@ -14,7 +14,7 @@ import type {
|
||||
// still further optimize the priorities depending on the user/document.
|
||||
// This also helps ensure a stable q-manifest.json file.
|
||||
|
||||
function prioritorizeSymbolNames(manifest: QwikManifest) {
|
||||
function prioritizeSymbolNames(manifest: QwikManifest) {
|
||||
const symbols = manifest.symbols;
|
||||
|
||||
return Object.keys(symbols).sort((symbolNameA, symbolNameB) => {
|
||||
@@ -35,7 +35,7 @@ function prioritorizeSymbolNames(manifest: QwikManifest) {
|
||||
const bIndex = EVENT_PRIORITY.indexOf(b.ctxName.toLowerCase());
|
||||
|
||||
if (aIndex > -1 && bIndex > -1) {
|
||||
// both symbols have an event with a prioritory
|
||||
// both symbols have an event with a priority
|
||||
if (aIndex < bIndex) {
|
||||
return -1;
|
||||
}
|
||||
@@ -58,7 +58,7 @@ function prioritorizeSymbolNames(manifest: QwikManifest) {
|
||||
const bIndex = FUNCTION_PRIORITY.indexOf(b.ctxName.toLowerCase());
|
||||
|
||||
if (aIndex > -1 && bIndex > -1) {
|
||||
// both symbols have a function with a prioritory
|
||||
// both symbols have a function with a priority
|
||||
if (aIndex < bIndex) {
|
||||
return -1;
|
||||
}
|
||||
@@ -179,13 +179,13 @@ function sortBundleNames(manifest: QwikManifest) {
|
||||
}
|
||||
|
||||
function updateSortAndPriorities(manifest: QwikManifest) {
|
||||
const prioritorizedSymbolNames = prioritorizeSymbolNames(manifest);
|
||||
const prioritorizedSymbols: { [symbolName: string]: QwikSymbol } = {};
|
||||
const prioritorizedMapping: { [symbolName: string]: string } = {};
|
||||
const prioritizedSymbolNames = prioritizeSymbolNames(manifest);
|
||||
const prioritizedSymbols: { [symbolName: string]: QwikSymbol } = {};
|
||||
const prioritizedMapping: { [symbolName: string]: string } = {};
|
||||
|
||||
for (const symbolName of prioritorizedSymbolNames) {
|
||||
prioritorizedSymbols[symbolName] = manifest.symbols[symbolName];
|
||||
prioritorizedMapping[symbolName] = manifest.mapping[symbolName];
|
||||
for (const symbolName of prioritizedSymbolNames) {
|
||||
prioritizedSymbols[symbolName] = manifest.symbols[symbolName];
|
||||
prioritizedMapping[symbolName] = manifest.mapping[symbolName];
|
||||
}
|
||||
|
||||
const sortedBundleNames = sortBundleNames(manifest);
|
||||
@@ -200,8 +200,8 @@ function updateSortAndPriorities(manifest: QwikManifest) {
|
||||
bundle.dynamicImports.sort(sortAlphabetical);
|
||||
}
|
||||
const symbols: string[] = [];
|
||||
for (const symbolName of prioritorizedSymbolNames) {
|
||||
if (bundleName === prioritorizedMapping[symbolName]) {
|
||||
for (const symbolName of prioritizedSymbolNames) {
|
||||
if (bundleName === prioritizedMapping[symbolName]) {
|
||||
symbols.push(symbolName);
|
||||
}
|
||||
}
|
||||
@@ -211,8 +211,8 @@ function updateSortAndPriorities(manifest: QwikManifest) {
|
||||
}
|
||||
}
|
||||
|
||||
manifest.symbols = prioritorizedSymbols;
|
||||
manifest.mapping = prioritorizedMapping;
|
||||
manifest.symbols = prioritizedSymbols;
|
||||
manifest.mapping = prioritizedMapping;
|
||||
manifest.bundles = sortedBundles;
|
||||
|
||||
return manifest;
|
||||
|
||||
@@ -52,7 +52,7 @@ export interface ElementFixtureOptions {
|
||||
|
||||
/**
|
||||
* Trigger an event in unit tests on an element.
|
||||
* Posibly deprecated in the future
|
||||
* Future deprecation candidate.
|
||||
* @param element
|
||||
* @param selector
|
||||
* @param event
|
||||
|
||||
@@ -24,7 +24,7 @@ async function triggerUserEvent(
|
||||
}
|
||||
|
||||
/**
|
||||
* CreatePlatfrom and CreateDocument
|
||||
* CreatePlatform and CreateDocument
|
||||
* @alpha
|
||||
*/
|
||||
export const createDOM = async function () {
|
||||
|
||||
@@ -116,7 +116,7 @@ async function submoduleCoreProd(config: BuildConfig) {
|
||||
global_defs: {
|
||||
// special global that when set to false will remove all dev code entirely
|
||||
// developer production builds could use core.min.js directly, or setup
|
||||
// their own build tools to define the globa `qwikDev` to false
|
||||
// their own build tools to define the global `qwikDev` to false
|
||||
'globalThis.qDev': false,
|
||||
'globalThis.qInspector': false,
|
||||
'globalThis.qSerialize': false,
|
||||
@@ -162,7 +162,7 @@ async function submoduleCoreProd(config: BuildConfig) {
|
||||
|
||||
console.log('🐭 core.min.mjs:', await fileSize(join(config.distPkgDir, 'core.min.mjs')));
|
||||
|
||||
// always set the cjs version (probably imported serverside) to dev mode
|
||||
// always set the cjs version (probably imported server-side) to dev mode
|
||||
let esmCode = await readFile(join(config.distPkgDir, 'core.mjs'), 'utf-8');
|
||||
let cjsCode = await readFile(join(config.distPkgDir, 'core.cjs'), 'utf-8');
|
||||
await writeFile(join(config.distPkgDir, 'core.cjs'), cjsCode);
|
||||
|
||||
@@ -228,7 +228,7 @@ async function validateModuleTreeshake(
|
||||
|
||||
if (outputCode !== '') {
|
||||
console.log(outputCode);
|
||||
throw new Error(`🧨 Not all code was not treeshaken (treeshooken? treeshaked?)`);
|
||||
throw new Error(`🧨 Unable to treeshake everything!`);
|
||||
}
|
||||
|
||||
console.log(`🌳 validated treeshake`);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { netifyEdgeAdapter } from '@builder.io/qwik-city/adapters/netlify-edge/vite';
|
||||
import { netlifyEdgeAdapter } from '@builder.io/qwik-city/adapters/netlify-edge/vite';
|
||||
import { extendConfig } from '@builder.io/qwik-city/vite';
|
||||
import baseConfig from '../../vite.config';
|
||||
|
||||
@@ -11,6 +11,6 @@ export default extendConfig(baseConfig, () => {
|
||||
},
|
||||
outDir: '.netlify/edge-functions/entry.netlify-edge',
|
||||
},
|
||||
plugins: [netifyEdgeAdapter()],
|
||||
plugins: [netlifyEdgeAdapter()],
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user