@fgv/ts-res-browser 5.0.0-2 → 5.0.0-21

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 (99) hide show
  1. package/cli.js +132 -21
  2. package/dist/bundle.js +1 -1
  3. package/dist/bundle.js.LICENSE.txt +11 -1
  4. package/package.json +42 -36
  5. package/.rush/temp/587277bfc395406ad444e989b6c309b9698f534c.tar.log +0 -15
  6. package/.rush/temp/chunked-rush-logs/ts-res-browser.build.chunks.jsonl +0 -35
  7. package/.rush/temp/operation/build/all.log +0 -35
  8. package/.rush/temp/operation/build/log-chunks.jsonl +0 -35
  9. package/.rush/temp/operation/build/state.json +0 -3
  10. package/.rush/temp/shrinkwrap-deps.json +0 -1225
  11. package/TS_RES_BROWSER_PLAN.md +0 -689
  12. package/babel.config.js +0 -17
  13. package/config/jest.config.json +0 -13
  14. package/config/rig.json +0 -16
  15. package/postcss.config.js +0 -3
  16. package/public/index.html +0 -15
  17. package/rush-logs/ts-res-browser.build.cache.log +0 -3
  18. package/rush-logs/ts-res-browser.build.log +0 -35
  19. package/src/App.tsx +0 -274
  20. package/src/cli.ts +0 -44
  21. package/src/components/common/FileImporter.tsx +0 -143
  22. package/src/components/common/NavigationWarningModal.tsx +0 -62
  23. package/src/components/layout/AppLayout.tsx +0 -46
  24. package/src/components/layout/Header.tsx +0 -22
  25. package/src/components/layout/MessagesWindow.tsx +0 -108
  26. package/src/components/layout/Sidebar.tsx +0 -99
  27. package/src/components/tools/CompiledBrowser.tsx +0 -949
  28. package/src/components/tools/ConfigurationTool.tsx +0 -1405
  29. package/src/components/tools/FilterTool.tsx +0 -1114
  30. package/src/components/tools/ImportTool.tsx +0 -249
  31. package/src/components/tools/ResolutionViewer.tsx +0 -1672
  32. package/src/components/tools/SourceBrowser.tsx +0 -496
  33. package/src/components/tools/ZipLoader.tsx +0 -302
  34. package/src/hooks/useAppState.ts +0 -111
  35. package/src/hooks/useFileImport.ts +0 -86
  36. package/src/hooks/useNavigationWarning.ts +0 -67
  37. package/src/hooks/useResourceManager.ts +0 -295
  38. package/src/hooks/useUrlParams.ts +0 -56
  39. package/src/index.css +0 -38
  40. package/src/main.tsx +0 -16
  41. package/src/types/app.ts +0 -70
  42. package/src/types/fileSystemAccess.d.ts +0 -94
  43. package/src/utils/browserFileTreeAccessors.ts +0 -245
  44. package/src/utils/fileImport.ts +0 -336
  45. package/src/utils/fileTreeConverter.ts +0 -160
  46. package/src/utils/filterResources.ts +0 -677
  47. package/src/utils/tsResIntegration.ts +0 -467
  48. package/src/utils/urlParams.ts +0 -238
  49. package/src/utils/zip/browserZipFileTreeAccessors.ts +0 -385
  50. package/tailwind.config.js +0 -21
  51. package/test-data/README.md +0 -184
  52. package/test-data/config-variations/README.md +0 -64
  53. package/test-data/config-variations/composition-terminology.json +0 -112
  54. package/test-data/config-variations/enterprise-complex.json +0 -129
  55. package/test-data/config-variations/gaming-app.json +0 -87
  56. package/test-data/config-variations/high-priority-language.json +0 -65
  57. package/test-data/config-variations/minimal-basic.json +0 -37
  58. package/test-data/config-variations/qualifier-default-values.json +0 -71
  59. package/test-data/config-variations/territory-first.json +0 -68
  60. package/test-data/config-variations/territory-hierarchy-test.json +0 -31
  61. package/test-data/config-variations/territory-hierarchy-unconstrained.json +0 -32
  62. package/test-data/default-matching-test/greeting.res.json +0 -83
  63. package/test-data/default-matching-test/only-defaults.res.json +0 -48
  64. package/test-data/sample-project/package.json +0 -27
  65. package/test-data/sample-project/src/resources/app-config.json +0 -27
  66. package/test-data/sample-project/src/resources/app.json +0 -177
  67. package/test-data/sample-project/src/resources/config/app.env=development.json +0 -21
  68. package/test-data/sample-project/src/resources/config/app.json +0 -21
  69. package/test-data/sample-project/src/resources/config/app.platform=mobile.json +0 -23
  70. package/test-data/sample-project/src/resources/feature-flags.json +0 -23
  71. package/test-data/sample-project/src/resources/home=CA/common.json +0 -16
  72. package/test-data/sample-project/src/resources/images/density=hdpi.json +0 -29
  73. package/test-data/sample-project/src/resources/images/home.json +0 -29
  74. package/test-data/sample-project/src/resources/images/logout.json +0 -14
  75. package/test-data/sample-project/src/resources/images/settings.json +0 -14
  76. package/test-data/sample-project/src/resources/images/ui-icons.json +0 -29
  77. package/test-data/sample-project/src/resources/images/user.density=hdpi.json +0 -14
  78. package/test-data/sample-project/src/resources/images/user.json +0 -14
  79. package/test-data/sample-project/src/resources/lang=en-US/common.json +0 -15
  80. package/test-data/sample-project/src/resources/language=en-CA/ui-terms.json +0 -19
  81. package/test-data/sample-project/src/resources/language=en-GB/ui-terms.json +0 -30
  82. package/test-data/sample-project/src/resources/language=fr-CA/ui-terms.json +0 -25
  83. package/test-data/sample-project/src/resources/language=nl-BE/ui-terms.json +0 -17
  84. package/test-data/sample-project/src/resources/region=europe/feature-flags.json +0 -17
  85. package/test-data/sample-project/src/resources/region=north-america/feature-flags.json +0 -18
  86. package/test-data/sample-project/src/resources/strings/dashboard.home=CA,language=fr.json +0 -20
  87. package/test-data/sample-project/src/resources/strings/dashboard.json +0 -18
  88. package/test-data/sample-project/src/resources/strings/dashboard.role=admin.json +0 -23
  89. package/test-data/sample-project/src/resources/strings/dashboard.role=user.json +0 -21
  90. package/test-data/sample-project/src/resources/strings/language=en-US.json +0 -16
  91. package/test-data/sample-project/src/resources/strings.json +0 -78
  92. package/test-data/sample-project/src/resources/territory=BE/app-config.json +0 -19
  93. package/test-data/sample-project/src/resources/territory=CA/app-config.json +0 -21
  94. package/test-data/sample-project/src/resources/territory=GB/app-config.json +0 -25
  95. package/test-data/sample-project/src/resources/territory=NL/app-config.json +0 -25
  96. package/test-data/sample-project/src/resources/ui-terms.json +0 -96
  97. package/test-data/sample-project/src/resources-config.json +0 -111
  98. package/tsconfig.json +0 -27
  99. package/webpack.config.js +0 -60
