@linktr.ee/linkapp 0.0.45 → 0.0.47

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 (76) hide show
  1. package/README.md +6 -6
  2. package/dev-server/{sheet → expanded}/main.tsx +2 -2
  3. package/dev-server/{sheet.html → expanded.html} +2 -2
  4. package/dev-server/preview/Preview.tsx +257 -245
  5. package/dist/commands/dev.d.ts.map +1 -1
  6. package/dist/commands/dev.js +21 -11
  7. package/dist/commands/dev.js.map +1 -1
  8. package/dist/lib/build/detect-layouts.d.ts +3 -1
  9. package/dist/lib/build/detect-layouts.d.ts.map +1 -1
  10. package/dist/lib/build/detect-layouts.js +16 -8
  11. package/dist/lib/build/detect-layouts.js.map +1 -1
  12. package/dist/lib/utils/setup-runtime.d.ts.map +1 -1
  13. package/dist/lib/utils/setup-runtime.js +26 -18
  14. package/dist/lib/utils/setup-runtime.js.map +1 -1
  15. package/dist/schema/config.schema.d.ts +2 -2
  16. package/dist/schema/config.schema.js +1 -1
  17. package/dist/schema/config.schema.js.map +1 -1
  18. package/dist/types.d.ts +1 -1
  19. package/dist/types.d.ts.map +1 -1
  20. package/package.json +2 -1
  21. package/dist/lib/config/resolve-config-path.d.ts +0 -19
  22. package/dist/lib/config/resolve-config-path.d.ts.map +0 -1
  23. package/dist/lib/config/resolve-config-path.js +0 -54
  24. package/dist/lib/config/resolve-config-path.js.map +0 -1
  25. package/dist/lib/deploy/artifacts.d.ts +0 -21
  26. package/dist/lib/deploy/artifacts.d.ts.map +0 -1
  27. package/dist/lib/deploy/artifacts.js +0 -35
  28. package/dist/lib/deploy/artifacts.js.map +0 -1
  29. package/dist/lib/deploy/confirmation.d.ts +0 -12
  30. package/dist/lib/deploy/confirmation.d.ts.map +0 -1
  31. package/dist/lib/deploy/confirmation.js +0 -30
  32. package/dist/lib/deploy/confirmation.js.map +0 -1
  33. package/dist/lib/deploy/context.d.ts +0 -44
  34. package/dist/lib/deploy/context.d.ts.map +0 -1
  35. package/dist/lib/deploy/context.js +0 -39
  36. package/dist/lib/deploy/context.js.map +0 -1
  37. package/dist/lib/deploy/execution.d.ts +0 -24
  38. package/dist/lib/deploy/execution.d.ts.map +0 -1
  39. package/dist/lib/deploy/execution.js +0 -29
  40. package/dist/lib/deploy/execution.js.map +0 -1
  41. package/dist/lib/deploy/output.d.ts +0 -16
  42. package/dist/lib/deploy/output.d.ts.map +0 -1
  43. package/dist/lib/deploy/output.js +0 -115
  44. package/dist/lib/deploy/output.js.map +0 -1
  45. package/dist/lib/deploy/preflight.d.ts +0 -9
  46. package/dist/lib/deploy/preflight.d.ts.map +0 -1
  47. package/dist/lib/deploy/preflight.js +0 -59
  48. package/dist/lib/deploy/preflight.js.map +0 -1
  49. package/dist/lib/utils/constants.d.ts +0 -42
  50. package/dist/lib/utils/constants.d.ts.map +0 -1
  51. package/dist/lib/utils/constants.js +0 -42
  52. package/dist/lib/utils/constants.js.map +0 -1
  53. package/dist/lib/utils/create-project.d.ts +0 -8
  54. package/dist/lib/utils/create-project.d.ts.map +0 -1
  55. package/dist/lib/utils/create-project.js +0 -48
  56. package/dist/lib/utils/create-project.js.map +0 -1
  57. package/dist/lib/utils/errors.d.ts +0 -49
  58. package/dist/lib/utils/errors.d.ts.map +0 -1
  59. package/dist/lib/utils/errors.js +0 -70
  60. package/dist/lib/utils/errors.js.map +0 -1
  61. package/dist/lib/utils/formatters.d.ts +0 -34
  62. package/dist/lib/utils/formatters.d.ts.map +0 -1
  63. package/dist/lib/utils/formatters.js +0 -59
  64. package/dist/lib/utils/formatters.js.map +0 -1
  65. package/dist/lib/utils/output.d.ts +0 -46
  66. package/dist/lib/utils/output.d.ts.map +0 -1
  67. package/dist/lib/utils/output.js +0 -66
  68. package/dist/lib/utils/output.js.map +0 -1
  69. package/dist/schema/index.d.ts +0 -8
  70. package/dist/schema/index.d.ts.map +0 -1
  71. package/dist/schema/index.js +0 -8
  72. package/dist/schema/index.js.map +0 -1
  73. package/dist/sdk/use-open-popup.d.ts +0 -23
  74. package/dist/sdk/use-open-popup.d.ts.map +0 -1
  75. package/dist/sdk/use-open-popup.js +0 -29
  76. package/dist/sdk/use-open-popup.js.map +0 -1
