@arcgis/toolkit 5.2.0-next.4 → 5.2.0-next.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/dist/{array/index.d.cts → array.d.ts} +1 -1
  2. package/dist/dom/{reference-element.d.cts → referenceElement.d.ts} +4 -0
  3. package/dist/dom/referenceElement.js +5 -0
  4. package/dist/dom/slots.js +39 -0
  5. package/dist/{dom/index.js → dom-Bnc7oSYx.js} +30 -48
  6. package/dist/{dom/index.d.cts → dom.d.ts} +22 -4
  7. package/dist/dom.js +21 -0
  8. package/dist/intl/dom.d.ts +63 -0
  9. package/dist/intl/{index.js → dom.js} +40 -36
  10. package/dist/{intl/index.d.ts → intl.d.ts} +10 -62
  11. package/dist/intl.js +10 -0
  12. package/dist/{predicate/index.d.cts → predicate.d.ts} +1 -1
  13. package/dist/{promise/index.d.ts → promise.d.ts} +1 -1
  14. package/dist/{url/index.d.cts → url.d.ts} +1 -1
  15. package/package.json +16 -61
  16. package/dist/array/index.cjs +0 -13
  17. package/dist/array/index.d.ts +0 -12
  18. package/dist/dom/index.cjs +0 -227
  19. package/dist/dom/index.d.ts +0 -117
  20. package/dist/dom/reference-element.d.ts +0 -6
  21. package/dist/dom/slots.d.cts +0 -93
  22. package/dist/error/index.cjs +0 -36
  23. package/dist/error/index.d.ts +0 -32
  24. package/dist/function/index.cjs +0 -16
  25. package/dist/function/index.d.ts +0 -19
  26. package/dist/intl/index.cjs +0 -110
  27. package/dist/intl/index.d.cts +0 -124
  28. package/dist/log/index.cjs +0 -81
  29. package/dist/log/index.d.ts +0 -128
  30. package/dist/number/index.cjs +0 -10
  31. package/dist/number/index.d.ts +0 -19
  32. package/dist/predicate/index.cjs +0 -8
  33. package/dist/predicate/index.d.ts +0 -24
  34. package/dist/promise/index.cjs +0 -45
  35. package/dist/promise/index.d.cts +0 -60
  36. package/dist/string/index.cjs +0 -117
  37. package/dist/string/index.d.ts +0 -130
  38. package/dist/tests/utils.d.cts +0 -1
  39. package/dist/type/index.cjs +0 -4
  40. package/dist/type/index.d.ts +0 -29
  41. package/dist/url/index.cjs +0 -26
  42. package/dist/url/index.d.ts +0 -18
  43. /package/dist/{array/index.js → array.js} +0 -0
  44. /package/dist/{error/index.d.cts → error.d.ts} +0 -0
  45. /package/dist/{error/index.js → error.js} +0 -0
  46. /package/dist/{function/index.d.cts → function.d.ts} +0 -0
  47. /package/dist/{function/index.js → function.js} +0 -0
  48. /package/dist/{log/index.d.cts → log.d.ts} +0 -0
  49. /package/dist/{log/index.js → log.js} +0 -0
  50. /package/dist/{number/index.d.cts → number.d.ts} +0 -0
  51. /package/dist/{number/index.js → number.js} +0 -0
  52. /package/dist/{predicate/index.js → predicate.js} +0 -0
  53. /package/dist/{promise/index.js → promise.js} +0 -0
  54. /package/dist/{string/index.d.cts → string.d.ts} +0 -0
  55. /package/dist/{string/index.js → string.js} +0 -0
  56. /package/dist/{type/index.d.cts → type.d.ts} +0 -0
  57. /package/dist/{type/index.js → type.js} +0 -0
  58. /package/dist/{url/index.js → url.js} +0 -0