@@ -1,112 +0,0 @@
1
- {
2
- "name": "Composition Terminology Configuration",
3
- "description": "Configuration demonstrating composition with international terminology variations plus full application context",
4
- "qualifierTypes": [
5
- {
6
- "name": "language",
7
- "systemType": "language"
8
- },
9
- {
10
- "name": "territory",
11
- "systemType": "territory",
12
- "configuration": {
13
- "allowContextList": true
14
- }
15
- },
16
- {
17
- "name": "role",
18
- "systemType": "literal",
19
- "configuration": {
20
- "allowContextList": false,
21
- "caseSensitive": false,
22
- "enumeratedValues": ["admin", "user", "guest", "anonymous"]
23
- }
24
- },
25
- {
26
- "name": "environment",
27
- "systemType": "literal",
28
- "configuration": {
29
- "enumeratedValues": ["development", "integration", "production", "test"]
30
- }
31
- },
32
- {
33
- "name": "platform",
34
- "systemType": "literal",
35
- "configuration": {
36
- "enumeratedValues": ["ios", "android", "web", "mobile", "tv", "desktop"]
37
- },
38
- "hierarchy": {
39
- "ios": "mobile",
40
- "android": "mobile"
41
- }
42
- },
43
- {
44
- "name": "density",
45
- "systemType": "literal",
46
- "configuration": {
47
- "allowContextList": false,
48
- "caseSensitive": false,
49
- "enumeratedValues": ["hdpi", "mdpi", "ldpi"]
50
- }
51
- },
52
- {
53
- "name": "region",
54
- "systemType": "literal",
55
- "configuration": {
56
- "allowContextList": false,
57
- "caseSensitive": false,
58
- "enumeratedValues": ["north-america", "europe", "asia-pacific", "latin-america"]
59
- }
60
- }
61
- ],
62
- "qualifiers": [
63
- {
64
- "name": "language",
65
- "typeName": "language",
66
- "defaultPriority": 800
67
- },
68
- {
69
- "name": "homeTerritory",
70
- "typeName": "territory",
71
- "defaultPriority": 850,
72
- "token": "home",
73
- "tokenIsOptional": true
74
- },
75
- {
76
- "name": "territory",
77
- "typeName": "territory",
78
- "defaultPriority": 700
79
- },
80
- {
81
- "name": "role",
82
- "typeName": "role",
83
- "defaultPriority": 500
84
- },
85
- {
86
- "name": "env",
87
- "typeName": "environment",
88
- "defaultPriority": 400
89
- },
90
- {
91
- "name": "platform",
92
- "typeName": "platform",
93
- "defaultPriority": 300
94
- },
95
- {
96
- "name": "density",
97
- "typeName": "density",
98
- "defaultPriority": 200
99
- },
100
- {
101
- "name": "region",
102
- "typeName": "region",
103
- "defaultPriority": 600
104
- }
105
- ],
106
- "resourceTypes": [
107
- {
108
- "name": "json",
109
- "typeName": "json"
110
- }
111
- ]
112
- }
@@ -1,129 +0,0 @@
1
- {
2
- "name": "Enterprise Complex Configuration",
3
- "description": "Comprehensive configuration for enterprise applications with many conditional dimensions",
4
- "qualifierTypes": [
5
- {
6
- "name": "language",
7
- "systemType": "language"
8
- },
9
- {
10
- "name": "territory",
11
- "systemType": "territory",
12
- "configuration": {
13
- "allowContextList": true
14
- }
15
- },
16
- {
17
- "name": "role",
18
- "systemType": "literal",
19
- "configuration": {
20
- "allowContextList": true,
21
- "caseSensitive": false,
22
- "enumeratedValues": ["admin", "manager", "employee", "contractor", "guest", "api", "service"]
23
- }
24
- },
25
- {
26
- "name": "department",
27
- "systemType": "literal",
28
- "configuration": {
29
- "allowContextList": false,
30
- "caseSensitive": false,
31
- "enumeratedValues": ["hr", "finance", "engineering", "sales", "marketing", "support", "legal"]
32
- }
33
- },
34
- {
35
- "name": "environment",
36
- "systemType": "literal",
37
- "configuration": {
38
- "enumeratedValues": ["development", "testing", "staging", "production", "dr"]
39
- }
40
- },
41
- {
42
- "name": "tenant",
43
- "systemType": "literal",
44
- "configuration": {
45
- "allowContextList": false,
46
- "caseSensitive": true,
47
- "enumeratedValues": ["corp", "subsidiary1", "subsidiary2", "partner1", "partner2"]
48
- }
49
- },
50
- {
51
- "name": "feature-flag",
52
- "systemType": "literal",
53
- "configuration": {
54
- "allowContextList": true,
55
- "caseSensitive": false,
56
- "enumeratedValues": ["enabled", "disabled", "beta", "alpha"]
57
- }
58
- },
59
- {
60
- "name": "security-level",
61
- "systemType": "literal",
62
- "configuration": {
63
- "allowContextList": false,
64
- "caseSensitive": false,
65
- "enumeratedValues": ["public", "internal", "confidential", "restricted"]
66
- }
67
- }
68
- ],
69
- "qualifiers": [
70
- {
71
- "name": "tenant",
72
- "typeName": "tenant",
73
- "defaultPriority": 1000
74
- },
75
- {
76
- "name": "environment",
77
- "typeName": "environment",
78
- "defaultPriority": 950,
79
- "token": "env"
80
- },
81
- {
82
- "name": "securityLevel",
83
- "typeName": "security-level",
84
- "defaultPriority": 900,
85
- "token": "security"
86
- },
87
- {
88
- "name": "homeTerritory",
89
- "typeName": "territory",
90
- "defaultPriority": 850,
91
- "token": "home",
92
- "tokenIsOptional": true
93
- },
94
- {
95
- "name": "currentTerritory",
96
- "typeName": "territory",
97
- "defaultPriority": 800
98
- },
99
- {
100
- "name": "language",
101
- "typeName": "language",
102
- "defaultPriority": 750
103
- },
104
- {
105
- "name": "role",
106
- "typeName": "role",
107
- "defaultPriority": 700
108
- },
109
- {
110
- "name": "department",
111
- "typeName": "department",
112
- "defaultPriority": 650,
113
- "token": "dept"
114
- },
115
- {
116
- "name": "featureFlag",
117
- "typeName": "feature-flag",
118
- "defaultPriority": 600,
119
- "token": "feature",
120
- "tokenIsOptional": true
121
- }
122
- ],
123
- "resourceTypes": [
124
- {
125
- "name": "json",
126
- "typeName": "json"
127
- }
128
- ]
129
- }
@@ -1,87 +0,0 @@
1
- {
2
- "name": "Gaming Application Configuration",
3
- "description": "Configuration tailored for gaming applications with device and graphics quality considerations",
4
- "qualifierTypes": [
5
- {
6
- "name": "language",
7
- "systemType": "language"
8
- },
9
- {
10
- "name": "territory",
11
- "systemType": "territory"
12
- },
13
- {
14
- "name": "platform",
15
- "systemType": "literal",
16
- "configuration": {
17
- "enumeratedValues": ["pc", "console", "mobile", "vr", "ar"]
18
- }
19
- },
20
- {
21
- "name": "graphics-quality",
22
- "systemType": "literal",
23
- "configuration": {
24
- "allowContextList": false,
25
- "caseSensitive": false,
26
- "enumeratedValues": ["low", "medium", "high", "ultra", "rtx"]
27
- }
28
- },
29
- {
30
- "name": "player-level",
31
- "systemType": "literal",
32
- "configuration": {
33
- "allowContextList": false,
34
- "caseSensitive": false,
35
- "enumeratedValues": ["beginner", "intermediate", "advanced", "expert", "pro"]
36
- }
37
- },
38
- {
39
- "name": "game-mode",
40
- "systemType": "literal",
41
- "configuration": {
42
- "enumeratedValues": ["single", "multiplayer", "cooperative", "competitive", "tutorial"]
43
- }
44
- }
45
- ],
46
- "qualifiers": [
47
- {
48
- "name": "platform",
49
- "typeName": "platform",
50
- "defaultPriority": 850
51
- },
52
- {
53
- "name": "language",
54
- "typeName": "language",
55
- "defaultPriority": 800
56
- },
57
- {
58
- "name": "territory",
59
- "typeName": "territory",
60
- "defaultPriority": 750
61
- },
62
- {
63
- "name": "graphics",
64
- "typeName": "graphics-quality",
65
- "defaultPriority": 700,
66
- "token": "gfx"
67
- },
68
- {
69
- "name": "playerLevel",
70
- "typeName": "player-level",
71
- "defaultPriority": 600,
72
- "token": "level"
73
- },
74
- {
75
- "name": "gameMode",
76
- "typeName": "game-mode",
77
- "defaultPriority": 550,
78
- "token": "mode"
79
- }
80
- ],
81
- "resourceTypes": [
82
- {
83
- "name": "json",
84
- "typeName": "json"
85
- }
86
- ]
87
- }
@@ -1,65 +0,0 @@
1
- {
2
- "name": "High Priority Language Configuration",
3
- "description": "Configuration that prioritizes language over territory, useful for internationalization-focused applications",
4
- "qualifierTypes": [
5
- {
6
- "name": "language",
7
- "systemType": "language"
8
- },
9
- {
10
- "name": "territory",
11
- "systemType": "territory"
12
- },
13
- {
14
- "name": "role",
15
- "systemType": "literal",
16
- "configuration": {
17
- "allowContextList": false,
18
- "caseSensitive": false,
19
- "enumeratedValues": ["admin", "user", "guest"]
20
- }
21
- },
22
- {
23
- "name": "platform",
24
- "systemType": "literal",
25
- "configuration": {
26
- "enumeratedValues": ["web", "mobile", "desktop"]
27
- }
28
- }
29
- ],
30
- "qualifiers": [
31
- {
32
- "name": "language",
33
- "typeName": "language",
34
- "defaultPriority": 900
35
- },
36
- {
37
- "name": "homeTerritory",
38
- "typeName": "territory",
39
- "defaultPriority": 600,
40
- "token": "home",
41
- "tokenIsOptional": true
42
- },
43
- {
44
- "name": "currentTerritory",
45
- "typeName": "territory",
46
- "defaultPriority": 500
47
- },
48
- {
49
- "name": "role",
50
- "typeName": "role",
51
- "defaultPriority": 400
52
- },
53
- {
54
- "name": "platform",
55
- "typeName": "platform",
56
- "defaultPriority": 300
57
- }
58
- ],
59
- "resourceTypes": [
60
- {
61
- "name": "json",
62
- "typeName": "json"
63
- }
64
- ]
65
- }
@@ -1,37 +0,0 @@
1
- {
2
- "name": "Minimal Basic Configuration",
3
- "description": "Simplified configuration with only essential qualifiers for basic applications",
4
- "qualifierTypes": [
5
- {
6
- "name": "language",
7
- "systemType": "language"
8
- },
9
- {
10
- "name": "device",
11
- "systemType": "literal",
12
- "configuration": {
13
- "allowContextList": false,
14
- "caseSensitive": false,
15
- "enumeratedValues": ["phone", "tablet", "desktop"]
16
- }
17
- }
18
- ],
19
- "qualifiers": [
20
- {
21
- "name": "language",
22
- "typeName": "language",
23
- "defaultPriority": 600
24
- },
25
- {
26
- "name": "device",
27
- "typeName": "device",
28
- "defaultPriority": 500
29
- }
30
- ],
31
- "resourceTypes": [
32
- {
33
- "name": "json",
34
- "typeName": "json"
35
- }
36
- ]
37
- }
@@ -1,71 +0,0 @@
1
- {
2
- "name": "Qualifier Default Values Demo",
3
- "description": "Configuration demonstrating qualifier default values functionality with language, territory, and device qualifiers",
4
- "qualifierTypes": [
5
- {
6
- "name": "language",
7
- "systemType": "language",
8
- "configuration": {
9
- "allowContextList": true
10
- }
11
- },
12
- {
13
- "name": "territory",
14
- "systemType": "territory",
15
- "configuration": {
16
- "allowContextList": false,
17
- "acceptLowercase": true
18
- }
19
- },
20
- {
21
- "name": "device",
22
- "systemType": "literal",
23
- "configuration": {
24
- "allowContextList": true,
25
- "caseSensitive": false,
26
- "enumeratedValues": ["phone", "tablet", "desktop", "watch", "tv"]
27
- }
28
- },
29
- {
30
- "name": "environment",
31
- "systemType": "literal",
32
- "configuration": {
33
- "allowContextList": false,
34
- "caseSensitive": true,
35
- "enumeratedValues": ["development", "staging", "production"]
36
- }
37
- }
38
- ],
39
- "qualifiers": [
40
- {
41
- "name": "language",
42
- "typeName": "language",
43
- "defaultPriority": 600,
44
- "defaultValue": "en-US, en-CA, en-GB"
45
- },
46
- {
47
- "name": "territory",
48
- "typeName": "territory",
49
- "defaultPriority": 500,
50
- "defaultValue": "US"
51
- },
52
- {
53
- "name": "device",
54
- "typeName": "device",
55
- "defaultPriority": 400,
56
- "defaultValue": "desktop, tablet"
57
- },
58
- {
59
- "name": "environment",
60
- "typeName": "environment",
61
- "defaultPriority": 300,
62
- "defaultValue": "production"
63
- }
64
- ],
65
- "resourceTypes": [
66
- {
67
- "name": "json",
68
- "typeName": "json"
69
- }
70
- ]
71
- }
@@ -1,68 +0,0 @@
1
- {
2
- "name": "Territory-First Configuration",
3
- "description": "Configuration that prioritizes territory/region over language, useful for region-specific applications",
4
- "qualifierTypes": [
5
- {
6
- "name": "language",
7
- "systemType": "language"
8
- },
9
- {
10
- "name": "territory",
11
- "systemType": "territory",
12
- "configuration": {
13
- "allowContextList": true
14
- }
15
- },
16
- {
17
- "name": "role",
18
- "systemType": "literal",
19
- "configuration": {
20
- "allowContextList": false,
21
- "caseSensitive": true,
22
- "enumeratedValues": ["ADMIN", "USER", "GUEST", "MODERATOR"]
23
- }
24
- },
25
- {
26
- "name": "environment",
27
- "systemType": "literal",
28
- "configuration": {
29
- "enumeratedValues": ["development", "staging", "production"]
30
- }
31
- }
32
- ],
33
- "qualifiers": [
34
- {
35
- "name": "homeTerritory",
36
- "typeName": "territory",
37
- "defaultPriority": 950,
38
- "token": "home",
39
- "tokenIsOptional": false
40
- },
41
- {
42
- "name": "currentTerritory",
43
- "typeName": "territory",
44
- "defaultPriority": 900
45
- },
46
- {
47
- "name": "language",
48
- "typeName": "language",
49
- "defaultPriority": 700
50
- },
51
- {
52
- "name": "role",
53
- "typeName": "role",
54
- "defaultPriority": 600
55
- },
56
- {
57
- "name": "env",
58
- "typeName": "environment",
59
- "defaultPriority": 500
60
- }
61
- ],
62
- "resourceTypes": [
63
- {
64
- "name": "json",
65
- "typeName": "json"
66
- }
67
- ]
68
- }
@@ -1,31 +0,0 @@
1
- {
2
- "name": "territory-hierarchy-test",
3
- "description": "Test configuration for territory qualifier type hierarchy support",
4
- "qualifierTypes": [
5
- {
6
- "name": "territory",
7
- "systemType": "territory",
8
- "configuration": {
9
- "allowContextList": true,
10
- "acceptLowercase": true,
11
- "allowedTerritories": ["US", "PR", "VI", "CA", "GB", "DE"],
12
- "hierarchy": {
13
- "PR": "US",
14
- "VI": "US"
15
- }
16
- }
17
- }
18
- ],
19
- "qualifiers": [
20
- {
21
- "name": "territory",
22
- "type": "territory"
23
- }
24
- ],
25
- "resourceTypes": [
26
- {
27
- "name": "message",
28
- "qualifiers": ["territory"]
29
- }
30
- ]
31
- }
@@ -1,32 +0,0 @@
1
- {
2
- "name": "territory-hierarchy-unconstrained",
3
- "description": "Test configuration for unconstrained territory qualifier type with hierarchy (no allowedTerritories)",
4
- "qualifierTypes": [
5
- {
6
- "name": "territory",
7
- "systemType": "territory",
8
- "configuration": {
9
- "allowContextList": true,
10
- "acceptLowercase": true,
11
- "hierarchy": {
12
- "PR": "US",
13
- "VI": "US",
14
- "GU": "US",
15
- "AS": "US"
16
- }
17
- }
18
- }
19
- ],
20
- "qualifiers": [
21
- {
22
- "name": "territory",
23
- "type": "territory"
24
- }
25
- ],
26
- "resourceTypes": [
27
- {
28
- "name": "message",
29
- "qualifiers": ["territory"]
30
- }
31
- ]
32
- }