@@ -1,49 +0,0 @@
1
- /**
2
- * Base error class for deployment-related errors.
3
- */
4
- export declare class DeploymentError extends Error {
5
- readonly exitCode: number;
6
- userMessage?: string;
7
- constructor(message: string, exitCode?: number, userMessage?: string | undefined);
8
- }
9
- /**
10
- * Error thrown when user is not authenticated.
11
- */
12
- export declare class AuthenticationError extends DeploymentError {
13
- readonly environment: 'production' | 'qa';
14
- constructor(environment: 'production' | 'qa');
15
- }
16
- /**
17
- * Error thrown when project validation fails.
18
- */
19
- export declare class ValidationError extends DeploymentError {
20
- constructor(message: string, details?: string[]);
21
- }
22
- /**
23
- * Error thrown when deployment is cancelled by user.
24
- */
25
- export declare class DeploymentCancelledError extends DeploymentError {
26
- constructor();
27
- }
28
- /**
29
- * Structured API error response from LinkTypes API.
30
- */
31
- export interface APIError {
32
- statusCode: number;
33
- messages: string[];
34
- responseData?: {
35
- error?: string;
36
- };
37
- }
38
- /**
39
- * Type guard to check if an error is an API error.
40
- */
41
- export declare function isAPIError(error: unknown): error is APIError;
42
- /**
43
- * Error thrown when API request fails.
44
- */
45
- export declare class APIRequestError extends DeploymentError {
46
- readonly apiError: APIError;
47
- constructor(apiError: APIError);
48
- }
49
- //# sourceMappingURL=errors.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/errors.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,qBAAa,eAAgB,SAAQ,KAAK;IACxC,SAAgB,QAAQ,EAAE,MAAM,CAAA;IACzB,WAAW,CAAC,EAAE,MAAM,CAAA;gBAGzB,OAAO,EAAE,MAAM,EACf,QAAQ,GAAE,MAAU,EACpB,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS;CASnC;AAED;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,eAAe;aAEpC,WAAW,EAAE,YAAY,GAAG,IAAI;gBAAhC,WAAW,EAAE,YAAY,GAAG,IAAI;CAUnD;AAED;;GAEG;AACH,qBAAa,eAAgB,SAAQ,eAAe;gBACtC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE;CAOhD;AAED;;GAEG;AACH,qBAAa,wBAAyB,SAAQ,eAAe;;CAK5D;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,UAAU,EAAE,MAAM,CAAA;IAClB,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB,YAAY,CAAC,EAAE;QACb,KAAK,CAAC,EAAE,MAAM,CAAA;KACf,CAAA;CACF;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,QAAQ,CAQ5D;AAED;;GAEG;AACH,qBAAa,eAAgB,SAAQ,eAAe;aAEhC,QAAQ,EAAE,QAAQ;gBAAlB,QAAQ,EAAE,QAAQ;CAKrC"}
@@ -1,70 +0,0 @@
1
- /**
2
- * Base error class for deployment-related errors.
3
- */
4
- export class DeploymentError extends Error {
5
- exitCode;
6
- userMessage;
7
- constructor(message, exitCode = 1, userMessage) {
8
- super(message);
9
- this.name = 'DeploymentError';
10
- this.exitCode = exitCode;
11
- if (userMessage !== undefined) {
12
- this.userMessage = userMessage;
13
- }
14
- }
15
- }
16
- /**
17
- * Error thrown when user is not authenticated.
18
- */
19
- export class AuthenticationError extends DeploymentError {
20
- environment;
21
- constructor(environment) {
22
- const envFlag = environment === 'qa' ? ' --qa' : '';
23
- super('Not authenticated', 1, `Run: npx @linktr.ee/linkapp login${envFlag}`);
24
- this.environment = environment;
25
- this.name = 'AuthenticationError';
26
- }
27
- }
28
- /**
29
- * Error thrown when project validation fails.
30
- */
31
- export class ValidationError extends DeploymentError {
32
- constructor(message, details) {
33
- super(message, 1);
34
- this.name = 'ValidationError';
35
- if (details) {
36
- this.userMessage = details.join('\n');
37
- }
38
- }
39
- }
40
- /**
41
- * Error thrown when deployment is cancelled by user.
42
- */
43
- export class DeploymentCancelledError extends DeploymentError {
44
- constructor() {
45
- super('Deployment cancelled by user', 0);
46
- this.name = 'DeploymentCancelledError';
47
- }
48
- }
49
- /**
50
- * Type guard to check if an error is an API error.
51
- */
52
- export function isAPIError(error) {
53
- return (error !== null &&
54
- typeof error === 'object' &&
55
- 'statusCode' in error &&
56
- 'messages' in error &&
57
- Array.isArray(error.messages));
58
- }
59
- /**
60
- * Error thrown when API request fails.
61
- */
62
- export class APIRequestError extends DeploymentError {
63
- apiError;
64
- constructor(apiError) {
65
- super(`API request failed with status ${apiError.statusCode}`, 1);
66
- this.apiError = apiError;
67
- this.name = 'APIRequestError';
68
- }
69
- }
70
- //# sourceMappingURL=errors.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../../src/lib/utils/errors.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,OAAO,eAAgB,SAAQ,KAAK;IACxB,QAAQ,CAAQ;IACzB,WAAW,CAAS;IAE3B,YACE,OAAe,EACf,WAAmB,CAAC,EACpB,WAAgC;QAEhC,KAAK,CAAC,OAAO,CAAC,CAAA;QACd,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAA;QAC7B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;QACxB,IAAI,WAAW,KAAK,SAAS,EAAE,CAAC;YAC9B,IAAI,CAAC,WAAW,GAAG,WAAW,CAAA;QAChC,CAAC;IACH,CAAC;CACF;AAED;;GAEG;AACH,MAAM,OAAO,mBAAoB,SAAQ,eAAe;IAEpC;IADlB,YACkB,WAAgC;QAEhD,MAAM,OAAO,GAAG,WAAW,KAAK,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAA;QACnD,KAAK,CACH,mBAAmB,EACnB,CAAC,EACD,oCAAoC,OAAO,EAAE,CAC9C,CAAA;QAPe,gBAAW,GAAX,WAAW,CAAqB;QAQhD,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAA;IACnC,CAAC;CACF;AAED;;GAEG;AACH,MAAM,OAAO,eAAgB,SAAQ,eAAe;IAClD,YAAY,OAAe,EAAE,OAAkB;QAC7C,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,CAAA;QACjB,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAA;QAC7B,IAAI,OAAO,EAAE,CAAC;YACZ,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QACvC,CAAC;IACH,CAAC;CACF;AAED;;GAEG;AACH,MAAM,OAAO,wBAAyB,SAAQ,eAAe;IAC3D;QACE,KAAK,CAAC,8BAA8B,EAAE,CAAC,CAAC,CAAA;QACxC,IAAI,CAAC,IAAI,GAAG,0BAA0B,CAAA;IACxC,CAAC;CACF;AAaD;;GAEG;AACH,MAAM,UAAU,UAAU,CAAC,KAAc;IACvC,OAAO,CACL,KAAK,KAAK,IAAI;QACd,OAAO,KAAK,KAAK,QAAQ;QACzB,YAAY,IAAI,KAAK;QACrB,UAAU,IAAI,KAAK;QACnB,KAAK,CAAC,OAAO,CAAE,KAAa,CAAC,QAAQ,CAAC,CACvC,CAAA;AACH,CAAC;AAED;;GAEG;AACH,MAAM,OAAO,eAAgB,SAAQ,eAAe;IAEhC;IADlB,YACkB,QAAkB;QAElC,KAAK,CAAC,kCAAkC,QAAQ,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,CAAA;QAFjD,aAAQ,GAAR,QAAQ,CAAU;QAGlC,IAAI,CAAC,IAAI,GAAG,iBAAiB,CAAA;IAC/B,CAAC;CACF"}
@@ -1,34 +0,0 @@
1
- /**
2
- * Formats a timestamp (in seconds or milliseconds) to a localized string.
3
- * Automatically detects whether the timestamp is in seconds or milliseconds.
4
- *
5
- * @param timestamp - Timestamp in seconds or milliseconds
6
- * @returns Formatted date string, or null if timestamp is undefined
7
- */
8
- export declare function formatTimestamp(timestamp: number | undefined): string | null;
9
- /**
10
- * Formats an elapsed time in milliseconds to a human-readable string.
11
- *
12
- * @param ms - Time in milliseconds
13
- * @returns Formatted time string (e.g., "1.5s")
14
- */
15
- export declare function formatElapsedTime(ms: number): string;
16
- /**
17
- * Displays a list of files with a preview limit.
18
- * Shows first N files and indicates how many more exist.
19
- *
20
- * @param files - Array of file paths
21
- * @param title - Title to display above the list
22
- * @param limit - Maximum number of files to show (default: from DISPLAY constant)
23
- */
24
- export declare function displayFileList(files: string[], title: string, limit?: number): void;
25
- /**
26
- * Pluralizes a word based on count.
27
- *
28
- * @param count - The count to check
29
- * @param singular - Singular form of the word
30
- * @param plural - Plural form of the word (optional, defaults to singular + 's')
31
- * @returns Pluralized string with count
32
- */
33
- export declare function pluralize(count: number, singular: string, plural?: string): string;
34
- //# sourceMappingURL=formatters.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"formatters.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/formatters.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,IAAI,CAU5E;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAEpD;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAC7B,KAAK,EAAE,MAAM,EAAE,EACf,KAAK,EAAE,MAAM,EACb,KAAK,GAAE,MAAmC,GACzC,IAAI,CAYN;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAGlF"}
@@ -1,59 +0,0 @@
1
- import pc from 'picocolors';
2
- import { TIMESTAMP, DISPLAY } from './constants.js';
3
- import { writeLine, writeIndented } from './output.js';
4
- /**
5
- * Formats a timestamp (in seconds or milliseconds) to a localized string.
6
- * Automatically detects whether the timestamp is in seconds or milliseconds.
7
- *
8
- * @param timestamp - Timestamp in seconds or milliseconds
9
- * @returns Formatted date string, or null if timestamp is undefined
10
- */
11
- export function formatTimestamp(timestamp) {
12
- if (!timestamp) {
13
- return null;
14
- }
15
- // Convert seconds to milliseconds if needed
16
- const timestampMs = timestamp < TIMESTAMP.SECONDS_TO_MS_THRESHOLD ? timestamp * 1000 : timestamp;
17
- return new Date(timestampMs).toLocaleString();
18
- }
19
- /**
20
- * Formats an elapsed time in milliseconds to a human-readable string.
21
- *
22
- * @param ms - Time in milliseconds
23
- * @returns Formatted time string (e.g., "1.5s")
24
- */
25
- export function formatElapsedTime(ms) {
26
- return `${(ms / 1000).toFixed(1)}s`;
27
- }
28
- /**
29
- * Displays a list of files with a preview limit.
30
- * Shows first N files and indicates how many more exist.
31
- *
32
- * @param files - Array of file paths
33
- * @param title - Title to display above the list
34
- * @param limit - Maximum number of files to show (default: from DISPLAY constant)
35
- */
36
- export function displayFileList(files, title, limit = DISPLAY.FILE_PREVIEW_LIMIT) {
37
- writeLine();
38
- writeLine(pc.bold(title));
39
- const filesToShow = files.slice(0, limit);
40
- for (const file of filesToShow) {
41
- writeIndented(`• ${file}`);
42
- }
43
- if (files.length > limit) {
44
- writeIndented(`• ... and ${files.length - limit} more files`);
45
- }
46
- }
47
- /**
48
- * Pluralizes a word based on count.
49
- *
50
- * @param count - The count to check
51
- * @param singular - Singular form of the word
52
- * @param plural - Plural form of the word (optional, defaults to singular + 's')
53
- * @returns Pluralized string with count
54
- */
55
- export function pluralize(count, singular, plural) {
56
- const word = count === 1 ? singular : plural ?? `${singular}s`;
57
- return `${count} ${word}`;
58
- }
59
- //# sourceMappingURL=formatters.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"formatters.js","sourceRoot":"","sources":["../../../src/lib/utils/formatters.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAA;AAC3B,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AACnD,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAEtD;;;;;;GAMG;AACH,MAAM,UAAU,eAAe,CAAC,SAA6B;IAC3D,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,OAAO,IAAI,CAAA;IACb,CAAC;IAED,4CAA4C;IAC5C,MAAM,WAAW,GACf,SAAS,GAAG,SAAS,CAAC,uBAAuB,CAAC,CAAC,CAAC,SAAS,GAAG,IAAI,CAAC,CAAC,CAAC,SAAS,CAAA;IAE9E,OAAO,IAAI,IAAI,CAAC,WAAW,CAAC,CAAC,cAAc,EAAE,CAAA;AAC/C,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAAC,EAAU;IAC1C,OAAO,GAAG,CAAC,EAAE,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAA;AACrC,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,eAAe,CAC7B,KAAe,EACf,KAAa,EACb,QAAgB,OAAO,CAAC,kBAAkB;IAE1C,SAAS,EAAE,CAAA;IACX,SAAS,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAA;IAEzB,MAAM,WAAW,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAA;IACzC,KAAK,MAAM,IAAI,IAAI,WAAW,EAAE,CAAC;QAC/B,aAAa,CAAC,KAAK,IAAI,EAAE,CAAC,CAAA;IAC5B,CAAC;IAED,IAAI,KAAK,CAAC,MAAM,GAAG,KAAK,EAAE,CAAC;QACzB,aAAa,CAAC,aAAa,KAAK,CAAC,MAAM,GAAG,KAAK,aAAa,CAAC,CAAA;IAC/D,CAAC;AACH,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,SAAS,CAAC,KAAa,EAAE,QAAgB,EAAE,MAAe;IACxE,MAAM,IAAI,GAAG,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,IAAI,GAAG,QAAQ,GAAG,CAAA;IAC9D,OAAO,GAAG,KAAK,IAAI,IAAI,EAAE,CAAA;AAC3B,CAAC"}
@@ -1,46 +0,0 @@
1
- /**
2
- * Writes a line to stdout with a newline.
3
- * @param message - The message to write (defaults to empty line)
4
- */
5
- export declare function writeLine(message?: string): void;
6
- /**
7
- * Writes a section header with title and separator line.
8
- * @param title - The section title
9
- * @param length - Length of the separator line (default: 50)
10
- */
11
- export declare function writeSection(title: string, length?: number): void;
12
- /**
13
- * Writes an error message in red with an ✗ symbol.
14
- * @param message - The error message
15
- */
16
- export declare function writeError(message: string): void;
17
- /**
18
- * Writes a success message in green with a ✓ symbol.
19
- * @param message - The success message
20
- */
21
- export declare function writeSuccess(message: string): void;
22
- /**
23
- * Writes a warning message in yellow with a ⚠ symbol.
24
- * @param message - The warning message
25
- */
26
- export declare function writeWarning(message: string): void;
27
- /**
28
- * Writes a horizontal separator line.
29
- * @param length - Length of the separator (default: 50)
30
- * @param char - Character to use for separator (default: '─')
31
- */
32
- export declare function writeSeparator(length?: number, char?: string): void;
33
- /**
34
- * Writes an indented message with dimmed styling.
35
- * @param message - The message to write
36
- * @param indent - Number of spaces to indent (default: 2)
37
- */
38
- export declare function writeIndented(message: string, indent?: number): void;
39
- /**
40
- * Writes a labeled value pair (e.g., "ID: my-linkapp").
41
- * @param label - The label text
42
- * @param value - The value text
43
- * @param indent - Number of spaces to indent (default: 2)
44
- */
45
- export declare function writeLabelValue(label: string, value: string, indent?: number): void;
46
- //# sourceMappingURL=output.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"output.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/output.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,wBAAgB,SAAS,CAAC,OAAO,SAAK,GAAG,IAAI,CAE5C;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,SAAK,GAAG,IAAI,CAI7D;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAEhD;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAElD;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAElD;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,MAAM,SAAK,EAAE,IAAI,SAAM,GAAG,IAAI,CAE5D;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,SAAI,GAAG,IAAI,CAE/D;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,SAAI,GAAG,IAAI,CAG9E"}
@@ -1,66 +0,0 @@
1
- import pc from 'picocolors';
2
- /**
3
- * Writes a line to stdout with a newline.
4
- * @param message - The message to write (defaults to empty line)
5
- */
6
- export function writeLine(message = '') {
7
- process.stdout.write(`${message}\n`);
8
- }
9
- /**
10
- * Writes a section header with title and separator line.
11
- * @param title - The section title
12
- * @param length - Length of the separator line (default: 50)
13
- */
14
- export function writeSection(title, length = 50) {
15
- writeLine(pc.bold(pc.cyan(`\n→ ${title}`)));
16
- writeLine(pc.dim('─'.repeat(length)));
17
- writeLine();
18
- }
19
- /**
20
- * Writes an error message in red with an ✗ symbol.
21
- * @param message - The error message
22
- */
23
- export function writeError(message) {
24
- writeLine(pc.red(pc.bold(`✗ ${message}`)));
25
- }
26
- /**
27
- * Writes a success message in green with a ✓ symbol.
28
- * @param message - The success message
29
- */
30
- export function writeSuccess(message) {
31
- writeLine(pc.green(pc.bold(`✓ ${message}`)));
32
- }
33
- /**
34
- * Writes a warning message in yellow with a ⚠ symbol.
35
- * @param message - The warning message
36
- */
37
- export function writeWarning(message) {
38
- writeLine(pc.yellow(pc.bold(`⚠ ${message}`)));
39
- }
40
- /**
41
- * Writes a horizontal separator line.
42
- * @param length - Length of the separator (default: 50)
43
- * @param char - Character to use for separator (default: '─')
44
- */
45
- export function writeSeparator(length = 50, char = '─') {
46
- writeLine(pc.dim(char.repeat(length)));
47
- }
48
- /**
49
- * Writes an indented message with dimmed styling.
50
- * @param message - The message to write
51
- * @param indent - Number of spaces to indent (default: 2)
52
- */
53
- export function writeIndented(message, indent = 2) {
54
- writeLine(pc.dim(' '.repeat(indent) + message));
55
- }
56
- /**
57
- * Writes a labeled value pair (e.g., "ID: my-linkapp").
58
- * @param label - The label text
59
- * @param value - The value text
60
- * @param indent - Number of spaces to indent (default: 2)
61
- */
62
- export function writeLabelValue(label, value, indent = 2) {
63
- const padding = ' '.repeat(indent);
64
- writeLine(pc.dim(`${padding}${label}: ${value}`));
65
- }
66
- //# sourceMappingURL=output.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"output.js","sourceRoot":"","sources":["../../../src/lib/utils/output.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,YAAY,CAAA;AAE3B;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAC,OAAO,GAAG,EAAE;IACpC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,OAAO,IAAI,CAAC,CAAA;AACtC,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,YAAY,CAAC,KAAa,EAAE,MAAM,GAAG,EAAE;IACrD,SAAS,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,KAAK,EAAE,CAAC,CAAC,CAAC,CAAA;IAC3C,SAAS,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;IACrC,SAAS,EAAE,CAAA;AACb,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,UAAU,CAAC,OAAe;IACxC,SAAS,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,OAAO,EAAE,CAAC,CAAC,CAAC,CAAA;AAC5C,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,OAAe;IAC1C,SAAS,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,OAAO,EAAE,CAAC,CAAC,CAAC,CAAA;AAC9C,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,OAAe;IAC1C,SAAS,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,OAAO,EAAE,CAAC,CAAC,CAAC,CAAA;AAC/C,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,MAAM,GAAG,EAAE,EAAE,IAAI,GAAG,GAAG;IACpD,SAAS,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;AACxC,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,OAAe,EAAE,MAAM,GAAG,CAAC;IACvD,SAAS,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,CAAC,CAAA;AACjD,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAC,KAAa,EAAE,KAAa,EAAE,MAAM,GAAG,CAAC;IACtE,MAAM,OAAO,GAAG,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;IAClC,SAAS,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,OAAO,GAAG,KAAK,KAAK,KAAK,EAAE,CAAC,CAAC,CAAA;AACnD,CAAC"}
@@ -1,8 +0,0 @@
1
- /**
2
- * LinkApp Configuration Schema
3
- *
4
- * This module provides schema validation for LinkApp configurations.
5
- * Inspired by Next.js and Tailwind CSS configuration validation.
6
- */
7
- export { linkAppConfigSchema, validateLinkAppConfig, safeLyValidateLinkAppConfig, isLinkAppConfig, type LinkAppConfig, type LinkAppManifest, type LinkAppSettings, type UrlMatchRules, type SettingsElement, } from './config.schema.js';
8
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schema/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,2BAA2B,EAC3B,eAAe,EACf,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,eAAe,GACrB,MAAM,oBAAoB,CAAA"}
@@ -1,8 +0,0 @@
1
- /**
2
- * LinkApp Configuration Schema
3
- *
4
- * This module provides schema validation for LinkApp configurations.
5
- * Inspired by Next.js and Tailwind CSS configuration validation.
6
- */
7
- export { linkAppConfigSchema, validateLinkAppConfig, safeLyValidateLinkAppConfig, isLinkAppConfig, } from './config.schema.js';
8
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schema/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,2BAA2B,EAC3B,eAAe,GAMhB,MAAM,oBAAoB,CAAA"}
@@ -1,23 +0,0 @@
1
- /**
2
- * Hook to open a popup/modal in the parent Linktree window
3
- *
4
- * @returns A callback function to trigger the popup with optional data
5
- *
6
- * @example
7
- * ```tsx
8
- * function FeaturedLayout() {
9
- * const openPopup = useOpenPopup()
10
- *
11
- * return (
12
- * <button onClick={() => openPopup({ itemId: '123', view: 'details' })}>
13
- * View More
14
- * </button>
15
- * )
16
- * }
17
- * ```
18
- *
19
- * Note: This only works when the LinkApp is embedded in Linktree.
20
- * The parent window identifies the LinkApp from the iframe's event.source.
21
- */
22
- export declare function useOpenPopup(): (data?: Record<string, unknown>) => void;
23
- //# sourceMappingURL=use-open-popup.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-open-popup.d.ts","sourceRoot":"","sources":["../../src/sdk/use-open-popup.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,YAAY,YACC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,UAGnD"}
@@ -1,29 +0,0 @@
1
- import { useCallback } from 'react';
2
- import { sendMessage } from './send-message.js';
3
- /**
4
- * Hook to open a popup/modal in the parent Linktree window
5
- *
6
- * @returns A callback function to trigger the popup with optional data
7
- *
8
- * @example
9
- * ```tsx
10
- * function FeaturedLayout() {
11
- * const openPopup = useOpenPopup()
12
- *
13
- * return (
14
- * <button onClick={() => openPopup({ itemId: '123', view: 'details' })}>
15
- * View More
16
- * </button>
17
- * )
18
- * }
19
- * ```
20
- *
21
- * Note: This only works when the LinkApp is embedded in Linktree.
22
- * The parent window identifies the LinkApp from the iframe's event.source.
23
- */
24
- export function useOpenPopup() {
25
- return useCallback((data) => {
26
- sendMessage('OPEN_POPUP', { data });
27
- }, []);
28
- }
29
- //# sourceMappingURL=use-open-popup.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-open-popup.js","sourceRoot":"","sources":["../../src/sdk/use-open-popup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAA;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAE/C;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,UAAU,YAAY;IAC1B,OAAO,WAAW,CAAC,CAAC,IAA8B,EAAE,EAAE;QACpD,WAAW,CAAC,YAAY,EAAE,EAAE,IAAI,EAAE,CAAC,CAAA;IACrC,CAAC,EAAE,EAAE,CAAC,CAAA;AACR,CAAC"}