@@ -1,130 +0,0 @@
1
- /**
2
- * Convert kebab-case string to PascalCase
3
- *
4
- * @example
5
- * ```ts
6
- * const pascal = kebabToPascal("my-component-name");
7
- * // MyComponentName
8
- */
9
- export declare const kebabToPascal: (string: string) => string;
10
- /**
11
- * Convert camelCase string to kebab-case
12
- *
13
- * @example
14
- * ```ts
15
- * const kebab = camelToKebab("myComponentName");
16
- * // my-component-name
17
- * ```
18
- */
19
- export declare const camelToKebab: (string: string) => string;
20
- /**
21
- * Convert camelCase string to Sentence case.
22
- *
23
- * @example
24
- * ```ts
25
- * const human = camelToHuman("myComponentName");
26
- * // My component name
27
- * ```
28
- */
29
- export declare const camelToHuman: (string: string) => string;
30
- /** Capitalize the first letter of a string. */
31
- export declare const capitalize: <T extends string>(string: T) => Capitalize<T>;
32
- /** Uncapitalize the first letter of a string. */
33
- export declare const uncapitalize: <T extends string>(string: T) => Uncapitalize<T>;
34
- /**
35
- * Add quotes to a string for display purposes.
36
- * If the string contains a double quote, then single quotes will be used.
37
- * If the string contains a single quote, then double quotes will be used.
38
- * If the string contains both, then double quotes will be used and the single quotes will be escaped.
39
- */
40
- export declare const quoteString: (value: string) => string;
41
- /**
42
- * Create a filter expression from a filter word.
43
- *
44
- * @remarks Once browser support permits, use `RegExp.escape()` instead.
45
- * @privateRemarks TODO: DEPRECATE
46
- */
47
- export declare const createFilterExpression: (filterWord: string) => RegExp;
48
- /**
49
- * Add LTR marks to a string to ensure it is displayed as LTR even in RTL contexts.
50
- * @param value The string to add LTR marks to.
51
- * @returns The string with LTR marks.
52
- *
53
- * @example
54
- * ```ts
55
- * // Without addLtrMark, this will render as arcadeVariable$ in RTL languages.
56
- * return <div>{addLtrMark("$arcadeVariable")}</div>;
57
- */
58
- export declare const addLtrMark: (value: string | undefined) => string;
59
- /**
60
- * A string containing a randomly generated, 36 character long v4 UUID.
61
- */
62
- export type UUID = ReturnType<typeof crypto.randomUUID>;
63
- /**
64
- * Generate a GUID string.
65
- *
66
- * If your component is using shadow root, the DOM element IDs do not need
67
- * to be globally unique - IDs are scoped to the shadow root.
68
- *
69
- * Avoid using GUID and other non-deterministic output in render() as they
70
- * cause SSR hydration issues and snapshot test instability.
71
- *
72
- * @example
73
- * ```ts
74
- * const id = generateGuid();
75
- * // 00000000-0000-0000-0000-000000000000.
76
- * ```
77
- */
78
- export declare const generateGuid: () => UUID;
79
- /**
80
- * Extract the major and minor version from a full version string.
81
- *
82
- * @example
83
- * ```ts
84
- * const minorVersion = getMinorVersion("4.34.0-next.123");
85
- * // "4.34"
86
- * ```
87
- */
88
- export declare const getMinorVersion: (version: string) => string;
89
- /**
90
- * Create a preamble text from a version number. Preamble text is used as legal
91
- * notice at the top of a file.
92
- * The preamble text contains the version number and a link to the license.
93
- * The version number should normally come from package.json.
94
- *
95
- * @see https://webgis.esri.com/sdk/contributing/licensing
96
- * @example
97
- * ```ts
98
- * const preamble = getPreamble("5.0.1-next.456");
99
- * // COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt
100
- * ```
101
- */
102
- export declare const getPreamble: (version: string) => string;
103
- /**
104
- * Replace values in a string using the format {valueName} with the value from the values object.
105
- * If the value is not found in the values object, then the value is not replaced.
106
- *
107
- * @deprecated Import from https://next.gha.afd.arcgis.com/javascript/latest/references/core/intl/#substitute instead
108
- */
109
- export declare const setValuesInString: (message: string | null | undefined, values?: Record<string, string>) => string;
110
- /**
111
- * Use `extractRegion` when you need to read a named `#region` block from a JavaScript/TypeScript source string,
112
- * such as docs or MDX snippets that should stay in sync with the real implementation.
113
- *
114
- * Throws when the named region cannot be found or is missing its closing marker.
115
- *
116
- * @example
117
- * ```ts
118
- * import code from "my-code-file.ts?raw";
119
- * const snippet = extractRegion(code, "myRegion");
120
- *
121
- * // where code is:
122
- * `
123
- * //#region myRegion
124
- * const value = 1;
125
- * //#endregion
126
- * `
127
- * // const value = 1;
128
- * ```
129
- */
130
- export declare const extractRegion: (source: string, regionName: string) => string;
@@ -1 +0,0 @@
1
- export declare function captureConsoleErrors(): unknown[][];
@@ -1,4 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const typeTest = 0;
4
- exports.typeTest = typeTest;
@@ -1,29 +0,0 @@
1
- /**
2
- * A convenient alias for `null | undefined`.
3
- * @remarks Named `nil` over `Nil` as per https://devtopia.esri.com/WebGIS/arcgis-js-api/pull/66920
4
- */
5
- export type nil = null | undefined;
6
- /**
7
- * @deprecated import type { ResourceHandle } from "@arcgis/core/core/Handles.js";
8
- */
9
- export type IHandle = {
10
- remove: () => void;
11
- };
12
- /**
13
- * @deprecated Import type { nil } from `@arcgis/toolkit/type` instead
14
- */
15
- export type Nil = nil;
16
- /**
17
- * A helper for doing TypeScript type tests.
18
- * This complements the TypeScript's `satisfies` operator.
19
- *
20
- * See usage examples:
21
- * https://webgis.esri.com/sdk/resources/typescript-tips#use-satisfies-operator-for-type-tests
22
- *
23
- * During production end-application build, such type tests will be removed as
24
- * they have no runtime impact.
25
- *
26
- * @privateRemarks
27
- * Using `0` over `undefined` to take fewer bytes if minifier is disabled.
28
- */
29
- export declare const typeTest: unknown;
@@ -1,26 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const hasSameOrigin = (url1, url2, ignoreProtocol = false) => {
4
- if (!url1 || !url2) {
5
- return false;
6
- }
7
- const url1Obj = new URL(url1);
8
- const url2Obj = new URL(url2);
9
- if (!ignoreProtocol && url1Obj.protocol !== url2Obj.protocol) {
10
- return false;
11
- }
12
- if (url1Obj.host == null || url2Obj.host == null) {
13
- return false;
14
- }
15
- return url1Obj.host.toLowerCase() === url2Obj.host.toLowerCase() && url1Obj.port === url2Obj.port;
16
- };
17
- const isURL = (url) => {
18
- try {
19
- new URL(url);
20
- return true;
21
- } catch (e) {
22
- return false;
23
- }
24
- };
25
- exports.hasSameOrigin = hasSameOrigin;
26
- exports.isURL = isURL;
@@ -1,18 +0,0 @@
1
- /**
2
- * Compares two url strings for their origin and returns true if they have the same origin.
3
- *
4
- * @param url1 First url string
5
- * @param url2 Second url string
6
- * @param ignoreProtocol Indicates if protocol comparison should be ignored
7
- * @returns True if the two url strings have the same origin
8
- */
9
- export declare const hasSameOrigin: (url1: string | null | undefined, url2: string | null | undefined, ignoreProtocol?: boolean) => boolean;
10
- /**
11
- * Tests if a url string is a URL or not.
12
- * @param url The url string to test
13
- * @returns True if the string is a URL.
14
- *
15
- * @remarks If browser support permits, use https://developer.mozilla.org/en-US/docs/Web/API/URL/parse_static instead
16
- * @privateRemarks TODO: DEPRECATE
17
- */
18
- export declare const isURL: (url: string) => boolean;
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes